Hacker News new | past | comments | ask | show | jobs | submit login
Introducing Meteor 0.9.0, the Meteor Package Server, and Isobuild (meteor.com)
153 points by waitingkuo on Aug 26, 2014 | hide | past | favorite | 62 comments



Having worked with Meteor for 8 months by now, my love affair with it is slowly fading.

I guess I've realized that it's too far on the left on the [framework...library] scale for my liking. It's very "don't call us, we'll call you". Which is awesome when you start because you just sort of put stuff out there, functions, collections etc., and Meteor magically picks it up and does stuff with it. Yes, you can still debug everything and it's all open source so nothing is black boxed, but it's still really annoying when the magic doesn't work or worse, when it works but just not very well. As with one of my apps at the moment, that is suddenly slow. Everything works so there is no error message that I can use as a break point. But it just takes a long time for my update function to be called for whatever reason, and debugging that takes me far into territory that I don't know about and frankly don't care to know about.

Libraries, on the other hand, require you to say more specifically what you want to happen, but then you can either see that it happens or not. And debug that one particular function if it doesn't, or if it's slow.

I have tremendous respect for the work that they are putting in; iteration is really fast and problems are being solved quickly so there is no doubt in my mind that Meteor will become one of the major platforms of the web like Rails did, but it's going to be a while before I will be using it for new projects.


What is nice about meteor is how quickly you can get off the ground and build something with it. Then you realize: I have no idea how this stuff works. Is it secure? When do things update? Is there too much magic?

But if you spend a bit of time learning how meteor’s core packages work (deps, ddp, livedata, blaze, etc) and how they work together — almost all of the apprehension disappears.

I recommend digging into the Deps package first, it powers reactivity and is surprisingly simple (only 1 kb).

EventedMind has great videos explaining reactivity and Deps https://www.eventedmind.com/classes/meteor-meteor-reactivity...

Meteor also started putting together a manual to explain the core concepts http://manual.meteor.com — the first chapter is about the Deps package.

With any new concept there is a learning curve. But I believe the concepts meteor introduce are too powerful to ignore. The saying is that any sufficiently advanced technology is indistinguishable from magic :)


You can also take a look at http://manual.meteor.com/#deps , which is provided by meteor offically


I would recommend checking out Kadira for optimizing your app. It's pretty amazing the kind of information you get out of it, and Kadira Academy teaches you a lot about Meteor's internals.

Also, if your app is now "suddenly slow", I'm guessing it's been around for a while. If you don't have the proper indexes on MongoDB it's going to get slower as it loads up with more data. I've experienced this first-hand, migrating a Rails app from Postgres to Meteor/MongoDB. We have millions of records, and one missed or incorrect index can slow the whole app down, sometimes unbearably.


Having not used Meteor (beyond toys) but trying to understand how it works this sounds exactly like what I would expect to hear.

But I hope you are wrong about becoming a major platform for the web, unless it drasticly changes. These Node frameworks keep astounding me in their use of stateful servers and relying on vertical scaling.


If you're thinking about using Meteor for something important, now that they're at 0.9.0, don't.

Meteor still doesn't have a UI component API, so making reusable, reactive interface components is basically impossible (or far more difficult than it needs to be). There's a deliberately undocumented and incomplete API that's supposed to help a little bit, but you're basically out of luck if you don't want to write spaghetti code right now.

Instead of shipping an API we can use, they're holding out for the "perfect" one. I wish I could go a year back in time and build my project with Angular instead of Meteor.


That's funny, because not having to write "spaghetti code" is one of the reasons I tell people to use Meteor. Perhaps we have different definitions.

For web apps, I tend to define spaghetti code as the huge layers of glue and boilerplate you have to write to get your data out of your database in the server, serialized into some JSON or XML format through your controller in order to send to the client and into an XHR callback hell or confusing promise-driven architecture, all so that you can finally concatenate everything into a string inside some jQuery function where you then have to manage your own state.

