Web server for running PHP+Erlang

末鹿安然 提交于 2019-12-23 14:58:04

问题


I wish to run PHP and Erlang on a web server. Apache is ruled out, because the backend Erlang process would need to handle around 3000 requests concurrently. So definitely something with a smaller memory footprint like lighttpd...

Which one would you recommend? And why?


回答1:


Erlang has built-in web server:

http://yaws.hyber.org/

Which you can use. It is supposed to be really really fast.

If you want to expose Erlang to the web, Yaws is the way to go (in just learning Erlang, so this may be incorrect)

edit:

After digging around a bit, I found that the Erlang webserver (Yaws) CAN run PHP scripts. So your answer is an Erlang webserver!

http://yaws.hyber.org/cgi.yaws




回答2:


Its hard to answer this one without more information. What is it you wish to use erlang and php for? Is php your frontend for a backend erlang process? Or is erlang going to do some of the frontend also?

I've seen folks do well with nginx in front of erlang and fastcgi. You could run the php through fastcgi with nginx doing the forwarding. Without more information it would be hard to say more than that.




回答3:


Run your php frontend with anything you like (apache i hope) and communicate with your erlang as a backend.

Read:

http://www.erlang-factory.com/upload/presentations/117/Todd-Lipcon-ErlangFactoryLondon2009-BuildingMulti-LanguageWebArchitecturesusingErlangandThrift.pdf

Basically talks how to run a php frontend, because it is good at strings and template designers 'get it' with a erlang backend because it is good at concurrency, etc. Then he glue it all together with thrifty

best quote

Where PHP sucks is where Erlang excels! I And vice versa!



来源:https://stackoverflow.com/questions/907144/web-server-for-running-phperlang

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