Cassandra with Spark 2.0 : Building Rest API !

Knoldus

In this tutorial , we will be demonstrating how to make a REST service in Spark using Akka-http as a side-kick  😉  and Cassandra as the data store.

We have seen the power of Spark earlier and when it is combined with Cassandra in a right way it becomes even more powerful. Earlier we have seen how to build Rest Api on Spark and Couchbase in this blog post, hence this will be about how to do the same thing in Cassandra.

So lets get started with the Code:

Your build.sbt should look like this :

Database Access layer:

And your Database Access layer should look like this :

Service Layer:

Now your routing file should look like this :

This blog is in the continuation of building your rest services using Spark and Couchbase and here we just changed the datastore to Cassandra, and hence I did…

View original post 92 more words

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s