Skip to content

Commit

Permalink
Merge pull request #167 from akka/main
Browse files Browse the repository at this point in the history
chore: Merge main to java-spi
  • Loading branch information
patriknw authored Jan 20, 2025
2 parents d15c21b + d744ee2 commit 49a96d2
Show file tree
Hide file tree
Showing 10 changed files with 332 additions and 434 deletions.
282 changes: 92 additions & 190 deletions docs/src/modules/concepts/images/geo-c.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
314 changes: 93 additions & 221 deletions docs/src/modules/concepts/images/geo-d.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
93 changes: 93 additions & 0 deletions docs/src/modules/concepts/images/geo-e.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 10 additions & 6 deletions docs/src/modules/concepts/pages/multi-region.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,31 @@ Akka's replicated reads offers full data replication across regions and even clo

image:geo-a.svg[Geo data replication, width=600]

In the image above, the entity representing Alice has its primary region in Los Angeles. When a user in the primary region performs a read request image:steps-1.svg[width=20], the request is handled locally, and the response sent straight back image:steps-2.svg[width=20].
In the image above, the entity representing Alice has its primary region in Los Angeles. When a user A in the primary region performs a read request image:steps-1.svg[width=20], the request is handled locally, and the response sent straight back image:steps-2.svg[width=20].

When the user in the primary region performs a write request image:steps-1.svg[width=20], that request is also handled locally, and a response sent directly back image:steps-2.svg[width=20]. After that write request completes, that write is replicated to other regions image:steps-3.svg[width=20], such as in London (UK).

A user in London, when they perform a read image:steps-4.svg[width=20], that read operation will happen locally, and a response sent immediately back image:steps-5.svg[width=20].
A user B in London, when they perform a read image:steps-4.svg[width=20], that read operation will happen locally, and a response sent immediately back image:steps-5.svg[width=20].

A user can also perform write operations on entities in non-primary regions.

image:geo-b.svg[Geo data replication, width=600]

In this scenario, a user in London (UK) is performing a write operation on the Alice entity image:steps-1.svg[width=20]. Since London is not the primary region for the Alice entity, Akka will automatically forward that request to the primary region image:steps-2.svg[width=20], in this case, Los Angeles (USA). That request will be handled in the USA, and a response sent directly back to the user image:steps-3.svg[width=20].
In this scenario, the user B in London (UK) is performing a write operation on the Alice entity image:steps-1.svg[width=20]. Since London is not the primary region for the Alice entity, Akka will automatically forward that request to the primary region image:steps-2.svg[width=20], in this case, Los Angeles (USA). That request will be handled in the USA, and a response sent directly back to the user image:steps-3.svg[width=20].

image:geo-c.svg[Geo data replication, width=600]

When Bob makes a request in the UK on his data image:steps-1.svg[width=20], that request is handled locally image:steps-2.svg[width=20], and replicated to the US image:steps-3.svg[width=20], while Alice's requests in the USA with her data are handled locally in the USA, and replicated to the UK.
When Bob makes a request in the UK on his data image:steps-1.svg[width=20], that request is handled locally image:steps-2.svg[width=20], and replicated to the US image:steps-3.svg[width=20]. Exactly the same as Alice's requests in the USA with her data are handled locally in the USA, and replicated to the UK.

The data however is still available in all regions. If Bob travels to the USA, he can still access his data.
The data however is still available in all regions. If Bob travels to the USA, he can access his data in the Los Angeles region.

image:geo-d.svg[Geo data replication, width=600]

When Bob travels to the USA, read requests that Bob makes on his data are handled locally image:steps-1.svg[width=20], while write requests are forwarded to the UK image:steps-2.svg[width=20]. Meanwhile, write requests made by Alice on her data is all handled locally image:steps-4.svg[width=20] image:steps-5.svg[width=20], with writes being replicated to the UK image:steps-6.svg[width=20].
When Bob travels to the USA, read requests that Bob makes on his data are handled locally image:steps-1.svg[width=20] and getting an immediate reply image:steps-3.svg[width=20]. Write requests, on the other hand, are forwarded to the UK image:steps-2.svg[width=20], before the reply is sent image:steps-3.svg[width=20].

image:geo-e.svg[Geo data replication, width=600]

Meanwhile, all requests made by Alice on her data are handled locally image:steps-1.svg[width=20] and get an immediate reply image:steps-2.svg[width=20]. The write operations are being replicated to the UK image:steps-3.svg[width=20].

=== Primary selection

Expand Down
2 changes: 1 addition & 1 deletion docs/src/modules/operations/pages/regions/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ When you deploy a service it will run in all regions of the project. When you ad
[[selecting-primary]]
=== Selecting primary for stateful components

Stateful components like Event Sourced Entities or Workflow can be replicated to other regions. For each stateful component instance there is a primary region, which handles all write requests. Read requests can be served from any region. See xref:java:event-sourced-entities.adoc#_replication[Event Sourced Entity replication] and xref:java:workflows.adoc#_replication[Workflow replication] for more information about read and write requests.
Stateful components like Event Sourced Entities and Workflows can be replicated to other regions. For each stateful component instance there is a primary region, which handles all write requests. Read requests can be served from any region. See xref:java:event-sourced-entities.adoc#_replication[Event Sourced Entity replication] and xref:java:workflows.adoc#_replication[Workflow replication] for more information about read and write requests.

