Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question

Gigaspaces Socket Connection PU and Tomcat 6.x integration

I am glad to inform you that we have received the Gigaspaces Startup License.

We have the requirements as follows:

1) Start a Socket connection from Processing Unit to external data feed and write the feed data to the space and generate notify event.
2) Start a Tomcat 6.x instance and run Comet Processor (Async) Servlets.
3) The Tomcat servlets will listen for space notify events and read the written entry and send to the requested external clients.

Please lets us know is it possible using Gigaspaces. If it is possible please give us some pointers to getting started.

This thread was imported from the previous forum.
For your reference, the original is available here

asked 2009-09-05 04:00:01 -0500

abhilash428 gravatar image

updated 2013-08-08 09:52:00 -0500

jaissefsfex gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

1.This basicaly involves consuming the data feed packets , transfer these into Space objects and use writeMultiple to push these into the space. Make sure you get the space proxy using NoWriteLease mode to avoid the return Lease objects. I guess you don’t need these for this activity. See the writeMultiple method here:

2. Why not using the built in Jetty server. It will make your like simpler. See:

Consider using the Service and Task executors to implement the remoting functionality that allows the web tier to interact with the data grid. See:

3. Are you sure you need notify container in such a case? It sounds like polling container will be more relevant. I guess you need only one consumer (notify container) for the data and not multiple (notify container).


answered 2009-09-05 04:26:57 -0500

shay hassidim gravatar image
edit flag offensive delete link more



What we are looking for is a Zero latency solution i.e. the moment data feed is written to the space, in less than 1 sec the webtier should send the data to the clients.

Do you think polling container or Executor service is the best solution for this?

abhilash428 gravatar imageabhilash428 ( 2009-09-05 05:03:04 -0500 )edit

Within one full second you could perform many things with GigaSpaces: - Write 50,000 objects per sec to a remote space (including replicate to backup) using writeMultiple (using multiple threads) - Read 100,000 objects per sec from a remote space using readMultiple (using multiple threads) - Read 10 million objects from a local cache using readById.

In terms of latency: 1K object remote write/read operation takes less than a millisec over 1 G network.

So , the answer is yes. I think you could achieve the performance you need from GigaSpaces with these operations.


shay hassidim gravatar imageshay hassidim ( 2009-09-06 20:12:59 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2009-09-05 04:00:01 -0500

Seen: 53 times

Last updated: Sep 05 '09