Skip to content

A template for brokerless ZeroMQ communication using Akka and Scala.

License

Notifications You must be signed in to change notification settings

sjednac/zeroweather

Repository files navigation

ZeroWeather

The goal of this project is to provide a template for a brokerless ZeroMQ communication system, which is based on Akka and Scala at its core.

The akka-zeromq extension was removed from Akka in a recent release. Check the project roadmap for an explanation of this decision and a summary of the known issues. For this reason, this project was built on JeroMQ (a pure Java implementation of ZeroMQ) and a spark-kernel module, which was rolled out as an akka-zeromq replacement by the spark-kernel team. This may be subject to change, since the communication module isn't available as a standalone library at the moment and some minor changes were applied on it as well.

Brokerless communication is currently assumed to be running in a similar fashion as "model 1" (try and failover). This may also change in the upcoming future.

Overview

Application layout

Module Role
proxy A RESTful web service for handling user requests.
supplier An internal service, which provides data from some external source.
message Domain-related messages, which are sent over ZeroMQ.
communication Socket actors for handling communication over ZeroMQ. Base implementation was taken from the spark-kernel project.

Deployment

Development mode

For rapid development feedback use the sbt-revolver plugin. To start the supplier process:

sbt ~supplier/re-start

To start the proxy process:

sbt ~proxy/re-start

Testing a distributed setup

To start a proxy process with explicit binding and an endpoint list:

sbt -Dhttp.port=8080 -Dzeromq.endpoints.0=tcp://localhost:5555 -Dzeromq.endpoints.1=tcp://localhost:5556 proxy/run

To start a supplier process with explicit binding:

sbt -Dzeromq.endpoint=tcp://localhost:5555 supplier/run

About

A template for brokerless ZeroMQ communication using Akka and Scala.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages