If your backend is never directly accessible to public via its REST API and only from your PHP front end. Would suggest you perhaps use XML-RPC as communications protocol as may make it easier as far as potentially not having to do as much manual conversion either end.
For the backend itself, it would generally not be good practice to run it on the same server. So you might instead run in a distinct server, not necessarily even Apache but with gunicorn instead. That way you don't carry the extra overhead of Apache in the way of configuration, management, memory etc that you don't need. Graham On 3 July 2011 05:49, aiden bell <[email protected]> wrote: > Hi all, > > I am designing a PHP frontend which uses business logic exclusively in > Python/mod_wsgi as a REST API. As both the PHP code and the API > endpoints will be hosted on the same machine (in this case, but not > for third-party developers) I want to cut as much HTTP overhead as > possible ... > > My thinking was writing a PHP module in C which talks directly to the > mod_wsgi process in daemon mode. Possibly accepting a cURL context and > producing the same semantics as executing that. > > Short of the above, thinking of going down the exec route on the > Python files themselves and mocking the WSGI environment ... but that > seems less clean to me. > > I guess my question is: Any hints before I get digging through the > source? > > Aiden > > -- > You received this message because you are subscribed to the Google Groups > "modwsgi" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/modwsgi?hl=en. > > -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
