As before, we will start with an implementation of the simplest of our workers, which just performs basic mathematical operations in order to do its work with Cook, which makes RawCookies out of Dough.
Lagom's APIs
Service API
In order to define our Cook as a service we need to implement a special interface called a service descriptor. The service descriptor defines two aspects of a Lagom service:
- The service signature: How the service should be called and its return type
- The service meta data: How the service call is mapped to the transport layer, for example to the REST call
The service descriptor extends Lagom's Service trait and in its simplest form just needs to override the descriptor method. This is what...