Hi Mark,

 

If what you mean by versioning is check in/check out, then the answer to
your question is that one can build an application that versions
documents with MarkLogic.  Because MarkLogic Server supports
transactions, you can build an application that would keep track of the
versions of a document and allow users to check out and check in
different versions, and have MarkLogic Server store all of the versions
of the documents.

 

When you update a document in a transaction (in an XQuery statement),
the transaction is run as an update statement in what is known as
Readers/Writers mode.  In readers/writers mode, a lock is put on the
document(s) used in the statement, and no other transactions can update
those documents until those locks are released, which happens at the end
of the transaction when the update commits, so transactional integrity
is preserved.     

 

I am not sure what you mean by the "last update wins" scenario; in a
transaction, the updates are always consistent.   These transactions all
happen automatically in MarkLogic Server, whenever there is an update
that occurs within an XQuery statement.  Now if another transaction
comes along after the first one commits, it will see the newly committed
version of the document, and if it updates it, it will lock it so no one
else can update during the transaction.  Meanwhile, the documents being
updated are still available for read-only queries (including searches);
any query will use the latest committed version of the document(s) at
the time in which it runs.

 

For details how this works, see the "Understanding Transactions in
MarkLogic Server" chapter of the Developer's Guide
(http://developer.marklogic.com/pubs/3.2/books/dev_guide.pdf).

 

-Danny

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mark
Waschkowski
Sent: Saturday, February 02, 2008 6:25 AM
To: [email protected]
Subject: [MarkLogic Dev General] versioning of data

 

Hi,

I checked the dev doc but didn't see anything exactly like my question:
does Marklogic support versioning of documents, or any plans to in the
future? I'm concerned about the 'last update wins' scenario.

Thanks,

Mark

_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to