On Tue, Aug 12, 2014 at 8:27 AM, Tim Pigden <[email protected]> wrote:
> My application occasionally needs to read and write files. > Specifically I've got a file store of data project files - each one of > which is maybe 10mb of xml with possibly an accompanying 2-3 mb of csv. > The xml is currently being read with scala XML.loadFile(fileName) and the > csv is being loaded into an input stream for processing using a java > library for parsing and then various tools to process the data. > > Likewise the write (xml only) is just doing a straight write. > > It doesn't happen *a lot* - maybe 40-50 loads per day - as once loaded the > files are loaded the data is managed through akka persistence - so the xml > is the initial state (or starting snapshot). > > In test, it's working fine. It's not going to scale to 100s or 1000s of > loads per day in the foreseeable future and on my home computer at least, > the loading is taking sub-second times. > > 1. should I even bother to convert this to some non-blocking protocol? > You should use a dedicated dispatcher for these blocking actors, but if you have a limited number and not too high load blocking IO might be just fine. > 2. If so, is there some pre-existing code to do simple files? I see stuff > for for TCP/IP but nothing for files. > Inspiration can be found here: https://github.com/drexin/akka-io-file /Patrik > > Tim > > -- > >>>>>>>>>> Read the docs: http://akka.io/docs/ > >>>>>>>>>> Check the FAQ: > http://doc.akka.io/docs/akka/current/additional/faq.html > >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user > --- > You received this message because you are subscribed to the Google Groups > "Akka User List" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Patrik Nordwall Typesafe <http://typesafe.com/> - Reactive apps on the JVM Twitter: @patriknw -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