There are two operational choices for deciding where the primary is located:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ akka services list [flags]
----
> akka services list
NAME AGE INSTANCES STATUS IMAGE TAG
shopping-cart 4h20m 3 Ready 0.0.2
NAME AGE INSTANCES STATUS IMAGE TAG SYNC STATUS
shopping-cart 4h20m 3 Ready 0.0.2 Synced
----

== Options
Expand Down
Binary file modified docs/supplemental_ui/bundle/akka-theme-ui-001-bundle.zip
Binary file not shown.
18 changes: 9 additions & 9 deletions docs/supplemental_ui/partials/drop-down-developers.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@
<div class="drop-down-content">
<div class="col">
<h3>Docs</h3>
<a href="/java/index.html">SDK</a>
<a href="https://doc.akka.io/libraries/">Libraries</a>
<a data-context="Mega Menu - Developers - Docs" href="/java/index.html">SDK</a>
<a data-context="Mega Menu - Developers - Docs" href="https://doc.akka.io/libraries/">Libraries</a>
</div>
{{!-- <div class="divider"></div> --}}
<div class="col">
<h3>Resources</h3>
<a class="kapa-trigger kapa-modal-open-ai hidden">Ask AI</a>
<a href="https://www.akka.io/blog">Blog</a>
<a href="/reference/release-notes.html">Release Notes</a>
<a href="https://portal.akka.io">Support</a>
<a data-context="Mega Menu - Developers - Docs" class="kapa-trigger kapa-modal-open-ai hidden">Ask AI</a>
<a data-context="Mega Menu - Developers - Docs" href="https://www.akka.io/blog">Blog</a>
<a data-context="Mega Menu - Developers - Docs" href="/reference/release-notes.html">Release Notes</a>
<a data-context="Mega Menu - Developers - Docs" href="https://portal.akka.io">Support</a>
</div>
{{!-- <div class="divider"></div> --}}
<div class="col">
<h3>Architecture</h3>
<a href="https://www.reactiveprinciples.org/">Principles</a>
<a href="https://akkademy.akka.io/">Free Training</a>
<a href="https://www.akka.io/certified-reactive-architect">Certification</a>
<a data-context="Mega Menu - Developers - Docs" href="https://www.reactiveprinciples.org/">Principles</a>
<a data-context="Mega Menu - Developers - Docs" href="https://akkademy.akka.io/">Free Training</a>
<a data-context="Mega Menu - Developers - Docs" href="https://www.akka.io/certified-reactive-architect">Certification</a>
</div>
</div>
</div>
Expand Down
27 changes: 27 additions & 0 deletions docs/supplemental_ui/partials/drop-down-get-started.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<span class="drop-down button-drop-down">
<a class="button sm:!m-0 !hidden lg:!inline-block cursor-default">Get Started</a>
<div class="drop-down-content-wrapper right">
<div class="drop-down-content get-started">
<div class="col">
<a data-context="Mega Menu - Get Started" href="https://console.akka.io/register">
<h3>
Try Akka for free
</h3>
<p class=" text-soft-gray leading-snug">Deploy and scale a multi-region app<br>No credit card required</p>
</a>
<a data-context="Mega Menu - Get Started" href="https://doc.akka.io/java/author-your-first-service.html">
<h3>
Develop your own Akka app
</h3>
<p class=" text-soft-gray leading-snug">Akka account not required<br>Free and open SDK for offline dev</p>
</a>
<a data-context="Mega Menu - Get Started" href="https://akka.io/request-a-demo">
<h3>
Request demo
</h3>
<p class=" text-soft-gray leading-snug">Personalized demo<br>Akka app design consultation</p>
</a>
</div>
</div>
</div>
</span>
10 changes: 5 additions & 5 deletions docs/supplemental_ui/partials/drop-down-sdk.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<div class="drop-down-content">
<div class="col">
<h3>SDK</h3>
<a href="/java/key-value-entities.html">Key Value Entities</a>
<a href="/java/event-sourced-entities.html">Event Sourced Entities</a>
<a href="/java/views.html">Views</a>
<a data-context="Mega Menu - SDK" href="/java/key-value-entities.html">Key Value Entities</a>
<a data-context="Mega Menu - SDK" href="/java/event-sourced-entities.html">Event Sourced Entities</a>
<a data-context="Mega Menu - SDK" href="/java/views.html">Views</a>
</div>
<div class="col">
<h3 class="hidden sm:inline-block">&nbsp;</h3>
<a href="/java/timed-actions.html">Timers</a>
<a href="/java/workflows.html">Workflows</a>
<a data-context="Mega Menu - SDK" href="/java/timed-actions.html">Timers</a>
<a data-context="Mega Menu - SDK" href="/java/workflows.html">Workflows</a>
</div>
</div>
</div>
Expand Down

0 comments on commit 49a96d2

Please sign in to comment.