Re: keeping client data in sync with Twisted, mirroring some Axiom Items on the client-side
Robert Gravina <[email protected]> Wed, 25 Oct 2006 02:24:17 +0900
| Newsgroups | gmane.comp.python.quotient.dev,gmane.comp.python.twisted |
|---|---|
| Message-ID | <[email protected]> |
On 2006/10/25, at 1:27, Mike Pelletier wrote: > The good news is that zeo+zodb can be used without pulling in the > rest of Zope > (thank god) and you probably could marry it with the rest of your > twisted > app. I started off doing this actually, and decided to switch to Axiom because it was object-relational. I've had some no-so-fun experiences with Plone and ZODB madness, but it probably has more to do with not understanding what was going on. For the most part, as long as all the database-related work goes on on the server side, whether I use ZODB or Axiom probably doesn't make much of a difference to the rest of the application. > The bad news is that zodb has completely different usage semantics and > tuning assumptions than axiom, and even if you find a way to deal > with zodb > asynchronously (which may be a bigger problem than I just indicated > now that > I give it a passing though), you may find that such a change ends > up leaking > up a few layers of abstraction, depending on your use cases. I'd > be happy to > hash it out off-list if you decide to go that way. Thanks. Actually most of my database access so far is along the lines of the client sending an object to the server (along with its child objects), and the server persists it (and add/edits/removes the children to suit). Your typical CRUD GUI. > Regardless of these > challenges, if your app is write-heavy, zodb is probably not the > way to go. I have heard this before yes. Actually I there will be more reading going on than writing. The application is your basic database-with- reports type application, so I'd say it would not be write heavy. > It does seem like what you are trying to do with Axiom would be a > fairly > common case, but it's young so it might not have been addressed. > I'm eager > to hear what the smart people have to say. As am I :) What I'm trying to I believe can be done with Twisted PB. Calling remote methods on all clients who have an object which is pb.Cacheable is quite easy to do. I am just unsure about how to go about it in a generic way. Also I'm sure there's a lot more to creating a distributed object system than meets the eye, but then again Twisted PB handles much of the heavy lifting. Originally, I planned to do much of the work on the server, and one thing I liked about Twisted was that I could easy decide what work was done on the client, and what on the server. Now that I'm a little further in developmentI realise that the clients would really benifit from having much of that data locally, so that can search/make PDF reports etc. easily. Perhaps I'm just using Twisted wrong and I should be doing this on the server? I'm really I'm happy for the clients do *all* the work, which is why I'm back to considering ZEO again. The server just needs to handle authentication and access control, ensuring everyone has the latest copy of an object, make sure two users aren't allowed to open a edit GUI for some object at the same time, etc. One important point, is that with ZEO I just code as if the database was a local ZODB. I like that because it saves literally hundreds of lines of code dealing with sending objects back and forth, notifying clients etc. > I think I've heard noises about > Axiom starting to support other databases beyond sqllite, so > perhaps it is > not beyond the realm of possibility that you could connect a bunch of > axiom-wielding processes to the same database. > For that matter, sqlite has > been talking about providing a client/server interface. Either > way, I think > you'd be on the bleeding edge. > If I were to go this way, then I wouldn't really be using Twisted right? In this case, I may as well use ZEO. Perhaps I'm taking the wrong approach - maybe all I need is a database server which clients connect to, and do away with the whole of Twisted cred/PB etc. that I'm using? > Boy, I'm a big help, eh? > Actually you were thanks! Robert