So; I'm running a large app where the client does a lot of calls to an AMFPHP installation. This works fine, but the having it open and close so many separate http calls through apache is a waste of resources. The server app is written in PHP, and I'm not at this point ready to rewrite the whole thing in Java, but I'd like it to scale more efficiently.

What I'm wondering is, would it save resources to set up a blazeds server, open a socket from the flash client, and have some piece of Java just bridge the incoming AMF over to PHP on the command line? And does anything like that exist already? I know there are methods that pipe java services into the REST calls used by amfphp, but I'm looking to speed up the process and cut down the other connections by going the other way - preserving my existing PHP code, without having to make new connections from the client to the server on every call, by using a some kind of primitive Java server to pipe the I/O to PHP and maintain the sockets w/o the normal Apache overhead.