Re: Safe read after write

2015-12-07 Thread Chetan Mehrotra
On Mon, Dec 7, 2015 at 8:28 PM, wrote: > Are you recommending that my consumer attempts to retrieve the node until it > is present? Kind of. One approach I can think of 1. If your code is adding node under specific path say /workItems then have a JCR Listener registered to monitor changes under

Re: Safe read after write

2015-12-07 Thread david
Thanks for the explanation. Can you elaborate on your last comment regarding polling as part of the queue consumer logic? Are you recommending that my consumer attempts to retrieve the node until it is present? On 2015-12-07 07:54, Chetan Mehrotra wrote: Hi David, To elaborate a bit on wha

Re: Safe read after write

2015-12-07 Thread Chetan Mehrotra
Hi David, To elaborate a bit on what Vikas and Davide said Oak has a MVCC storage model which is eventually consistent. So any change made on one cluster node would not be immediately visible on other cluster nodes. Instead each node would periodically poll for changes in the backend store (Mongo

Re: Safe read after write

2015-12-07 Thread Vikas Saurabh
On Mon, Dec 7, 2015 at 7:14 PM, David Marginian wrote: > Yes, each node however is referencing the same mongo instance. Is there a > way to tell jackrabbit to grab the document from mongo instead of using the > cluster cache (assuming that is what's going on). Each cluster node has a thread (b

Re: Safe read after write

2015-12-07 Thread David Marginian
Yes, each node however is referencing the same mongo instance.  Is there a way to tell jackrabbit to grab the document from mongo instead of using the cluster cache (assuming that is what's going on). On Dec 7, 2015 6:24 AM, Davide Giannella wrote: > > On 07/12/2015 12:56, David Marginian wrote

Re: Safe read after write

2015-12-07 Thread Davide Giannella
On 07/12/2015 12:56, David Marginian wrote: > There are separate Oak instances in separate vms. In this case you're dealing with a cluster. DocumentMK is not my cup of tea; but when you write something on a cluster node, it's not immediately visible to the whole cluster. This is to achieve the fas

Re: Safe read after write

2015-12-07 Thread David Marginian
There are separate Oak instances in separate vms. On Dec 6, 2015 10:44 PM, Chetan Mehrotra wrote: > > Does the above setup involves multiple Oak instances (say in separate > JVM) or message producer and consumer of queue are use same Oak > instance? > > > Chetan Mehrotra > > > On Thu, Dec 3,

Re: Safe read after write

2015-12-07 Thread David Marginian
There are multiple Oak instances in separate vms. On Dec 6, 2015 10:44 PM, Chetan Mehrotra wrote: > > Does the above setup involves multiple Oak instances (say in separate > JVM) or message producer and consumer of queue are use same Oak > instance? > > > Chetan Mehrotra > > > On Thu, Dec 3,

Re: Safe read after write

2015-12-06 Thread Chetan Mehrotra
Does the above setup involves multiple Oak instances (say in separate JVM) or message producer and consumer of queue are use same Oak instance? Chetan Mehrotra On Thu, Dec 3, 2015 at 8:33 PM, wrote: > I am using Oak with a DocumentNodeStore. I am storing content then adding a > message onto

Safe read after write

2015-12-03 Thread david
I am using Oak with a DocumentNodeStore. I am storing content then adding a message onto a queue. The consumer of the message uses and id to retrieve the content. I am seeing frequent failures in the consumer (node not available/does not exist). If I add a Thread.sleep after I store the nod