Forced manual tcp and persistence synchronization

87 views
Skip to first unread message

harry.cal...@gmail.com

unread,
Apr 24, 2014, 6:57:28 PM4/24/14
to java-ch...@googlegroups.com
Is it possible to force manual synchronous persistence save and tcp replication if synchronous mode=false?
System should not trigger automatically tcp replication and persistence storage save.

I mean in every x ms force manually the synchronous persistence save and tcp replication. 
It is important to finish all previous actions (save into the persistence store and replicate through tcp successfully).

Is there any solution to use a manual synchronization?
eg:
excerpt.synchronize();

Peter Lawrey

unread,
Apr 25, 2014, 2:07:15 AM4/25/14
to java-ch...@googlegroups.com

It is certainly possible. Generally speaking chronicle goes to great lengths to avoid pauses so we would need to understand why you would want to add delays.
By sending every X ms you are adding a worse case delay of X ms by design it would appear.

--
You received this message because you are subscribed to the Google Groups "Java Chronicle" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-chronicl...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Harry

unread,
Apr 25, 2014, 3:19:39 PM4/25/14
to java-ch...@googlegroups.com
I have checked and the synchronous mode is much slower then asynchronous mode.
In case of web application 20-50 ms response time is perfect. 
If we can use chronicle in asynchronous mode then we can process web application requests in batch and force the storage and replication in every 50 ms for example in synchronous mode.
After synchronous save and tcp replication we can send back the web responses in batch.
With this solution we can reach very high throughput with totally reliable persistent storage and replication.
For this case automatic chronicle tcp replication and persistence storage should be switched off totally and they should be triggered manually.
How it is possible to do?


Other solution could be to get an event notification about items which were stored and tcp replicated. In this case chronicle works in asynchronous mode normally.
However asynchronous replication frequency time should be able to configure in chronicle config.
Is it possible to define a listener to get notification event about items which were persistently stored and replicated? 

Peter Lawrey

unread,
Apr 25, 2014, 4:06:50 PM4/25/14
to java-ch...@googlegroups.com

You appear to have an interestimg solution but it not clear what problem you are trying to solve. Why is a delay of 20 ms more perfect than no delay at all?

You have only two options with a chronicle writing and reading/listening for new entries.

Reply all
Reply to author
Forward
0 new messages