How To Use Active spaces shared_nothing persistence.

How To Use Active spaces shared_nothing persistence.

book

Article ID: KB0090411

calendar_today

Updated On:

Products Versions
TIBCO ActiveSpaces -
Not Applicable -

Description

Resolution:
Description:
============
This Solution shows how to setup and test ActiveSpaces shared nothing persistence.

Environment:
==========
ActiveSpaces 2.0.0 HF 1 .
All supported platforms.
Probably applies to later AS versions as well with minor command line changes.

Resolution:
=========
AS creates directories for shared_nothing persistence seeders in your user directory by default.  The structure is
c:\users\&ltuser-name>\&ltmetaspace-name>\&ltspace-name>\&ltmember-name>\.  

The memer-name defaults to something based on timestamp and the port number. Therefore use the -member_name "agent1" command line parameter to assure use of the correct data store.  Also, I use -discovery "tibpgm://1423" since there are frequently other instances of AS running in my sub-network.

1). Remove all files in your data_store directory, e.g.,

c:\users\&ltuser-name>\ms\myspace

to remove any artifacts from previous tests.

2). Open four windows: as-agent, ASBatchOperations, ASMM, and Admin CLI .

3). In as-agent, cd to C:\tibco\as\2.0\examples\java>  and execute

    java -cp Examples.jar ASPersistence2 -member_name "agent1" -discovery "tibpgm://1423"

Output should resemble the following:

Activespaces 2.0.0.V18                                                                          
Example: ASPersistence2                                                                          
[2012-07-18 10:02:45:880][10372][10740][INFO][] ip_address=10.105.66.41 port=50000              
d 012-07-18 10:02:50:898][10372][10740][INFO][ms.ms] ConnectCurrent metaspace members: e        
metaspace n     a694229-c350-5006ec35-371 as MANAGERa                                            cd
e                                                                                                
=[ms], listen=[tcp://10.105.66.41:50000], discovery=[tibpgm://1423], member name=[a694229-c350]  
[2012-07-18 10:02:50:898][10372][7756][INFO][ms.$members] member joined: 10.105.66.41:50000      
Current space members for myspace :                                                              
        a694229-c350-5006ec35-371 as SEEDER                                                      
                                                                                                
Type 'quit' to quit
                                                                            
3). In ASMM, cd to C:\tibco\as\2.0\asmm> and execute "java -jar asmm.jar".  ASMM will start and output will look like the following:

