News for hackers. Stuff that matters.
Re:Meteor 0.3.9 adds search engine optimization by mcgwiz on Thursday August 09, 2012 @02:07PM (#4362343)
Their technique for generating the HTML representation of deep-link into a Meteor app is to run the entire client app in a headless browser and serialize the generated DOM?!

This is an area of vital importance to public, JS-based RIAs, and needs some real innovation. Why even bother delivering this half-baked solution? The processing cost makes it untenable for all but the tiniest of URL-spaces.

Re:Meteor 0.3.9 adds search engine optimization by dgreensp on Thursday August 09, 2012 @03:03PM (#4362646)
Yeah, it's definitely the kind of solution that makes you twitch a bit. The reason we wrote it is because we needed it now for meteor.com, and it wasn't too much engineering work (I think Nick wrote the first version over a weekend, and then it was a couple days of packaging it up). The reason we released it is, well, why not? :)

The "real solution" is coming, and we will get it right. It's connected to URL routing, and sending down initial HTML on page load. We're all excited for the day when Meteor apps initialize the client session on the server. It will look at first glance like a traditional server-side app. :)

Re:Meteor 0.3.9 adds search engine optimization by besquared on Thursday August 09, 2012 @07:52PM (#4364014)
Did you guys think about just building a normal website?
Re:Meteor 0.3.9 adds search engine optimization by raja on Thursday August 09, 2012 @05:05PM (#4363233)
Did you look into using Zombie instead of PhantomJS? It advertises itself as a tool for headless full stack testing utility but I have come to rely on it for integrating headless browsing in node.js apps.
Re:Meteor 0.3.9 adds search engine optimization by KaoruAoiShiho on Thursday August 09, 2012 @06:37PM (#4363691)
Not affiliated with meteor but I have a similar setup.

I have tried zombie but there were various issues with getting it to work. Phantomjs was just much more painless.

Re:Meteor 0.3.9 adds search engine optimization by enos_feedler on Thursday August 09, 2012 @06:32PM (#4363672)
+1 for Zombie. I have been using it for acceptance testing with mocha and it works quite well for emulating the browser environment. The nice thing is its just an npm module that you can require and works within the js environment.
Re:Meteor 0.3.9 adds search engine optimization by geoffschmidt on Thursday August 09, 2012 @03:53PM (#4362892)
> Why even bother delivering this half-baked solution?

Because we used it for our funding announcement at the end of last month -- a full press cycle, where the Andreessen Horowitz and Matrix Partners press machine pushed our story out to all of the tech blogs, with all of the traffic that that implies -- and not only did it work fine, it got us to #1 on Google for "meteor." Above, you know, actual meteors :)

It works fine for us as a stopgap measure and we wanted to share it with others. We put it in a optional smart package that isn't included in new projects by default.

We're near the end of a major rewrite of Meteor's page update engine. You can see the latest progress on the 'spark' branch. One thing that happened during this rewrite was the conversion of Meteor's templating to be 100% string-based. Check it out: go to meteor.com/faq, open your browser console, and evaluate "Template.faq()".

This means that the server can render the templates for your app without having a DOM implementation of any kind (much less a headless client.) 'spiderable' doesn't do this yet, but it will by Meteor 1.0 (if 1.0 even has a separate package.)

For the record, the ratio of our investment in auth and accounts, to our investment in Spark, is about 2:1.

Re:Meteor 0.3.9 adds search engine optimization by gaius on Thursday August 09, 2012 @04:36PM (#4363096)
Above, you know, actual meteors :)

Elegant proof if any were needed that so-called SEO is merely tricks for polluting search indexes. As bad as spammers.

Re:Meteor 0.3.9 adds search engine optimization by csallen on Thursday August 09, 2012 @07:46PM (#4363982)
Search engines are all about what people are looking for on the web. It's quite possible that more people are currently interested in Meteor the framework than meteors the objects, in which case I wouldn't call this result "pollution."

If you really want the Wikipedia page for meteors, nothing's stopping you from going straight there.

Re:Meteor 0.3.9 adds search engine optimization by gaius on Friday August 10, 2012 @06:51AM (#4365668)
I very much doubt that, with the Perseid shower due this weekend.
Re:Meteor 0.3.9 adds search engine optimization by libria on Thursday August 09, 2012 @10:07PM (#4364440)
My top 2 hits were meteor.com and meteor.ie (a mobile communications provider in Ireland) and then space debris. It would seem domain names have a lot of SEO weight, an important takeaway for startups.
Re:Meteor 0.3.9 adds search engine optimization by jcoglan on Thursday August 09, 2012 @02:49PM (#4362578)
Never mind the cost. They are proposing that you run your app, with its 3rd-party jquery/facebook/twitter/google code loaded dynamically over non-SSL connections on a platform with filesystem-write-access to your server.
Re:Meteor 0.3.9 adds search engine optimization by mnutt on Thursday August 09, 2012 @04:11PM (#4362975)
It's no less safe than loading hostile 3rd-party web pages on your browser at home.
Re:Meteor 0.3.9 adds search engine optimization by jcoglan on Thursday August 09, 2012 @06:29PM (#4363649)
It is much less safe. PhantomJS has a filesystem API, which is fine when you consider that its primary use case is testing code you wrote and reporting the results. However, given that it is fairly easy to create a bridge between the PhantomJS and WebKit JavaScript runtimes, or to exploit common patterns for making such a bridge, running arbitrary 3rd-party code, loaded over a connection not verified by an SSL cert chain, is asking for trouble. This is an obvious backdoor to get write access to Meteor servers.
Re:Meteor 0.3.9 adds search engine optimization by mortice on Thursday August 09, 2012 @06:25PM (#4363630)
You are so wrong that you are dangerous.
Re:Meteor 0.3.9 adds search engine optimization by mnutt on Thursday August 09, 2012 @08:02PM (#4364059)
No, I'm not.

I think people's confusion lies in the fact that there are actually two separate areas where javascript is run in Phantom: one is the javascript that controls Phantom and has a filesystem API; the other is the javascript that gets run inside the browser sandbox as part of the web page, just like any other javascript run in any other browser. It is possible to set up a bridge between the two such that the latter can issue commands to the former, just as you can curl sites and pipe them into bash. The point is that with default settings you can use PhantomJS to load a website without any danger whatsoever.

If you disagree, please write a more worthwhile comment showing me which part of the API is dangerous.

Re:Meteor 0.3.9 adds search engine optimization by tomku on Thursday August 09, 2012 @02:14PM (#4362381)
Seems like this would be a very easy way to DoS a Meteor app, if it's really spawning a PhantomJS process for each request.
Re:Meteor 0.3.9 adds search engine optimization by bct on Thursday August 09, 2012 @02:19PM (#4362404)
It is. And the server doesn't even feed PhantomJS the HTML that it can generate, PhantomJS has to make another request to the server. I wonder if it can be made to recurse? https://github.com/meteor/meteor/blob/master/packages/spider...
Re:Meteor 0.3.9 adds search engine optimization by jacobr on Friday August 10, 2012 @05:22AM (#4365515)
If this content is mostly for spiders, I don't see why you couldn't cache the resulting HTML for 1 hour or so and only regenerate new pages.
Re:Meteor 0.3.9 adds search engine optimization by mnutt on Thursday August 09, 2012 @04:09PM (#4362970)
It actually is possible to render those pages in phantom at scale, but it's not very elegant. It seems like something like env.js would be sufficient to render the page, though. I think other people have done that, although I haven't seen a framework that makes it natural. Meteor and others would be in a great position to build such a framework.
Re:Meteor 0.3.9 adds search engine optimization by audreyr on Thursday August 09, 2012 @02:39PM (#4362523)
Agreed that it needs some real innovation, something better than this. Consider it just a start: the fact that the spiderable package is one of the first ones out means that it is something the Meteor team cares about trying to solve. It's certainly not perfect, but it paves the way for future iterations.
Re:Meteor 0.3.9 adds search engine optimization by trung_pham on Friday August 10, 2012 @09:29PM (#4369086)
agree. this is a horrible solution. sigh...