Browse files

Overview and usage instructions

  • Loading branch information...
krasserm committed Aug 11, 2012
1 parent c35d91e commit f2de91894031d0c77c0e7c6bef7987a43e607cbf
Showing with 22 additions and 2 deletions.
  1. +20 −2
  2. +2 −0 src/main/scala/org/eligosource/eventsourced/example/service/PaymentService.scala
@@ -1,14 +1,32 @@
This project re-implements [eventsourcing-example]( based on the Eligosource [Eventsourced]( library.
This project re-implements [eventsourcing-example]( based on the Eligosource [Eventsourced]( library. Regarding library usage, it demonstrates how to
- implement command-sourcing (for managing state of invoices)
- implement event-sourcing (for managing state of payment processes and for recording usage statistics)
- implement domain services (to handle requests via UI and XML/JSON API)
- implement business processes (to deal with long-running background activities)
- recover from crashes (incl. recovery of business processes)
Compared to the [old implementation](, domain events are now decoupled from the immutable domain model. Web UI and XML/JSON API are built on top of [Jersey](, [Scalate]( and [JAXB]( A [Play]( version will follow (which supports asynchronous responses in contrast to Jersey).
First checkout and build the [Eventsourced]( library
git clone git://
cd eventsourced
sbt publish-local
Then checkout the example application run it
git clone git://
cd eventsourced-example
sbt 'run-nobootcp org.eligosource.eventsourced.example.server.Webserver'
Then go to [http://localhost:8080](http://localhost:8080) and create some invoices.
Finally go to [http://localhost:8080](http://localhost:8080) and create some invoices.
@@ -20,6 +20,8 @@ class PaymentService(invoiceComponent: Component) extends Actor {
// because payments may take several days to arrive ...
Future { invoiceComponent.inputChannel ! Message(InvoicePaymentReceived(invoiceId, amount)) }
// here we assume that an external payment service will
// retry notifying us should this app be not available

0 comments on commit f2de918

Please sign in to comment.