How Replication Works

Domino data is stored in databases that are usually hosted by Domino servers, but which may also be hosted by your own Notes client. A given database might be hosted by a single Domino server or Notes workstation or by multiple machinesone or more Domino servers and possibly multiple users' Notes workstations as well.

The primary reason why a database may exist on multiple machines is so that users can gain access to the data more quickly and conveniently. Notes can deliver locally stored data to you more quickly than data stored on a Domino server. It can deliver data stored on a nearby server more quickly than data on a server half-way round the world.

But there's a problem with permitting databases to reside on multiple computers, which is that the content of the databases changes from time to time and somehow the changes have to get copied to the other copies of each database. The process of copying such changes is called replication. It is actually a special copying process. Replication does not overwrite the entire database, as copying a database would in your file system. Instead, it updates only the documents that have been modified (and, in fact, only the changed fields within those documents).

Although many programs use replication to move copies of data closer to the users, Notes is unusual in that, by default, it allows users to make changes to the data in any copy of the database. If you and I both change the same piece of data on two different copies of a database, we create a replication conflict. The servers will do their best to resolve the conflict, but may not be able to do so, in which case a human being will have to do so. Most other distributed database applications avoid this problem by requiring all changes to occur on a single master copy of the database, all others being read-only copies.

As a user, you need to know two things about replication. First, a given database might reside on multiple servers; you want to access the database on the closest one. Generally, your administrator can configure Domino so that, when you go looking for a database the first time, you will only find the one closest to you. But if you travel a lot, you might occasionally want to connect to a different copy of the database than the normal one.

Second, you may need to know how to create and maintain replicas on your own Notes workstation. If you travel a lot or work from home and have to use a modem to connect to other computers, you will really appreciate Notes's ability to store local replicas of your server-resident databases. Not only will it be painfully slow to retrieve in real time each bit of data over the slow telephone connection, but the telephone connection might be costly. On the other hand, even if you only ever use Notes in your office at work, you might still find yourself using a local copy of your mail database if the network administrators need to conserve network resources. If so, you need to know how to initiate replication with your server.

Home Server is the term used for the Domino server on which your mail database resides. If you can access several Domino servers at work, the one containing your mail database is your home server.

When you are ready to replicate a database, you'll connect to the server in your office. After the two computers "shake hands" and recognize each other, your computer begins sending updates you made to your database replicas. Then your computer receives any modifications made to the server's replicas since you last replicated.

Now look at replication with regard to your Mail database. To receive your mail, you connect to the server from home (or from the road) and replicate your Mail database. After you disconnect from the server, you read your mail, reply to some messages, delete some messages, and file some messages in folders. During this time, Mary Jones sends a new mail message to you, which is waiting on the server replica of your mail database. When you finish reading and replying to mail, you reconnect to the server and replicate mail again. During this replication period, the changes you made while disconnected (new replies, deletions, and so forth) are sent to the server copy of your mail database, and Mary's new message is sent to your replica of the database.

Each database has a unique replica ID that identifies it as a genuine replica and not just a copy of the database (you can see it on the Info tab of the Database properties box). If the database on your computer does not have the same ID as the one on the server, replication won't occur.

Before replicating, the server also checks to see when the replica copy of the database on your computer was last modified. If that date is more recent than the date the database was last successfully replicated, the database replicates. The server also looks at the modification and replication dates on the server replica. If that replica was modified since the last replication, replication occurs. Domino maintains a replication history of each database you replicate (choose File, Replication, History to view the replication history of the database you have open).

When the database replicates, it updates only those document fields that have been changed since the last replication, and adds any new documents. Each document has its own unique Notes identification number (UNID) assigned to it when it is first saved (you can see it on the Document IDs tab of the Document properties box). Part of that number is a document-level sequence number that increases each time you modify the document. If the number is higher for a particular document than in the database on the server, it is replicated to the server. Any documents that you deleted or that were deleted from the server replica leave a deletion stub, and that is replicated so the document is deleted from other replicas of the database, unless Do not send deletions was checked in the replication settings dialog box.

When replication is complete, you disconnect. You now have an updated copy of the database on your PC.

Sams Teach Yourself Lotus Notes 7 in 10 Minutes
Sams Teach Yourself Lotus Notes 7 in 10 Minutes
Year: 2003
Pages: 182 © 2008-2017.
If you may any questions please contact us: