Well ... ;) PubNub isn't exactly peer-to-peer, though. (So you don't have to deal with firewall rules; just as long as you can make outbound requests on port 80 or port 443, you'll be fine.) Also, there is a free tier, which I have been on since I started using the service last October.
If you do decide to go the peer-to-peer route, you'll have some other considerations, such as:
- Getting the user's remote IP. You cannot rely on anything fancy for this, even in node; the only reliable way is either via SMTP to the firewall, or using a web service that replies with the endpoint IP that established the connection. (Like the "what is my ip address" Google query)
- Actually connecting users to one another is tricky, unless you expect them to use some side-channel to communicate their IP address. (Chat, IM, SMS, etc.)
- Port number must be configurable on both ends for two reasons:
- Firewall rules
- A running service may already be using your preferred port number
- Sending data quickly over HTTP can be tricky due to additional protocol overhead unless your server uses one of the following headers:
- Connection: Keep-Alive; Keeps an established TCP connection open after all HTTP data has been received, allows reusing the connection to avoid overhead from the initial TCP handshake
- Transfer-Encoding: chunked; Allows "streaming" packets through a single TCP connection, avoiding the overhead of exchanging HTTP headers
My understanding is that node-webkit doesn't require any special "installation steps" to get node running; it's just included as part of the package deal. So you can run an HTTP server out of the box. So yeah, I don't see why it wouldn't work.