All Projects → tomduhourq → akka-streams-example

tomduhourq / akka-streams-example

Licence: other
Example on Akka Streams with productive cases

Programming Languages

scala
5932 projects
HTML
75241 projects

Projects that are alternatives of or similar to akka-streams-example

Safe Chat
IRC-style chat demo featuring full-stack F#, Akka.Streams, Akkling, Fable, Elmish, Websockets and .NET Core
Stars: ✭ 157 (+685%)
Mutual labels:  akka-streams
Quark
Quark is a streaming-first Api Gateway using Akka
Stars: ✭ 13 (-35%)
Mutual labels:  akka-streams
kanadi
Kanadi is a Nakadi client for Scala
Stars: ✭ 20 (+0%)
Mutual labels:  akka-streams
Akka Stream Contrib
Add-ons to Akka Stream
Stars: ✭ 173 (+765%)
Mutual labels:  akka-streams
reactive-streams-in-java
Code for "Reactive Streams in Java" book
Stars: ✭ 19 (-5%)
Mutual labels:  akka-streams
akka-cookbook
提供清晰、实用的Akka应用指导
Stars: ✭ 30 (+50%)
Mutual labels:  akka-streams
Akka Stream Eventsourcing
Event sourcing for Akka Streams
Stars: ✭ 105 (+425%)
Mutual labels:  akka-streams
thoth
Event sourcing in java with vavr, akka stream and vertx reactive PG driver
Stars: ✭ 27 (+35%)
Mutual labels:  akka-streams
telepooz
Functional Telegram Bot API wrapper for Scala on top of akka, circe, cats, and shapeless
Stars: ✭ 26 (+30%)
Mutual labels:  akka-streams
khermes
A distributed fake data generator based in Akka.
Stars: ✭ 94 (+370%)
Mutual labels:  akka-streams
Otoroshi
Lightweight api management on top of a modern http reverse proxy
Stars: ✭ 177 (+785%)
Mutual labels:  akka-streams
fdp-modelserver
An umbrella project for multiple implementations of model serving
Stars: ✭ 47 (+135%)
Mutual labels:  akka-streams
slicebox
Microservice for safe sharing and easy access to medical images
Stars: ✭ 18 (-10%)
Mutual labels:  akka-streams
Pulsar4s
Idiomatic, typesafe, and reactive Scala client for Apache Pulsar
Stars: ✭ 172 (+760%)
Mutual labels:  akka-streams
Akka
Examples and explanations of how Akka toolkit works
Stars: ✭ 20 (+0%)
Mutual labels:  akka-streams
Parquet4s
Read and write Parquet in Scala. Use Scala classes as schema. No need to start a cluster.
Stars: ✭ 125 (+525%)
Mutual labels:  akka-streams
akka-streams-interleaving
Akka Streams example of how to interleave Sources with priorities
Stars: ✭ 28 (+40%)
Mutual labels:  akka-streams
akka-http-streaming-response-examples
A list of examples that involve streaming with Akka Streams and used together with Akka HTTP
Stars: ✭ 73 (+265%)
Mutual labels:  akka-streams
akka-http-circe-json-template
Akka HTTP REST API Project Template using Akka HTTP 10.0.4 with Circe 0.7.0 targeting Scala 2.12.x
Stars: ✭ 21 (+5%)
Mutual labels:  akka-streams
alpakka-samples
Example projects building Reactive Integrations using Alpakka
Stars: ✭ 61 (+205%)
Mutual labels:  akka-streams

scala-hashtags-akka-streams

A personal example to learn Akka Streams basics and Docker

This includes:

  • Basic example on bank accounts and web sockets taken from Paul Kinsky's intro to akka-streams
  • Blocking Twitter consumption to show Graph DSL
  • Streaming Twitter Publisher Actor pipeline on to a file
  • Akka Http streaming endpoints that consume the files from both processes
  • Tests - I couldn't get to use the akka-stream-testkit yet

Usage:

$ sbt run

will bring up a couple of main classes to run:

  • you might want to choose the Server.scala to make both endpoints (tweets and websockets) available
  • StreamingHashtags.scala to boot up a streaming processing of tweets on to a file on your /target directory
  • BlockingHashtags.scala will output both to console and to a file named interesting-tweets.txt the most recent tweets that interested me according to the file on src/resources/interesting-hashtags.txt
$ sbt test

will output some tests results, they test most of the machinery behind these examples and common Sources, Flows and Sinks.

PS: Don't forget to fill in your twitter creds in order to access the Twitter API. This is on the Twitter.scala file.

API

  • / will pop up the bank accounts backendish frontend, if you fill in a name and an amount and click on an action you should be able to see the bank's current state if you inspect what's going on on the browser's console
  • /ws this endpoint is used by the bank accounts frontend to send the Withdraw or Deposit action through the websocket
  • /tweets/blocking will bring up the contents of a local file in your target folder. You need to run BlockingHashtags.scala before.
  • /tweets/streaming will bring up the contents of a local file in your target folder, product of running StreamingHashtags.scala

Docker

I used the awesome sbt-docker plugin to push this project and run it as a container anywhere, free of installing Scala or sbt. Just remember to configure where to push it on the imageName field on build.sbt

$ sbt dockerBuildAndPush

should do the trick for you.

Contributing

Feel obviously free to contribute to this project, open a pull request, or an issue and I'll be happy to address it. I've just started out with this awesome tool, constructive criticism is accepted.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].