[kepler-dev] Reading files in Kepler

Christopher Brooks cxh at eecs.berkeley.edu
Fri Feb 6 13:29:58 PST 2009


Hi Michal,
Try LineReader or ExpressionReader, the will avoid
the problem of reading in the entire file.

See also:
http://ptolemy.eecs.berkeley.edu/ptolemyII/ptIIfaq.htm#reading%20data%20from%20files?

FileReader reads the entire file and sends the contents to its
output.  A BufferedFileReader would be an interesting actor, but
the semantics might be a little unusual because it would not be clear
how much data would be read and sent.  The buffer size could be
specified as a parameter and the BufferedFileReader could send a string
of at most the buffer size.

_Christopher


Michal Owsiak wrote:
> Hello all,
> 
> I have a question regarding reading files within Kepler.
> 
> I have attached simple example. There is a file which I want to read.
> File content is passed to other actor later on. According to source code
> of File Reader actor, it seems that Kepler will load all the data from
> file before sending it to other actor. Is it so?
> 
> In that case, how can I read very large files (>>1GB) into Kepler actor?
> 
> Is it possible to use some sort of streaming actor? I'd like to pass
> data between actors in streaming mode instead of tokens (but I am not
> sure whether this solutions is even possible inside workflow paradigm).
> 
> Cheers
> 
> Michal
> 
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Kepler-dev mailing list
> Kepler-dev at kepler-project.org
> http://mercury.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev

-- 
Christopher Brooks (cxh at eecs berkeley edu) University of California
CHESS Executive Director                      US Mail: 337 Cory Hall
Programmer/Analyst CHESS/Ptolemy/Trust        Berkeley, CA 94720-1774
ph: 510.643.9841 fax:510.642.2718	      (Office: 545Q Cory)
home: (F-Tu) 707.665.0131 (W-F) 510.655.5480


More information about the Kepler-dev mailing list