Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Side effect mode #360

Merged
merged 6 commits into from
Sep 23, 2024
Merged

Side effect mode #360

merged 6 commits into from
Sep 23, 2024

Conversation

jchapuis
Copy link
Member

@jchapuis jchapuis commented Sep 5, 2024

A new runModeFor method is introduced in SideEffect, with the default set to Async to ensure backward compatibility. With Async mode, it triggers in run & forget mode so that any lengthy side-effect does not delay command reply. With Sync mode, the side-effect runs to completion before the entity processes the next command: this can simplify the side-effect logic as it precludes accounting for concurrency, but can hurt the system's responsiveness.

Copy link

what-the-diff bot commented Sep 5, 2024

PR Summary

  • Additional Import and Method Update in DurableShardedEntityDeployer.scala and EventSourcedShardedEntityDeployer.scala
    They now include the import endless.core.entity.SideEffect.RunMode, which provides rules for running specific types of operations in our system. The methods for handling side effects were also updated to take more parameters and deal with them depending on the RunMode.

  • Added runModeFor in SideEffect.scala
    A new method runModeFor is now in SideEffect.scala. This method will be used to inquire about the run mode of specific operations.

  • Documentation Update
    Updated the documentation in side-effect.md to include the new changes.

  • Removal of Unused Imports
    Unnecessary matching imports were removed from a number of files to streamline the code and mitigate any issues they may cause.

  • Scala Version Update
    The application's Scala version has been updated to 2.13.14 for enhanced performance and new feature availability.

  • Change in System Shutdown Behaviour
    Added coordinated-shutdown.exit-jvm = off in akka.conf and pekko.conf. This indicates that the system will not forcibly terminate the JVM during a coordinated shutdown.

  • Test Case Refactors
    Adjusted the munitFixtures to use IOFixture in several testing suites. This change is aimed at making tests more robust and reliable.

@jchapuis jchapuis requested review from adriaanm and amiguez September 5, 2024 09:21
project/Dependencies.scala Outdated Show resolved Hide resolved
build.sbt Outdated Show resolved Hide resolved
amiguez
amiguez previously approved these changes Sep 6, 2024
Copy link
Collaborator

@amiguez amiguez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Jonas Chapuis added 6 commits September 9, 2024 08:32
A new `runModeFor` method is introduced in `SideEffect`, with the default set to `Async` to ensure backward compatibility. With `Async` mode, it triggers in *run & forget* mode so that command reply is not delayed by any lengthy side-effect. With `Sync` mode, the side-effect runs to completion before the next command is processed by the entity: this can be useful to simplify the side-effect logic as it precludes accounting for concurrency, but can hurt the system's responsiveness.
@jchapuis jchapuis added this pull request to the merge queue Sep 23, 2024
Merged via the queue into master with commit 9cc8dc2 Sep 23, 2024
1 check passed
@jchapuis jchapuis deleted the side-effect-mode branch September 23, 2024 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants