Replicating deletions

Hi All,

I am writing an application that handles

replications between a central database and

deployed databases. At the moment replications

of modified documents work (additions to

documents).

My question is: Is it possible to replicate a

deletion (that is, if a user deletes a document

on a deployed database, then I want it to be

replicated to the central database and vice versa)

We are using the 5.06 api at the moment. If it

is not possible with this api then which version

of the api allows this.

All help greatly appreciated.

TIA.

Subject: Replicating deletions

Unless you have turned off repliate deletions in the replication settings/Send tab then it will automatically replicate them - UNLESS the sending server doesn’t have delete authority in the replica on the receiving server?

Subject: RE: Replicating deletions

Hi,

Thanks for the response. I did not make my

question clear enough. Instead of sending the

whole document, my app only sends the changes, the

other notes server receives the changes and merges

them in to the replicas. Additions work but

deletions don’t.

Subject: RE: Replicating deletions

???What are you deleting?

How are you deleting it?

Subject: RE: Replicating deletions

Ok. This is the situation.

Rather than sending the whole database

everytime, which could be 10 to 50 MB in size,

we create replicas of the databases to be used

and install them on remote domino servers. My

application only grabs the changes to the

databases since last check time. Say that a user

is modifying a discussion database, when a new

topic is added or a new respones or a response

to a response is added since last "replication

of the changes", these are extracted and sent to

my application on another machine which

processes it and merges the changes to the

appropriate replica database on the remote

sites.

However, if a user deletes a discussion thread

from the above mentioned database my application

does not seem to be able to grab the deletions

and send it over. I read it somewhere that when

a deletion occurs, only the notes ID of the

deleted record is kept in the stub rather than

a UNID.

Subject: RE: Replicating deletions

Not true. In fact, replication of deletions would rarely work if the UNID was not included in the stub, since the NoteID for any given data document is rarely the same from replica to replica. Deletions will be replicated unless the deletion stubs have been purged since the last replication, the “deletion” has arisen as the result of a replication cut-off date, or a replication formula prevents replicating the deletions.

The part I’m having trouble with is that you have an application that “replicates” ordinary replication. Why not simply use the built-in functionality?

Subject: RE: Replicating deletions

I can’t use the built-in functionality because myapp does more than just replications. Is there a

way to config domino to include the UNID in the

stub when a deletion occurs?

Subject: RE: Replicating deletions

As I said in my previous posting, the UNID is part of the deletion stub. Without that, deletions would only replicate by coincidence, and documents that shouldn’t be deleted would be deleted in one replica because they had the same NoteID as a document that was deleted in a different replica of the database.

And, for what it’s worth, I still don’t see why you’re not just replicating. You can do the “more” part after the documents arrive at their new destination.

Subject: RE: Replicating deletions

Hi Stan,

Is the inclusion of the UNID as of 6.5? We use version 5.0.11 of the API.

TIA

Subject: RE: Replicating deletions

No, it goes back as far as replication does. Only the UNID is identical in all replicas; the NoteID (of a data document) is only valid in a single database instance. The NoteID “0000BE8E” could represent 16 completely different documents in 16 replicas of the same database. The UNID “0812EA7E555661108525704C00142399” will always represent the document I am relying to in every replica of this forum, including the one on my desktop. (“Special database object” alias NoteIDs will also be the same, but those are not the “real” NoteIDs of the design documents.)

Subject: RE: Replicating deletions

Hi,

The reason we are not relying on native replication is that it requires a tcp

connection (2-way) whereas we only have a push type connection from the

server to the clients. We are using API version 5.0.11 currently. Is there a

later API available?

Ta.