How to connect an HTTP Streaming Server APE (Ajax Push Engine) to an expensive computing server

I studied APE (Ajax Push Engine - http://www.ape-project.org/ ) for several weeks, and I read all the documentation that they have on the website.

The APE project claims to be “ live streaming ”, but I just can't find a good example for this. I am a little disappointed with their documentation.

Possible wikipage that I read on their website: http://www.ape-project.org/wiki/index.php/Tutorial:How_to_write_an_application_with_APE

But then again, he just has some concepts, not detailed information.

After doing a search on Google, I began to feel more upset. There are no valuable tutorials or examples for my purpose .

So, I am posting it here.

Basically, what I would like to do is a streaming HTTP server (with a very expensive calculation) can still scale quite well (100 or 200 clients). Requirements:

  • Use HTTP protocol (without RTMP);
  • The client transmits audio data to the server;
  • The server receives audio data, processes it, and sends the result back to cient WHILE, receiving audio data from the client;
  • Audio data processing is performed in the C / C ++ library ;
  • The server will also be able to stream several seconds of audio data to the client, and the client can play WHILE audio while receiving . Audio data from the server
  • A long-term connection / session must be made between the client and the server and disconnection (TimeOut or UserDisconnect) must be detected by the server;

My questions:

  • What APE examples and tutorials should be read to ease my needs?
  • Where can I find a good example using streaming APE HTTP?
  • How to create a very simple example of HTTP streaming (server streams) ?
  • How can I plug in my expensive server side C / C ++ lib ?
  • How can I maintain the state of each client connection / session on the server side?

If anyone knows any ideas about my requirements or questions, please let me know.

Thanks.

Peter

+1
source share
1 answer

APE is designed to exchange JSON data - not streaming data. Thus, you should find a solution in which your standard web server (under the control of your library) receives and analyzes data. What you can do with APE is the so-called "built-in push". This means that transferring data from the server server to the APE server allows you to transfer data to clients.

In your case, I would regularly have a lib parsing, posting a status update to the APE server so that it can be distributed by the client.

Regarding your questions:

TL; DR

  • Use another server as backend for lib
  • Ask the lib server to send short status updates using the built-in click on APE so that the client clicks on the APE
+2
source

All Articles