large_platform
large_platform

Build services

Services (Akka apps) are packaged binaries and microservices that contain your domain, application logic, and components. You create processing flows by wiring components together with your application logic. 

 

akka-service-02

 

akka-service-01

Simple SDK

Create durable, real-time services exposed as APIs with an SDK that enables a rapid inner dev loop, integration with your favorite IDEs, and offline local development.

Entity

Build apps that act as their own in-memory, durable, and replicated database. 

Streaming

Streaming producers and consumers enable real-time data integration.

Endpoint

Design HTTP and gRPC APIs. 

View

Access multiple entities or retrieve entities by attributes other than entity id.

Workflow

Execute durable, long-running processes with point-in-time recovery.

Timer

Execute actions with a reliability guarantee.

SDK-components-to-clean-code

 

Avoid technical debt

Create high velocity teams with an inner dev loop that separates domain logic from distributed dependencies. Your business logic is yours - build and test domain logic without decorators or leaky API pollution. Akka’s components inject distributed, responsive intelligence during the build.

placeholder

With Akka: Domain Separation
Keep your business logic yours. Build and test domain code like your first ‘Hello, World’ program. Akka components inject intelligence at build with an inner loop that moves as fast as your fingers.

separation-duties-clean-code

 

placeholder

Without Akka : Polluted Domain Logic
Decorating domain code or calling APIs to distribute data or improve resilience creates technical debt, cross-team friction, and coherence leaks.

separation-duties-polluted-code

 

No local cloud required

Developers locally create and debug chained, networked services that execute as local binaries without having to install local cloud infrastructure.

Binaries generated from SDK dependencies are included and compiled at build time enabling offline development.

  • Service-to-service local discovery and messaging
  • No packing
  • No Docker Compose
  • No database
  • No Kubernetes

 

SDK-sandbox

 

Local console and event debugger

Local console, event debugger, sandboxes, and separation of concerns ensures high dev velocity with minimal local configuration.

SDK-event-debugger-screenshot

 

 

Local operations console for visualizing distributed architecture components and their data flows. 

Track entity state changes and visualize modifications to the networked, durable event log. 

Leverage your favorite IDE’s build, run, debugger, and AI add-on to generate and test large blocks of Akka code with minimal prompting.

Fast unit and integration testing

Execute local unit and integration tests for components with a built-in Testkit that enables invocation and assertion comparisons of component responses.

Execute single-component unit tests embedded as binaries or with a built-in networked endpoint.

Execute multi-component integration tests by executing an entire service with component client and endpoint interactions.

 

what-test-kit

 

Components

Endpoints are HTTP- and gRPC-accessible APIs that execute in a serverless execution environment. Use Endpoints for creating or augmenting apps that are exposed over multi-region routes. 

 

akka-component-endpoint

 

// API definition
@Get("/hello") 
public String hello() { }

// Path parameters
@Get("/hello/{name}/{age}") 
public String hello(String name, int age) { }

// Serializable JSON inputs
@Post("/hello")
public String hello(<< serializable_custom_type >>) { }

// Protocol exception handlers
HttpException.<< helper_methods >>
GrpcException.<< helper_methods >>

// Asynchronously invoke other APIs and services
client.POST("/custom/url") 
  .withRequestBody(<< insert_request >>)
  .invokeAsync() 
  .thenApply(<< handle_response >>)

// Streaming requests and custom media types
request.entity()
  .toStrict(1000, materializer)
  .thenApply(<< collect_response >>)

Entities are microservices that act as their own in-memory, durable database with strongly consistent transactions. Entity state is sharded horizontally, replicated across regions, and persisted.

 

akka-component-entity-1

 

// Custom key-value storage
class <<my class>> extends KeyValueEntity 

// Storage for custom state and event types
class <<my class>> extends EventSourcedEntity

// Key value state update
effects()
  .updateState(newCounter)
  .thenReply(newCounter)

// Event driven state changes
effects()
  .persist(event)
  .thenReply(<< return_status >>)

// Event driven state changes
switch (event) {
  case << event_type >> -> << event_handler >>
  case << event_type >> -> << event_handler >>
}

