[erlang-questions] Serve PHP/Python scripts behind Erlang

Nathaniel Waisbrot nathaniel@REDACTED
Mon Mar 13 18:58:22 CET 2017


It depends on what you mean by "efficient" :-) Some methods that I've worked with (Python only)

- Python uses Flask+Gunicorn to serve requests, Erlang makes HTTP calls to it
  You get to customize the request as much as you want in Erlang, the coupling is loose, it's easy to do black-box tests on the Python service alone
- Python uses Flask+Gunicorn to serve requests, Nginx reverse-proxies to Python and to Erlang, P&E don't talk to each other
  Nginx is good at forwarding connections, the coupling is loose, it's easy to do black-box tests on either sub-service alone
- Erlang calls Python through ErlPort (http://erlport.org/ <http://erlport.org/>)
  Faster than a network connection, tighter coupling, you manage queueing and pooling yourself



> On Mar 13, 2017, at 1:47 PM, Frank Muller <frank.muller.erl@REDACTED> wrote:
> 
> Thanks Loïc, that was the first lib I found. But it seems to be outdated. 
> 
> I'll will dig into the FastCGI spec soon.
> 
> Anyone else?
> 
> /Frank
> 
> <essen@REDACTED <mailto:essen@REDACTED>> 
> The typical setup uses fastcgi: https://en.wikipedia.org/wiki/FastCGI <https://en.wikipedia.org/wiki/FastCGI>
> 
> There was an early attempt by Anthony at
> https://github.com/extend/ex_fcgi <https://github.com/extend/ex_fcgi> - not sure how much of it still works,
> but probably worth salvaging.
> 
> On 03/13/2017 06:09 PM, Frank Muller wrote:
> > Hi guys
> >
> > What’s the most efficient way to run PHP (Python) scripts behind Erlang?
> >
> > I would like to receive HTTP requests in Cowboy and forward them to a
> > PHP/Python backend.
> >
> > Get the response back from the backend and forward it to the client.
> >
> > Thanks in advance.
> > /Frank
> >
> >
> > _______________________________________________
> > erlang-questions mailing list
> > erlang-questions@REDACTED <mailto:erlang-questions@REDACTED>
> > http://erlang.org/mailman/listinfo/erlang-questions <http://erlang.org/mailman/listinfo/erlang-questions>
> >
> 
> --
> Loïc Hoguin
> https://ninenines.eu <https://ninenines.eu/>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170313/3b4ac66f/attachment.htm>


More information about the erlang-questions mailing list