Chapter 13. Embedded Data Grid (Library Mode)

Embedding Data Grid in a custom OpenShift application, or running in Library Mode, is intended for specific uses only:

  • Using local or distributed caching in custom Java applications to retain full control of the cache lifecycle. Additionally, when using features that are available only with embedded Data Grid such as distributed streams.
  • Reducing network latency to improve the speed of cache operations. Although it is worth noting that the Hot Rod protocol provides near-cache capabilities that achieve equivalent performance of a standard client-server architecture.

Embedding Data Grid also has some limitations:

  • Persistence to a cache store is not currently supported. You can embed Data Grid for in-memory caching only.
  • Only DNS_PING is supported for clustering.
  • TCP is supported for the ping port.
  • UDP is not supported with embedded Data Grid.
Important

Red Hat highly discourages embedding Data Grid to build custom caching servers to handle remote client requests. Use the datagrid-service server implementation. It is fully supported and benefits from regular updates with performance improvements and security fixes.