Can server communicate directly to client? - webserver

Everybody knows that client always request to server to execute script and get required data and we can give lot of examples of this.
But the question is that. Is there any example that server directly communicate/request to client. The server is not categorized i mean that any server.
Thanks in advance

Related

Server for iPhone; continuous connection

Ok lets say I want to create a connection between my iPhone app and my server (i'd like to try and use GoDaddy servers for this) to server real time location data to users.
I've seen plenty of good stuff online about using sockets, streams, ASIHttpmessage, CFHTTPMessageRef, etc., but what I'm unclear about is how to set up a server that continuously servers real time data to users (I believe you'd need a stream of data going to the user for this, not just a single http request and response). How does one take a host like GoDaddy and run server code on it. I know you can set up a server like this using terminal, but I don't have access to command line or the ability to run this "server program" from my web host as far as I know. Is there software I can download on my cpanel for this? Do I need a virtual private server and different hosting via GoDaddy maybe?
Does anyone know how I can do this or if my understanding of this whole thing is wrong. Please keep in mind I need this real time (or close to). Please, educate me. I really just need a better understanding of how this works.

Loopback.io backup server and server to server replication

I am thinking of adopting Loopback.io to create a REST API. I may need the following approach: an inTERnet server (run by me) to which clients connect, plus a fallback inTRAnet server to which clients connect only in case the internet connection is down. This secondary fallback server should then replicate data on the main server when the internet connection is up and running again. As clients are on the same inTRAnet they should be able to switch automatically to the fallback server. Is this possible as an idea and if so, what do you recommend i start digging into?
Thank you all!
Matteo
Simon from my other account. I believe what you want is possible as you can use whatever client side technology you want with LoopBack. As for easy solutions, I'm not familiar enough with Cordova to give any insight there.
It is definitely possible, but I suggest going through the getting started tutorial first. You'd probably create two application servers and have another proxy in front to route the requests to server a or b based a heartbeat from the main server. You would have to code all the logic and set up the infrastructure yourself though.

Can I use PHP to look for http requests and response in a '.pcap' file that was generated by Tcpdump?

I have '.pcap' files that were generated by Tcpdump. I have been looking for a way with PHP to read data in the files. I have tried several methods available, but the only thing I was able to see was that there were some number of packets with a timestamp against each packet. I tried to read further but it was all in some binary.
Just wanted to ask if anyone out there has experience with packet capture. Would be great help.
I have tried these methods so far:
https://github.com/zobo/php-pcap
https://code.google.com/a/eclipselabs.org/p/php-pcap-analyzer/
and
http://systemsarchitect.net/parsing-binary-data-in-php-on-an-example-with-the-pcap-format/
http://systemsarchitect.net/
Thanks in advance :)
I was able to see http requests from my client machine to internet by using PHP's unpack() function and fread() combined. The libraries mentioned above are also useful to retrieve other information for example the ip addresses of client and server machines with timestamps
But I wasn't able read the responses. That is because the data returned from internet servers to remote client is encrypted and PHP is not a good technology to retrieve this data.

GWT Client and Server

I believe that GWT achieves RIA through initial throwing of
objects and files to the client side initially. but what I do not
understand is that is it possible to control the amount of information
being thrown to the client side? cos this is because I do not want
sensitive information to be cache at the client side. these
information shall only be retrieved from server when requested.
these information should only be sent to the client only when
requested and should not be cached at the client side. does anyone
know if it is possible to control the amount of information being sent
to the client? can anyone enlighten me? would appreciate your help
sincerely.
See if you dont want to expose particular information on client side then keep it on server side and whenever you want that information then using RPC call you can get it on server side.And gwt cache things like images etc that on client side information only.It is not caching your information which is present in lets say database or server side.So you dont need to worry about it.And if you want more security then you can use encryption and decryption algorithms.And if you follow design patterns like mvc then that will be very good programming practice.I created one sample application so if you want you can take checkout from here

Ajax Push Engine

I'm researching methods to find ways for an event driven web application where a server can push data to the web page. Can I use APE ?? If so how can I use it and some resources please??
Thank You!!
People have been writing event driven servers since the dawn of the network. A simple google search will find your way.
However, since the client is a browser, your server must re-act upon keeping an HTTP connection open instead of simply doing socket work.
This is basically the only small difference than say an IRC server or a simple chat server.