Is instantiating a new JVM for every server request a large load?

非 Y 不嫁゛ 提交于 2019-12-04 18:09:14

You need only one java process to make this work. Write a Java Socket server. Then you can write a PHP Client with PHP Sockets to send commands to your Java Server which do the work.

Yes, starting a new process (Java or otherwise) for each request is going to perform very poorly.

Google App Server does this and it can handle in the order of 2 to 10 requests per second per server. If you use a Java server which is running all the time you should expect around 100-1000 requests per second. If you use a persisted connection, and efficient messages, you can handle over 100K message per second.

In short, it could work but I would have trouble accepting such a inefficient solution. ;)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!