jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Wood <daw...@us.ibm.com>
Subject Re: JCS as shared memory in MANET and problem with put/get.
Date Mon, 13 Jun 2011 13:27:12 GMT
Not sure why but the cfg files were not included...




David Wood 
Computing Systems for Wireless Networks
IBM TJ Watson Research Center
dawood@us.ibm.com
914-784-5123 (office), 914-396-6515 (mobile)




From:   David Wood/Watson/IBM@IBMUS
To:     jcs-users@jakarta.apache.org
Date:   06/13/2011 09:13 AM
Subject:        JCS as shared memory in MANET and problem with put/get.



Hi, 

I've split the following question out into a separate thread. I'm 
considering using JCS 1.3  for a distributed registry in a Mobile 
Adhoc Network (MANET), with the following requirements:

1) No central server
2) More than one JVM per ip address 
3) Single config file (desirable, but not absolutely required)

There may be more, but those are the ones that I think cause the most 
trouble.  So the first question: Can JCS do this (particularly 2)?  I've 
looked at the UDP discovery and Lateral TCP, which together suggest that 
it can. 

I've create a test case which I'm having trouble with (see code below). 
Unfortunately, the put() does not seem to be shared with the get()er.  (I 
first run the put()er, then start the get()er).  Thoughts? 

                String cfg1 = "/dsm-jcs1.ccf"; 
                String cfg2 = "/dsm-jcs2.ccf"; 
                if (argv.length > 0) { 
                        JCS.setConfigFilename(cfg2); 
                    JCS jcs = JCS.getInstance("DSM");   
                        Object s = jcs.get("me"); 
                        System.out.println("Getting entry me="+s); 
                } else { 
                        JCS.setConfigFilename(cfg1); 
                    JCS jcs = JCS.getInstance("DSM");   
                    System.out.println("Placing entry me=here"); 
                    jcs.put("me", "here"); 
                        Object s = jcs.get("me"); 
                        System.out.println("Getting entry me="+s); 
                    try { 
                            System.out.println("Sleeping 1000 seconds"); 
                                Thread.sleep(1000*1000); 
                        } catch (InterruptedException e) { 
                                ; 
                        } 
                } 



David Wood 
Computing Systems for Wireless Networks
IBM TJ Watson Research Center
dawood@us.ibm.com
914-784-5123 (office), 914-396-6515 (mobile)
---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-users-help@jakarta.apache.org

Mime
View raw message