Git Product home page Git Product logo

akka_reactive-flows's Introduction

Reactive Flows

Reactive Flows is a demo project showing a Reactive web app built with:

  • Scala
  • Akka
  • Akka Cluster Sharding
  • Akka Data Replication
  • Akka HTTP
  • Akka Persistence
  • Akka SSE (Server-Sent Events)
  • AngularJS

Usage

  • Important: Reactive Flows makes use of advanced JavaScript which isn't yet available in Chrome, so make sure to use Firefox or Safari
  • To run the first node, execute rf1 in an sbt session; you can shutdown the app with reStop
  • To run further nodes, execute sbt rf2 or sbt rf3 from the command line; stop the app with CTRL+C
  • As the names and labels of the flows aren't persisted, you have to create them after the app has started; see below examples
  • Important: Reactive Flows uses a shared journal for Akka Persistence; this single point of failure gets started on the first node, if you shutdown this one all others will fail

REST API Examples

curl -i 127.0.0.1:9001/flows
curl -i -H 'Content-Type: application/json' -d '{ "label": "Akka" }' 127.0.0.1:9001/flows
curl -i -H 'Content-Type: application/json' -d '{ "label": "AngularJS" }' 127.0.0.1:9001/flows
curl -i -H 'Content-Type: application/json' -d '{ "text": "Akka rocks!" }' 127.0.0.1:9001/flows/akka/messages
curl -i 127.0.0.1:9001/flows/akka/messages

curl -N 127.0.0.1:9001/messages
curl -i -H 'Content-Type: application/json' -d '{ "text": "Akka and AngularJS are a great combination!" }' 127.0.0.1:9001/flows/akka/messages
curl -i -H 'Content-Type: application/json' -d '{ "text": "AngularJS rocks!" }' 127.0.0.1:9001/flows/angularjs/messages

curl -i -X DELETE 127.0.0.1:9001/flows/akka

curl -X DELETE 127.0.0.1:9001

Contribution policy

Contributions via GitHub pull requests are gladly accepted from their original author. Along with any pull requests, please state that the contribution is your original work and that you license the work to the project under the project's open source license. Whether or not you state this explicitly, by submitting any copyrighted material via pull request, email, or other means you agree to license the material under the project's open source license and warrant that you have the legal authority to do so.

License

This code is open source software licensed under the Apache 2.0 License.

akka_reactive-flows's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.