Master Worker implementation with user-defined UID

The classic master worker implemented in the following way:

Master write RequestEntry and then take ReplyEntry with long timeout from the space (blocking take)

Worker/Slave take using long timeout (blocking take) RequestEntry and then write ReplyEntry in the same TX to the space.

Master getting the ReplyEntry as a result of the take from the space immediately when the Worker/Slave committed the TX

If you want to perform the take using the UID. In general there should not be any problem with this.

You can use the UID generated by the space or use a UID that you generate.

Implementing the __setEntryUID and __getEntryUID methods as described in the doc ( - by storing the passed value into transient attribute when entry is created at the client) allows you getting the UID for entries that do not extends the MetaDataEntry or implement the IMetaDataEntry.

With this approach you do not need to generate the UID yourself via ClientUIDHandler ??? it is optional. You can use the UID GigaSpaces generated for the entry when written into the space , still - if can you generated the UID yourself and called the __setEntryUID.

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|]{quote}

asked 2006-03-30 21:22:01 -0600

bernard gravatar image

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

jaissefsfex gravatar image
edit retag flag offensive close merge delete