None of which even comes up when building with Meteor, since it takes care of all of that for you, leaving you more time to build your app. So as far as I've experienced building apps in Meteor for two years, spaghetti code is a thing of the past. Not to mention that just the fact that the API works this way dramatically simplifies your application architecture just as a side effect of how the templating system, reactivity and javascript-everywhere approach work.

Yes, there are MVC frameworks like Angular and Backbone that help you take care of the client side of that. But they don't handle the server at all, so IMO they still haven't matched Meteor's feature set.


Backbone is not an MVC framework, and it's important to know that. It's one of its greatest strengths as a client-side JavaScript tool. A well structured Backbone app can stand the test of time, and I can't say that for some other options.

Meteor shows promise, but I have to agree that without a mature UI toolkit, you just end up with the same junk we've had for years (not speaking to other components of Meteor).

For what it's worth, have another look at promises. They're not the same as "callback hell" and can be a really elegant way to compose and deal with async. It's actually really nice, when the tool is called for.

Agree with you that Meteor's built-in reactivity is really nice!


I didn't mean to imply I thought promises are the same as callback hell - they are completely different beasts, indeed. But I still greatly prefer the reactive system provided by Blaze and Meteor's overall setup. I've built reasonably complex apps with Meteor that have required no promise chaining, and no callback nesting. They're more readable, easier to maintain, and cause fewer bugs. One of the reasons why I greatly prefer Meteor now, because all of those things mean that I get to do more of what I enjoy: building cool stuff.

I'm not sure why you're claiming Backbone isn't an MVC framework. It was pretty much designed to be MVC or at least MVVM, and checking the Backbone website, it still says it pretty much in the first paragraph: models, collections, and views. That's fine, but I like Meteor because it doesn't need the MVC crutch to provide structure and elegance. Somehow, it gives me more power as a developer without also asking me to write the kind of boilerplate code normally associated with data binding, getter/setters, models, and things like event emitters.

If you still prefer Backbone, that's great! But I just wanted to explain to the OP that for me, Meteor is about getting rid of spaghetti code, not adding to it.


Will Backbone stand the test of time as both data binding and DOM eventing continue to evolve? I'm not resolutely convinced of Backbone's staying power, but I'm open to entertaining other thoughts on the matter.


1 cent for every new System that promise no spaghetti code and i will be rich ;-)


I have built and integrated some pretty complex components with blaze templates without needing a component api. I am curious what use case you ran into where the template api was not sufficient?

In your comment history I saw that you asked for reactive template variables. I know of two ways to accomplish that, 1) attach a ReactiveDict to a template instance in it's render function, 2) pass it in as a variable to the template inclusion {{>template myDict}}.


Since Meteor automatically scopes by file, you can write your template helpers and event handlers in the same file, and place a reactive data structure at the top of the file that both can access.

You could use reactive-object (my package), as it provides a fairly drop-in reactive object that supports arrays as reactive properties, including all the Array.prototype methods.


It's coming, and the community is already doing a lot of cool things around UI components and with the parts of the UI API that are starting to emerge. For one example check out the UI Harness being built over at Respondly: https://www.youtube.com/watch?v=jscINbvWoDg&list=UU3fBiJrFFM...


I wouldn't write a commercial, production application with anything less than 1.0. In fact, I wouldn't write a commercial, production application with anything less than a 2.1. ;-)

The cost of supporting these projects early is that you're likely to be rebuilding anyway a year from now, but I think that's implicit in the version number.

In my opinion, the biggest risks of Meteor are this:

1. It hitched its wagon for now to mongo, so you'll be doing the same. If you happen to believe that schemaless isn't all its cracked up to be, that's a real problem in production.

2. You're picking both a client and a server. Sure, you can strip apart DPP or Blaze, but why would you? If you're not wanting to benefit from Meteor's reactivity, you can just use any server+client combo and, say, a websocket connection or something like React.js for UI components.

3. Meteor has a financial incentive to round up as many devs into their own ecosystem (atmosphere?). They want to sell you servers, services, et cetera, like Heroku does. Nothing wrong with that, but it's something to be aware of.

