Examples

Account Component

The account component example is a working, operational autonomous service with the responsibility for the basic functionality of a bank account.

It covers the following scenarios:

  • Open an account
  • Deposit to the account
  • Withdraw from the account
  • Close the account

Along with the basics of messaging and event sourcing, the sample code illustrates some more advanced concepts, including:

  • Concurrency
  • Idempotence
  • Reservation Pattern

The example includes both the component implementation as well as a client API that is used to trigger the above operations from another service, app, script, or other client.

The service is thoroughly tested, and a set of test controls (example objects) are included.

Get the Code

The full code is available on GitHub:

https://github.com/eventide-examples/account-component

Example Code in Successive Steps

The account component example's Git repository includes a number of commits whose messages are prefixed with "[STEP]".

To get a sense of these different levels of implementation elaboration, from the most basic to fully implemented, you can check out the successive steps and follow along the evolution of the service implementation.

results matching ""

    No results matching ""