[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Messages posted by: zeeiyer  XML
Profile for zeeiyer -> Messages posted by zeeiyer [458] Go to Page: Previous  1, 2, 3 ... 28 , 29, 30, 31 Next 
Author Message
No the configurator currently only allows for Tomcats on the same host (not separate hosts).

Are you sure that there isn't some exception in the logs - look at catalina.out
and terracotta-client logs. (If you could also attach these logs) and see if you see the sessions being clustered via the Admin Console. (I have the config file, btw and it looks normal - take it you are clustering 2 applications - EdgeGateway and SessionServlet - right ?)


Thanks.
hi Zeus

That sounds odd - even without persistence mode, just restarting one of your "client" Tomcats, should result in sessions getting faulted in from the Terracotta server - so it should behave exactly like how you'd like it to...In fact, you could shutdown your entire application server tier and resume with session-state from the time at which your "outage" occurs.

I am having some issues with your attachment - if i can't resolve those, i might send you a private message asking you to resend it and may need the log (client) files as well.

In the meanwhile, perhaps you could try your app with the configurator, just shutdown both tomcats and restart them and you should see what you expect.

Thanks
Sreeni Iyer
Terracotta.
See the reply to the same topic on the another forum at https://forums.terracotta.org/forums/posts/list/159.page
Hi Raj:

Like a few other customers/users, you could replace JMS by

1.
Just writing to a shared/clustered (by Terracotta) object graph which utilizes the appropriate data-structure (e.g. LinkedBlockingQueue) and/or
2.
Utilize wait/notify or wait/notifyAll (since with TC these become distributed) - notifyAll for example is more like a broadcast, where threads on all VMs participating in the cluster could wake up and execute some useful work (much like a Pub/Sub where all VMs in the cluster are subscribers to some JMS topic and any of them can publish as well).
3.
Based on your use case, DMI (Distributed Method Invocation) is an option too - where you can have a given method execute on all JVMs participating in the cluster. Something like
Code:
       <distributed-methods>
         <method-expression>void com.myOrg.myPkg.MyClass.anyMethod(Object,  Long)</method-expression>
        </distributed-methods>
 


In terms of examples - you could look at the inventory/coordination samples in the DSO kit. In terms of more complex JVM coordination examples, these might be useful: http://wiki.terracotta.org/confluence/display/~jboner/Build+a+POJO-based+Data+Grid+Using+Open+Terracotta
http://www.terracotta.org/confluence/download/attachments/151/DSOWhitePaper.pdf?version=1

Perhaps you could describe your use case some more and we can give you some pointed best practices/how-tos...

regards
Sreeni Iyer
Terracotta
Hi Neuman

We have several "paying" customers (i.e. folks that signed up for services and support) that range from small .coms to large Fortune-100 companies across a wide variety of verticals (Ecommerce, Gaming, Banks, Telcos etc.)

However in terms of disclosure, typically our marketing team determines when and how we publicly discuss these production customers. As a result, we have to request that you email Jeff Hartley (jhartley@terracottatech.com) directly and we can provide you a response. Also watch out for a few customer announcements in the coming weeks.

Of course, we are OSS - so we have quite a few "non-paying" customers as well who have marshalled themselves through to production with a little aid from the community in some cases - We think that's a substantial number based on community activity and anecdotes although we are not aware of all of them.

Regards
Sreeni Iyer
Terracotta Inc.

Yep - check it out at http://terracotta.org/confluence/display/labs/Open+Data+Grid
And yeah w.r.t turning on the persistence mode, we have done quite a few use cases now where folks have simply used TC-Server to persist "transient data" that dosen't need to belong in a system of record...

e.g. one use-case was where mobile-users search and the appserver federates the search requests to other sites and presents collated results to the user. The results are also additively "cached" and persisted by the appserver (with the Terracotta virtual memory impl). The disk isn't backed up etc. since if one happens to lose the disk, in this case, the query gets re-federated to the other sites and the cache just gets rehydrated...

Thanks.

Yep relying on the Terracotta virtual memory implementation that transparently pages out and faults in object-graphs, we have clustered real applications for folks with over 32G of data. We have gone much higher in internal tests...So it probably might just work.

Of course, if you iterate over every element of a collection as part of the "report" you would be constantly paging-in and faulting-out and that may adversely impact performance. Perhaps your "report" dosen't do that - if it does and you are concerned about performance, then you could partition your data (use a Hashmap of Hashmaps or some such datastructure) and then execute portions of the report on each node.

Let us know if you need anything with the sessions use-case as well.
Cheers.
Iyer.
Posting for AkshanthaKumar:
=====================
Hi

How do I cluster a TCP server. I am not sure how to go about it. Lets say I have a code below, how would I enable clustering on it using Terracotta and what benefits would I get by clustering using Terracotta like would the threads be moved to workers.

Code:
 import java.net.*;
 import java.io.*;
 
 class TestServer extends Thread {
     public TestServer() {
         super("Demo");
         start();
     }
 
     public void run() {
         ServerSocket acceptSocket=null;
         try {
             acceptSocket = new ServerSocket(123);
             while(true) {
                 final Socket s = acceptSocket.accept();
                 Thread t = new Thread() {
                     public void run() {
                         try {
                             doRequest(s);
                         } catch(Exception err) {
                             System.out.println("Error at client :"+err);
                         }
                     }
                 };
                 t.start();
             }
         } catch (IOException e) {
             System.out.println("Error at server :"+e);
         } finally {
             try {
                 acceptSocket.close();
             }catch(Exception re){
                 throw new RuntimeException(re);
             }
         }
     }
 
     public final void doRequest(Socket s) throws IOException {
         InputStream in = s.getInputStream();
         OutputStream out=s.getOutputStream();
         PrintWriter rout=new PrintWriter(
         new BufferedOutputStream(out));
         rout.println("Hello");
         rout.flush();
         try {
             Thread.sleep(1000);
         } catch (InterruptedException e){
             System.out.println("Do request thread interrupted : "+e);
         } finally {
             out.close();
         }
         s.close();
     }
 
     public static void main(String args[]) {
         new TestServer();
     }
 }

=====================
Regards, Akshathkumar Shetty
Tech Lead
enStage Software Pvt. Ltd.
Email: ashetty@enstage.com Off: +91-80-25204351, 80-32722080 Telefax: +91-8025204350 Bangalore, India
Thanks for the stack trace - We are working on it. There is a JIRA at
http://jira.terracotta.org/jira/browse/CDV-110?rc=1 for tracking purposes.
regards
Lets look at it in 2 parts:
>> nothing is shared
Check http://www.terracotta.org/confluence/display/wiki/Troubleshooting+Guide#TroubleshootingGuide-IdideverythingIwassupposedtodoandnothingisbeingclusteredorshared.Whatnext%3F
Could you attach your startup script (are all the Java options being passed in correctly), tc-config.xml and (appropriate classes if possible)...Do you see any Terracotta exceptions in the log ?

>> eclipse issue
Perhaps
https://forums.terracotta.org/forums/posts/list/130.page
https://forums.terracotta.org/forums/posts/list/122.page
might have some actionable information. Take it was installed with the latest instructions at http://www.terracotta.org/confluence/display/docs/Eclipse+Plug-in..If not drop us a line and we can dig in further.

Hope this helps.
Also to pass Java system properties - you have to pass these in with the fully qualified name – i.e. –Dcom.tc.l1.cachemanager.threshold=30 (not –Dl1.cachemanager.threshold). If you don't pass it in, the default for that property is 70 (i.e. cache evictor will kick in when heap utilization gets to 70%)
Cool. We'll take a look as well - in the meanwhile if you are getting stuck somewhere specific let us know. Cheers...
Yes, Terracotta's virtual memory implementation feature provides you some knobs to control how much of the clustered object graph resides on the L1 (application server) and how much resides on L2 (the Terracotta Server) and on disk attached to L2.

See the discussion at http://forums.terracotta.org/forums/posts/list/97.page

So in the use-case you describe, you'd set l1.cachemanager.threshold Java System property to something very low (default is 70, i.e. the evictor runs when heap utilization gets to 70%) to ensure that cache eviction runs frequently and the amount of application-server heap consumed by your cache is minimal.

Hope that helps.
Cheers
Also might help if you could post the stack-trace and the tc-config.xml.

I have seen an exception like this on a previous version, when there was something syntactically wrong with the specification of an element in the tc-config.xml (i.e. the xml may be well-formed but the expansions in the include/exclude declarations follows AspectWerkz style of specification - so missing 1 "." somewhere might break it, for example).
 
Profile for zeeiyer -> Messages posted by zeeiyer [458] Go to Page: Previous  1, 2, 3 ... 28 , 29, 30, 31 Next 
Go to:   
Powered by JForum 2.1.7 © JForum Team