GithubHelp home page GithubHelp logo

kwang2014 / cluster Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cloudadc/cluster

0.0 1.0 0.0 7.31 MB

jGroups, JBossCache, Infinispan, Ehcache

Home Page: https://github.com/kylinsoong/cluster

License: Apache License 2.0

cluster's Introduction

JGroups TankWar Demo

  • JGroups is a toolkit for reliable multicast communication. It can be used to create groups of processes whose members can send messages to each other. Group members can be spread across LANs or WANs. More details refer to http://www.jgroups.org/

  • JGroups is a mature library used by Java Developer millions of time, JGroups TankWar Demo use basic JGroups API, it can be a quick start for Java Developer who want to build group communication application, the original code(GUI) came from my college homework

  • Groups TankWar Demo Source Code ./jgroups/tankwar

Build and Generate demo home
JGroups TankWar Demo Architecture
JGroups TankWar Architecture

Key feature of JGroups TankWar Demo:

  • Use multiple channels instead of use single one

  • Sharing a transport between multiple channels in a JVM

How to run?
  • Navigate to DEMO_HOME/bin execute the following bootstrap script, note that, -n plus a unique name is mandatory, if isGood parameter is append, tank play as Alliance tank, or else it will be Enemy tank

./tankwar.sh -n node1 isGood
  • On another Terminal start tank play as Enemy

./tankwar.sh -n node2

Actually, we can open more Terminal, start more nodes as below diagram

JGroups Runtime Diagram

Now 2 groups demo can emit missile attack each other, for details:

  1. Use arrow(up, down, left. right) move Tank, Tank can move to 8 direction

  2. Use space emit missile

  3. Use F2 for generating a new Tank if current Tank exploded

JBossCache Replication Demo

  • JBoss Cache is a tree-structured, clustered, transactional cache. It can be used in a standalone, non-clustered environment, to cache frequently accessed data in memory. JBoss Cache is also a clustered cache, and can be used in a cluster to replicate state providing a high degree of failover.

  • JBossCache Replication Demo is a demo what show JBossCache’s tree-structured, clustered, transactional feature, we can easy track the replication process via demo UI, demo mangement console, bsh mangement console.

  • JBossCache Replication Demo Source code ./jbosscache/demo

Build and Generate demo home
BossCache Replication Demo Architecture
JBossCache Replication Demo Architecture

BossCache Replication Demo key feature:

  • How JBossCache build upon jGroups

  • tree-structured, clustered,transactional

  • 3 ways to manage or access JBossCache demo

    • console - traditional command line

    • GUI - java swing interface

    • bsh - bsh console

How to run?

Navigate to DEMO_HOME/bin, we will see JBossCache bootstrap scripts. Open more Terminal, start scprit as below will start JBossCache Demo in GUI mode:

./jbosscache.sh -c total-replication.xml

Start scprit as below will start JBossCache Demo in console mode:

./jbosscache.sh -c total-replication.xml -console

Start scprit as below will start JBossCache Demo in bsh mode:

./jbosscache.sh -c total-replication.xml -bsh
JBossCache Replication Demo Runtime diagram
  • See more underlying details

Infinispan Data Grid Demo

  • Infinispan is an extremely scalable, highly available key/value NoSQL datastore and distributed data grid platform.

  • Infinispan Data Grid Demo show Infinispan Distribute mode & Replication mode

  • Infinispan Data Grid Demo Source Code ./infinispan/grid/demo

Build and Generate demo Home
Infinispan Data Grid Demo Architecture
Infinispan Data Grid Demo Architecture
How to run

DEMO_HOME/bin has bootstrap scripts, Open 4 Termial(actually, you can open more), in each Terminal, execute the following commands in a sequence

./dataGrid.sh -c infinispan-distribution.xml

We also can run Data Grid demo use console mode, similiar, execute the following commands as below:

./dataGrid.sh -c infinispan-distribution.xml -console
4 nodes data grid console

Alternatively, use the following commands start Infinispan Data Grid as Replication Mode:

./dataGrid.sh -c infinispan-replication.xml
./dataGrid.sh -c infinispan-replication.xml -console

Start Infinispan Data Grid as Invalidation Mode:

./dataGrid.sh -c infinispan-invalidation.xml
./dataGrid.sh -c infinispan-invalidation.xml -console

Start Infinispan Data Grid as Local Cache Mode:

./dataGrid.sh -c infinispan-local.xml
./dataGrid.sh -c infinispan-local.xml -console
  • See more underlying details

cluster's People

Contributors

kylinsoong avatar

Watchers

 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.