News for hackers. Stuff that matters.
Re:Ask HN: Is Meteor.js still a thing? by Blixs on Saturday November 04, 2017 @08:36AM (#15624720)
I speak from personal experience when I say companies are migrating away from Meteor. For me personally it's to a React/RxJS front-end stack in combination with a traditional Ruby/PostgreSQL/REST api back-end. This had the disadvantage of losing the back-end reactivity Meteor is known for, but at the same time it's a much more stable, decoupled and scalable stack. Meteor simply felt too much like a black box that caused a lot of scalability and maintainability problems in production. Its "make reactive all the things" model also gave (less experienced) developers a huge gun to shoot themselves in the foot with, causing a lot of performance issues.

If you want to keep all the reactivity goodness from Meteor I'd suggest taking a look at Firebase. Their new Cloud Firestore is very impressive and basically gives you all the features Meteor offers when you combined with a front-end framework like react or angular. Or you could take a more low-level approach and use something like Elixir/Phoenix and PostgreSQL's LISTEN/NOTIFY to create your own reactive push streams, and subscribe to them in the front-end using a reactive library like RxJS.

Re:Ask HN: Is Meteor.js still a thing? by michaelsbradley on Saturday November 04, 2017 @09:58AM (#15625025)
Any thoughts on RxDB?

https://github.com/pubkey/rxdb

Re:Ask HN: Is Meteor.js still a thing? by Blixs on Saturday November 04, 2017 @02:51PM (#15626352)
I'm a fan of RxDB. It makes a lot of sense to combine something like PouchDB with RxJS to create a reactive datastore. The only thing that bothers me a bit about it is the dependency on CouchDB (at least in case you want to have online sync). Not that I have anything against CouchDB (it's a great piece of technology IMO), but it's definitely not suited for all use cases and is in general a lot more restrictive/less powerful than a more general-purpose database like PostgreSQL.
Re:Ask HN: Is Meteor.js still a thing? by Jonovono on Saturday November 04, 2017 @02:35PM (#15626285)
yo this looks interesting. Thanks for posting it. Do you use it? Any thoughts on it and maybe how it compares to Firebase? We currently use firebase but are looking at a few other options.
Re:Ask HN: Is Meteor.js still a thing? by rco8786 on Saturday November 04, 2017 @12:29PM (#15625739)
> React/RxJS front-end stack

Tangent here, but I see this combo a lot and I don't understand what RxJS is adding to the equation on the front-end. What were/are your motivations for using RxJS?

Re:Ask HN: Is Meteor.js still a thing? by Blixs on Saturday November 04, 2017 @12:55PM (#15625858)
We use RxJS for data loading and global state management. Started with redux first, but really disliked all the boilerplate code. RxJS enabled us to have a really smart data loading and caching mechanisme that automatically pushes changes to all streams that rely on a particular piece of data whenever that data changes. No need for reducers, selectors, actions, constants or sagas. Just components with one or many RxJS subscriptions, and services to alter that data. It's been working really well for us so far.
Re:Ask HN: Is Meteor.js still a thing? by littlecranky67 on Saturday November 04, 2017 @04:57PM (#15626864)
Totally agreed, after I jumped through the hoops of learning RxJS I realized it can replace all the libraries you mentioned just because of the way RxJS worked. If you are interested, I created a small little Redux-clone based on Observables/RxJS as a fun project, but am using it in my side projects in production now: https://github.com/Dynalon/reactive-state
Re:Ask HN: Is Meteor.js still a thing? by cnp on Saturday November 04, 2017 @08:37PM (#15627577)
This is nice! Thanks for sharing
Re:Ask HN: Is Meteor.js still a thing? by dmak on Saturday November 04, 2017 @01:04PM (#15625898)
I don't really understand RxJS that well, but here is where my understanding is at. RxJS helps with composition and dataloading. On a theorectical level, isn't it ideal to have Redux used with RxJS? How do you do global state management with RxJS?
Re:Ask HN: Is Meteor.js still a thing? by Blixs on Saturday November 04, 2017 @01:26PM (#15626007)
Well, RxJS helps with pushing data around in general. It doesn't care much if it's from a local state store, a backend api or something else. So in a way it makes a lot of sense to use it for state management as well. The way we do it is by having a single global state store (like redux) with one incoming RxJS stream for writing to that store, and one outgoing stream that emits the latest snapshot of the store whenever a change is made to it. A component can then subscribe to that stream and filter it so it only gets an emitted value when the data it cares about changes. And because there's only one incoming and one outgoing stream it's very easy to debug and see what's going on in the app, making it very predictable and transparent. Also, like I said before: almost no boilerplate code at all!
Re:Ask HN: Is Meteor.js still a thing? by n2solutions on Friday November 10, 2017 @03:18PM (#15672608)
Hi, do you know of any docs / blogs that describe how to build what you have built? it sounds amazing but I don't know where to begin. do you write to the data store with some key / value pair, and subscribe to data by the key so you get back what you want when it changes?
Re:Ask HN: Is Meteor.js still a thing? by davidjnelson on Sunday November 05, 2017 @09:45PM (#15633172)
That's a really clean sounding architecture. Any particular issues?
Re:Ask HN: Is Meteor.js still a thing? by lauritzsh on Saturday November 04, 2017 @03:06PM (#15626399)
The official Redux documentation [0] mentions using RxJS with Redux. According to the docs they work great together but you might not need Redux with RxJS.

I haven't come across a project using only React and RxJS though. There is redux-observable [1] if you haven't seen yet that combines Redux and RxJS.

[0]: http://redux.js.org/docs/introduction/PriorArt.html#rxjs

[1]: https://github.com/redux-observable/redux-observable

Re:Ask HN: Is Meteor.js still a thing? by agnivade on Sunday November 05, 2017 @01:02PM (#15630643)
We have been using VueJS. Loving its fully packaged ecosystem of vue-router, vuex. The EventBus + vuex layer takes care of all state management and data subscriptions.
Re:Ask HN: Is Meteor.js still a thing? by rco8786 on Sunday November 05, 2017 @01:21PM (#15630751)
Sounds interesting, is there some code I can look at or a blog post or something?
Re:Ask HN: Is Meteor.js still a thing? by marknadal on Saturday November 04, 2017 @02:32PM (#15626271)
You mentioned "gun" in the context of databases/realtime, so naturally I found it - although I was bummed it wasn't about gun (I'm the author of the popular https://github.com/amark/gun MIT licensed graph database) just the expression.

But since I now have you, you mention that "make reactive all the things" on the server caused newer developers pain? I've certainly had my fair share of developers initially being confused about reactive systems, but generally once they play with it, it "clicks" and they are mind-blown about the possibilities.

Would you mind sharing your experiences? So that way I can indirectly learn from your interactions and try to make things better, since I work on related systems.

Re:Ask HN: Is Meteor.js still a thing? by devdoomari on Saturday November 04, 2017 @10:27AM (#15625137)
Cloud Firestore has too many limitations on what it can't do...

e.g. can't query with age > 10 and have it sorted by age <-- (wrong example)

edit: see benjaminl's comment on the wrong example

CORRECT example: can't query with age > 10 and have it sorted by total_spent

Re:Ask HN: Is Meteor.js still a thing? by benjaminl on Saturday November 04, 2017 @11:27AM (#15625443)
Firebase Cloud Firestore is new product from Firebas and is much more flexible than Firebase Realtime Databse.

It can do accomplish that query. From the docs a similar query:

  citiesRef
    .where("population", ">", 100000)
    .orderBy("population")
    .limit(2)
https://firebase.google.com/docs/firestore/query-data/order-...
Re:Ask HN: Is Meteor.js still a thing? by devdoomari on Saturday November 04, 2017 @11:41AM (#15625512)
if you scroll down:

citiesRef.where("population", ">", 100000).orderBy("country")

is invalid...

EDIT: sorry got confused & posted wrong example (population/population vs population / country)

Re:Ask HN: Is Meteor.js still a thing? by benjaminl on Saturday November 04, 2017 @12:31PM (#15625749)
That is interesting. The examples show this limitation.

> Invalid: Range filter and first orderBy on different fields

But I can’t find any documentation on what exactly the limitations on orderBy are.

The reference docs on queries don’t mention any limitations on order_by: https://cloud.google.com/firestore/docs/reference/rpc/google...

Re:Ask HN: Is Meteor.js still a thing? by icc97 on Saturday November 04, 2017 @08:57AM (#15624792)
You can use React as a front end for Meteor
Re:Ask HN: Is Meteor.js still a thing? by a_humean on Saturday November 04, 2017 @09:20AM (#15624873)
That wasn't at all their point.
Re:Ask HN: Is Meteor.js still a thing? by icc97 on Saturday November 04, 2017 @10:32AM (#15625152)
Perhaps I misread, but I got the impression they were going from Meteor front and back to React + Python. All I'm saying is that if you'd done that you wouldn't have to throw out everything to get React.