I have to make a website for local restaurants to let people order foods online. I decided to make this system real-time. In other words, i want it to notify restaurant kitchen about new orders synchronously (at least almost). What i have in my mind is to make a program ( we call it messenger ) to check server periodically with default or custom intervals. for example it should check database for new orders every 30 seconds. When i look at this solution, it comes to my mind that there must be better solutions which i am not aware of! so i came here to ask you guys what is the best solution for this?
My ideal solution is to have notifying mechanism like what we see in Instant messenger like Yahoo Messenger. As you know when you receive new email, YIM notifies you by showing a message and this not based on client side checking system that i mentioned in first paragraph.
Thanks in advance.
What do you suggest?
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
- Maugrim_The_Reaper
- DevNet Master
- Posts: 2704
- Joined: Tue Nov 02, 2004 5:43 am
- Location: Ireland
What arborint said
.
Comet is a server-push model. Once the initial HTTP response is received by the client (using AJAX), the connection is maintained to push new data immediately to the client. So long as the number of maintained connections is not too many it scales fine - might want to run it from a separate subdomain since most browsers/clients only allow a limited number of connection per domain.
Comet is a server-push model. Once the initial HTTP response is received by the client (using AJAX), the connection is maintained to push new data immediately to the client. So long as the number of maintained connections is not too many it scales fine - might want to run it from a separate subdomain since most browsers/clients only allow a limited number of connection per domain.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Hey silvercover, there is a PHP Comet demo here, but I clicked on the demo link and it did not work. Why don't you get that demo code working and post the fixed code and your thoughts here. I think other members would be interested in that.
(#10850)
- silvercover
- Forum Newbie
- Posts: 10
- Joined: Thu Sep 20, 2007 10:17 am
Thank you guys for your great info. I am studying Comet model as much as i can.
@arborint,
Let me see that source and examine it.
@califdon,
I know about this, but imagine the situation that you forced to use instant messaging model. i also thought about email to fax, email to SMS and similar methods including sending simple email message. The most effective solution for our needs is instant messaging. On the other side we
want to bring new experience for customers and let them keep in touch with restaurant and track their orders via that Messenger i mentioned.
@arborint,
Let me see that source and examine it.
@califdon,
I know about this, but imagine the situation that you forced to use instant messaging model. i also thought about email to fax, email to SMS and similar methods including sending simple email message. The most effective solution for our needs is instant messaging. On the other side we
want to bring new experience for customers and let them keep in touch with restaurant and track their orders via that Messenger i mentioned.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Great. I just don't have time right now to look into why it wasn't working (there is a chat demo on that page too). If you can figure out the problem, but narrow it down a little, post the code here and we can pitch in to get a working demo. I think that would benefit everyone here interested in this subject.silvercover wrote:Let me see that source and examine it.![]()
(#10850)