resync / resync-simulator

ResourceSync Change Simulator
11 stars 6 forks source link

Unify inventory (serialization) #7

Closed behas closed 12 years ago

behas commented 12 years ago

Just to make sure we don't forget about this :-)

Here is how I see a unified conceptual "model" for inventory handling:

In Ruby I would probably implement the "the inventory" as mixin (http://rubysource.com/ruby-mixins-2/).

In python we could, for instance, implement "inventory" and specializations thereof as pyhton objects and mix them into the source and the client:

Inventory(object): def add_resources(...) def to_sitemap(...) def from_sitemap(...) def find_updates(self, other_inventory) def find_deletes(self, other_inventory) ....

Source(object, Inventory) ....

Client(object, Inventory) ....

Thoughts, comments are appreciated.....