News for hackers. Stuff that matters.
Re:Can Firebase/Meteor ever be secure? by marcusf on Saturday April 14, 2012 @05:00AM (#3840323)
Yup, seems like the hype took peoples common sense with it out the window. I'd assume and hope that just because there's a mongo api on the client, surely doesn't mean it's the raw socket that's exposed?
Re:Can Firebase/Meteor ever be secure? by geoffschmidt on Saturday April 14, 2012 @05:37AM (#3840390)
The way it works in Meteor is, there is a data cache on the client with a Mongo-compatible API. When you type commands in the browser console, you're not hitting the real Mongo database at all, you're hitting that client-side cache. That's why it can be synchronous.

When you do a write, it also does a RPC to the server to ask the server to do the same write. The server can accept the request, reject it, or do something totally different. Whatever ends up happening, the client cache is patched to reflect the results.

Re:Can Firebase/Meteor ever be secure? by jcoffey on Saturday April 14, 2012 @06:20AM (#3840479)
Geoff, a bit off topic here but do you have any comment on the GPL licensing/linking conversation people have been getting their nickers in a twist about every time meteor comes up on HN?
Re:Can Firebase/Meteor ever be secure? by geoffschmidt on Saturday April 14, 2012 @07:05AM (#3840539)
We've been working very hard on this, and are scrambling to digest all of the (stunningly helpful and specific) feedback and to educate ourselves.

This thread isn't a good place for it, but we'll get something out soon.

Re:Can Firebase/Meteor ever be secure? by taylorbuley on Saturday April 14, 2012 @11:27AM (#3841100)
Any idea if you can call a dropDatabase() from the client? That's my big fear.
Re:Can Firebase/Meteor ever be secure? by geoffschmidt on Saturday April 14, 2012 @11:54AM (#3841179)
Definitely not. It's not even in the wire protocol.
Re:Can Firebase/Meteor ever be secure? by chrisbroadfoot on Saturday April 14, 2012 @09:38AM (#3840803)
Geoff,

Does this mean the entire dataset is sent to the client?

Re:Can Firebase/Meteor ever be secure? by geoffschmidt on Saturday April 14, 2012 @11:19AM (#3841068)
You have a choice.

If the "autopublish" package is added to your project, which it is by default, then the entire dataset is sent to the client. That's good for learning and prototyping, but isn't any good for production use. The Leaderboard example uses autopublish.

Once you app works and you're ready to lock it down and scale it up -- and only then -- you remove the autopublish package. Now, it's up to you to define what's sent to the client. Use Meteor.publish() on the server to set up different datasets that clients are allowed to subscribe to, and use Meteor.subscribe() on the client to turn on/off a particular dataset. The Todos example demonstrates this -- it retrieves just the items for the todo list you're looking at, plus the list of lists. It's just a couple of lines of code, like 5 or 10, and not tricky ones either.