2012-07-18 10:04:12.542:INFO::Logging to STDERR via org.mortbay.log.StdErrLog                                                                                
2012-07-18 10:04:12.570:INFO::jetty-6.1.26                                                                                                                    
ISC: Configuring log4j from: file:/C:/tibco/as/2.0/asmm/war/WEB-INF/classes/log4j.isc.config.xml                                                              
2012-07-18 10:04:13.449:INFO:/:=== SERVER CONFIGURATION ===|                                                                                                  
2012-07-18 10:04:13.450:INFO:/:Metaspace Update Interval: 1000                                                                                                
2012-07-18 10:04:13.451:INFO:/:Metaspace Update Timeout: 10000                                                                                                
2012-07-18 10:04:13.452:INFO:/:Statistics Update Interval: 5000                                                                                              
2012-07-18 10:04:13.453:INFO:/:Statistics Life Span: 15                                                                                                      
2012-07-18 10:04:13.454:INFO:/:Startup Space: ms{discoveryURL:tibpgm://1423, listenerURL:}                                                                    
2012-07-18 10:04:13.455:INFO:/:============================                                                                                                  
[2012-07-18 10:04:13:654][9628][11412][INFO][] ip_address=10.105.66.41 port=50001                                                                            
[2012-07-18 10:04:14:71][9628][11412][INFO][ms.ms] Connected metaspace name=[ms], listen=[tcp://10.105.66.41:50001],
discovery=[tibpgm://1423], member name=[a694229-c351]                                                                                                                                                  
[2012-07-18 10:04:14:71][9628][11924][INFO][ms.$members] member joined: 10.105.66.41:50001                                                                    
[2012-07-18 10:04:14:71][9628][11924][INFO][ms.$members] member joined: 10.105.66.41:50000                                                                    
2012-07-18 10:04:14.283:INFO::Started SelectChannelConnector@0.0.0.0:8686                                                                                    

4). Use a browser to connect to http://localhost:8686/, enter ms for the Metaspace Name and click Connect, then click on myspace and on Members.  Two members are shown; the members are agent1 as a seeder and the ASMM as leech.

5). In ASBatchOperations window, cd to C:\tibco\as\2.0\examples\java> and execute

    java -cp Examples.jar ASBatchOperations -persistence share_nothing -member_name agent2 -discovery "tibpgm://1423"

6). In the ASBatchOperations window, use the "p" command to create several tuples, e.g.,
Main [p/pl/g/t/l]: p                                
Adding tuples, press enter for key value to complete
Put: Enter the key (integer): 1                    
Put: Enter the value (string):                      
Put: Enter the key (integer): 2                    
Put: Enter the value (string):                      
Put: Enter the key (integer): 3                    
Put: Enter the value (string):                      
Put: Enter the key (integer): 4                    
Put: Enter the value (string):                      
Put: Enter the key (integer): 5                    
Put: Enter the value (string):                      
Put: Enter the key (integer):                      
The SEEDER in ASMM will now show 5 Entries.

7). In the as-agent 1 window, type quit to stop the agent, then " java -cp Examples.jar ASPersistence2" to start it again.

8). In ASBatchOperations window enter 'q' to stop the engine then

    java -cp Examples.jar ASBatchOperations -persistence share_nothing -member_name agent2 -discovery "tibpgm://1423"

Output:                        
Activespaces 2.0.0.V18                                                                                                                            
Example: ASBatchOperations                                                                                                                        
[2012-07-18 10:27:39:881][12008][8348][INFO][] ip_address=10.105.66.41 port=50000                                                                
e2012-07-18 10:27:40:91][12008][8348][INFO][ms.ms] Connected metaspace name=[ms], lisCurrent metaspace members: t                                
n=[tcp: a694229-c353-5006ef15-3c6 as MEMBER/                                                                                                      
0       a694229-c351-5006edb1-2dd as MANAGER1                                                                                                    
51      a694229-c350-5006f20b-372 as MEMBER0                                                                                                      
6                                                                                                                                                
0.41:5Current PersistenceType: NONE0                                                                                                              
Current PersistenceType: SHARE_ALL0                                                                                                              
]Current PersistenceType: SHARE_NOTHING                                                                                                          
persistenceType: share_nothing                                                                                                                  
yiscoveCurrent space members for myspace :r                                                                                                      
=       a694229-c351-5006edb1-2dd as LEECH[                                                                                                      
b       a694229-c350-5006f20b-372 as LEECHi                                                                                                      
p                                                                                                                                                
gm://1423], member name=[a694229-c350]                                                                                                            
[2012-07-18 10:27:40:91][12008][8860][INFO][ms.$members] member joined: 10.105.66.41:50000                                                        
[2012-07-18 10:27:40:91][12008][8860][INFO][ms.$members] member joined: 10.105.66.41:50003                                                        
[2012-07-18 10:27:40:91][12008][8860][INFO][ms.$members] member joined: 10.105.66.41:50001                                                        
waiting for the space to be ready...                                                                                                              
please start an 1 seeder nodes (ex. as-agent) with -name and -data_store arguments and issue a 'recover space' admin command                      

9). In the Admin CLI window, cd to C:\tibco\as\2.0\lib> and execute "java -jar as-admin.jar" to see output which resembles the following:
                                                     &nb

Issue/Introduction

How To Use Active spaces shared_nothing persistence.