The XP runtime is the foundation of XP apps
Traditional Micro services typically combine a runtime (JavaVM, NodeJS etc) with specific application code Once started, the micro service will occupy a set of resources (CPU, memory and disk) through its lifetime.
The XP runtime is capable of running in both stateful (using the embedded NoSQL storage) and stateless mode. A single instance deployment will do both, but a clustered deployment may for instance be split into back-end and front-end nodes.
The runtime is also capable of running multiple applications within a single instance. Applications are isolated from each other using OSGi, a dynamic module system for the JVM.
This provides a range of possibilities:
Better utilization of underlying infrastructure
Modularization without performance degradations due to network traffic
Simplified testing and developer environment
An example of when these features are useful, is the XP CMS. For a single site, multiple applications may be involved in the processing of a request. The applications may be dynamically added to or removed from a site - without any downtime.
The XP runtime is capable of utilizing multiple underlying multi-core CPUs for vertical scaling. This is useful for applications with heavy load, but also important from a development perspective. As the XP runtime is multi-threaded, developers may also benefit from a simpler development model. Simpler debugging, and the ability to run threaded operations when needed are just some of the benefits. The XP task engine for instance runs all tasks as separate threads.
XP can also be scaled horizontally through a cluster of runtime nodes.
There are multiple ways of rolling out apps on Enonic XP.
The most dynamic is through the apps API. This actually persists applications in the XP storage. Events cause runtime instances to pick up and start the new apps automatically.
Enonic XP ships with a Software Development Kit. The SDK is essentially the entire platform with both back-end and front-end offered in a single runtime. The major difference between the SDK and Server versions of XP is that the SDK builds on the Java Development Kit, where the server version is a leaner and more optimized version of the Java VM.