[katello-devel] Partial updates discussion

Dmitri Dolguikh dmitri at redhat.com
Mon Jul 25 12:06:13 UTC 2011


On 11-07-24 11:01 AM, Bryan Kearney wrote:
> On 07/22/2011 10:13 PM, Tomas Strachota wrote:
>> Hello,
>>
>> I'd like to start discussion about partial updates in katello. They are
>> now used only in changeset controller for updating the content but there
>> will be more space for them in future and the implementation should be
>> consistent. At least one another place where we can use it now is
>> updating templates.
>>
>> Currently the patches that are sent to the server are in custom json
>> format. Eg.
>>
>> {
>> '+products': ['product_1']
>> '-products': ['product_2']
>> '+packages': [{'name': 'warnerbros', 'product': 'product_3'}]
>> }
>> #adds product_1 and package warnerbros, removes product_2
>>
>> The implementation is very simple and works without any problem. It
>> should be sufficient as long as we update whole db fields (and not let's
>> say parts of long textual fields).
>>
>> Dmitri pointed out the fact that it is custom format and proposed using
>> standard diff output format. His primary idea was to diff the current
>> state with the changed one and send the patch to server alongside with a
>> timestamp.
>>
>> These are two designs we have. I'd like to gather other ideas, compare
>> pros & cons, pick the best one and reimplement if necessary. All
>> comments are welcome. Dmitri, could you please provide more information
>> about your solution?
>>
>>
>
> If we have the old and new why not just send a complete replacement?
>
> -- bk
>
> _______________________________________________
> katello-devel mailing list
> katello-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/katello-devel
If updates are made concurrently, the earlier set of changes will be 
lost. At the very least we should detect those situations, but I'd very 
much prefer minimizing these sort of conflicts.
-d
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/katello-devel/attachments/20110725/3f40a20c/attachment.htm>


More information about the katello-devel mailing list