Ignite Web Console allows to configure all the cluster properties and import schema from a database for integrating with persistence stores. Ignite Web Console will connect to the specified database and generate all the required OR-mapping configuration (XML and pure Java) and Java domain model POJOs.
Ignite also ships with
org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStore, which is out-of-the-box JDBC implementation of the IgniteCacheStore interface, and automatically handles all the write-through and read-through logic.
You can watch the following videos to see how to automatically import schema metadata from an RDBMS, start an Ignite cluster and load data from the database, and use Ignite web console to run SQL queries on distributed data stored across the cluster:
Ignite Web Agent, a special Java application should be started near your RDBMS. This application collects the database schema metadata and sends it to the Ignite Web Console.
Web Console Hosting and Logo
For the simplicity of this guide, an already deployed instance of Ignite Web Console is used. The instance is hosted on GridGain infrastructure and GridGain embeds its logo as a part of the console interface. You'll see the logo on the screenshots below. Note that you're free to deploy Ignite Web Console on an alternative infrastructure and use other logo.
If the Ignite Web Agent is not already started, the Web Console will display a dialog box prompting you to download the Web Agent and start it. The Web agent should be started on the computer that has access to the RDBMS from which the schema will be imported.
After the Web Agent is started and connected to the Web server, you will see a step-by-step wizard to import the schema from the database. Note that you may need to copy the JDBC driver for your database to the
jdbc-drivers folder of the Ignite Web Agent.
- Configure connection to the database.
- Select schemas to load the tables from.
- Select tables to import as domain model and configure mapping those tables to caches. By default, each table will be imported to a separate partitioned cache.
- Specify various import options and select the cluster that should be associated with the generated caches.
After importing the schema, you can go to the Summary screen and download the project that contains the following:
- Spring XML configurations for cluster and caches.
- Java code for cluster and caches configuration.
- Java code for Server and Client nodes startup.
- Java code for data preloading from an underlying RDBMS.
- Java code for POJOs.
- pom.xml with project description.
The project generated by Ignite Web Console contains a variety of ready-to-use artifacts as described above.
The following needs to be done if you want to preload data from the underlying RDBMS quickly:
secret.propertiesfile in the project downloaded from the Web Console, and set the JDBC driver related parameters like JDBC URL, name and password to the values you used at the schema importing stage with Ignite Web Console.
- Start a server node using either
- Initiate data preloading from the database into Ignite caches using
To learn more about the project's structure and existing artifacts, refer to project's README file that contains a thorough explanation of the content.