Contents

Microservices may be synchronous or asynchronous. Microservices are loosely coupled allowing them to interact via exchange of messages in a flexible manner within a Fiorano Event Process. Microservices are the building blocks of Fiorano applications (Event Processes). A microservice is an application that performs a specific task (for example, sending e-mails or reading a file). Each microservice has an interface that defines the acceptable formats of each input and output. Most microservices typically require runtime parameters and other variables to be configured before they are run/executed. Configurations allow customization of microservices for the specific business scenario/situation being solved by the Event Process. Microservices can be categorized as synchronous and asynchronous, based on the manner in which a microservice is invoked for processing.

Synchronous Microservices

A synchronous microservice, as the name suggests, is invoked in a Request - Reply format. Thus the invoking client of this microservice waits for the microservice to process the request and send back the response. Fiorano synchronous microservices implement the J2EE Connector Architecture (JCA) interface, which mandates that each microservice has a single input and single output. JCA is a standard API that is part of the J2EE platform that implements synchronous function calls semantics.

The Fiorano platform includes a Business Component Development Kit (BCDK) for the development of synchronous microservices. This framework abstracts the implementation details of JCA.

All synchronous microservices can also be invoked asynchronously. This is achieved through the usage of a JMSGateway microservice that provides a layer (wrapper) on top of the BCDK to make the microservices event-driven, allowing them to be invoked using asynchronous JMS semantics.

Asynchronous Microservices

Asynchronous microservices or event-microservices are based on JMS semantics. Each asynchronous microservice can have multiple inputs and outputs. Inputs of asynchronous Fiorano microservices listen for events (JMS messages) via listeners on specific JMS destinations.

Asynchronous microservices have the concept for ports — abstracted form of JMS destinations. A port can be a queue or a topic and microservices listen to input ports for JMS messages and send JMS messages on to the output ports. An asynchronous microservice can define how many input and output ports it needs. These can be added through static definition or dynamically when a microservice is configured.

Design Choices

When developing a component in the Fiorano Platform, a design decision as to when to use a synchronous microservice versus an asynchronous microservice requires a careful understanding of the strengths of both types of microservices. The following features of both microservice types help decision making:

Synchronous microservices

  • Scheduling, error handling and connection pooling are abstracted
  • Can be deployed in external J2EE JCA containers
  • Cannot have multiple ports in output/input
  • Cannot handle server sockets
  • Cannot have runtime UI with manual intervention
  • Supports only Java programming language for microservice creation

Asynchronous microservices

  • Allows multiple input and output ports
  • Supports multiple programming languages for microservice creation like Java, C, C++, C# etc.
  • Handles server sockets
  • Allows microservice to have manual intervention
  • Does not have abstracted layers like synchronous microservices

Based on the business context, users can determine the type of microservice to use and/or create.

Adaptavist ThemeBuilder EngineAtlassian Confluence