Apache Ignite for C++

Ignites's In-Memory Data Fabric for C++ is designed to deliver uncompromised performance for a wide set of in-memory computing use cases through native, optimized C++ APIs.

Ignite C++ is built on top of Ignite. This allows you to perform almost all the in-memory data grid operations including Basic Cache Operations, ACID Transactions, SQL Queries, and Distributed SQL Joins, on replicated or partitioned caches distributed across the cluster.

Ignite also supports Cross-Platform Interoperability allowing applications to seamlessly interoperate between Java, .NET, and C++ by writing and reading objects to and from the cache, respectively, in a common binary format. Additionally, both Ignite .NET and Ignite C++ provide native APIs and their implementations that delegate most of the calls to Java using JNI. Here, it is worth mentioning that the JNI overhead is minimal and does not cause any performance degradation, especially in distributed environments where network is the main obstacle. Furthermore, Ignite provides a pure C++ implementation of the Binary Marshaller to contribute to the perfomance.

Code Examples:
                            // Get cache instance.
                            Cache<int, std::string> cache = grid.GetCache<int, std::string>("myCache");

                            // Store keys in cache (values will end up on different cache nodes).
                            for (int i = 0; i < 10; ++i)
                            {
                                std::stringstream value;
                                value << i;

                                cache.Put(i, value.str());
                            }

                            for (int i = 0; i < 10; ++i)
                                std::cout << "Got [key=" << i << ", val=" << cache.Get(i) << "]";
                        
                            Transaction tx = transactions.TxStart();

                            int hello = cache.Get("Hello");

                            if (hello == 1)
                              cache.Put("Hello", 11);

                            cache.Put("World", 22);

                            tx.Commit();
                        
                            Cache<int, Person> cache = grid.GetOrCreateCache<int, Person>("personCache");

                            SqlQuery qry("Person", "Salary < 1000");

                            QueryCursor<int, Person> cursor = cache.Query(qry);

                            // Iterate over results.
                            while (cursor.HasNext())
                              std::cout << cursor.GetNext().GetKey() << std::endl;
                        
                            Cache<int, Person> cache = grid.GetOrCreateCache<int, Person>("personCache");

                            // SQL join on Person and Organization
                            // to find all persons working for Ignite organization.
                            SqlQuery qry("Person", "from Person as p, \"orgCache\".Organization as org"
                                "where p.OrgId = org.Id "
                                "and org.name = Ignite");

                            QueryCursor<int, Person> cursor = cache.Query(qry);

                            // Iterate over results.
                            while (cursor.HasNext())
                              std::cout << cursor.GetNext().GetKey() << std::endl;
                        
GitHub Examples:

Also see Ignite C++ examples available on GitHub.

Get started with Ignite C++