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

Ask Your Question
0

Is there a way to deploy a processor and have it process existing objects?

I just deployed a processor and want it to process the objects that are already in the space. Can I do that?

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

asked 2013-01-25 11:47:41 -0500

rickfish 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
0

Rick,

A "processor" usually running continuously. It can be constructed using :
- Polling container - a queue based consumer. Good with a single consumer.
- Notify container - a topic based consumer. Good with multiple consumers.

Both can be deployed collocated with the space or remote. Once collocated the serialization and network overhead is avoided.
Both support also batching where the consumer can consume multiple objects in one call.
Both support FIFO based data consumption.

Another option would be to invoke a Task or a DistributedTask across the entire cluster partitions. In this case the Task code will be sent from the client to the space and executed. This approach will also avoid serialization and network overhead as the executed code is collocated with the space. This is more dynamic approach as you will be able to create and invoke these Tasks while the system is running and execute these once needed , still you will need explicitly to invoke the Task.

Which option fits your needs?

Shay

btw:
The following will provide you some best practices how to implement "processor":
http://wiki.gigaspaces.com/wiki/display/SBP/Map-ReducePattern-ExecutorsExample
http://wiki.gigaspaces.com/wiki/display/SBP/Master-WorkerPattern

answered 2013-01-25 12:02:37 -0500

shay hassidim gravatar image
edit flag offensive delete link more

Comments

Shay, I want to be notified when the appropriate object for my processor is written to the space once it is deployed. That works fine.

But it would be nice if I could tell Gigaspaces that, upon deployment of my processor, invoke my processor for all objects that were already in the container at time of deployment.

Does this make sense? if so, Is this possible?

rickfish gravatar imagerickfish ( 2013-01-25 12:45:13 -0500 )edit

Paul, As spoke over the phone on Friday, if you have space and processor as separate processing units, you have to update the processor's PU to point to a remote space. Once you update this, you can achieve what you are looking for.

HTH Sean

seankumar gravatar imageseankumar ( 2013-01-27 08:44:57 -0500 )edit

thx Sean

rickfish gravatar imagerickfish ( 2013-01-29 12:04:30 -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

Stats

Asked: 2013-01-25 11:47:41 -0500

Seen: 92 times

Last updated: Jan 25 '13