Replication and Conflict management

47 views
Skip to first unread message

KiranPVUthaman

unread,
May 16, 2012, 12:56:29 PM5/16/12
to ravendb
Hi All,

I am new to RavenDB and would like to request some help regarding the
Replication and Conflict management in RavenDB.

I setup two instance of RavenDB in my machine (with different port
numbers) and configured replication between these two. Now I did some
document update and purposefully created a conflict as I wanted to
know how to manage the conflict.

Looking at different blogs and posts, I came to know that I could do
this by catching the exception when I read some records. Please see
page http://ravendb.net/docs/server/bundles/replicationconflicts.

With this approach I will be able to resolve conflicts only when I
read the conflicting record and system raises the exception.

May I ask your help to understand whether I could handle the conflict
in such a way that my client application get a notification whenever a
conflict is created in the DB? May be something like, DB raising an
event when it encountered a conflict and client listening to that
event.

The other approach I have in mind is to periodically go through each
document available in my DB and resolve any conflict manually using
code similar to what is there in the above provided link. But, I am
concerned about the performance implications this might have
considering my database may grow rapidly.

Any help will be appreciated.

Thanks in advance,
Kiran PV Uthaman

Itamar Syn-Hershko

unread,
May 16, 2012, 3:25:50 PM5/16/12
to rav...@googlegroups.com
You can resolve conflicts automatically on the server side, and you can also have it signal a listening client application if you wish to do so

But sometimes it is just easier to handle this in the client application only when the document with conflict is requested

Oren Eini (Ayende Rahien)

unread,
May 16, 2012, 8:04:46 PM5/16/12
to rav...@googlegroups.com
As Itamar noted, we provide you with an extension point that can give you a chance to notify a 3rd party about a conflict, or auto resolve it.

For future reference, it is this one:

KiranPVUthaman

unread,
May 17, 2012, 12:54:57 AM5/17/12
to ravendb
Thanks for the responses.... Will try out and let you know how it's
going.

On May 17, 5:04 am, "Oren Eini (Ayende Rahien)" <aye...@ayende.com>
wrote:
> As Itamar noted, we provide you with an extension point that can give you a
> chance to notify a 3rd party about a conflict, or auto resolve it.
>
> For future reference, it is this one:https://github.com/ayende/ravendb/blob/master/Bundles/Raven.Bundles.R...
>
> On Wed, May 16, 2012 at 8:25 PM, Itamar Syn-Hershko <
>
>
>
>
>
>
>
> ita...@hibernatingrhinos.com> wrote:
> > You can resolve conflicts automatically on the server side, and you can
> > also have it signal a listening client application if you wish to do so
>
> > But sometimes it is just easier to handle this in the client application
> > only when the document with conflict is requested
>
> > On Wed, May 16, 2012 at 7:56 PM, KiranPVUthaman <kiranpvutha...@gmail.com>wrote:
>
> >> Hi All,
>
> >> I am new to RavenDB and would like to request some help regarding the
> >> Replication and Conflict management in RavenDB.
>
> >> I setup two instance of RavenDB in my machine (with different port
> >> numbers) and configured replication between these two. Now I did some
> >> document update and purposefully created a conflict as I wanted to
> >> know how to manage the conflict.
>
> >> Looking at different blogs and posts, I came to know that I could do
> >> this by catching the exception when I read some records. Please see
> >> pagehttp://ravendb.net/docs/server/bundles/replicationconflicts.
Reply all
Reply to author
Forward
0 new messages