Inconsistent data structure field behaviour

13 views
Skip to first unread message

Felix Stürmer

unread,
Sep 1, 2011, 7:10:33 AM9/1/11
to python...@googlegroups.com
Hi Isbardel and everyone!

I'm quite impressed by what you've created with python-stdnet and I like the documentation.

Currently I'm considering the use of python-stdnet in a project, but one thing itches me:

The semantics of operations on a model instance "m" seem to be that the changes are only persisted to redis when "m.save()" is called. But looking at the code for the list, set and hashtable structures, those seem to be inconsistent. While "m.some_list.push_back(item)" is not persisted immediately, "m.some_list.pop_front()" is. Since I plan to access the same data from different processes almost simultaneously, I'm concerned this will impact the robustness of my distributed system when some developer is not always 100% aware of the semantics. And that, frankly, would defeat the main advantage of using an orm in my mind.

So why buffer some operations and not other? Wouldn't it be more in the spirit of redis to have all model changes immediately affect the database and offer pipelineing when the developer wants to use it?

Thanks for all your work and have a nice day!
(felix)

lsbardel

unread,
Sep 2, 2011, 3:59:50 AM9/2/11
to python...@googlegroups.com
Hi Felix,
thanks for your comments!
While stdnet is actively used by myself for several big projects, it is still a beta library, and therefore there are several inconsistencies that can and should be rectified.

The main goals of stdnet are

1 - simplify the management of large data in redis (or other key-values stores in the future)
2 - try to be as fast as possible

Buffering is very very important, but I agree with you that it should be handled in a more consistent way.
I'm open for suggestion and contributions!

ciao

Luca
Reply all
Reply to author
Forward
0 new messages