Re: Persistent objects

2004-12-13 Thread Paul Rubin
deelan <[EMAIL PROTECTED]> writes: > this sounds like the "orthogonal persistence" of > unununium python project: Thanks, I had something a little more conventional in mind, but I really enjoyed reading the unununium page. It's not often that I see someone doing something that interesting and far

Re: Persistent objects

2004-12-13 Thread deelan
Paul Rubin wrote: I've had this recurring half-baked desire for long enough that I thought I'd post about it, even though I don't have any concrete proposals and the whole idea is fraught with hazards. Basically I wish there was a way to have persistent in-memory objects in a Python app, maybe a mu

Re: Persistent objects

2004-12-12 Thread Keith Dart
Paul Rubin wrote: I've had this recurring half-baked desire for long enough that I thought I'd post about it, even though I don't have any concrete proposals and the whole idea is fraught with hazards. Basically I wish there was a way to have persistent in-memory objects in a Python app, maybe a mu

Re: Persistent objects

2004-12-12 Thread Keith Dart
Paul Rubin wrote: I've had this recurring half-baked desire for long enough that I thought I'd post about it, even though I don't have any concrete proposals and the whole idea is fraught with hazards. Basically I wish there was a way to have persistent in-memory objects in a Python app, maybe a mu

Re: Persistent objects

2004-12-12 Thread Keith Dart
Paul Rubin wrote: I've had this recurring half-baked desire for long enough that I thought I'd post about it, even though I don't have any concrete proposals and the whole idea is fraught with hazards. Basically I wish there was a way to have persistent in-memory objects in a Python app, maybe a mu

Re: Persistent objects

2004-12-12 Thread Dan Perl
"Paul Rubin" wrote in message news:[EMAIL PROTECTED] > I've had this recurring half-baked desire for long enough that I > thought I'd post about it, even though I don't have any concrete > proposals and the whole idea is fraught with hazards. > > Basically I wish there

Re: Persistent objects

2004-12-12 Thread Bengt Richter
ould not be that hard to implement. Basically a string repository plus some presistent representation of a hash table associating key strings with value strings, and locking provisions. > >On the other hand, there'd either have to be interpreter hair to >separate the persistent objects from

Re: Persistent objects

2004-12-12 Thread Irmen de Jong
Paul Rubin wrote: Basically I wish there was a way to have persistent in-memory objects in a Python app, maybe a multi-process one. So you could have a persistent dictionary d, and if you say d[x] = Frob(foo=9, bar=23) that creates a Frob instance and stores it in d[x]. Then if you exit the a

Re: Persistent objects

2004-12-12 Thread Paul Rubin
Nigel Rowe <[EMAIL PROTECTED]> writes: > Maybe POSH (http://poshmodule.sourceforge.net/) is what you want. Thanks, that is great. The motivation was somewhat different but it's clear that the authors faced and dealt with most of the same issues that were bugging me. I had hoped to avoid the use

Re: Persistent objects

2004-12-12 Thread Paul Rubin
Alan Kennedy <[EMAIL PROTECTED]> writes: > Have you looked at Ian Bicking's SQLObject? > > http://sqlobject.org/ That sounds like Python object wrappers around SQL transactions. That's the opposite of what I want. I'm imagining a future version of Python with native compilation. A snippet like

Re: Persistent objects

2004-12-12 Thread Alan Kennedy
ply its id. my_existing_object = MyPersistentObj.get(id=42) Select a subset of your persistent objects using SQL-style queries my_foo_9_objects = MyPersistentObj.select(MyPersistentObj.q.foo == 9) for o in my_foo_nine_objects: process(o) SQLObject also takes care of caching, in that objects are optionally cac

Re: Persistent objects

2004-12-12 Thread Duncan Booth
Paul Rubin wrote: > Well, as you can see, this idea leaves a lot of details not yet > thought out. But it's alluring enough that I thought I'd ask if > anyone else sees something to pursue here. > Have you looked at ZODB and ZEO? It does most of what you ask for, although not necessarily in th

Re: Persistent objects

2004-12-12 Thread Nigel Rowe
Paul Rubin wrote: > I've had this recurring half-baked desire for long enough that I > thought I'd post about it, even though I don't have any concrete > proposals and the whole idea is fraught with hazards. > > Basically I wish there was a way to have persistent in-memory objects > in a Python a

Re: Persistent objects

2004-12-12 Thread Paul Rubin
Duncan Booth <[EMAIL PROTECTED]> writes: > Have you looked at ZODB and ZEO? It does most of what you ask for, > although not necessarily in the way you suggest. You're the second person to mention these, so maybe I should check into them more. But I thought they were garden-variety persistent obj

Re: Persistent objects

2004-12-12 Thread Paul Rubin
Max M <[EMAIL PROTECTED]> writes: > > Basically I wish there was a way to have persistent in-memory objects > > in a Python app, maybe a multi-process one. So you could have a > > persistent dictionary d, and if you sayd[x] = Frob(foo=9, bar=23) > > that creates a Frob instance and stores it i

Re: Persistent objects

2004-12-12 Thread Max M
Paul Rubin wrote: Basically I wish there was a way to have persistent in-memory objects in a Python app, maybe a multi-process one. So you could have a persistent dictionary d, and if you say d[x] = Frob(foo=9, bar=23) that creates a Frob instance and stores it in d[x]. Then if you exit the a

Persistent objects

2004-12-12 Thread Paul Rubin
ndle it). On the other hand, there'd either have to be interpreter hair to separate the persistent objects from the non-persistent ones, or else make everything persistent and then have some way to keep processes sharing memory from stepping on each other. Maybe the abstraction machinery