Contents

Apart from the exhaustive list of pre-built Microservices, custom Microservices can be written, built, and deployed into the Fiorano Platform by developers. To aid developers in service creation, the platform provides a template engine to generate the skeleton code for custom services in Java, C, C++, C# (.Net). User can create a component in any language, add the business logic and deploy it in the Fiorano environment.

Creating a new Microservice

To create a new microservice, go to Tools > Create Service Component to open the Micro Service Creation Wizard (Figure 2).


Figure 1: Menu containing Create Service Component action

All the details related to the creation of a new microservice must be specified in this wizard. Various steps in microservice creation are illustrated below.

Microservice Location

This is the location where the component source code and other required files to be generated has to be saved.

  • Parent DirectoryProvide the absolute path where the folder has to be saved, for example, D:\New\Services
  • Destination DirectoryProvide the name of the folder to be saved under the above location.

    Icon

    Provide a new name here; if the folder name already exists, then the wizard does not allow proceeding to the next panel.

A new folder with the name specified for Destination Directory will be created in the Parent Directory specified, which will be the final location for the microservice files generated by the wizard. 


Figure 2: Service Location Panel in the Micro Service creation wizard

Basic Details

The basic details of the microservice need to be provided here.

  • Service Guid: Provide a name using which the system uniquely identifies the microservice
  • Name: Display Name of the microservice.
  • Version: This value will be pre-populated and it can be edited as well.


    Figure 3: Basic Details panel
  • Category: The components that are registered in the Enterprise Server are categorized under different categories for easier maintenance as seen under the Micro Service Palette. In the Category field, a new Category name can be provided for the component or an existing Category can be selected from the available categories by clicking the button against the property. Existing Categories can be viewed by clicking the ellipsis button that appears against the Category field. On clicking ellipsis, the Category Selection dialog box appears as shown in figure below. Multiple Categories can also be selected in the dialog box. The components are shown as grouped under the category they belong to in tools; figure below illustrates the organization of categories in Fiorano eStudio


    Figure 4: Category Selection dialog box


  • Generate Source: Used to generate sources for various languages and the option Assemble From Binary is used to create System Libraries. 
  • Source Language: By default, this option is set to 'JMS'; other options are:
    • JCA
    • C
    • CPP
    • CSharp


    Figure 5: Source Language options
     
  • is CCP enabled
    • If enabled, component listens, understands and responds to control events from Peer Server. It allows components launched as a separate process to cleanup when stopping.
    • If disabled, component does not handle control events from the Peer Server. The Peer Server will not send any control event to component. Component launched in separate process is issued a destroy command to stop and the component process will be killed instantly without any cleanup.

      Icon

      This property will not be editable while editing the microservice from eStudio.

Icon

Location and Basic Details panel are the only panels in which the details are mandatory. Microservice definition can be finished any time by clicking the Finish button after the minimum required details are specified in these panels.

Ports Information

The input and output ports of the microservice can be configured here.

A new port can be added by clicking the Add button. By default, Port Type is 'Inport'. The Port Type and other port properties can be changed in the Wizard as required.


Figure 6: Ports Information

To provide schemas for the component ports, select the port and click the Edit button. A dialog box gets launched where the schemas and external schemas (if any) can be provided.

Provide the schema and click the Save button. Select the root element and click OK.

Icon
  • Root element can be selected only when the schema provided in the text area is saved by clicking the Save button.
  • To provide external schemas, right-click the Schema node and select Add External Schema option.


Figure 7: Schema Editing Window

Generate XML Beans option can be used to generate model objects based on the port schemas.

Resources

The resources required by the microservice (either during configuration time or runtime) can be added in this panel. Resources can be of any file type which is used by the component; there is no restriction on the type of file. Typically, resource files are of types – dll, zip, jar, so, exe..

The server makes a local copy of these files in the component folder. Resources can be added or removed using Add and Remove buttons respectively.


Figure 8: Resources panel

Dependencies

Dependencies are predefined. Every component or system library registered can be added as a dependency. The dependencies are referenced from the existing location and are not copied locally into the component folder.

Icon

Dependencies are loaded only once when the components are launched in-memory of same peer server, thereby reducing the memory footprint.

  • To Add: Select the dependency on the left side of the page and move it to the right side.
  • To Remove: Select the dependency on the right side of the page and move to the left side.


Figure 9: Dependencies panel

Icon

In the Resources and Dependencies panels, no resources or dependencies need to be specified for C/C++ components as they are built using static libraries and do not need any resources or libraries during runtime.

Log Modules

Logging is a practice of writing out the messages indicating the state of component, actions performed and any other related data. Logging is used for different purposes including:

  • Notifying users of important actions/changes or problems (exceptions/errors) that occur during runtime
  • Aiding developers in debugging the application
  • Understanding the flow of data among different Method calls

For each of the above purpose, the data and the details that should be logged vary. Log levels help in meeting the needs of different users.


Figure 10: Log Modules Panel

Execution Information

This panel allows the user to specify the execution details of the component. A component while executing, might require parameters to execute different request or details of handling different request. There are two ways of passing this information to the component:

  • By configuring the details in the Configuration Property Sheet of the panel (discussed in Component Configuration section)
  • By defining the command line arguments that can be passed to the component during the launch of the component. These command line arguments are captured as runtime arguments in this panel.


Figure 11: Execution Information panel

Advanced Information Configuration

This panel has the following properties:

PropertyDescription

Supports Error Handling

Enabled - Error port is shown when 'Show Error Ports' is selected
Disabled - Error port is not shown even when 'Show Error Ports' is selected

Supports Failover to another Peer Server

Enabled - When the Peer Server on which component is running goes down, the component keeps running on the next available Peer Server.
Disabled - When the Peer Server on which component is running goes down, the component will not keep running on the next available Peer Server.

Supports Manual Launch

Enabled - Component can be launched in 'Manual' mode
Disabled - Component cannot launched in 'Manual' mode

Supports Inmemory Launch

Enabled - Component can be launched in 'In Memory' mode
Disabled - Component cannot launched in 'In Memory' mode

Generate Fiorano Installation as classpath variable

Enable this to generate Fiorano Home as an eclipse variable instead of a hardcoded path In the eclipse build files generated for the component. You have to define the variable 'FIORANO_HOME' and assign it to specific Fiorano Installation directory. The .classpath file will pickup the required libraries from the specified location.



Figure 12: Advanced Configuration panel

Finishing Creation

Click the Finish button (see the figure above) to complete the process of creation.

When the wizard is finished, sources are generated in src directory which would be placed under the folder specified in the Service Location page. It also creates necessary files to build and deploy the components.

Icon

The microservice will be physically present in eStudio (in the Micro Service Palette and Micro Service Repository) after applying codes and logic as per requirement and then finally by deploying the service. Go through the next sections to understand these.

Adaptavist ThemeBuilder EngineAtlassian Confluence