-
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
Key feature of JGroups TankWar Demo:
-
Use multiple channels instead of use single one
-
Sharing a transport between multiple channels in a JVM
-
Navigate to DEMO_HOME/bin execute the following bootstrap script, note that,
-n
plusa unique name
is mandatory, ifisGood
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
Now 2 groups demo can emit missile attack each other, for details:
-
Use arrow(up, down, left. right) move Tank, Tank can move to 8 direction
-
Use
space
emit missile -
Use
F2
for generating a new Tank if current Tank exploded
See more underlying details: https://community.jboss.org/wiki/JGroupsTankWarDemo
-
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
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
-
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
-
See more underlying details
-
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
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
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