Home » Tag Archives: Akka (page 2)

Tag Archives: Akka

Akka Typed Actors: Exploring the receiver pattern

akka-logo

In the previous article we looked at some of the basic features provided by Akka Typed. In this article and the next one we’ll look a bit closer at some more features and do that by looking at the two different patterns provided by Akka Typed: the Receiver and the Receptionist pattern. If you’re new to Akka Typed, it might ...

Read More »

Akka Typed: First steps with typed actors in Scala

akka-logo

With the [release of Akka 2.4.0| http://akka.io/news/] a couple of weeks ago the experimental Akka Typed module was added. With Akka Typed it is possible to create and interact with Actors in a type safe manner. So instead of just sending messages to an untyped Actor, with Akka Typed we can add compile time type checking to our Actor interactions. ...

Read More »

Divided We Win: an event sourcing / CQRS prospective on write and read models separation. Commands and Events.

akka-logo

In today’s post we are going to unveil some very interesting (in my opinion) architecture styles: event sourcing and command query responsibility segregation (CQRS). Essentially, in both of them events are in the heart of the system design and reflect any changes of the state which are happening. It is quite different from the traditional CRUD architecture where usually only ...

Read More »

Backpressure in action with websockets and akka-streams

akka-logo

So in the previous article I showed how you could create a websocket server using akka-streams. In this follow up article we’ll look a bit closer on how backpressure works with websockets (and probably any TCP based protocol on top of akka). To show you this we’ll use the same setup as we did in the article on visualizing backpressure. ...

Read More »

Akka samples with scala and Spring

akka-logo

I was looking around recently for Akka samples with Spring and found a starter project which appeared to fit the bill well. The project however utilizes Spring-Scala which is an excellent project, but is no longer maintained. So I wanted to update the sample to use core Spring java libraries instead. So here is an attempt on a fork of ...

Read More »

Quasar and Akka – a Comparison

akka-logo

The actor model is a design pattern for fault-tolerant and highly scalable systems. Actors are independent worker-modules that communicate with other actors only through message-passing, can fail in isolation from other actors but can monitor other actors for failure and take some recovery measures when that happens. Actors are simple, isolated yet coordinated, concurrent workers. Actor-based design brings many benefits:     ...

Read More »

The Bet With Typesafe That Got Me Into Building Akka

akka-logo

Back to the drawing board: The lost lines of code on the road to Akka Streams, Akka HTTP and Akka Typed If you’ve ever been curious about how new core features are being developed and why your favorite technologies take on a certain path, you’ve reached the right place. In the new design decisions series on the Takipi blog you’ll ...

Read More »

Alternating between Spray-servlet and Spray-can

akka-logo

On a server you may want to deploy your application as a war. How to build a war with spray-servlet. Locally it’s easiest to run without an application server. We include both the spray-servlet and spray-can dependencies: name := "sprayApiExample" version := "1.0" scalaVersion := "2.11.6" libraryDependencies ++= { val akkaV = "2.3.9" val sprayV = "1.3.3" Seq( "io.spray" %% ...

Read More »

Building a war with spray-servlet

akka-logo

We will use spray-servlet to build a war file of our API. So we can run it in a java app server. I assume we already have a working REST API. We will need a web.xml, under src/main/webapp/WEB-INF/: <?xml version="1.0"?> <web-app> <listener> <listener-class>spray.servlet.Initializer</listener-class> </listener> <servlet> <servlet-name>SprayConnectorServlet</servlet-name> <servlet-class>spray.servlet.Servlet30ConnectorServlet</servlet-class> <async-supported>true</async-supported> </servlet> <servlet-mapping> <servlet-name>SprayConnectorServlet</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> </web-app> We need an sbt plugin to ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns