-4

The question and description has been edited to make the user understand well what i am trying to ask after getting 4 -votes.

I have a vps(Virtual dedicated server).

I have a desktop application in which i want notifications from the vps webserver.

i can write both c and php as a server side script if needed.

I thought server push mechanism would do that?

So what should i do?

i read that long opened connections and keep alive will be a load to the server

i know c, win32 api, php, winsock and php sockets.

is it just the programming technique pushing information which is called push technology?

i had been reading a lot of explanations in the internet but non had a wireframe kind of explanation and i dont know which libraries in c,php would do that...

what i am assuming with push technology is it is just a mechanism using the existing libraries (sockets) in any programming language if available (win32api, php) to get instant notification from a remote location.

Charles
  • 50,943
  • 13
  • 104
  • 142
Jayapal Chandran
  • 10,600
  • 14
  • 66
  • 91
  • Ranting (in particular in the question title) is a sure way to get a question downvoted and closed. Show some professionalism. – Oded Mar 22 '12 at 12:02
  • Also, asking a legible question would help you to get answers. I recommend reading [Writing the perfect question](https://msmvps.com/blogs/jon_skeet/archive/2010/08/29/writing-the-perfect-question.aspx). – Oded Mar 22 '12 at 12:03
  • @Jayapal: And I agree with Oded. You should fix your question title – ANisus Mar 22 '12 at 12:04
  • This isn't a question about a program, it's a fishing expedition for an architecture, and a particularly whiny one at that. If you want to connect to a web server, you have to live within the HTTP protocol. Either you do polling or you use a connection that doesn't close. Pretty simple. Same thing if you're working within a web browser, unless you want to limit your browsers and write plugins. If those don't apply, come up with your own protocol. – tvanfosson Mar 22 '12 at 12:07
  • i have changed the title of the question and body of the question and how people will understand now. – Jayapal Chandran Dec 09 '12 at 06:44

1 Answers1

2

If you don't want to use open connections, you have two choices:

1) Either you have a client application on your computer that frequently checks the server for new notifications

2) You create a little notification server (like a little node.js webserver or something) which is running on your desktop. Then you have a client application on the server which connects to your desktop whenever there is a notification.

ANisus
  • 74,460
  • 29
  • 162
  • 158
  • i had been doing like the first point... that's fine. with respect to the second point i was wondering whether can we directly connect to a end user system from a remote server (webserver)... wont the firewall do some blocking – Jayapal Chandran Mar 22 '12 at 12:23
  • Yes, you will most likely have firewall problems. But if you want an external system to push notifications to your desktop without frequent fetching or an open connection, your only option is this. At least over a TCP/IP network such as Internet. Other applications such as MSN and Skype use an open connection as far as I know. – ANisus Mar 22 '12 at 13:40
  • hhmmm... interesting... so it is like keepalive in http... a open connection which can receive information any time... let me try that ... it will take some time... yet ... have to do it. – Jayapal Chandran Mar 23 '12 at 09:42
  • 1
    You wouldn't necessarily need an ordinary HTTP connection. For dual communication, you can also try websocket. It has quite recently become a RFC-standard and is supported in most major browsers. Alternative, check out socket.io – ANisus Apr 02 '12 at 08:50