For all the debate about JavaScript frameworks, I have Backbone code I wrote a relatively long time ago and it's still durable and not being refactored. I can't say the same for Ember or Angular code in my experience or observation. Backbone as a library is lightweight enough that I create the framework, following good design principles, that's best for a given application. Your mileage may vary.

It's not to say the people at Meteor aren't a great bunch of people who really love what they're making. Meteor does some interesting things and I think hopes to solve some complex problems. Hope they get there. I'd love to see Meteor mature and become a tool to build bigger things (UI components I agree would be a welcome step).


Not that I implied a lack of data validation was my reason for disliking mongo - just to keep myself honest - there are the collection2 and simple-schema packages that help enforce schema validation on Meteor collections.

https://github.com/aldeed/meteor-collection2

https://github.com/aldeed/meteor-simple-schema


Why does everyone insist on this 1.0 nonsense? Ever looked at the latest Node.js version number?


I wouldn't quite call it spaghetti code... You can still structure things into models, views, controllers, and view controllers (event handlers that pass data to controllers basically). Having a component API isn't really a deal breaker.


What do you mean by "UI component API"? Couldn't you use Blaze in order to construct the the UI you need or modify existing components to fit the Meteor reactive model?


Meteor is so awesome. Yesterday was coding my project and was thinking about why I have to install meteorite. Today I can just use one tool...

A great example of many good patterns like: Ship basic version, but well-tested one. Then add things once community starts using them (3rd part packages). Also remove quirks that confuse ppl, like auto css reloading.


As a developer and maker, one of the most important things is to ship. And as someone who is not a self-professed [insert programming language] ninja or a full-stack this or that, I can safely say that Meteor has made it much easier for me to iterate and ship. I expect that as I grow, Meteor will continue to grow as well. Excited to see Meteor get closer to 1.0.


Definitely agree with you on this one, Meteor has made code easier to deploy. Haven't used it in a while but was able to get my project off the ground in less than 20 minutes. Have recommended it to non 'full stack' friends and they have had great success too. Hopefully this project continues to improve on the road to 1.0!


Don't make Meteor sound like a toy, though, 'full stack' engineers worth their salt can do awesome things with it if they understand its inherent limitations. I ran Meteor with Redis before their official Redis implementation came out, and I used Redis pub/sub to sync in real-time between 8 different instances of Meteor in production. It rocked.

Just because a framework comes out supporting only MongoDB doesn't mean you have to use MongoDB for everything. It's still on Node.js, and it still supports NPM packages, with some small caveats.


Last time I looked at Meteor I decided I wouldn't use it until there was support for server side rendering and the live updates were implemented more efficiently with triggers instead of polling. Are those implemented yet?


Live updates were implemented with listening to MongoDB replication log back on 0.7.0: https://www.meteor.com/blog/2013/12/17/meteor-070-scalable-d... This is a much more efficient way to get updates from the database and it also scales horizontally to multiple application servers (and multiple MongoDB replicas!)

If you are curious how it works, this talk is a good start: https://www.youtube.com/watch?v=_dzX_LEbZyI


Very cool, thanks. Is server side rendering coming soon as well?


The roadmap of Meteor includes "Server-side rendering" planned after 1.0. https://trello.com/c/Lz07fBAm/7-server-side-rendering

In my opinion, server-side rendering is a bit overrated since Google knows how to crawl ajaxy apps. SEO is a big concern but you can always render your pages with phantomjs (also a popular approach in the Angular world) or rely on Google being smart.

For rendering the page to the end-user, Facebook is not rendering everything server-side, nor does Twitter. I don't have enough knowledge why, but one of the FB engineers told me that it is not really faster: you need to render it twice, send the same data possibly twice, it is hard to correctly chip into the events made on the page, etc.


I'm more concerned with end user page load speed than crawling. I find Facebook and Twitter pages annoyingly slow to load, personally. Sure, server side rendering is difficult but it's exactly the sort of hard problem that a framework ought to be able to solve for you.

