On 2006-12-11 21:58:47 -0000, Adam Jones wrote: > After spending some time looking at the idea for microapps I thought it > might be useful to wrap access to a microapp from within TurboGears > into local and "proxied" controller methods. This allows you to run a > local copy of a microapp in your controller and gather data through > direct method calls or access the data remotely ... again through > direct method calls, this time on the proxy class. > > Anyways, I wrote up the basic idea here: > http://docs.turbogears.org/1.0/TurboGearsAndMicroApps
This is a really cool idea. Thanks for writing it up. The microapps concept is still sort of coagulating and ideas for this kind of glue are a big help. On the implementation side of things, one idea that I had that I haven't had time to code up a test of is to use wsgi_intercept[1] to automatically bypass HTTP and make the calls to a microapp in-process for situations where they microapp is running on the same server as the main app and happens to also be written in python with a WSGI capable framework. That way, you could use your proxy idea and have a registry somewhere else (per-app configured, or global to a machine, or whatever) where you specify that certain URLs map to WSGI applications. Done right, that lets you have your cake of nicely seperated microapps while letting you eat it too by skipping the latency of HTTP calls. Then, if you need to scale out by moving the microapp to another server, you just remove the entry in the registry and it goes back to HTTP requests. My intention with the microapps stuff is to have it be a cross-language idea, but IMO, WSGI gives Python a huge advantage as the implementation language of choice. 1: http://darcs.idyll.org/~t/projects/wsgi_intercept/README.html -- anders pearson : http://www.columbia.edu/~anders/ C C N M T L : http://www.ccnmtl.columbia.edu/ weblog : http://thraxil.org/
pgpcPwDLVZtcD.pgp
Description: PGP signature

