The first and more obvious response to this question, is that there are major problems with letting people listen on sockets. First if two people want to listen on the same socket who would get it. (I am assuming that sockets like flash server and socket.io, everyone would want) Second, an application is only loaded into memory for about 5 minutes after the last request. So if a connection tries to come in after a application is closed, how would the system deal with it. Would it be fair to delegate permanent port to applications to deal with this, otherwise, you might find two applications crossing over unknowingly, but then most likely, the socket would be closed and the request would fail.
For the outgoing requests, you must understand that jsapp is more like a share hosting, the is a current amount of resources that everyone must share, and if people, for example, were able to get onto busy irc then that can take a lot of bandwidth. Plus of you app gets killed and you have a socket open then it would have to properly be close. For example, with irc, if the connection crashes, you then have to ghost any nick name that you are using. Also if you have read the freenode docs, then you know that they limit the number of connections per ip, and thus it might not be fair to some. (I know with freenode that you can ask for an exception with an ip, but there are other services that do the same thing, and I do not wasn't to get involved in this)
--
Matthew Francis-Landau
mat...@matthewfl.com
http://matthewfl.com
http://jsapp.us/p/matthewfl
http://twitter.com/matthewfl