The topic of implementing compositing in the app_server comes up once in a while. I have outlined my thoughts on the subject more than once, but these are burried in mailing list archives. Since I have just written another overview of how this could be approached, I thought I might better put this up as an article here, so I can point people to it in the future.
I am going to give an overview only. It is intended to help anyone along when reading the app_server code and piecing things together. These are direction that I think are guaranteed to work OK, and with the minimal amount of changes, but anyone taking up this task needs to figure out the actual implementation himself, of course. Here it goes...