实现人与人之间的随机聊天 [英] Implementing a random chat among people

查看:129
本文介绍了实现人与人之间的随机聊天的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的想法是做一个网站,在那里人们可以注册中心和搜索人聊天。他们可以选择从某国,流派的人,有一定的年龄等。

My idea is to make a website, where people could registry and search for a people to talk. They can choose people from certain country, genre, with certain age and so on.

是的,我知道有很多这样的网站,但我想实现这一点,因为它看起来非常具有挑战性的。

Yeah, I know there is a lot of websites like this, but I want to implement this, because it looks really challenging.

你能不能给我的想法我怎么能实现这个使用PHP + MYSQL + jQuery的(阿贾克斯)?我既不是初学者还是高级的这些事情。

Can you give me ideas how could I implement this using PHP + MYSQL + Jquery(Ajax)? I am neither a beginner nor advanced with these things.

那么,应该如何工作的呢?一个人点击搜索按钮,这个人摆在那,他搜索有人说话数据库,所以下一步是什么?我也希望能够让人们在同一时刻有几个人说话。

So, how should this work? One person clicks search button, this person is put in database that he searches for somebody to talk, so what's next? I also want to be able to allow people to talk with a few people at the same moment.

我不要求为code什么的,只是想法如何code吧,没code需要。

I am not asking for a code or something, just ideas how to code it, no code needed.

感谢你。

推荐答案

我不认为一个同步的,阻塞的编程语言如PHP是正确的平台,这样的应用程序。这是更为明智的选择异步,非阻塞像JavaScript语言。这样做,您可以使用长轮询这将提高在聊天体验您应用程序。

I don't think that a synchronous, blocking programming language like PHP is the right platform for such an application. It were much wiser to choose an asynchronous, non-blocking language like JavaScript. This has the great advantage that you may use Long Polling which will improve the chatting experience in your application.

因此​​,我建议使用执行本 NodeJS 。你可能想看看的节点,一个简单的聊天的实现。

Thus I recommend implementing this using NodeJS. You may want to look at an implementation of a simple chat in node.

这篇关于实现人与人之间的随机聊天的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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