In an environment full of dynamic components, it is important to have a registry where services can register themselves and discover other services at runtime. This registry needs to maintain an updated list of available services. The ServiceLocator is the API that Lagom provides as the query mechanism to achieve these tasks. The actual implementation behind the ServiceLocator API can be chosen depending on the use case. There are plenty of technologies that provide Service Registry capabilities, such as Apache Zookeeper, Consul, or ConductR.Â
When running Lagom in development, the framework provides an in-memory service locator where all services get registered when we run sbt runAll. Although this might be sufficient for development environments, when running services in production, this will not be enough since your services would be running...