Giter Club home page Giter Club logo

jcache-samples's Introduction

jcache-samples

This contains the samples used for the Java Colombo Meetup on Distributed Caching with Java. [1] This demonstrates the use of Javax JCache with Hazelcast as the caching server. Hazelcast is running in client-server mode where the Hazelcast cluster instances are running separately from the Application. It is also possible to run Hazelcast in embedded mode where the application and the Hazelcast instance reside within the same JVM.

[1] http://www.meetup.com/java-colombo/events/223811796/

This has three maven modules. Each module can be run by executing the following command.

mvn test -Prun

  1. cache-server-starter - Starts a hazelcast instance which will act as a distributed caching server. Run mvn test -Prun two-three times to get a Hazelcast cluster with two to three nodes.
  2. cache-setter - This creates a cache, and adds a set of objects to it.
  3. cache-getter - This reads the set of objects to it that was added by cache-setter module.

You can analyze the cache usage across the distributed cluster nodes via the Hazelcast Mancenter.

To run mancenter,

  1. Download Hazelcast, and Unpack the distribution.
  2. Go to hazelcast-x.x/mancenter/
  3. Execute the command.

In Linux - ./startManCenter.sh 8080 mancenter

In Windows - ./startManCenter.bat 8080 mancenter (not tested)

  1. Spin up a hazelcast cluster, if not done so already.
  2. Point your browser to http://localhost:8080/mancenter.

jcache-samples's People

Contributors

kasunbg avatar

Stargazers

Dilip Jain avatar  avatar

Watchers

 avatar Dilip Jain avatar Isuru Jayathilake avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.