{"id":18640,"date":"2013-11-01T22:00:54","date_gmt":"2013-11-01T20:00:54","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=18640"},"modified":"2013-11-01T09:44:35","modified_gmt":"2013-11-01T07:44:35","slug":"getting-started-with-hazelcast","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2013\/11\/getting-started-with-hazelcast.html","title":{"rendered":"Getting Started with Hazelcast"},"content":{"rendered":"<p>In July I wrote a <a href=\"http:\/\/www.captaindebug.com\/2013\/07\/erlang-for-java-developers.html#.UmFeCGTk8jc\" target=\"new\">blog<\/a> introducing erlang to Java developers, highlighting some of the similarities and differences between the two languages. The erlang virtual machine has a number of impressive, built-in features, one of which is that they are location independent and can talk to each other. This means that that data can be synchronised between VMs by writing very few lines of code. This is really good news if you have a networked cluster of servers all doing the same thing.<\/p>\n<p>You could argue that there&#8217;s something lacking in the JVM if it can&#8217;t even perform the most basic interprocess communication; however, Java takes the opposite view, it has a basic VM and then layers different services on top as and when required. Whether this is right is a matter of opinion and I&#8217;ll leave it as a subject for a future blog, because it seems that the Hazelcast Guys have solved the problem of JVMs talking to each other; which is the point of this blog.<\/p>\n<h2>So, what is Hazelcast?<\/h2>\n<p><a name=\"more\"><\/a><\/p>\n<p>The Hazelcast press release goes something like this: &#8220;Hazelcast ( <a href=\"www.hazelcast.com\" target=\"new\">www.hazelcast.com<\/a>) is reinventing in-memory data grid through open source. Hazelcast provides a drop-in library that any Java developer can include in minutes to enable them to build elegantly simple mission-critical, transactional, and terascale in-memory applications&#8221;.<\/p>\n<h2>So, what does that really mean?<\/h2>\n<p>Okay, so that&#8217;s just marketing\/PR bumpf. What is Hazelcast\u2026 in real life? The answer can be succinctly given using code. Imagine you&#8217;re writing an application and you need a <code>Map&lt;String,String&gt;<\/code> and when you&#8217;re in production you&#8217;ll have multiple instances of your app in a cluster. Then writing the following code:<\/p>\n<pre class=\" brush:java\">\u00a0\u00a0\u00a0 HazelcastInstance instance = Hazelcast.newHazelcastInstance(); \r\n\u00a0\u00a0\u00a0 loggedOnUsers = instance.getMap(\"Users\");<\/pre>\n<p>\u2026means that data added to your map by one instance of your application is available to all the other instances of your application<sup>2<\/sup><\/p>\n<p>There are a few points that you can deduce from this. Firstly, Hazelcast nodes are &#8216;masterless&#8217;, which means that it isn&#8217;t a client-server system. There is a cluster leader, which is by default the oldest member of the cluster, which manages how data is spread across the system; however, if that node went down, then the next oldest will take over.<\/p>\n<p>Having a bunch of distributed Maps, Lists, Queues etc, means that everything is held in memory. If one node in your cluster dies, then you&#8217;re okay, there&#8217;s no loss of data; however, if a number of nodes die at the same time, then you&#8217;re in trouble and you&#8217;ll get data loss as the system won&#8217;t have time to rebalance itself. It also goes without saying that if the whole cluster dies, then you&#8217;re in big trouble.<\/p>\n<h2>So, why is Hazelcast a good bet?<\/h2>\n<ol>\n<li>It&#8217;s open source. This is <a href=\"http:\/\/www.captaindebug.com\/2011\/09\/benefits-and-dangers-of-using.html#.UmFlj2Tk8jc\" target=\"new\"> usually a good thing\u2026<\/a><\/li>\n<li>Hazelcast have just received a large cash injection to &#8216;commoditize&#8217; the product. For more on this take a look <a href=\"http:\/\/www.prnewswire.com\/news-releases\/hazelcast-announces-25-million-in-series-a-funding-to-commoditize-in-memory-computing-224634081.html\" target=\"new\">here<\/a> and <a href=\"http:\/\/www.infoq.com\/news\/2013\/09\/hazelcast-vc-funding\" target=\"new\">here<\/a>.<\/li>\n<li>Rod Johnson, yes Mr Spring, is now on the board of Hazelcast.<\/li>\n<li>It just works<sup>1<\/sup>.<\/li>\n<li>Getting started is pretty easy.<\/li>\n<\/ol>\n<h2>The Scenario<\/h2>\n<p>To demonstrate Hazelcast imagine that you&#8217;re writing an application, in this case modelled by the <code>MyApplication<\/code> class and then there&#8217;s a big, wide world of users as modelled by the <code>BigWideWorld<\/code> class. As expected, users from the <code>BigWideWorld<\/code> log in and out of your application. Your application is very popular and you&#8217;re running multiple instances of it in a cluster, so when a user logs in an instance of the app it stores their details (as modelled by the <code>User<\/code> class) in a <code>Map<\/code> and the contents of the map are synchronised with the maps held by other instances of your application.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/10\/Screen-Shot-2013-10-21-at-20.45.28.png\"><img decoding=\"async\" class=\"aligncenter size-medium wp-image-18666\" alt=\"Screen Shot 2013-10-21 at 20.45.28\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/10\/Screen-Shot-2013-10-21-at-20.45.28-300x123.png\" width=\"300\" height=\"123\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/10\/Screen-Shot-2013-10-21-at-20.45.28-300x123.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/10\/Screen-Shot-2013-10-21-at-20.45.28.png 979w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<h2>POM Configuration<\/h2>\n<p>The first thing to do is to setup the POM.xml and there&#8217;s only one entry to consider:<\/p>\n<pre class=\" brush:xml\">&lt;dependency&gt;\r\n        &lt;groupId&gt;com.hazelcast&lt;\/groupId&gt;\r\n        &lt;artifactId&gt;hazelcast&lt;\/artifactId&gt;\r\n        &lt;version&gt;3.1&lt;\/version&gt;\r\n    &lt;\/dependency&gt;<\/pre>\n<h2>The Code<\/h2>\n<p>The <code>BigWideWorld<\/code> is the starting point for the code and it&#8217;s a very small class for such a large concept. It has one method, <code>nextUser()<\/code>, which randomly chooses the name of the next user to log in or out from a collection of all your application&#8217;s users.<\/p>\n<pre class=\" brush:java\">public class BigWideWorld { \r\n\r\n\u00a0 private static Random rand = new Random(System.currentTimeMillis()); \r\n\r\n\u00a0 private final Users users = new Users(); \r\n\r\n\u00a0 private final int totalNumUsers = users.size(); \r\n\r\n\u00a0 public String nextUser() { \r\n\r\n\u00a0\u00a0\u00a0 User user = users.get(rand.nextInt(totalNumUsers)); \r\n\u00a0\u00a0\u00a0 String name = user.getUsername(); \r\n\r\n\u00a0\u00a0\u00a0 return name; \r\n\r\n\u00a0 } \r\n\r\n}<\/pre>\n<p>The collection of users is managed by the <code>Users<\/code> class. This is a sample code convenience class that contains a number of hard coded users&#8217; details.<\/p>\n<pre class=\" brush:java\">public class Users { \r\n\r\n\u00a0 \/** The users in the database *\/ \r\n\u00a0 private final User[] users = { new User(\"fred123\", \"Fred\", \"Jones\", \"fredj@a.com\"), \r\n\u00a0\u00a0\u00a0\u00a0\u00a0 new User(\"jim\", \"Jim\", \"Jones\", \"jimj@a.com\"), \r\n\u00a0\u00a0\u00a0\u00a0\u00a0 new User(\"bill\", \"Bill\", \"Jones\", \"bill@a.com\"), \r\n\u00a0\u00a0\u00a0\u00a0\u00a0 new User(\"ted111\", \"Edward\", \"Jones\", \"tedj@a.com\"), \r\n\u00a0\u00a0\u00a0\u00a0\u00a0 new User(\"annie\", \"Annette\", \"Jones\", \"annj@a.com\"), \r\n\u00a0\u00a0\u00a0\u00a0\u00a0 new User(\"lucy\", \"Lucy\", \"Jones\", \"lucyj@a.com\"), \r\n\u00a0\u00a0\u00a0\u00a0\u00a0 new User(\"jimj\", \"James\", \"Jones\", \"jimj@a.com\"), \r\n\u00a0\u00a0\u00a0\u00a0\u00a0 new User(\"jez\", \"Jerry\", \"Jones\", \"fredj@a.com\"), \r\n\u00a0\u00a0\u00a0\u00a0\u00a0 new User(\"will\", \"William\", \"Jones\", \"willj@a.com\"), \r\n\u00a0\u00a0\u00a0\u00a0\u00a0 new User(\"shaz\", \"Sharon\", \"Jones\", \"shazj@a.com\"), \r\n\u00a0\u00a0\u00a0\u00a0\u00a0 new User(\"paula\", \"Paula\", \"Jones\", \"pauj@a.com\"), \r\n\u00a0\u00a0\u00a0\u00a0\u00a0 new User(\"leo\", \"Leonardo\", \"Jones\", \"leoj@a.com\"), }; \r\n\r\n\u00a0 private final Map&lt;String, User&gt; userMap; \r\n\r\n\u00a0 public Users() { \r\n\r\n\u00a0\u00a0\u00a0 userMap = new HashMap&lt;String, User&gt;(); \r\n\r\n\u00a0\u00a0\u00a0 for (User user : users) { \r\n\u00a0\u00a0\u00a0\u00a0\u00a0 userMap.put(user.getUsername(), user); \r\n\u00a0\u00a0\u00a0 } \r\n\u00a0 } \r\n\r\n\u00a0 \/** \r\n\u00a0\u00a0 * The number of users in the database \r\n\u00a0\u00a0 *\/ \r\n\u00a0 public int size() { \r\n\u00a0\u00a0\u00a0 return userMap.size(); \r\n\u00a0 } \r\n\r\n\u00a0 \/** \r\n\u00a0\u00a0 * Given a number, return the user \r\n\u00a0\u00a0 *\/ \r\n\u00a0 public User get(int index) { \r\n\u00a0\u00a0\u00a0 return users[index]; \r\n\u00a0 } \r\n\r\n\u00a0 \/** \r\n\u00a0\u00a0 * Given the user's name return the User details \r\n\u00a0\u00a0 *\/ \r\n\u00a0 public User get(String username) { \r\n\u00a0\u00a0\u00a0 return userMap.get(username); \r\n\u00a0 } \r\n\r\n\u00a0 \/** \r\n\u00a0\u00a0 * Return the user names. \r\n\u00a0\u00a0 *\/ \r\n\u00a0 public Set&lt;String&gt; getUserNames() { \r\n\u00a0\u00a0\u00a0 return userMap.keySet(); \r\n\u00a0 } \r\n}<\/pre>\n<p>This class contains a few database type of calls, such as <code>get(String username)<\/code> to return the user object for a given name, or <code>get(int index)<\/code> to return a given user from the DB, or <code>size()<\/code> to return the number of users in the database.<\/p>\n<p>The user is described by the <code>User<\/code> class; a simple Java bean:<\/p>\n<pre class=\" brush:java\">public class User implements Serializable { \r\n\r\n\u00a0 private static final long serialVersionUID = 1L; \r\n\u00a0 private final String username; \r\n\u00a0 private final String firstName; \r\n\u00a0 private final String lastName; \r\n\u00a0 private final String email; \r\n\r\n\u00a0 public User(String username, String firstName, String lastName, String email) { \r\n\u00a0\u00a0\u00a0 super(); \r\n\u00a0\u00a0\u00a0 this.username = username; \r\n\u00a0\u00a0\u00a0 this.firstName = firstName; \r\n\u00a0\u00a0\u00a0 this.lastName = lastName; \r\n\u00a0\u00a0\u00a0 this.email = email; \r\n\u00a0 } \r\n\r\n\u00a0 public String getUsername() { \r\n\u00a0\u00a0\u00a0 return username; \r\n\u00a0 } \r\n\r\n\u00a0 public String getFirstName() { \r\n\u00a0\u00a0\u00a0 return firstName; \r\n\u00a0 } \r\n\r\n\u00a0 public String getLastName() { \r\n\u00a0\u00a0\u00a0 return lastName; \r\n\u00a0 } \r\n\r\n\u00a0 public String getEmail() { \r\n\u00a0\u00a0\u00a0 return email; \r\n\u00a0 } \r\n\r\n\u00a0 @Override \r\n\u00a0 public String toString() { \r\n\r\n\u00a0\u00a0\u00a0 StringBuilder sb = new StringBuilder(\"User: \"); \r\n\u00a0\u00a0\u00a0 sb.append(username); \r\n\u00a0\u00a0\u00a0 sb.append(\" \"); \r\n\u00a0\u00a0\u00a0 sb.append(firstName); \r\n\u00a0\u00a0\u00a0 sb.append(\" \"); \r\n\u00a0\u00a0\u00a0 sb.append(lastName); \r\n\u00a0\u00a0\u00a0 sb.append(\" \"); \r\n\u00a0\u00a0\u00a0 sb.append(email); \r\n\r\n\u00a0\u00a0\u00a0 return sb.toString(); \r\n\u00a0 } \r\n}<\/pre>\n<p>Moving on the crux of the blog, which is the <code>MyApplication<\/code> class. Most of the code in this blogs is merely window dressing, the code that&#8217;s of importance is in <code>MyApplication<\/code>&#8216;s constructor. The construct contains two lines of code; the first gets hold of a new Hazelcast instance, whilst the second uses that instance to create a <code>Map&lt;String, User&gt;<\/code> with a namespace of &#8220;Users&#8221;. This is all the Hazelcast specific code that&#8217;s needed. The other methods: <code>logon()<\/code>, <code>logout()<\/code> and <code>isLoggedOn()<\/code> just manage the users.<\/p>\n<p>All the above is tied together using a simple <code>Main<\/code>class:<\/p>\n<pre class=\" brush:java\">public class Main { \r\n\r\n\u00a0 public static void main(String[] args) throws InterruptedException { \r\n\r\n\u00a0\u00a0\u00a0 BigWideWorld theWorld = new BigWideWorld(); \r\n\r\n\u00a0\u00a0\u00a0 MyApplication application = new MyApplication(); \r\n\r\n\u00a0\u00a0\u00a0 while (true) { \r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 String username = theWorld.nextUser(); \r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 if (application.isLoggedOn(username)) { \r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 application.logout(username); \r\n\u00a0\u00a0\u00a0\u00a0\u00a0 } else { \r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 application.logon(username); \r\n\u00a0\u00a0\u00a0\u00a0\u00a0 } \r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 application.displayUsers(); \r\n\u00a0\u00a0\u00a0\u00a0\u00a0 TimeUnit.SECONDS.sleep(2); \r\n\u00a0\u00a0\u00a0 } \r\n\u00a0 } \r\n\r\n}<\/pre>\n<p>This code creates an instance of the <code>BigWideWorld<\/code> and <code>MyApplication<\/code>. It then infinitely loops grabbing hold of the next random user name. If the user is already logged in, then the user logs out. If the user is not logged in, then the user logs in. The logged in users are then displayed so that you can see what&#8217;s going on.<\/p>\n<h2>Running the App<\/h2>\n<p>After building the app, open a terminal and navigate to the projects <code>target\/classes<\/code> directory. Then type in the following command:<\/p>\n<pre class=\" brush:bash\">java -cp \/your path to the\/hazelcast-3.1\/lib\/hazelcast-1.jar:. com.captaindebug.hazelcast.gettingstarted.Main<\/pre>\n<p>When running, you&#8217;ll get output that looks something like this:<\/p>\n<pre class=\" brush:bash\">Logged on users:\r\nUser: fred123 Fred Jones fredj@a.com\r\nUser: jimj James Jones jimj@a.com\r\nUser: shaz Sharon Jones shazj@a.com\r\nUser: paula Paula Jones pauj@a.com\r\nUser: lucy Lucy Jones lucyj@a.com\r\nUser: jez Jerry Jones fredj@a.com\r\nUser: jim Jim Jones jimj@a.com\r\n7 -- 14:54:16-17<\/pre>\n<p>Next, open more terminals and run a few more instances of your application.<\/p>\n<p>If you trail through the output you can see users logging in and out, with the user <code>Map<\/code> being displayed on each change. The clue that the changes in one app&#8217;s map are reflected in the other instances can be hard to spot, but can be deduced from the total size of the map (the first number on the last line of the output). Each time the map is displayed one user has either logged in or out; however, the total size can change by more than one, meaning that other instances&#8217; changes have affected the size of the map you&#8217;re looking at.<\/p>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/10\/Screen-Shot-2013-10-21-at-22.22.21.png\"><img decoding=\"async\" class=\"aligncenter size-medium wp-image-18667\" alt=\"Screen Shot 2013-10-21 at 22.22.21\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/10\/Screen-Shot-2013-10-21-at-22.22.21-300x226.png\" width=\"300\" height=\"226\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/10\/Screen-Shot-2013-10-21-at-22.22.21-300x226.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/10\/Screen-Shot-2013-10-21-at-22.22.21.png 793w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>So, there you have it a simple app that when four instances are running keep themselves in synch and know which users are logged in.<\/p>\n<p>It&#8217;s supposed to work in large clusters, but I&#8217;ve never tried it. Apparently, in large clusters, you have to do some jiggery-pokery with the config file, but that&#8217;s beyond the scope of this blog.<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n<strong><sup>1<\/sup><\/strong>Okay, enough of the marketing speak. In general is does &#8216;just work&#8217;, but remember that it is software, written by developers like you and me, it does have its <i>features<\/i> and <i>idiosyncrasies<\/i>. For example, if you&#8217;re still using version 2.4 then upgrade <b>NOW<\/b>. This has a memory leak that means it &#8216;just silently stops working&#8217; when it feels like it. The latest version is 3.1.<\/p>\n<p><strong><sup>2<\/sup><\/strong>I&#8217;ve chosen <code>Map<\/code> as an example, but it&#8217;s also true for other collection types such as <code>List<\/code>, <code>Set<\/code> and <code>Queue<\/code>, plus Hazelcast has many other features that are beyond the scope of this blog including a bunch of concurrency utilities and publish\/subscribe messaging.<\/p>\n<ul>\n<li>The code for this blog is available on github at: <a href=\"https:\/\/github.com\/roghughe\/captaindebug\/tree\/master\/hazelcast\" target=\"new\">https:\/\/github.com\/roghughe\/captaindebug\/tree\/master\/hazelcast<\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<div style=\"border: 1px solid #D8D8D8; background: #FAFAFA; width: 100%; padding-left: 5px;\"><b><i>Reference: <\/i><\/b><a href=\"http:\/\/www.captaindebug.com\/2013\/10\/getting-started-with-hazelcast.html\">Getting Started with Hazelcast<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/jcg\">JCG partner<\/a> Roger Hughes at the <a href=\"http:\/\/www.captaindebug.com\/\">Captain Debug&#8217;s Blog <\/a> blog.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In July I wrote a blog introducing erlang to Java developers, highlighting some of the similarities and differences between the two languages. The erlang virtual machine has a number of impressive, built-in features, one of which is that they are location independent and can talk to each other. This means that that data can be &hellip;<\/p>\n","protected":false},"author":65,"featured_media":5124,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[694],"class_list":["post-18640","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-hazelcast"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Getting Started with Hazelcast<\/title>\n<meta name=\"description\" content=\"In July I wrote a blog introducing erlang to Java developers, highlighting some of the similarities and differences between the two languages. The erlang\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2013\/11\/getting-started-with-hazelcast.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Getting Started with Hazelcast\" \/>\n<meta property=\"og:description\" content=\"In July I wrote a blog introducing erlang to Java developers, highlighting some of the similarities and differences between the two languages. The erlang\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2013\/11\/getting-started-with-hazelcast.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2013-11-01T20:00:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/hazelcast-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Roger Hughes\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Roger Hughes\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/11\\\/getting-started-with-hazelcast.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/11\\\/getting-started-with-hazelcast.html\"},\"author\":{\"name\":\"Roger Hughes\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/c9feacaf8e783104a69621cd65bf1f07\"},\"headline\":\"Getting Started with Hazelcast\",\"datePublished\":\"2013-11-01T20:00:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/11\\\/getting-started-with-hazelcast.html\"},\"wordCount\":1266,\"commentCount\":7,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/11\\\/getting-started-with-hazelcast.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/12\\\/hazelcast-logo.jpg\",\"keywords\":[\"Hazelcast\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/11\\\/getting-started-with-hazelcast.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/11\\\/getting-started-with-hazelcast.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/11\\\/getting-started-with-hazelcast.html\",\"name\":\"Getting Started with Hazelcast\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/11\\\/getting-started-with-hazelcast.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/11\\\/getting-started-with-hazelcast.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/12\\\/hazelcast-logo.jpg\",\"datePublished\":\"2013-11-01T20:00:54+00:00\",\"description\":\"In July I wrote a blog introducing erlang to Java developers, highlighting some of the similarities and differences between the two languages. The erlang\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/11\\\/getting-started-with-hazelcast.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/11\\\/getting-started-with-hazelcast.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/11\\\/getting-started-with-hazelcast.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/12\\\/hazelcast-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/12\\\/hazelcast-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/11\\\/getting-started-with-hazelcast.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Getting Started with Hazelcast\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/c9feacaf8e783104a69621cd65bf1f07\",\"name\":\"Roger Hughes\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/db9d1e5362dbc3f8007b383b852473b59fb8c5282a6066a13ab1cef761a9d5d6?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/db9d1e5362dbc3f8007b383b852473b59fb8c5282a6066a13ab1cef761a9d5d6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/db9d1e5362dbc3f8007b383b852473b59fb8c5282a6066a13ab1cef761a9d5d6?s=96&d=mm&r=g\",\"caption\":\"Roger Hughes\"},\"sameAs\":[\"http:\\\/\\\/www.captaindebug.com\\\/\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Roger-Hughes\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Getting Started with Hazelcast","description":"In July I wrote a blog introducing erlang to Java developers, highlighting some of the similarities and differences between the two languages. The erlang","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2013\/11\/getting-started-with-hazelcast.html","og_locale":"en_US","og_type":"article","og_title":"Getting Started with Hazelcast","og_description":"In July I wrote a blog introducing erlang to Java developers, highlighting some of the similarities and differences between the two languages. The erlang","og_url":"https:\/\/www.javacodegeeks.com\/2013\/11\/getting-started-with-hazelcast.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2013-11-01T20:00:54+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/hazelcast-logo.jpg","type":"image\/jpeg"}],"author":"Roger Hughes","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Roger Hughes","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2013\/11\/getting-started-with-hazelcast.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/11\/getting-started-with-hazelcast.html"},"author":{"name":"Roger Hughes","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/c9feacaf8e783104a69621cd65bf1f07"},"headline":"Getting Started with Hazelcast","datePublished":"2013-11-01T20:00:54+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/11\/getting-started-with-hazelcast.html"},"wordCount":1266,"commentCount":7,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/11\/getting-started-with-hazelcast.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/hazelcast-logo.jpg","keywords":["Hazelcast"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2013\/11\/getting-started-with-hazelcast.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2013\/11\/getting-started-with-hazelcast.html","url":"https:\/\/www.javacodegeeks.com\/2013\/11\/getting-started-with-hazelcast.html","name":"Getting Started with Hazelcast","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/11\/getting-started-with-hazelcast.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/11\/getting-started-with-hazelcast.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/hazelcast-logo.jpg","datePublished":"2013-11-01T20:00:54+00:00","description":"In July I wrote a blog introducing erlang to Java developers, highlighting some of the similarities and differences between the two languages. The erlang","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/11\/getting-started-with-hazelcast.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2013\/11\/getting-started-with-hazelcast.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2013\/11\/getting-started-with-hazelcast.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/hazelcast-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/hazelcast-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2013\/11\/getting-started-with-hazelcast.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Getting Started with Hazelcast"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/c9feacaf8e783104a69621cd65bf1f07","name":"Roger Hughes","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/db9d1e5362dbc3f8007b383b852473b59fb8c5282a6066a13ab1cef761a9d5d6?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/db9d1e5362dbc3f8007b383b852473b59fb8c5282a6066a13ab1cef761a9d5d6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/db9d1e5362dbc3f8007b383b852473b59fb8c5282a6066a13ab1cef761a9d5d6?s=96&d=mm&r=g","caption":"Roger Hughes"},"sameAs":["http:\/\/www.captaindebug.com\/"],"url":"https:\/\/www.javacodegeeks.com\/author\/Roger-Hughes"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/18640","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=18640"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/18640\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/5124"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=18640"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=18640"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=18640"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}