10+1 steps to setup BigMemory Max platform with connected clients

Updated on 14th August 2014 to reflect  latest GA release of BigMemory , version 4.1.3

Quick and dirty 10+1 steps to :-

  1. Setup Terracotta Server Array (TSA) of single stripe, active & mirror server pair
  2. Setup of Terracotta Management Console to monitor TSA and connected clients
  3. BigMemory Max client that pushes KeyValue(KV) pair to TSA
  4. BigMemory Max client that fetches KV pair from TSA

Here is what the end-state of the setup looks like:-


See screen cast on  http://www.youtube.com/watch?v=PuBrgwhwf8o & encoded within the script below:-

#1 download BigMemory Max distribution
# from http://www.terracotta.org/downloads &
# copy the terracotta trial license key
# (terracotta-license.key) received by email
# over to a suitable folder

$> ls

bigmemory-max-4.1.3.tar.gz terracotta-license.key

#2 unzip the BigMemory-Max distribution
$> tar -xf bigmemory-max-4.1.3.tar.gz

#3. lets setup terracotta server array (TSA),
# the sub-component responsible for distributing in-memory
# data for connected client.
# To setup a simple/minimalist TSA with one stripe,
# a pair of active and mirror server, define a
# configuration similar to the one below.
# The configuration file defines the TSA topology & is used to
# start up all the server instances participating in the TSA
$>curl -L https://raw.github.com/vinaynair/tc-labs/master/BigMemoryMaxEhCacheClient/TSA/tc-config-ha.xml -o bigmemory-max-4.1.3/config-samples/tc-config-ha.xml

#4 also copy over the terracotta license key to the install folder
$>cp terracotta-license.key bigmemory-max-4.1.3/

#5 first lets start server1 defined within the configuration,
# & since its the first one to come up within this stripe it will
# assume ACTIVE role
$>nohup ./bigmemory-max-4.1.3/server/bin/start-tc-server.sh -f bigmemory-max-4.1.3/config-samples/tc-config-ha.xml -n server1 >server1.log 2>&1 &

#6 start server2, which will assume PASSIVE a.k.a MIRROR role
$>nohup ./bigmemory-max-4.1.3/server/bin/start-tc-server.sh -f bigmemory-max-4.1.3/config-samples/tc-config-ha.xml -n server2 >server2.log 2>&1 &

#7 start Terracotta Management Console (TMC), component
# responsible for monitoring TSA and connected clients.
# For simplicity lets disable authentication for now

# Logon to TMC on the browser @ http://localhost:9889/tmc . As requested, with no authentication set, lets restart TMC & view TSA statistics
$>./bigmemory-max-4.1.3/tools/management-console/bin/start-tmc.sh &

# Lets setup simple clients to BigMemoryMax
#8 download simple BigMemoryMaxEhCacheClient (requires git & maven)
$>git clone https://github.com/vinaynair/BigMemoryMaxEhCacheClient.git

#9 copy the same terracotta license key to the client folder
$>cp terracotta-license.key BigMemoryMaxEhCacheClient/

#10 run the sample client that puts into the BigMemory Max distributed in-memory data store
$>cd BigMemoryMaxEhCacheClient/
$>mvn clean compile exec:exec -Daction=put

#11 run the sample client that gets from the BigMemory Max distributed in-memory data store
$>mvn clean compile exec:exec -Daction=get




Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s