Example for event resourcing, and server sent event based frontend state management.
The actual resource is the aggregate of the events. You can create a resource with PUT
modify it with POST
and mark
as deleted with DELETE
methods. Every events can be undone except creation, or the last change was from another
session. Undo events can redoed in (with) the same session(-id). It possible to remove fields on by one (except resource
id, and resource type), to clean up a resource.
docker-compose up -d
psql -U postgres -p 5433 -h localhost
lein release
lein run
- open the app
- Add new person, select it from the list above, try to apply different changes on it
- Open another session in private browser, or another browser, to see if SSE works
- check for cookies in the developer tools, it shoud have a session-id key with UUID value