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

Ask Your Question

Livelock in event-driven services


are event-driven services guaranteed to process requests in the same order as requests were created? If the client sends requests #1, #2, #3 etc faster than the service implementation could process them, is there a guarantee that the request #1 is processed before the request #100?

If there is no such guarantee, is there at least a protection from a livelock? If new requests are sent with approximately the same speed as they are executed, is there a guarantee that each request will be eventually executed, or could a request be indefinitely postponed because other requests (which were sent later) are being executed?

Background of the question: when I run performance tests for an event-driven service (async calls) under a heavy load and measure a latency, the measured latency for some requests appears too large compared with a time which it takes for a service to process a single request. The large latency could be perfectly explained if some requests are queued for an execution for a long time because other requests, which were sent later, are processed earlier (out-of-order).

asked 2016-10-21 09:57:29 -0500

Alexey Serdyuk gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

The org.openspaces.remoting.EventDrivenSpaceRemotingEntry used with Event Driven Remoting would need to be FIFO enabled to support ordered processing. This would support FIFO ordering at the partition level.

As you have observed the EventDrivenSpaceRemotingEntry is not FIFO enabled hence the unordered processing behavior.

Are you running the service collocated or remote?

From:forum@ask.gigaspaces.org [mailto:forum@ask.gigaspaces.org]

answered 2016-10-21 10:34:30 -0500

shay hassidim gravatar image
edit flag offensive delete link more


In this particular performance test (based on a service which we use in our application) the event-driven service was remote. In other parts of our application we are using colocated as well as remote event-driven services.

Alexey Serdyuk gravatar imageAlexey Serdyuk ( 2016-10-24 01:07:10 -0500 )edit

For collocated logic execution the executor based remoting will be faster as it is using a different more lightweight mechanism executing the service methods. This option has no FIFO support but you can control the thread pool allocated for handling such requests (custom operation LRMI thread pool). http://docs.gigaspaces.com/attachment...

shay hassidim gravatar imageshay hassidim ( 2016-10-24 05:52:24 -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


Asked: 2016-10-21 09:57:29 -0500

Seen: 319 times

Last updated: Oct 21 '16