-
Notifications
You must be signed in to change notification settings - Fork 2
Overview
Lagom is a battle-tested framework, offering great development environment out of the box, easy deployment configuration and great documentation about Event Sourcing and CQRS which is not trivial for the average engineer.
So lagom-pb adds to Lagom a set of tools that can make the development of both REST and gRPC micro-services even easier by:
-
Hiding all the distractions of Akka concepts when necessary
-
Allowing simple and by the book events and commands handler
-
Using Google Protocol Buffers for the definitions of commands, events and state and making use of the same for REST API requests and response
-
Offering out of the box simple instrumentation using Kamon
-
Commands handlers : given current state of an entity and some command, validate the command and return an event (or fail). So we can depict a command handler as follow:
(Command, State) => Event. -
Events handlers: given current state of an entity and an event, return a new state for that entity (never fail!). So we can depict an event handler as follow:
(Event, State) => State.
As much as these concepts are sweetly handled in Lagom they do not make it flexible for a developer to focus solely on the business logic because they have to deal with some Akka concepts.
So we believe given the developer simple interfaces with very limited Akka concepts can enhance velocity in implementation and in testing by merely focusing on what is at stake which is the business model. Of course some Google Protocol Buffers knowledge are needed.
We will see in the upcoming sections how one can easily implement an events and commands handlers.
Copyright © 2020 superflat