Modelling Checkin-Checkout using locks
Hi there, I am currently thinking about ways how to model a reliable checkout-checkin scenario with XML documents. In an older SGML CMS system that we build, we implemented the procedure roughly like that: - user chooses a document in the CMS and clicks on CHECKOUT - CHECKOUT copy the document to a private area of the user - CHECKOUT will lock the original file (reads allowed, write forbidden) - user edits the the copied content - user performs either a CHECKIN which will copy the private copy of the file into its original location and release the lock - or user will cancel the checkout (removing the copy and releasing the lock) I see that exist-db has support for read and exclusive locks (inside the util: module). Can they be used to implement such a scenario? Is it possible to associate (arbitrary metadata) with locks like lock time, user who created the lock, app specific data? Is it possible to introspect all current locks on the database? Is there something like a lock token (in WebDAV) does one needs to release a lock? Andreas
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 oops, this was intended for the exist-db guys...but the question are similar...anyone used BaseX with a checkout-checkin scenario? Andreas Andreas Jung wrote:
Hi there,
I am currently thinking about ways how to model a reliable checkout-checkin scenario with XML documents.
In an older SGML CMS system that we build, we implemented the procedure roughly like that:
- user chooses a document in the CMS and clicks on CHECKOUT - CHECKOUT copy the document to a private area of the user - CHECKOUT will lock the original file (reads allowed, write forbidden) - user edits the the copied content - user performs either a CHECKIN which will copy the private copy of the file into its original location and release the lock - or user will cancel the checkout (removing the copy and releasing the lock)
I see that exist-db has support for read and exclusive locks (inside the util: module).
Can they be used to implement such a scenario?
Is it possible to associate (arbitrary metadata) with locks like lock time, user who created the lock, app specific data?
Is it possible to introspect all current locks on the database?
Is there something like a lock token (in WebDAV) does one needs to release a lock?
Andreas
- -- Regards Andreas Jung andreas@andreas-jung.com about.me/andreasjung -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQGUBAEBAgAGBQJU60znAAoJEADcfz7u4AZj1lQLwKUdviDiZ8+coRTOSfh+W+Iw 6GMSIAL3VrmnpiTTkipwJS+8VlKqUTlb7V/tQPuG1kUVgILAtN6LaUrnJgvYlbbn edNkJzxcbrfr0Yme2a/f3DhHkSp3f4csb6nCd0OOIOP5n2y9+/judrnffoaOFlyq 8tJM3/KU732M222YrWzah8l51i56FDYQohL3H0fkUWh3e6SKZQrTQyGhgFBC2ER7 XbfFpf976vzevLtMiF1anEt+tM86DQukRqIKIrC9sgO0VRz2LT3sNv2rO7bEDdok TZZsx+VbXCbp3hNWc8L/pH4UEz9A2xbvxms/nRt0aQmA2C8F0HS2QX/5fTyRW860 ValDn9/9ctyANjYGQkrrH3BeQ2AW2sjflUDQt29vpmpWC1JivOu7fAgCN3mHyT3F dBdCjoQpryQ4baaq4kKl1ecQMIDfmKJ1Bl3St4qrkkfk7fIyhUIofB+zwM+wcLXp t46CiTTxVPKbFjsce3ZyClW76mlUEek= =gISO -----END PGP SIGNATURE-----
oops, this was intended for the exist-db guys...but the question are similar...anyone used BaseX with a checkout-checkin scenario?
First of all: I'm also interested to hear more about this from our users.. Talking about locking functions, we plan to generalize our WebDAV locking feature to a general database locking mechanism. The WebDAV locks already contain information on the user who created the lock, a timeout, the scope (shared vs. exclusive), the lock id, etc., and this info could be extended by the lock time and other (maybe even application specific) info. Do you have some examples for data that could be specific to an application? Christian
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Christian Grün wrote:
oops, this was intended for the exist-db guys...but the question are similar...anyone used BaseX with a checkout-checkin scenario?
First of all: I'm also interested to hear more about this from our users..
Talking about locking functions, we plan to generalize our WebDAV locking feature to a general database locking mechanism. The WebDAV locks already contain information on the user who created the lock, a timeout, the scope (shared vs. exclusive), the lock id, etc., and this info could be extended by the lock time and other (maybe even application specific) info. Do you have some examples for data that could be specific to an application?
In our SGML CMS you were able to checkout parts of a bigger document for example a chapter. In this case we needed additional information inside the checked-out document - perhaps not on the lock itself - we used processing instructions for that as far as I recall. Being able to store arbitrary key-value pairs on a lock would be sufficient. Otherweise I would store such application specific data as an additional XML file containing these informations. Andreas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQGUBAEBAgAGBQJU62IaAAoJEADcfz7u4AZjNZALv0Io/kz/HrL2w/1AjXrYs2n4 bMpW+qqxRj91WlLJxDZrjfHXOaaB3km+aHBlatEWQOnZSeLtaHBYYzsSToXHvj5L O29kxgRaMXLw30YtsfeRIVLeefGY6Y34F44N+EZmrdqb1Mfr2HCl9/B/LTBhv34z +9H22XMroPEgM40sBWkUzl6pr+FHwDH5NovByFuwu2Bw+gvhOWlWRvwZ5i5xRmvY OET2uhqVeAqeHaEyyH7Ox+m95deqsVU9t/JrA71xtkXfaNpIDNtgxnqaej2pLSDc XiaklMmaqnNMZUahd+StoCtvqPnAGloWxjbb4WUnEU+6z+lOB+u/vbxNXBQkyeSb 2lRbDcvVbiitupC3tackuNxLjOBbvPMNYsQ010297VkALKTp2ZBX8azPei/SgvaQ cQJxegRpSMi+ThOam5U2V4i0+CSkRrUV6EgtYYEyPuGa6mDEmNi80V6yELF328H6 CI/dcovjtTp/6VDZB3g8u02oXVmu7s4= =HJMw -----END PGP SIGNATURE-----
participants (2)
-
Andreas Jung -
Christian Grün