Posts

Showing posts with the label SBT

Spark Streaming and Kafka Integration Example

Image
Spark Streaming and Kafka Integration Example Introduction         My search online for a good tutorial on Big Data processing using Spark Streaming and Kafka ended up in a bunch of old posts which had very old versions of Spark and Kafka client libraries. They were of no use to me if I wanted to use the newer versions of the libraries. Hence I decided that I should share my experience with the newer versions of the libraries. This was the motivation for me to come up with this post. This post will give you a comprehensive overview of Spark Streaming and Kafka Integration. The use case that I am trying to address in this post is to process streaming data from a topic on Kafka using Spark Streaming. This is a very common use case that many organizations large and small are implementing these days.         I will be presenting 2 examples in this post. One example will print the stream of data from a Kafka Topic as it receives it and...

REST API using Play Framework with Java

Image
REST API using Play Framework with Java Introduction           In the latest Play 2.6 release, they have decided not to support Activator. I was searching online for a basic application in the latest  Play 2.6 release . But I could not find any post or tutorial . Hence I decided to come up with this post.   In this post, we will be creating an Application using Play Framework in Java with GET, POST, PUT and DELETE APIs for CRUD operations on an Employee Entity class. To keep things simple, all data will be kept in memory in a simple map. Play as a framework does support UI as well, however in this tutorial we will be focusing only on the services part and not the UI. Play Framework                 Play Framework is built on Akka and is based on a lightweight, stateless, web-friendly architecture. Play provides predictable and minimal resource consumption (CPU, memory, threads) for highly-scalab...

REST API and CRUD Operations with Akka HTTP

Image
REST API and CRUD Operations with Akka HTTP Introduction         In this post, we will be creating an Akka HTTP Application with GET, POST, PUT and DELETE APIs for CRUD operations on an Employee Domain class. All data will be kept in memory in a Vector. Akka HTTP         The Akka HTTP modules implement a full server- and client-side HTTP stack on top of akka-actor and akka-stream. It’s not a web-framework but rather a more general toolkit for providing and consuming HTTP-based services.  Most important features that Akka HTTP provides are:                Asynchronous processing  Non blocking I/O operations  For more details on Akka HTTP, you can check: Akka HTTP Website . Requirements to Run the Application: 1. Intellij IDE with SBT and Scala Plugins In this tutorial I will help you to build an Akka HTTP Application in a few simple steps. Step 1: Dependencies ...