how many times can you spot the letter "c" in:
application code should focus on application and/or business logic. lifecycle and infrastructure concerns should be left to the underlying infrastructure. infrastructure just needs input from the application where such input cannot be automatically derived. the design of squbs does exactly this: allowing infrastructure to plug in infrastructure concerns without disturbing the application in any way.
tangling of large systems comes from tight coupling of the type system. akka, being a message passing system, can avoid type coupling altogether allowing for modules to live together without any type dependency on each others. however, the common way of starting actors needs actors to have type coupling between each others. for instance, context.actorof(props[myactortype]) requires the caller to import myactortype and thus causes a type dependency to myactortype. such couplings cannot be categorized as loose coupling. squbs allows creation of loosely-coupled components called "cubes" that may only communicate by messages known to both parties. to what degree such cubes should be used depends on the complexity of the service, and whether the functionality provided by a cube is optional or not. a very small "microservice" may be all implemented in one cube. a more complex service that has common modules shared with other services may want to implement that common logic as a separate cube (much more than a separate library as that is usually tightly-coupled). an admin console that may be deployed with all services but rarely communicates with the services directly should definitely be implemented as a separate cube.
don't repeat yourself. the drop-in design of squbs allows for at-most-once coupling. this generally means cubes can be dropped in by just adding them to the dependency list or runtime classpath. no real call into the cube is required as this will cause dependencies both in the code and in the dependency list/classpath. removing the loosely-coupled module will therefore be as easy as removing it from the runtime classpath or dependency.
most of the low-level components of the application that deal with application lifecycle and monitoring are common across applications. a minimal framework dealing with the lifecycle management will hide and abstract away such duplications. this will standardize the paas and load balancer interfaces and allows developers to focus on their concern (application logic) and dramatically reduces the variation of scripts and configuration needed to support the applications.
we realize the emergence of the thin platform and try to keep squbs as lightweight and non-imposing as possible. as a result, we have squbs-unicomplex which is the core container in charge of bootstrapping and managing the state and lifecycle of the runtime. it pulls in virtually no dependency beyond scala and akka and does not impose further requirements or frameworks on the developer. any other framework can be included by the developer as needed.
squbs: how do you wish to start supporting infrastructure such as admin consoles? mixing in creates a compile-time dependency as well as developer awareness and violates both separation of concerns and loose coupling.
squbs: so you need both the dependency in your build definition as well as modifying the application to call into initialization code? this violates separation of concerns, loose coupling, and dry.
developer: we can provide lifecycle scripts how to start our application.
squbs: this means we need a separate lifecycle scripts for each application. this would be duplication of effort to have different scripts for each application?
developer: we need to write our own health check page.
squbs: having standardized admin cube allows all squbs applications to be viewed similarly.
developer: we would need to configure paas and load balancer for the application.
squbs: we should not need to have separate configurations for each application. we should not maintain these many configurations, one per application. this is duplication of effort. we would not achieve separation of concern with this. should we not standardize?
squbs: how should a unified cloud management/paas environment cleanly shut down the application such as at flex-up or flex-down?
squbs: how do you make sure the shutdown script gracefully terminates the process without causing any state and data corruption?
developer: we take care of graceful shutdown of the application.
squbs: so each application will have to take care of this themselves. shutdown is not trivial. what if there are bugs in the shutdown process. this is best handled by standard scripts, separate from the application and will avoid both duplication of efforts as well as separation of concerns.
user
I counted 199 "c"s in that text.
assistant