The Java implementation used as a reference, both for correctness and “how long would this take to do in Java”, is a lightly modified version of this implementation, taken from the git repo of the original article. Implementation This section is going to be considerably larger than previous parts as it’s less abstracted, and not as large as one might … Continue reading “Using Scala to Read Really, Really Large Files – Part 7: The Reference Implementation”
Using Scala to Read Really, Really Large Files – Part 6: FS2 (core)
In the Part 5 we evaluated FS2, a functional streams library which aims to be safe and simple, using the fs2-io helper module. In this part, we’ll evaluate FS2, using only the core module. Implementation Ergonomics 😀 Once written, this version is easier to work with than using the fs2-io helpers: there’s no implicits to keep track of, and relying on … Continue reading “Using Scala to Read Really, Really Large Files – Part 6: FS2 (core)”
Using Scala to Read Really, Really Large Files – Part 4: Akka Streams
Akka Streams is an implementation of Reactive Streams, which intends to bring sanity to handling asynchronous streams of large quantities of data. As a bonus, they provide both a Scala and a Java DSL, which can be handy as moving between Java and Scala is really only easy when calling Java methods from Scala code. Implementation Note: if you’re curious … Continue reading “Using Scala to Read Really, Really Large Files – Part 4: Akka Streams”
Using Scala to Read Really, Really Large Files – Part 3: better-files
better-files is a dependency-free pragmatic thin Scala wrapper around Java NIO README.md Basically: scala.io.Source, done right. It’s simple enough that the user manual fits in the github landing page. Implementation Ergonomics 😀 One of the really nice parts of this library is that the various iterators it creates close themselves when the end of the file is reached or an … Continue reading “Using Scala to Read Really, Really Large Files – Part 3: better-files”