Edit: actually I just went to twitter and it loaded pretty fast, so I looked at the network requests and they do server side rendering for your timeline.


Hm, looks like you are right. At least the new timeline is server-side rendered. I guess they are updating parts of UI to be rendered on the server to be faster.

Interestingly some websites like GitHub are doing the opposite: they are slowly bringing incremental ajax-based transitions to every page, some "real-time" features are implemented with a socket signal refreshing the whole page.

One of the community solutions is "FastRender" package, which is not really about rendering. What it does, it puts most of the initial data into HTML page so you don't need to wait for the websocket connection and the data arriving to render the initial page. Improves the initial page load quite significantly: https://meteorhacks.com/fast-render/


What is Isobuild? The blog post doesn't actually say, and Googling [meteor isobuild] just turns up the blog post.

(Is Isobuild the tool that implements "proper single loading?")


I too was disappointed that the blog post doesn't go into any detail about unibuild.

One of the best and only explanations of isobuild is in this talk by Geoff Schmidt, one of the founders of meteor: http://youtu.be/EZUfQ1zA_NM?t=11m33s

  [iso]build
  Like 'make' or 'scons' but for distributed systems.

  One source tree
  One package system
  Multiple languages
  Multiple targets
  Multiple architectures


I think that this notion of _generality_ that meteor embraces is essentially the struggle for platform relevance. I take isobuild to mean iso-platform, one platform to rule them all. Take the discussion in the video about DDP. It's like "get on board people, we've figured it out!"

There is a tension between generalities and specifics, between abstraction and things that are concrete. I don't doubt that having a solution that satisfies everyones hopes, dreams and desires would be awesome, but I feel tension when I work on meteor apps. It feels super easy to code up demos (generalities) and then once you get into the business of building out complexity you bang into trouble. It's almost as if the underlying platforms percolate up and clamor to be heard, if you stray from that meteor happy-path.


I feel this way too sometimes, but I've come to relate it more to the fact that Meteor is relatively new, and the community has collectively built relatively few complex apps, so the documentation, available blog posts, Stack Overflow questions and answers, wikis, books, tutorials and videos just aren't really in place yet for that kind of architecture.

There are more and more solutions and patterns emerging every day as more and more people try building complex stuff in Meteor, though. Just look at some of the packages by Arunoda like fast-render, subs-manager, and kadira: all designed to ease development around common bottlenecks you run into as you start to scale up.

In other words, I think this problem will eventually go away as more people keep trying.

Just like it did with Ruby on Rails 8 years ago :)


In fact, it was explain in the post but was removed a few hours later (perhaps too much info on one news).

It was about the fact that you can code the same way on server, browser, mobile.

Example was that you can use Http package everywhere with the same function and have the same result.

And the other example was the Cordova integration. The build system can generate the code for the whole distributed system (not just the browser).


(MDG-er here) Yup, we decided to break it into two parts! Expect a blog post on Isobuild very soon.



(MDG-er here) Expect a blog post on Isobuild very soon... :-)


I cannot recommend Meteor enough for a large class of web applications. I've written 3 apps now using it and find it solves a good many of the problems inherent in more "typical" JS app app stack like rails + backbone.


If you're still using Backbone, then yes, there are better things out there, Meteor being one of them. Others include React, Angular and anything else in widespread use that came out less than half a decade ago.


You can try and use Meteor 0.9.0 in a Terminal.com container. I just created a snapshot for it at https://www.terminal.com/tiny/cb3Rc2NLlE


The new package system was one of the last missing part for Meteor 1.0 so it's really a good news. And Isobuild, isopack are really promising. Can't wait to see the result!


I used Meteor for a project and almost killed myself. Its good and fancy but loads a bajillion javascript libs that you have no idea. Also loads of dependencies on specific versions. DO NOT USE IT FOR PRODUCTION PROJECTS! I've had a very very horrible experience.


Is there a time table for when meteor will support a relational database?


