7

I need to make tet-a-tet comet chat with many channels using PHP as a backend and JQuery as a frontend. I need something like event-driven server to do this... But didnt find any simple and appplicable to my task. Please, tell me the best solution for this problem

hexxy
  • 71
  • 1
  • 2

7 Answers7

2

You may a look for Reverse Ajax term. Probably the APE project will help you.

edigu
  • 9,878
  • 5
  • 57
  • 80
  • Been using APE project for PHP and Python (django) and it works perfect. Server side javascript and got working scripts for mootools, jquery and probably other js-frameworks. – xintron Mar 03 '10 at 13:19
1

You can create a daemon: http://kevin.vanzonneveld.net/techblog/article/create_daemons_in_php/

Sam Dark
  • 5,291
  • 1
  • 34
  • 52
  • Not very useful as i have not enough time to write a server by myself :) deadline coming soon – hexxy Feb 14 '10 at 13:52
  • Making daemons is fun. But there are speedier alternatives. – Brian Lacy Mar 01 '10 at 22:05
  • though it's nice to see my own project (system_daemon) mentioned here, this is not the right tool for the job. i recommend taking a closer look at node.js; and have that (maybe) talk to a php backend. – kvz Sep 03 '12 at 19:08
1

You could try WebSync On-Demand...there's a simple chat demo that should get you off and running...

http://www.frozenmountain.com/websync/demos

Jerod Venema
  • 44,124
  • 5
  • 66
  • 109
1

Have you heard of AjaxIM?

It's an open-source instant messaging framework that uses AJAX.

Alex Weber
  • 2,186
  • 2
  • 19
  • 27
0

Maybe you should try to use node.js. It supports event-driven web servers and there is already a chat demo (http://nodejs.org/#demo). With node.js you write your backend and frontend code in Javascript, so it shouldn't be problem if you know this language.

Bohdan
  • 31
  • 1
0

I was actually just reading an article on this, which led me to: http://demo.java2script.org/gtalk/ which is an example of what you're trying to do.

jamie-wilson
  • 1,925
  • 21
  • 38
0

I have a very simple example here that can get you started with comet. It covers compiling Nginx with the NHPM module and includes code for simple publisher/subscriber roles in jQuery, PHP, and Bash.

http://blog.jamieisaacs.com/2010/08/27/comet-with-nginx-and-jquery/

Jamie
  • 811
  • 9
  • 13