chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florian Müller <f...@apache.org>
Subject Re: A better way to add/remove hold in CMIS 1.1?
Date Thu, 04 Feb 2016 08:54:22 GMT
Hi Mike,

You may want to move this discussion to the CMIS TC. The Technical 
Committee is planning CMIS 1.2/2.0 at the moment. It would be a good 
time now to add it to the discussion.

Adding change tokens support on the CMIS level is relatively easy even 
if the native repository doesn't support it. Just use the last 
modification date as the change token value. It's not perfect, but 
depending on the time resolution of your repository it is pretty 
effective.

- Florian



> Florian,
> 
> Thanks for your response. In my case, our content server implements
> hold as relationship like folder. There is no hold list stored for
> each of the objects in content server. We need to query the
> relationships related to the object to get all the holds. If a whole
> list is updated, we need to query out all the existing holds and
> compare the two list.
> 
> In the most cases, from business' perspective, add/remove hold is
> typical usage scenario because a specific user does not care much
> about which hold is currently on a specific object. What he/she cares
> is whether a new hold should be added or whether an existing hold
> should be removed. One workaround that is under discussion is to
> enforce user to add prefix like AddHold_ or RemoveHold_ to the object
> ids that the user want to update in the list. This way, CMIS server
> can easily understand the intention of the user and no need to do a
> retrieve and compare.
> 
> Unfortunately, our content server has no support to change token.
> 
> Best Regards,
> 
> Mike Li(李永亮)
> IBM Content Manager RM Development
> Tel:(86-10)82453403 Fax:(86-10)58851920 Tie-line: 905-3403
> liyongl@cn.ibm.com
> 
> Florian Müller ---2016/02/03 16:57:52---Hi Mike, I hope I've some
> answers for you.
> 
> From: Florian Müller <fmui@apache.org>
> To: dev@chemistry.apache.org
> Cc: Srinivas Nv Gannavarapu <srinivas.gannavarapu@in.ibm.com>, Randy
> Richardt <rrichar@us.ibm.com>, Jay Brown <jay.brown@us.ibm.com>, Yong
> Liang Li/China/IBM@IBMCN
> Date: 2016/02/03 16:57
> Subject: Re: A better way to add/remove hold in CMIS 1.1?
> 
> -------------------------
> 
> Hi Mike,
> 
> I hope I've some answers for you.
> 
> Re a) Holds are stored as a multi-value property. CMIS only allows
> retrieving and updating multi-value properties as a whole. There is no
> 
> support for partial retrieval or partial update.
> But if a client doesn't modify the list of holds, it shouldn't send it
> 
> to the server. Hence, there is no need for the server to retrieve the
> list of holds all the time.
> Do you except a frequent change of holds on an object? In the use
> cases
> I know, holds are not updated very often.
> 
> Re b) That shouldn't happen if your server implements change tokens
> correctly. Change tokens are supposed to prevent lost updates.
> 
> - Florian
> 
>> Hi all,
>> 
>> In the current CMIS 1.1 spec, hold is supported by secondary type.
>> Specifically, the user can add/remove ids from cmis:hold.rm_holdIds
> to
>> add/remove holds. There are two major issues here.
>>    a) The user need to firstly retrieve out the whole hold list
> before
>> the
>>    user can add/remove hold. The list might be a big one depends on
>>    business needs. In CMIS server side implementation, we need to
>> firstly
>>    retrieve out this list from content server and compare it to the
>> list in
>>    the update request. So that we get to know which one should be
>>    added/removed. Even though there is no change in this list, we
> still
>>    need to do the retrieve and compare practice in each checkin.
> This
>> will
>>    not perform well.
>>    b) May result in inconsistences in consequent updates. For
> example,
>> user
>>    A is trying to add a hold, so it pass the original list plus the
> one
>>    that it wants to add hold. Now user B wants to add another hold.
> If
>> user
>>    B's original list had been retrieved out before user A completed
> the
>>    update, then user A's update will be overwritten by user B's
> update,
>>    unintentionally.
>> 
>> 
>> So, I wonder whether there is a better way to add/remove holds
> without
>> going through the retrieve and compare logic in an update(checkin).
>> Thanks
>> in advance!
>> 
>> 
>> Best Regards,
>> 
>> Mike Li(李永亮)
>> IBM Content Manager RM Development
>> Tel:(86-10)82453403 Fax:(86-10)58851920 Tie-line: 905-3403
>> liyongl@cn.ibm.com

Mime
View raw message