Jorge Godoy 寫道: > > On the other hand, I might be wrong on my thoughts since I haven't studied or > played much with WSGI (it's on my plans...). > > > Also what about sessions? There are several interesting WSGI session > > middleware implementations alredy (supporting memcache for ex.). Will > > it be easy to plgug any of those in TG-2.0? > > Again, from what I understand WSGI decouples your application from a normal > flow. You just have to pass information for several middlewares and things > will get going. Your own application will be kind of a middleware in that it > will have access to the same things, the difference is that it will interact > with the user and also have much of the business logic. > > -- > Jorge Godoy <[EMAIL PROTECTED]>
Using WSGI in cherrypy seems very intuitive. http://www.cherrypy.org/wiki/WSGI Currently the CP2 use single entry point: cherrypy.root = Root() We had to start multiple cherrypy application to host each of them. In CP3, Each CP3 application is WSGI enabled, the cherrypy.root is replaced by cherrypy.tree.mount(Root(), "/") so the following mount is possible: start-xxx.py: ------------------------------------------------------ from controllers import Root import blog.controllers import wiki.controllers cherrypy.tree.mount(Root(), "/") cherrypy.tree.mount(blog.controllers.Root(), "/blog") cherrypy.tree.mount(wiki.controllers.Root(), "/wiki") The script mount 3 application to "/", "/blog", "/wiki". Besides, we can use the same syntax to "graft" other non-CherryPy WSGI applications in single run, too. Some clever wrapper is needed to extend our start_server function though (plus routesDispatch support). # our original start_server function in start-xxx.py turbogears.start_server(Root()) I think the possible backward compatible way is to set the tree.mount/tree.graft in configs. And keep the generated script(start-xxx.py) simple. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears Trunk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears-trunk?hl=en -~----------~----~----~----~------~----~------~--~---
