This does not seem very mod wsgi related. I am not sure why you would want a php front-end over Python based business logic other than that you are familiar with php and have no or little python knowledge.
Php code looks like my crap after a bad dinner to me. This does not answer your question but I think most people here would sort of think the same. Both your solutions are a huge job and you could do away with the http stuff al together, look at the python code and try and find a dispatcher, as python is easy to read. Somewhere the URL called should be translated to a function or method call. Write a new dispatcher or hook into the current one. Again using php makes this project much more complex and harder to maintain. Your choice Martijn Verstuurd vanaf mijn iPad Op Jul 2, 2011 om 21:50 heeft "aiden bell" <[email protected]> het volgende geschreven: > 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.
