Going RESTful

An alternative to memcache is the even more generic RESTful API. Without wanting to go into too much detail, REST is a popular convention of providing HTTP access to data via resources. These are set up to provide path-like access to collections, objects, and properties. Hazelcast additionally provides a simple HTTP service built into each of the nodes to enable access to our standard map and queue collections via HTTP.

The structure of the API is pretty simple:

  • http://127.0.0.1:5701/hazelcast/rest/maps/<mapName>/<key>
  • http://127.0.0.1:5701/hazelcast/rest/queues/<queueName>

If <mapName> or <queueName> is as configured within our application, we can use the standard REST convention of the HTTP method to describe the type of operation ...

Get Getting Started with Hazelcast - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.