如何将HTTP Streaming Server APE(Ajax推送引擎)连接到计算昂贵的服务器 [英] How to Hook up the HTTP Streaming Server APE (Ajax Push Engine) to a Computation-Expensive Server

查看:217
本文介绍了如何将HTTP Streaming Server APE(Ajax推送引擎)连接到计算昂贵的服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在研究APE(Ajax推送引擎 - http://www.ape-project.org / )我已经阅读了他们在网站上提供的所有文档。

I've been studying the APE (Ajax Push Engine - http://www.ape-project.org/) for several weeks, and I have read all the documentation they have at the website.

APE项目声称实时数据流媒体,但我找不到一个很好的例子。我对他们的文档感到很沮丧。

The APE project claims "real-time data streaming", but I just cannot find a good example for that. I'm kind of frustrated with their documentation.

我在他们的网站上看到的可能的wipipage:
http://www.ape-project.org/wiki/index.php/Tutorial:How_to_write_an_application_with_APE

The possible wikipage I read at their website: http://www.ape-project.org/wiki/index.php/Tutorial:How_to_write_an_application_with_APE

但同样,它只是有一些概念,而不是详细信息。

But again, it just has some concepts, not detailed info.

在做了一些谷歌搜索后,我开始感到更加沮丧。 没有符合我目的的有价值的教程或示例

After doing some Google search, I started feeling more frustrated. No valuable tutorials or examples for my purpose.

所以我在这里发帖。

基本上,我一直想做的是,HTTP流媒体服务器(计算成本非常高)仍然可以很好地扩展(100或200个客户端)。要求:

Basically, what I've been wanting to do is, an HTTP streaming server (with very computation expensive) can still scale reasonably well (100 or 200 clients). Requirements:



  1. 使用HTTP协议(无RTMP);

  2. 客户端将音频数据流式传输到服务器;

  3. 服务器接收音频数据,处理它并将结果发送回客户 WHILE接收音频数据来自
    客户端;

  4. 音频数据的处理在 C / C ++库中完成;

  5. 服务器还能够流式传输几秒钟的音频数据到客户端,客户端可以播放音频 WHILE接收
    音频数据来自服务器;

  6. 应在客户端和服务器之间建立长期连接/会话,并且服务器应检测到断开连接(TimeOut或UserDisconnect)
    ;

  1. Use HTTP protocol (no RTMP);
  2. The client streams the audio data to the server;
  3. The server receives the audio data, processes it and sends the result back to the cient WHILE receiving the audio data from the client;
  4. The processing of the audio data is done in a C/C++ library;
  5. The server is also be able to stream several-second audio data to the client, and the client can play the audio WHILE receiving the audio data from the server;
  6. A long-lived connection/session should be made between a client and the server, and the disconnection (TimeOut or UserDisconnect) should be detected by the server;


我的问题是:



  1. 我应该阅读哪些APE示例和教程o促进我的需求?

  2. 我在哪里可以找到使用APE HTTP Streaming的好例子?

  3. 如何创建一个非常简单的 HTTP流示例(服务器流)

  4. 我如何在服务器端连接计算昂贵的C / C ++库

  5. 如何在服务器端维护每个客户端连接/会话的状态

  1. What APE examples and tutorials should I read to facilitate my needs?
  2. Where can I find a good example using APE HTTP Streaming?
  3. How can I create a very simple HTTP streaming example (server streams)?
  4. How can I hook up my computation-expensive C/C++ lib at the server side?
  5. How can I maintain the state of each client connection/session at the server side?


如果有人知道我的要求或问题,请告诉我。

If anyone know any idea of my requirements or questions, please let me know.

谢谢。

Peter

推荐答案

APE用于交换JSON数据 - 而不是流数据。
因此,您必须找到一个解决方案,您的标准Web服务器(运行您的lib)接收并解析数据。
你可以用APE做什么然后被称为内联推送。这意味着,将数据从后端服务器发送到APE服务器,以便它可以将数据转发给客户端。

APE is meant for exchanging JSON data - not streamed data. So, you must find a solution where your standard web server (running your lib) receives and parses the data. What you can do with APE then is so called "inline push". This means, sending data from the backend server to the APE server so it can forward the data to the clients.

在您的情况下,我会定期发送解析库对APE服务器的状态更新,以便将其分发给客户端。

In your case, I would regularily have the parsing lib send a status update to the APE server so it can be distributed to the client.

关于您的问题:


  1. http://www.ape-project。 org / wiki / index.php / Libape-controller

  2. 无处 - 它不适合

  3. 使用anothother服务器端编程您选择的语言

  4. 显然,取决于您的Apache / Nginx和服务器语言

  5. 这是APE可以做和将做的事情 - 如果你做了必要的话在服务器端编程。您已经在我的博客上发表了评论,因此您可能已经看过 http:// www。 xosofox.de/2010/10/ape-user-handling/ - 这应该给你一些提示。

  1. http://www.ape-project.org/wiki/index.php/Libape-controller
  2. Nowhere - it is not meant for that
  3. With anothother server side programming language of your choice
  4. Obviously, depends on your Apache/Nginx and server language
  5. Thats something APE can and will do - if you do the required programming on the server side. You already commented on my blog, so you might have seen http://www.xosofox.de/2010/10/ape-user-handling/ - this should give you some hints.

tl; dr


  • 使用另一台服务器作为lib的后端

  • 让lib服务器通过内联推送向APE发送短状态更新,以便APE将其推送到
    客户端

这篇关于如何将HTTP Streaming Server APE(Ajax推送引擎)连接到计算昂贵的服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