Apache Ignite

GridGain Developer Hub - Apache Ignitetm

Welcome to the Apache Ignite developer hub run by GridGain. Here you'll find comprehensive guides and documentation to help you start working with Apache Ignite as quickly as possible, as well as support if you get stuck.

 

GridGain also provides Community Edition which is a distribution of Apache Ignite made available by GridGain. It is the fastest and easiest way to get started with Apache Ignite. The Community Edition is generally more stable than the Apache Ignite release available from the Apache Ignite website and may contain extra bug fixes and features that have not made it yet into the release on the Apache website.

 

Let's jump right in!

 

Documentation     Ask a Question     Download

 

Javadoc     Scaladoc     Examples

Memcached

Connect to Ignite using Memcached compatible client.

Ignite is Memcached compliant which enables users to store and retrieve distributed data from Ignite cache using any Memcached compatible client.

Currently, Ignite supports only binary protocol for Memcached.

You can connect to Ignite using a Memcached client in one of the following languages:

PHP

To connect to Ignite using PHP client for Memcached, you need to download Ignite and -

1. Start Ignite cluster with cache configured. For example :

bin/ignite.sh examples/config/example-cache.xml

2. Connect to Ignite using Memcached client, via binary protocol.

// Create client instance.
$client = new Memcached();

// Set localhost and port (set to correct values).
$client->addServer("localhost", 11211);

// Force client to use binary protocol.
$client->setOption(Memcached::OPT_BINARY_PROTOCOL, true);

// Put entry to cache.
if ($client->add("key", "val"))
    echo "Successfully put entry in cache.\n";

// Check entry value.
echo("Value for 'key': " . $client->get("key") . "\n");

Java

To connect to Ignite using Java client for Memcached, you need to download Ignite and -

1. Start Ignite cluster with cache configured. For example:

bin/ignite.sh examples/config/example-cache.xml

2. Connect to Ignite using Memcached client, via binary protocol.

MemcachedClient client = null;

try {
    client = new MemcachedClient(new BinaryConnectionFactory(),
            AddrUtil.getAddresses("localhost:11211"));
} catch (IOException e) {
    e.printStackTrace();
}

client.set("key", 0, "val");

System.out.println("Value for 'key': " + client.get("key"));

Python

To connect to Ignite using Python client for Memcached, you need to download Ignite and -

1. Start Ignite cluster with cache configured. For example:

bin/ignite.sh examples/config/example-cache.xml

2. Connect to Ignite using Memcached client, via binary protocol.

import pylibmc

client = pylibmc.Client (["127.0.0.1:11211"], binary=True)

client.set("key", "val")

print "Value for 'key': %s"%client.get("key")

Ruby

To connect to Ignite using Ruby client for Memcached, you need to download Ignite and -

1. Start Ignite cluster with cache configured. For example:

bin/ignite.sh examples/config/example-cache.xml

2. Connect to Ignite using Memcached client, via binary protocol.

require 'dalli'

options = { :namespace => "app_v1", :compress => true }

client = Dalli::Client.new('localhost:11211', options)

client.set('key', 'value')

value = client.get('key')

Memcached

Connect to Ignite using Memcached compatible client.