Search code examples
akkamesosmesospheredcos

DC/OS service development with Akka


First of all, I'm new to DC/OS ...

I installed DC/OS locally with Vagrant, everything worked fine. Then I installed Cassandra, Spark and I think to understand the container concept with Docker, so far so good.

Now it's time to develop an Akka service and I'm a little bit confused how I should start. The Akka service should simply offer a HTTP REST endpoint and store some data to Cassandra.

So I have my DC/OS ready, and Eclipse in front of me. Now I would like to develop the Akka service and connect to Cassandra from outside DC/OS, how can I do that? Is this the wrong approach? Should I install Cassandra separately and only if I’m ready I would deploy to DC/OS?

Because it was so simple to install Cassandra, Spark and all the rest I would like to use it for development as well.


Solution

  • While slightly outdated (since it's using DC/OS 1.7 and you should be really using 1.8 these days) there's a very nice tutorial from codecentric that should contain everything you need to get started:

    1. It walks you through setting up DC/OS, Cassandra, Kafka, and Spark
    2. It shows how to use Akka reactive streams and the reactive kafka extension to ingest data from Twitter into Kafka
    3. It shows how to use Spark to ingest data Cassandra

    Another great walkthrough resource is available via Cake Solutions:

    1. It walks you through setting up DC/OS, Cassandra, Kafka, and Marathon-LB (a load balancer)
    2. It explains service discovery for Akka
    3. It shows how to expose a service via Marathon-LB