Java Magazine, Mar/Apr 2018
Component Component Component Main Class Service Figure 1 Startup of a Wookiee application ORACLE COM JAVAMAGAZINE MARCH APRIL 2018 56 microservices and containers Once that was done you still had other services to write before your product worked end to end some of which needed HTTP servers of their own This is a perfect situation for putting all of your interactions with the chosen library into its own Component Components can also be built to do things that are normally reserved for the servicespecific startup logic for instance starting up technologies or connections to servers They can even exist as their own pseudo service running alongside your service and for example accepting messages to process and respond to independently There are numerous possibilities for Components such as a supervised connection to a database with APIs for querying managed access to a health monitoring service possibly a cluster Component that messages instances of itself on other servers or a metrics coordinator that records timings and counts or one that connects to your big data stores allowing access from any Service As the next evolution of libraries Components seek to widen your applications Wookiee Commands When you are communicating using Wookiee the first step is the Command As with Services and Components you make your own Command by extending an interface The snippet below is simplified the actual version allows more flexible marshaling and asynchronous processing class MyStringCommand extends Command def execute bean CommandBean CommandResponse CommandResponse Replying
You must have JavaScript enabled to view digital editions.