From: Alan K. <sql...@xh...> - 2004-11-26 17:58:24
|
[jwsacksteder] > I'm considering what it takes to extend SQLObject to a three tier > configuration. The leading candidate is Pyro, which uses pickle to pass > around proxy remote objects. If SQLObject is in the middle tier containing > all the business logic, is it possible to handle SQLObjects in this way? I > believe there are 'pickle issues'? You may be interested in a snippet I sent to the list last month which pickles references to SQLObjects. http://sourceforge.net/mailarchive/message.php?msg_id=9798657 The original question I posed, about how to pickle SQLObjects using __getstate__ and __setstate__ (which doesn't work), can be found here http://sourceforge.net/mailarchive/message.php?msg_id=9797988 Using the above snippet, I'm fairly sure that you could communicate references to SQLObjects back and forth across a socket through pickles. As for Pyro, a search through the 3.3 codebase for "persistent_id" and "persistent_load" turns up nothing, so I imagine that Pyro would require some changes to support pickling external objects. But I think Irmen is pretty open to those kinds of things. You can read about the pickle extensions for pickling references to external objects here http://docs.python.org/lib/node69.html I'm not sure I understand what you want to do. Do you want to be able to instantiate SQLObjects (by ID?) on both sides of the network connection? Would that not be contrary to isolating functionality into separate layers? Regards, Alan. |