New blog post: Lease on documents

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

New blog post: Lease on documents

Alessandro  Vernet
Administrator
http://blog.orbeon.com/2017/12/lease-lock.html


Enjoy,


Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: New blog post: Lease on documents

bwallis42
Hi Alex,
  The blog post mentions some changes/additions to the persistence API to
support the lease feature. Is there any documentation on the additions to
the API to support this feature?

We have already implemented our own optimistic locking mechanism in our
persistence implementation but I am keen to see if we can utilise your
standard lease feature instead of our home grown mechanism.

thanks
brian...


--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: New blog post: Lease on documents

Alessandro  Vernet
Administrator
Hi Brian,

You can find some information about the API in the comment linked below, but
we should indeed have some proper documentation about this. I'm planning on
doing it this week, and then will post a follow-up here, but of course, just
let me know if you already have any comment based on what you're seeing in
the comment.

https://github.com/orbeon/orbeon-forms/issues/1067#issuecomment-338298131

Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: New blog post: Lease on documents

Alessandro  Vernet
Administrator
Here we go Brian: the API is now documented. See the URL below, and I'm
curious to read your feedback about this, and in particular if this is
something that you'll be able to leverage.

https://doc.orbeon.com/form-runner/api/persistence/lease.html

Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: New blog post: Lease on documents

bwallis42
Thanks for that Alex.

We are having an internal discussion about this. Basically it is a
difference between leased locks and our current implementation of optimistic
locks. We are thinking about what is better for our users.

Our current locking mechanism disallows editing of a document if any other
user has a draft of that document.

Our persistence implementation creates a new draft as soon as a user begins
editing a form rather than at first draft save/autosave so we always know
when a form is being edited. Since the drafts are removed when the form is
saved this works reasonably well but of course the locks can last for as
long as a draft is kept (default 7 days in our implementation) so we also
allow a second user to ignore the lock and continue to edit and save the
form.

Once the second user has saved the form, the first user's draft becomes an
orphan and cannot be saved (we use the form version to do this, essentially
a form of optimistic locking). If the first user saves first then the second
user cannot out but that is the nature of optimistic locking.

In the failure cases the users still have access to the draft and can view
it to enable them to manually merge any changes if they want.




--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: New blog post: Lease on documents

Alessandro  Vernet
Administrator
Got it Brian; indeed doing a form of optimistic locking, as you did, is
another option we considered. Both optimistic and pessimistic locking have
their place, depending on the situation, and we went with the pessimistic
approach mostly because this was a requirement from the customer who
sponsored this feature :).

Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet