4 ms·
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
by Blixs 9y ago
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.
- icc97 9y agoYou can use React as a front end for Meteor
- michaelsbradley 9y agoAny thoughts on RxDB? https://github.com/pubkey/rxdb https://github.com/pubkey/rxdb
- Jonovono 9y agoyo 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.
- Blixs 9y agoI'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.
- devdoomari 9y agoCloud 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
- deleted 9y ago[deleted]
- benjaminl 9y agoFirebase 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-limit-data https://firebase.google.com/docs/firestore/query-data/order-...
- devdoomari 9y agoif you scroll down: citiesRef.where("population", ">", 100000).orderBy("country") is invalid... EDIT: sorry got confused & posted wrong example (population/population vs population / country)
- benjaminl 9y agoThat 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.firestore.v1beta1#google.firestore.v1beta1.StructuredQuery https://cloud.google.com/firestore/docs/reference/rpc/google...
- rco8786 9y ago> 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?
- Blixs 9y agoWe 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.
- dmak 9y agoI 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?
- lauritzsh 9y agoThe 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 http://redux.js.org/docs/introduction/PriorArt.html#rxjs [1]: https://github.com/redux-observable/redux-observable https://github.com/redux-observable/redux-observable
- Blixs 9y agoWell, 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!
- marknadal 9y agoYou 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 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.