<!doctype html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<div class="default-style">
I've face a problem for years now using Gemstone/S and I did several attempts to solve this, but I would like to ask, if there is a hidden trick to get rid of concurrency in this case using Gemstone/s.
</div>
<div class="default-style">
</div>
<div class="default-style">
Think about a session object holding an attribute with a timestamp - a timestamp, where the last successful commit has been done in this session. Its a rough index about how the session hasn't done anything (regarding the read-only user case).
</div>
<div class="default-style">
</div>
<div class="default-style">
This session object is shared in a Javascript ui frontend-application (actually the gop to the session) - and now whenever this ui calls an API function on the server (resulting in a commit), the session object in the server gets updated. But if the UI now opens several windows and would like to do sevral independent stuff with the same session in a concurrency way - you will notice, that the API calls might fail - due to concurrency of updating the same timestamp from different "logical" threads.
</div>
<div class="default-style">
</div>
<div class="default-style">
How can this be solved in Gemstone/S ? Retry of the transaction just due to this field might be pretty cost intensive.
</div>
<div class="default-style">
</div>
<div class="default-style">
How did I try to solve that in the past ?
</div>
<div class="default-style">
</div>
<div class="default-style">
a) I added an update object in a work queue and and independent topaz process worked on that work queue
</div>
<div class="default-style">
</div>
<div class="default-style">
In a newer attempt I introduced RabbitMQ in our solutions and use RabbitMQ for holding the information formerly stored in the work queue in Gemstone/S and now the topaz process receives information from RabbitMQ and updates the data in an optimized way. The good thing here is, that I get session updates in an transaction with or without commit.
</div>
<div class="default-style">
</div>
<div class="default-style">
Any ideas ?
</div>
</body>
</html>