Learning Akka Streams 1.0 with simple examples.
- InMemory: running a simple stream.
- DefineStreams: running a simple Sink.fold stream - calculate the sum of an integer stream.
- ReactiveTweets: stream filters case class objects.
- FileReader: reading file content and output the content to stdout
- EchoServer: an echo tcp server implementation in four lines :)
- SimpleServer: tcp server understands one command.
- ReplClient: tcp server understands two commands.
- SinkActorRef: connect a simple actor as sink.
- MyActorSubscriber: ActorSubscriber example
- HttpClientFlowBased: reading from urls and write the content to stdout and calculates the packet and byte count. Two implementations: onComplete and functional.
- HttpClientFlowBased2: reading from urls and write the content to stdout and calculates the packet and byte count (functional).
- HttpClientFlowBased3: reading from Elasticsearch or CouchDb and store the content into Elasticsearch. Implementation with two asynchrous streams.
- Group: Using Flow.group and groupWithin: Chunk up this stream into groups of the given size or within a time window. Todo: terminate a running stream.
- BalanceMerge: Using Balance and merge. Split the implementation in a Flows and Graphs object.
- TcpServer2: Same as EchoServer, but reusing the Flows and Graphs definitions from BalanceMerge.
- HttpLowLevelServer: using the akka http low level server API.
- HttpLowLevelServerAsync: the async implementation.
- HttpLowLevelServerAsyncFlow: running a flow on the HttpRequest data.
- HttpHighLevelServerMinimal: using the akka http high level server API and requires akka-http-xml-experimental (build.sbt).
- HttpHighLevelServerRoutes: playing with route composition.
- Some examples needs a running Elasticsearch installation. See Elasticsearch Setup and Installation instructions
Requirements: java >= 1.6, sbt, optional scala-ide
git clone ...
Build and run:
sbt run
Prepare Scala-Ide:
sbt eclipse
and import project.
- Do's and Dont's When Deploying Akka in Production
- Reactive Kafka source code
- Akka Reactive Streams example
- Connecting dots with Akka Streams - microservice, implementing sink and source - error handling
- Comparing Akka Streams and Scalaz Streams with code examples
- Java Code Geeks - Building a REST service in Scala with Akka HTTP, Akka Streams and reactive mongo