frapi/frapi — Issue #111: Listening on a socket
Author: davidgillen
Created: 2012-03-09 11:55:31+00:00
State: open

Hi, Firstly apologies for the wall of text, but providing some background info will hopefully make it easier to evaluate the proposal.

So, the core requirement is to aggregate the results of multiple separate API search calls into a single result set, and return that. I was looking to use Frapi to create a single service which I can call, which will then behind the scenes hit the other APIs, and then return the merged result set. Ideally these multiple API calls need to happen at the same time. However, when PHP is run under apache you are unable to fork it. I still want to run with Frapi, as there is a lot of other functionality outside of this which I can build in Frapi.

So, as a way around this and as proof of concept I have PHP code which runs as a service binding itself to a port. It then receives a request, forks off, gets multiple results, and then merges and returns them.

I want to see about using Frapi to handle things under the hood. And then add this PHP service listening on a port, which when a request comes in would hook into Frapi at the same point as if the request had come over HTTP.
Note: There will be multiple other calls beyond the search, but these can be handled as standard requests within Frapi.

So questions.
Is what I am proposing feasible, or even advisable?
Is there another approach which may be better?
Assuming, what I'm proposing to do is okay, are there any special considerations which I need to take under advisement? Any functional requirements perhaps for configuring the new socket based service which people would like to see within the Frapi UI?
And to the maintainers, if I build it, will you pull it?