Announcing Akka 24.05: More Security. More Performance. More Efficiency. Watch the Webinar Replay
akka akka-edge

What is Akka Edge?

Patrik Nordwall Akka Tech Lead, Lightbend, Inc.

Being able to serve, collect, and process data closer to devices in the Internet of Things becomes more and more important. The sheer amount of data from all devices can be massive and the cost for sending every piece of data collected to a central place in the cloud can easily become prohibitive. Low latency demand with near real-time responses requires having the data nearby and providing additional compute power that may not exist in the devices themselves. Geographical distribution of the application improves reliability and reduces the risk for outages.

For example, there are many use cases for having vehicles communicate with each other, or with local devices such as traffic lights, information signs, distribution points, either in a single geographic area or a wide area:

  • Traffic coordination and status reporting.
  • Support self-driving vehicles with AI decisions.
  • Fleet tracking, coordination and communication.

The communication between the vehicles and local devices would not be point-to-point, but via a local PoP (point of presence). Akka Edge supports implementing these PoPs: Not only can it manage the communication between the devices in the area, but also aggregate or filter information based on importance and send that to more central cloud services. It can receive information from cloud services and propagate relevant information to the devices.

The benefits of having vehicles in an area communicate locally with each other and devices instead of through the cloud include:

  • Isolation from wider area network faults.
  • Communication can be far more chatty without overwhelming ingress/egress in the cloud, allowing much higher scales.
  • Much lower latencies.

Akka Edge will help you develop these types of distributed systems. Akka Edge is a major new feature of Akka, but you will find it surprisingly similar to other parts of Akka. This familiarity has been a key goal when designing Akka Edge. As Jonas Bonér said, Akka Edge: Unifying the Cloud and Edge.

Akka Edge shares several building blocks with what we had in Akka earlier. These tools build on top of each other and are composed slightly differently depending on what is needed. The main building blocks are:

  • Event sourced entities.
  • Projections.
  • Cluster.
  • Brokerless service-to-service communication.

Event sourcing is not only a way to store the state of an actor. Event sourcing is the foundation for fully event driven systems, with events as the way to communicate between different services all the way to the edge. Akka has promoted event sourcing and event driven from the very beginning, but with Akka Edge the full power of event driven systems becomes more concrete.

Akka Projections is the way to consume events from event sourced actors, and resume processing where it left off in case of failures or other restarts. The classical example of a projection is a database representation that is tailored for queries, but it can be so much more, such as event driven communication all the way to the edge.

There can be many event sourced entities and projections that must be scaled over more than one node. Akka Cluster makes it possible to scale stateful systems horizontally. Akka Distributed Cluster makes it possible to distribute those clusters geographically around the globe.

Projections can be local, within one cluster, or between different services of different clusters. With Akka Edge, those projections can now also be producing or consuming events in edge services. Between clusters or edge services the events are delivered with brokerless service-to-service communication , which is using gRPC as a network and infrastructure friendly transport.

As said, this should be very familiar to you if you are already using Akka, but I can assure you that there were many challenges that had to be solved to support the Edge cases (pun intended):

  • Network connections can only be established from the Edge.
  • Edge services may be disconnected for a long while.
  • Edge services may only have access to transient storage.
  • Scaling to many edge services.
  • Scale to zero.

We will explain how we solved those problems in upcoming blog posts.

Learn more and study the sample application in the Akka Edge guide .



The Total Economic Impact™
Of Lightbend Akka

  • 139% ROI
  • 50% to 75% faster time-to-market
  • 20x increase in developer throughput
  • <6 months Akka pays for itself