[Asterisk-Users] CRM integration (was RE: CallerID)

Andrew Kohlsmith akohlsmith-asterisk at benshaw.com
Sat May 28 13:20:50 MST 2005


On Saturday 28 May 2005 12:42, Rusty Shackleford wrote:
> Browsers don't "listen". They inititiate a connection, process the
> requested transaction with the web server, and close the connection. The
> simply can't be used to "listen" for an arbitrary connection.

Don't be so closed-minded.  Yes, technically you're absolutely correct.  
However it's trival to simulate 'listening', especially in this kind of 
situation.

> Again, this is not the way to do this. Dozens, or hundreds of clients
> constantly hammering a server with "Have you got anything new? No?
> OK..." messages every couple of seconds is an excellent example of how
> NOT to design a system. Yes, you can get away with it, if the resources
> involved are not an issue, but I think it fair to assume that for many
> interested in this discussion, resources like bandwidth and CPU usage
> ARE issues.

Nonsense.  Ever hear of poll()?  It accepts a timeout.  You make your request 
and let it block for, say 3 seconds plus a random (1-1500) ms.  With any kind 
of modern processor running on the server you will be very hard pressed to 
kill it with requests for data.

> Quite. Alas, that means an instance of SOMETHING on the client that can
> listen for, and respond to, arbitrary events.

Nah; see above.  I am very much against clients having to listen for 
connections because it introduces all kinds of problems with NAT.  
Unfortunately it's a reality and has to be worked around and port forwarding 
and firewall tricks just aren't a good solution.

-A.



More information about the asterisk-users mailing list