Custom Repository for Storing Objects
Hi, I am a newbie to Zope and have just gone through the tutorials and a little bit of ZopeBook. I have my own Custom Repository (RDBMS based) that has the features like storing flat files, folders etc. It also has provisions for user management. I have the XML APIs (lanuage is not a problem) for interacting with the repository. Can I store all the objects created in Zope in that repository? Further I also want that the authentication should also be done based on that repository (its like the roles and users defined in the custom system). Is it possible in Zope? I can comprehend that I would need to develop some kind of an interface that sits between the two for integration, but I wanted to know that whether it is possible in Zope or not? Its like when a user creates a folder or an object, the request is actually send to a module and then that module stores the object in my repository (may be the format is little bit changed) and vice-versa. Anticipating a positive response Sameer Maggon
If you want a transparent connection between your XML RDBMS and Zope so that Zope need not be aware of the storage for these objects then you can use Shane's AdaptableStorage to create a bridge between Zope's ZODB and your RDBMS. This is probably not going to be a total walk in the park though ;^). Also I would caution that "the XML factor" is likely to introduce significant overhead to the storage, which when combined with the underlying RDBMS overhead could result in disappointing performance. Just straight RDBMS ZODB storage (such as OracleStorage) not using XML at all is significantly slower than the stock FileStorage for instance. A less transparent option would be to create your own bridge by writing a Zope product that can interact via this XML API and conjure up non-persistent objects to represent its state. Then use the standard ZODB FileStorage or ZEO for the Zope side of things. It would be even easier if your API was done over XML-RPC. Then the marshalling of the XML to python objects could be largely done for you. hth, Casey <scold type="obligatory">Please don't cross-post your messages in the future. Many of us are subscribed to multiple lists and don't appreciate reading the same message multiple times. Thanks</scold> On Thursday 09 January 2003 09:11 pm, Sameer Maggon wrote:
Hi,
I am a newbie to Zope and have just gone through the tutorials and a little bit of ZopeBook. I have my own Custom Repository (RDBMS based) that has the features like storing flat files, folders etc. It also has provisions for user management. I have the XML APIs (lanuage is not a problem) for interacting with the repository.
Can I store all the objects created in Zope in that repository?
Further I also want that the authentication should also be done based on that repository (its like the roles and users defined in the custom system). Is it possible in Zope?
I can comprehend that I would need to develop some kind of an interface that sits between the two for integration, but I wanted to know that whether it is possible in Zope or not?
Its like when a user creates a folder or an object, the request is actually send to a module and then that module stores the object in my repository (may be the format is little bit changed) and vice-versa.
Anticipating a positive response Sameer Maggon
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Sameer Maggon wrote at 2003-1-9 18:11 -0800:
I am a newbie to Zope and have just gone through the tutorials and a little bit of ZopeBook. I have my own Custom Repository (RDBMS based) that has the features like storing flat files, folders etc. It also has provisions for user management. I have the XML APIs (lanuage is not a problem) for interacting with the repository.
Can I store all the objects created in Zope in that repository? The easiest way to integrate with a Custom Repository would be to go along the RDBMS integration.
This would mean, the objects were not created in Zope at all but directly in the Custom Repository. Zope would provide views on the Custom Repository similar to Z SQL Methods (and the associated search interfaces) for relational databases.
Further I also want that the authentication should also be done based on that repository (its like the roles and users defined in the custom system). Is it possible in Zope? You would customize a User Folder.
There are (almost) hundreds of examples for such a task...
I can comprehend that I would need to develop some kind of an interface that sits between the two for integration, but I wanted to know that whether it is possible in Zope or not? It is.
Its like when a user creates a folder or an object, the request is actually send to a module and then that module stores the object in my repository (may be the format is little bit changed) and vice-versa. The interface would probably make the content of your repository "URL-addressable" (see Z SQL Methods and especially "direct traversal" in this context). It would create proxy objects (maybe using acquisition) to present/update/delete the objects in your repositiory.
Dieter
Hi.. Thanx for the reply, but are there any pointers for performing this operation. Like how can I completely override the object creation in Zope and create objects directly in my Repository. And how would zope understand it and dispkay in its view. I think there are lot of products for customizing the user managemnet part of Zope. So I think that part can be accomplished with some small work (creating some abstractions). Anticipating a Positive Response. Sameer Maggon -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Dieter Maurer Sameer Maggon wrote at 2003-1-9 18:11 -0800: The easiest way to integrate with a Custom Repository would be to go along the RDBMS integration. This would mean, the objects were not created in Zope at all but directly in the Custom Repository. Zope would provide views on the Custom Repository similar to Z SQL Methods (and the associated search interfaces) for relational databases. You would customize a User Folder. There are (almost) hundreds of examples for such a task... It is. The interface would probably make the content of your repository "URL-addressable" (see Z SQL Methods and especially "direct traversal" in this context). It would create proxy objects (maybe using acquisition) to present/update/delete the objects in your repositiory. Dieter
Sameer Maggon wrote at 2003-1-10 16:15 -0800:
Thanx for the reply, but are there any pointers for performing this operation. Like how can I completely override the object creation in Zope and create objects directly in my Repository. And how would zope understand it and dispkay in its view.
I think there are lot of products for customizing the user managemnet part of Zope. So I think that part can be accomplished with some small work (creating some abstractions). I suggested to look at the way Zope itegrates with Relational Databases.
There are HowTos on Zope.org. Search for "database adapter". Dieter
participants (3)
-
Casey Duncan -
Dieter Maurer -
Sameer Maggon