聊天轮盘的架构

发布于 2024-08-28 13:52:11 字数 270 浏览 4 评论 0原文

有人可以向我解释一下聊天轮盘背后的架构吗? 我正在考虑一个类似的项目,只实现音频 支持(对于初学者)。设置闪存服务器的最佳方法是吗? 如果是这样,我应该如何进入闪存,我需要 Flex 4 吗?我 有一些 c++、c# 和 java 的初学者经验,但我从来没有 为网络开发任何东西。

我还想知道随机发生器如何匹配参与者。 你会如何编写这样的代码。

我显然对此一无所知,我非常感谢一些建议 关于这个问题——我不期望复制和粘贴解决方案。它 很高兴听到你们将如何解决这个问题。

非常感谢

Could somebody explain to me the architecture behind chatroulette?
I was thinking about a similar project that would only implement Audio
support (for starters). Is the best way to set this up a flash server?
If so, how should I go about getting into flash, will I need flex 4? I
have some beginner experience with c++, c# and java but I have never
developed anything for the web.

I was also wondering how the randomizer matches up the participants.
How would you code something like this.

Im obviously pretty clueless here and I'd greatly appreciate some advice
regarding this problem -- I don't expect copy and paste solutions. It
would just be nice to hear how you guys would tackle this problem.

Thank you very much

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

深居我梦 2024-09-04 13:52:13

它使用 wowza 的流媒体服务器,而不是 Adob​​e 的 cirrus,由于许可证限制,您无法在生产中使用后者。

http://www.streamingmedia.com /Articles/News/Featured-News/The-Tech-Behind-Chatroulette-66278.aspx

It uses wowza's streaming server not Adobe's cirrus which you can't use in production due to license limitations.

http://www.streamingmedia.com/Articles/News/Featured-News/The-Tech-Behind-Chatroulette-66278.aspx

梦断已成空 2024-09-04 13:52:12

AFAIK ChatRoulette 在 Flash Player 10.1 中使用了一组新的 API(代号为 Stratus),它允许在 Flash Player 实例之间建立点对点连接。

因此,视频和音频流不是被推送到特殊的流媒体服务器,而是共享唯一 ID(如 FMS 或 Red5),并且对等点之间直接连接。

这很有可能减少实时事件流的服务器负载,其中可以在近邻之间共享与服务器流的 1 个连接。

如果 Stratus 不直接在对等点之间推送流,您能想象 ChatRoulette 之类的托管费用吗?!

如果您有兴趣了解更多信息,请查看 Stratus 关于 Adob​​e 小伙子的部分:http://labs.adobe .com/technologies/stratus/

AFAIK ChatRoulette uses a new set of API's in Flash Player 10.1 codenamed Stratus, which allows for peer-to-peer connections between Flash Player instances.

So instead of the video and audio streams being pushed up to a special streaming server, like FMS or Red5 unique ID's are shared and peers connect directly to each other.

This has great possibilities to reduce server load for live streaming of events where 1 connection to a server stream can be shared between near neighbours.

Can you imagine the hosting bills for something like ChatRoulette if Stratus wasn't pushing the streams directly between the peers?!

If you're interested in knowing more check out Stratus' section on Adobe lads: http://labs.adobe.com/technologies/stratus/

木森分化 2024-09-04 13:52:12

如何匹配参与者?简单的。有一个名为“等待用户”的变量,该变量最初设置为 null。当用户连接时,如果“waiting users”为空,则将连接用户设置为等待用户。如果 waiting users 不为 null,则创建一个新线程来管理这两个用户的对话,并将 waiting users 设置为 null。这种“随机性”意味着如果您有很多访客,对话应该是随机的。但是,如果一次只有 10 个人进行对话,那么您不会获得惊人的结果。您需要不断断开/连接才能使其发挥作用。

使用actionscript,您可以通过Microphone.get()轻松访问麦克风设备[使用谷歌获取更多信息]...您必须将收到的数据提供给服务器。

为了不必不间断地发送 HTTP 标头,您应该创建一个套接字 [actionscript 支持此功能,请查看 flash.net。[Socket/Sockets?我忘记了]] 并连接到一个自定义编写的服务器,这很容易用 c# 完成...我没有用 c++ 尝试过,也没有使用 java...

该服务器将充当您之间的“代理”两个客户...

How can you match up participants? easy. have a variable named "waiting users" which is initially set to null. When a user connects, if "waiting users" is null, make the connecting user the waiting user. If waiting users isn't null, create a new thread that manages those two user's conversation, and set waiting users to null. This "randomness" means that if you have many visitors, conversations should be random. However, if you only have 10 people doing conversations at a time, its not like you'll get amazing results. You need constant disconnects/connects for this to work.

With actionscript, you can easily get access to a microphone device via Microphone.get() [use google to get more info]... You'll have to feed the data you receive to your server.

For the sake of not having to send HTTP headers nonstop, you should create a socket [actionscript supports this, look into flash.net.[Socket/Sockets? i forget]] and connect to a custom written server, which is easily done with c#... I haven't tried it with c++ and haven't worked with java...

The server will act as a "proxy" between your two clients...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文