The Portal greatly simplifies things essential to real-time web applications like connection sharing, reply, heartbeat and disconnection detection. The Portal is designed by carefully considering known issues and best practices of real-time web to provide a reliable socket based on its simple protocol.
Even for Internet Explorer 6. Not only WebSocket but also Server-Sent Events, Streaming and Long polling over HTTP are supported considering their known issues.
It's feasible in browser. Connection can be shared and used across multiple tabs and windows as long as browser session is alive.
Considering a multitude of browsers, transports, servers and their combination, Heartbeat is essential to maintain stable connection.
Conversation not notification. Once in a while, simple event-notification is not sufficient. Then, client and server can have conversation by sending and replying to event.
The portal.js in master branch takes only 6.88KB minified and gzipped. Compare it to others.