On 10/6/05, Dave Warnock <[EMAIL PROTECTED]> wrote: > > Sorry to reply to my own email. > > > How would you partition these in TurboGears? The goal is a single > > application instance running lots of clients. Each client should have > > entirely separate data and security. > > > > For example how would I code in turbogears so that > > mydomain.org/clientA/applicationurl uses a separate database (and > > separate identitifcation/permissions) from > > mydomain.org/clientB/applicationurl > > Duh, use a dynamic language. All I need to do is dynamically add the > client as an instance of the application to the cherrypy root.
Or use the default() method, but adding instances is the easiest. Note that an important change coming in 0.8 is the addition of a URL() class that understands the notion of an "application root", just for this very purpose. In TurboGears 0.8, if you use relative URLs or URL(), you should be able to do this kind of thing easily enough. > That handles the url's. Next I need to work out how the SQLObject db > connections. Without knowing for sure, I wouldn't be 100% certain that 37signals uses truly separate DBs for each customer. You can certainly do the partitioning at the application level. It's a bit riskier, but it does cut down considerably on database connections, which can be an issue if you're running a big service. TurboGears 0.8 adds a "PackageHub" for database connections, which allows for a per-package database configuration, making it easy to point different apps at different databases, if desired. (More importantly, it added a bit of laziness to the initialization of the hub which makes it easier to configure...) It seems like having per-path database configuration is more useful and is probably doable using a scheme like the PackageHub. Kevin -- Kevin Dangoor Author of the Zesty News RSS newsreader email: [EMAIL PROTECTED] company: http://www.BlazingThings.com blog: http://www.BlueSkyOnMars.com

