Meteor

An HTTP server for the 2.0 web

Welcome to Meteor - you're a star! (Learn more)
  1. How do I run Meteor on port 80?
  2. What cross-site scripting restrictions affect Meteor?
  3. Is caching a problem, and how do you solve it?
  4. Can you stream through a proxy server?
  5. I have a shared/free hosting account. Can I run Meteor?
  6. What can you use Meteor for?

How do I run Meteor on port 80?

To get around cross site scripting restrictions (see What cross-site scripting restrictions affect Meteor?) you'll need to serve Meteor from the same port as your web server. Clearly they can't both bind to the same port on the same IP so you either need to run them on separate machines, or have multiple IPs available to your server. You will probably want to use port 80, since that's the default port used by web browsers, but ports under 1024 are reserved for processes running as root.

So the problem we're addressing here is how to run Meteor on port 80 despite the restriction on running processes on low port numbers. There are two practical solutions: run Meteor as root, or configure your firewall to internally redirect traffic on port 80 of your second IP address to port X, where X is greater than 1024 and is the port on which Meteor is listening.

What cross-site scripting restrictions affect Meteor?

There are three important cross-site scripting restrictions that you should be aware of:

  1. Frames requested from different subdomains of the same parent will not talk to one another until document.domain is set to a domain that both frames share.
  2. Gecko-based browsers will not allow document.domain to be lengthened once it has been shortened.
  3. In Internet Explorer, you can only make XMLHTTPRequests to the host from which the page in which the XMLHTTPRequest object is used was requested.

For a detailed examination of cross site scripting and the same origin policy, see the cross site scripting matrix.

Is caching a problem, and how do you solve it?

Yes, in some cases local caching is an issue, particularly with polling requests. Meteor solves this by appending a millisecond timestamp to the end of each request, making each querystring slightly different. The timestamp parameter is ignored by Meteor server. Meteor also adds no-cache headers to all responses and includes no-cache meta tags (for luck).

Can you stream through a proxy server?

Ish. If there is a proxy server between the client and Meteor, strange things may happen. At worst the client may never receive the stream at all. Some proxies will allow streaming but will have a timeout on the maximum duration of a connection, so the stream will occasionally have to reconnect. Others have no problems at all. If the proxy does not allow streaming the client will give up and use polling mode after the pingtimeout has expired.

I have a shared/free hosting account. Can I run Meteor?

Almost certainly not. Running Meteor requires a fair amount of filesystem surgery, as well as reconfiguration of Apache, added to which you need two IP addresses at your disposal. There may be some ISPs that give you this much freedom within a virtual server account, but we don't know of any.

What can you use Meteor for?

We use it for live chat applications and datalogging, but there are loads of potential uses: