Emersion Platform Main Concepts

Here comes description of main principles used in Emersion Platform. It is strongly recommended for developers to understand these concepts to get using Platform more productively and be able writing applications (plug-ins) for it.

Plug-in Framework

Platform plug-ins infrastructure is based on the Java Plug-in Framework (JPF) - open source general purpose library intended to help building "highly extendible" applications. Refer to the project web site to get framework documentation.

The Platform is organized as a set of plug-ins. Each plug-in contributes some functionality and/or resources to the system. Plug-ins are related with each other through dependencies. The most significant concept in plug-in framework is extension point and extension. Briefly, extension point is a "place" in the application that can be extended somehow. Extension - is that "thing", which adds functionality to the extension point.

Physically, plug-in consists of a manifest file (that introduces plug-in to the system) and any number of classes, libraries and other files of any kind. There is no predefined plug-in structure, developers may organize plug-in resources as they want.

It is strongly recommended to review JPF documentation before further reading.

Applications Platform

The Platform application as "system entry point" forms one plug-in - org.emersion.platform. It is activated by "boot class" when Emersion starts up.

There is currently only one extension point declared in this plug-in - PlatformApplication. The idea here is that actual "server" (or "service", or "background") applications should plug into Platform as extensions of this point. The Web Server application (described bellow) is implemented as extension to this point.

Web Server

The plug-in is org.emersion.platform.webserver. To be a Platform application there is declared (and implemented :) webserver extension that connected to PlatformApplication extension point.

The Web Server is designed to be a "real" Java Servlet/JSP container but actually implemented in container independent manner. This is achieved by declaring set of extension points. The first is WebServer extension point. It is expected that Servlet/JSP container implementations will be plugged into Platform as extensions to this point. For now, the Open Source Servlet/JSP container Apache Jakarta Tomcat is plugged into Platform and actually provides all Web Server functionality.

The next important extension point, declared in the plug-in is WebContext. This is most important part of the plug-in as it provides possibility to deploy web application as extensions of this point. The WebContext extension point is actually abstracts standard Servlet container contexts to get them available for Platform as part of plug-in. The most interesting and noteworthy fact here is that many "usual" standard Java web applications may be "wrapped" as Platform plug-ins and thus plugged into Platform without any changes. The working examples are demo applications shipped with Tomcat (available as plug-in fragment with org.apache.tomcat.compat-5.5.4 plug-in) and tutorial applications shipped with Jakarta Struts (available as plug-in fragment with org.apache.struts-1.2.4 plug-in).

The last but not least extension point declared in org.emersion.platform.webserver is WebContextFragment extension point. The purpose of this point is to provide possibility to "split" resources of web application (declared as extension of WebContext) between several plug-ins. This is extremely useful feature if you are going to develop "extendible" web applications (like Platform Workplace, see description bellow). Contributing to this extension point, other plug-ins may extend functionality of your web application.

Embedded Tomcat

The Apache Jakarta Tomcat is embedded into Platform to provide actual implementation of standard Java Servlet/JSP container. This is achieved with two plug-ins. First is org.apache.tomcat.compat-5.5.4. This is "wrapper plug-in" of Tomcat 5.5 series container, that is Open Source implementation of Servlet 2.4 and JSP 2.0 specifications. The next plug-in here is org.emersion.platform.webserver.tomcat. This is "adapter" plug-in that holds "glue" classes which is actually embed Tomcat into Emersion Platform.

It is expected that other plug-ins will never depend directly on these two as they are "concrete implementation" of "abstract" web server, introduced by org.emersion.platform.webserver plug-in.

Workplace

The Workplace is Platform "control center" - GUI application (only web interface, for the moment), developers, administrators and other application maintainers will use to manage applications, deployed into Platform.

It is expected that other web applications will plug some their functionality into Workplace to alloy users control and manage applications work. The (now hypothetical) example may be the web forum application. Usual forum visitors will see and use only "main" forum application that is deployed into Platform as common web application. But for forum managers there maybe available a special interface embedded into Workplace to get them possible to manage forum. The only thing forum manager should know in such scenario is the link to Workplace and have permissions to access it.

The Workplace is now in heavy development stage. The more functionality will ready, the more documentation will be available here.