Red Hat Data Grid (RHDG) is an elastically scalable in-memory data store built on the open source Infinispan project.
You can use Red Hat Data Grid in two modes:
Library Mode provides binaries to build and deploy custom runtime environments. RHDG runs alongside your application in the same JVM. Your application has local access to a single node in a distributed cluster.
Remote Client-Server Mode provides a self-contained process in a container based on JBoss EAP. RHDG runs remotely and provides access to data through Hot Rod
, REST
, or Memcached
interfaces.
These quickstarts demonstrate Red Hat Data Grid features and capabilities with specific, working examples that you can reference in your own projects.
If you are using Remote Client-Server Mode, you should start with the helloworld-jdg quickstart to ensure that your server configuration is valid and you can start it successfully.
Quickstarts have Beginner, Intermediate, and Advanced levels. You should start with a level that is comfortable for you and move on to the next level as you gain expertise.
Some quickstarts are prerequisites for others that expand on certain capabilities or functionality. You should always deploy and run any prerequisite quickstarts first.
This distribution contains the following quickstarts:
Quickstart Name | Demonstrated Technologies | Shows you how to... |
---|---|---|
carmart | Data Grid, CDI | Use Data Grid instead of a relational database. |
carmart-tx | Data Grid, CDI, Transactions | Use Data Grid instead of a relational database with transactions enabled. |
eap-cluster-app | Data Grid, CDI, EJB | Access an Data Grid cache from a JBoss EAP application using JDG modules for EAP. |
helloworld-jdg | Data Grid, CDI | Use Data Grid in clustered mode with expiration. |
hotrod-endpoint | Data Grid, Hot Rod | Access Data Grid remotely through the Hot Rod protocol. |
hotrod-secured | Data Grid, Hot Rod | Securely access Data Grid remotely through the Hot Rod protocol. |
memcached-endpoint | Data Grid, Memcached | Access Data Grid remotely through the Memcached protocol. |
openshift | Data Grid, OpenShift | Complete tutorials for Data Grid on OpenShift that range from simple "Hello World" demonstrations to more advanced use cases. |
rapid-stock-market | Data Grid, Hot Rod, REST | Use compatibility mode to access data with multiple protocols. |
spring 4 | Data Grid, Spring | Use Spring 4 integration modules. |
spring 5 | Data Grid, Spring | Use Spring 5 integration modules. |
spring 4 session | Data Grid, Spring Boot, Spring Session | Use of Spring Boot and Spring Session with RHDG. |
spring 5 session | Data Grid, Spring Boot, Spring Session | Use of Spring Boot and Spring Session with RHDG. |
remote-query | Data Grid, Hot Rod, Remote Query | Query Data Grid remotely through the Hot Rod protocol. |
rest-endpoint | Data Grid, REST | Access Data Grid remotely through the REST protocol. |
secure-embedded-cache | Data Grid, CDI, REST | Secure Data Grid in Library (embedded) mode. |
cdi | Data Grid, CDI | Use Data Grid CDI and JCache extensions. |
camel-jbossdatagrid-fuse | Camel, Data Grid, REST | Use the Camel component camel-jbossdatagrid in JBoss Fuse. |
spark | Data Grid, Apache Spark | Read and write data to Data Grid and use streaming to react to data changes in real time. |
You need the following to build and run the quickstarts:
You can also run the quickstarts with JBoss Developer Studio or Eclipse.
If you have not yet done so, you must Configure Maven.
If you do not configure Maven, you must pass settings with every Maven command as follows: -s QUICKSTART_HOME/settings.xml
RHDG quickstarts use the following environment variables:
JBOSS_HOME
denotes the path to your RHDG server installation.EAP_HOME
denotes the path to your JBoss EAP installation.EAP_HOME
is a replaceable value. When you encounter it in a RHDG quickstart, change the value as appropriate.
Installation method | Installation directory |
---|---|
ZIP archive | Custom directory |
RPM | /var/lib/jbossas/ |
Installer | {USER_HOME}/EAP-6.3.0 |
JBoss Developer Studio installer | {USER_HOME}/jbdevstudio/runtimes/jboss-eap |
Where {USER_HOME}
is one of the following:
/home/USER_NAME/
"C:\Users\USER_NAME\"
Refer to the README
file in each quickstart directory for instructions on building and running the quickstart.
You can build archives without deploying the quickstarts to check for compilation errors and view the contents of the quickstart.
From the root directory of the quickstart, run $ mvn clean install
to build the archive.
Refer to JBoss Developer Contributing Guide