Apache Ignite provides JDBC driver and write-behind caching features.
Is there a way to sync data between Ignite and MySQL using write-behind strategy if data is added to Ignite using its JDBC driver?
The data flow is as follows:
app -Ignite JDBC driver
-> Ignite -MySQL JDBC driver
-> MySQL.
If you use SQL (cache queries or Ignite JDBC) to operate on data in Ignite, then read-through, write-through and write-behind semantics is not respected for the configured cache store.
You need to load data into cache, using IgniteCache#loadCache(...) method, for example first to be able to query it from SQL.
If you need write-behind semantics, then you should use cache key-value API.
Another option is to abandon MySQL and use Ignite native persistence. This way data will be preserved on cluster restarts. It allows you operate on data from any API and eliminates the need to replicate it to another database.