[katello-devel] Partial updates discussion

Tomas Strachota tstrachota at redhat.com
Sat Jul 23 02:13:29 UTC 2011


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?


Thanks,

Tomas




More information about the katello-devel mailing list