Workflows are long-running, multi-step business processes that can be point-in-time recovered. Workflows are Saga orchestrators for distributed transactions.

 

akka-component-workflow

 

// Custom state definitions for workflows
class TransferWorkflow extends Workflow <TransferState>  

// Define the order of steps to be taken workflow() .addStep(withdraw) .addStep(deposit, maxRetries(2)) // Timeouts and failover for steps or workflows workflow() .timeout(ofSeconds(5)) .failoverTo("failover-handler", maxRetries(0)) // Chainable definitions for steps step("withdraw") .asyncCall(<< invoke_other_Akka_components >>) .andThen(<< transition_to_next_wf_step >>) // Effects tell Akka what operations to perform effects() .updateState(<< update_status_of_workflow >>) .transitionTo(<< next_workflow_step >>) .thenReply("we are running now") effects().error("workflow shouldn’t start") effects().reply(currentState())

Timers enable the scheduling of calls for future execution. Timers are used to set timeouts and for verifying the completion status of processes without polling or blocking.

 

akka-component-timer

 

// Schedule up to 50,000 timers with durable response
timerScheduler.startSingleTimer(
  timerName(<>), 
  Duration.ofSeconds(10), 
  componentClient
     .forTimedAction()
     .method(<< timer_handler_method >>))

// Define custom timers and handlers
class OrderTimedAction extends TimedAction {
  effects().asyncDone(<< timer_handler >>)
}

// Guaranteed to run at least once
// Can be scheduled to run at a future time
// Can be cancelled
// Automatically removed upon successful completion
// Rescheduled upon failure with retry limits

Views are aggregations of data that can be queried. Views enable complex reads of data to be independently executed and scaled apart from write operations. Views updates are triggered by events, messages, and state changes.

 

akka-component-view

 

