Monday, May 4, 2015

Introduction to CARBON Runtimes - Part 1

What is a Runtime

When we considering a Runtime many aspects of a Runtime can be taken into consideration depending on its capabilities and features of it. For example if we consider Apache Axis2 Runtime it is a web service engine, Apache Tomcat is a implementation of the Java Servlet and JavaServer and Apache Synapse is a mediation engine likewise. Each of these Runtimes has its own features and capabilities. 


How features of a Runtime can be used

To facilitate its features a Runtime can expose different services that can be used. For example if we consider Axis2 Runtime it has Axis2Deployer which is responsible for artifact deployment and Axis2Runtime which is responsible about the Runtime aspect.


The Runtime can be utilized in Carbon by implementing the provided SPI implementations on the server. For example, by implementing the Deployer SPI, server can expose its custom deployer in such a way that it is recognised by the Deployment Engine. Likewise, Runtime SPI can be used to implement the runtime service.


Carbon Runtime Status

In the Carbon context, Runtime can be defined as an application level runtime instance that can run on top of Carbon OSGI framework. Runtime can have a different runtime status, depending on the state of the carbon server. Following diagram shows the available status options of a runtime.



Pending : A given Runtime is in idle state (before the Runtime initialization).

Inactive : The runtime has being initialized successfully. Runtimes can perform operations such as deploying artifacts.

Active : After the start() method of the runtime has been completed, the given runtime is fully functional and it can server requests to the runtime.

Maintenance : In this status, the runtime is on hold for maintenance work. That is, we are temporarily holding the serving of requests while the runtime is on intermediate/maintenance mode.

No comments:

Post a Comment