The only thing I found is that additional databases are under consideration for 1.1+ https://trello.com/c/6ugalZMG/54-additional-database-support


I've found the absence of joins very frustrating, as well as aggregations such SUM etc. The reason is, I presume, that these are very intensive for a reactive app. If it has to check for a re-render everytime anything is updated across 4 tables then that's expensive. Or for aggregation, everytime something new is inserted into a table.


Joins are a really hard problem, many people have tried to support joins with a package but they all miss a corner case or have less-than-ideal performance. I think it is something we will have to wait for meteor core to support. https://trello.com/c/BGvIwkEa/48-easy-joins-in-subscriptions

In the meantime I have been using the publish-composite package and denormalizing data that has a lot of reads in an update hook using the collection hooks package.

In mongo ideally you should have rich documents and not spread out relations among too many collections. However I can imagine how hard it would be to try and sync w/ a relational database without native join support.


waiting for postgresql support


Glad to see that they went with Atmosphere. Meteor has done an incredible job at adopting 3rd party implementations as their official packages.


Great, I was just thinking the web needed another package manager this week. I'm already tired of duojs.


Weird, no matter what I try, it only updates to 0.8.3 :(


Likewise. I reran the install script (curl https://install.meteor.com/ | sh) and it removed my existing install and installing 0.9.0.


It's very convenient that I can install both front-end package and back-end package by the same package management system!


I wonder if Meteor will go 1.0 before NodeJS.


The problem with meteor (and similar frameworks):

    curl -s https://www.meteor.com/blog/2014/08/26/meteor-090-new-packaging-system \
      | sed -e '/[<]head[>]/,/[<]\/head[>]/ d'
    <!DOCTYPE html>
    <html>
    <body>
    
    </body>
    </html>
If you want someone to read your article, actually sending that article would be useful. If that article has advanced features that require javascript, flash, or video/audio, you should probably give me a reason to whitelist the page. Sending and empty body tag, on the other hand, looks more like a rendering error than any kind of real content.

Don't bother replying with the usual nonsense assertions that "everybody has js", variations of "js is mandatory/expected", or that not running js in stupid/luddite. Sorry, with pages asking for js from 10-20 hosts and the current drama about network security, js is whitelist only. So give me a reason if you want to be added to that whitelist. This means actual content, not "I'm too lazy to statically render a copy on the server".


> js is whitelist only

You're not representative of the majority of online users. Not even close, by an enormous margin (95% of people don't know what JavaScript is, let alone how to disable it; out of the remaining 5% that do know, 4.999% don't care). Given that you're in an extreme minority and wield no power in the marketplace, could you give them a reason as to why they should dedicate development time to making this use case work?


That makes me wonder: what is Lynx's market share these days?


Ahh, the downvotes, as expected.

> 95% of people don't know what Javascript is

Indeed. So you take every opportunity to exploit that ignorance, instead of educating them that there might be risks associated with running unknown code?

This is a perfect example of one of the larger problems in the tech industry. Your product could be something that helps them, despite their ignorance of the alphabet soup of technologies. Instead, you choose to make something that requires the client to take risks. Was there some technical reason this was necessary? No. Was here some huge benefit to speed or availability that wasn't available with other technologies? No. The benefit was personal convenience ("development time").

The next time you see someone annoyed at technology they don't understand, remember that YOU (and people like you) were the source of that frustration.

//i'm sure this will be downvoted as well, given how selfishly narrow-minded this crowd can be at times


This is something that's on the roadmap, though currently there is an unofficial package available.


Thank you - I will have to give the project another look once that feature is implemented in its final form.


Your sense of entitlement is simply staggering.

Why do you assume that your attention is so valuable that developers should go out of their way to cater specifically to you? The number of people who disable JS is statistically insignificant.

You have chosen to break your web experience, you have no one to blame but yourself.



You're completely right. Although I think meteor is eating its own dogfood ;)

Normally you would use meteor for your webapplication and only render the dynamic parts with meteor instead of the entire page.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: