[Twisted-web] Patch for athena branch: LivePageFactory

Andy Gayton andy at thecablelounge.com
Mon Oct 3 02:02:02 MDT 2005

Athena livepage instances need to be unique for each page render.

This patch addresses controlling creation of livepage instances by 
introducing a LivePageFactory.  Instead of having child_ etc directly 
return a livepage instance, they should request a persistent 
LivePageFactory for an instance.


def child_aLivePageInstancePlease(self, context):
	return aPersistentLivePageFactory.clientFactory(context)

When a livepage instance renders, it registers itself with its factory. 
  Each instance has an id. All client server remote calls carry this id 
so that the factory can return the correct livepage instance to handle 
an incoming request.

An example use is at: svn://twisted.cablelounge.com/sandbox/athena/chatola

-------------- next part --------------
A non-text attachment was scrubbed...
Name: athena.livePageFactory.patch
Type: text/x-patch
Size: 3409 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-web/attachments/20051003/ff778a85/athena.livePageFactory.bin

More information about the Twisted-web mailing list