// Query a View with data from a single entity
@Query("”” SELECT id, name FROM customers 
           WHERE name = :customerName “”") 

// Update a view from a Topic
@Consume.FromTopic(“<< topic_name >>”)

// Parameterized queries
@Query("SELECT id FROM << view_type >> 
  WHERE name = :<< parameter_name >>") 
    queryMethod (String << parameter_name >>) {}

// Multiple results can generate collections or streams
// View indexes created based upon query structure

// Query filter predicates - logical operators
// Query filter predicates - comparison operators
// Query filter predicates - array operators

// Query pattern matching
SELECT * FROM customers WHERE name LIKE 'Bob%'

// Text, numerical, boolean, byte, & timestamps

// Sorting and paging results
SELECT * FROM customers 
  WHERE name = :name 
  AND age > :min_age 
  ORDER BY age DESC

// Joins, multiple tables, and projections

Producers and consumers enable stream-based interaction between Akka services and the outside world. 

 

akka-component-streaming

 

// Stream state change events from entities
@Consume.FromEventSourcedEntity(<< akka_entity_name >>) 
@Consume.FromKeyValueEntity(<< akka_entity_name >>) 

// Consume an event with a custom event handler
onEvent(<< entity_event >>) { 
  return switch (event) {
    case << event_type >> -> << handle_event >>
    case << event_type >> -> << handle_event >>
  };
}

// Effects are Akka instructions how to handle an event
effects().done()
effects().ignore()

// Produce a new event with an effect
effects().produce(<< new_event >>, << metadata >>)

// Send events to other Akka services
@Produce.ServiceStream(id = << my_event_stream_name >>) 
@Acl(allow = @Acl.Matcher(service = "*"))

// Views can consume events and update state
effects().updateRow(<< new_state >>)

// Consume and produce CloudEvents from Pub/Sub topics
@Consume.FromTopic(value = “<< topic_name >>“)
@Produce.ToTopic(“<< topic_name >>“)

Interactions between services, components, and the outside world are asynchronous event streams programmed with a simple, procedural style.

 

// Asynchronously invoke other components
componentClient.<< component_name >> 
  .method(<< your_component_method >>)
  .invokeAsync();

Automated operations

Operate apps with automation that does not require DevOps to understand the app’s infrastructure: clouds, regions, databases, Kubernetes, VMs, and proxies.

Monitor, log, and trace

Visualize logs, metrics, and traces in real-time with the Akka control tower or stream to a terminal.

Akka supports integration with your preferred observability protocols including, Open Telemetry, Prometheus remote write, and Splunk HEC. 

heat-maprequests-per-second

p99-processing

graph view

Replication

Elastic to workload changes

Akka operating environments perform cold start and automatic adjustment of app instances as traffic spikes or idles.

Logs, metrics and traces visualized within a per-service dashboard or exported to your preferred observability tooling.

sharding

 

Resilient to failures

Akka automatically snapshots app instances and executes change data capture of individual state changes for entities. Akka replays snapshots and entity events sequentially to automate restoration after a failure.  

 

empty-recovered-state

 

Akka apps run in an Akka operating environment, which provides automation for elasticity, agility, and resilience. Your apps can deploy into environments managed by us or you. Federate your private regions with public regions available at Akka.io to enable cross-region replication.

federate

 

Akka provides managed services and self-hosted software that automates the lifecycle of your applications enabling them to maintain their own SLA. Akka environments orchestrate microservices, handle elasticity scaling events, configure gateways and proxies as topologies change, and manage persistence access for entities, events and views.

 

Operate apps across clouds and geos

Multi-Master Replication of app data across regions with automated cutovers leverage location transparency to enable apps to move from one location to another without users experiencing downtime. 

Zero-downtime upgrades, cloud-to-cloud, serverless to BYOC, and repatriation migrations are all supported.

 

replicate

 

 

multi-cloud-replication-types

 

Freedom to move

Avoid lock-in and downtime during migrations. Akka apps move from one location to another without users experiencing downtime through replication of data across regions with automated cutovers. Support for cloud upgrades, cloud-to-cloud migrations, Serverless to BYOC, and repatriation migrations.

migrate

 

Start with one place

Design, build and deploy apps within a single location.

Regional migration

Add regions for apps to replicate across. 

Custodial migration

Retire an app in one place after movement to a second. Mix Akka-managed regions with self-managed.

Infrastructure upgrades

Promote read-only regions to writable for rolling infra updates. 

Version and schema updates

Apps automatically adapt to schema changes with end user traffic rerouting.

 

 

 

Clustering from within

The Akka runtime executes as an embedded kernel. Akka clustering, also from within, enables your apps to discover, join, participate, and leave a cluster automatically and across networking boundaries.

akka-runtime

 

The Akka runtime

  • Scheduling: compute, threads
  • Data: flows, shards, replication
  • Communication: cluster membership, I/O
  • Resilience: self-healing actions, split brain resolution
  • Akka creates a ring of physical nodes to execute instances
  • Akka places instances in more than 1 bucket for redundancy
  • Akka monitors service request traffic to add / remove nodes
  • Akka rebalances instances and data as ring size changes

The G.O.A.T. libraries

Yes, after 1B downloads, we're comfortable claiming the Akka libraries are the Greatest Of All Time for building distributed systems. ;)

icon_service_mesh_yellow

Simpler concurrent & distributed systems

Actors and Streams let you build systems that scale up, using the resources of a server more efficiently, and out, using multiple servers.

icon_security_yellow

Resilient by Design

Building on the principles of The Reactive Manifesto Akka allows you to write systems that self-heal and stay responsive in the face of failures.

icon_dynamics_yellow

Elastic & decentralized

Distributed systems without single points of failure. Load balancing and adaptive routing across nodes. Event Sourcing and CQRS with Cluster Sharding. Distributed Data for eventual consistency using CRDTs.

icon-reactive_yellow

Reactive streaming data

Asynchronous non-blocking stream processing with backpressure. Fully async and streaming HTTP server and client provides a great platform for building microservices. Streaming integrations with Alpakka.

icon_launch_yellow

High performance

Up to 200 million msg/sec on a single machine. Small memory footprint; ~2.5 million actors per GB of heap.

Stay Responsive
to Change.