Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meteor reactivity with postgreSQL instead of MongoDB [closed]

Is there any way to implement reactivity with other database such as PostgreSQL in meteor? We need to have live updates with databases other than MongoDB.

like image 836
ShafiVayyattukavil Avatar asked Feb 18 '14 05:02

ShafiVayyattukavil


People also ask

Why PostgreSQL is better than MongoDB?

Key Features in MongoDB vs. PostgreSQL: MongoDB has the potential for ACID compliance, while Postgres has ACID compliance built-in. ACID (atomicity, consistency, isolation, durability) are principles or components that work towards data validity, especially in databases intended for transactional workflows.

When should I use MongoDB instead of PostgreSQL?

If you are looking for a distributed database for modern transactional and analytical applications that are working with rapidly changing, multi-structured data, then MongoDB is the way to go. If a SQL database fits your needs, then Postgres is a great choice.

Which is faster PostgreSQL or MongoDB?

PostgreSQL outperforms MongoDB in almost all performance test cases. The Postgres database management system (DBMS) measured between 4 and 15 times faster than MongoDB in transaction performance.

Is Meteor JS still relevant?

For all those who think the Meteor framework is dead- Meteor is most alive, getting back in the game with some ever-powerful updates. Meteor is a popular JavaScript web framework that did have a brief slowdown because of some changes inside the company.


1 Answers

Currently (0.7.0.1), Meteor's only supported database is Mongodb which is very coupled with what is called Minimongo, a client side implementation that mimics the mongodb api and is what basically one of the core components that allow the magic behind Meteor's reactivity.

That being said, other (sql) databases are actually on Meteor's roadmap which you can follow on the Trello board at https://trello.com/c/6ugalZMG/54-additional-database-support and https://trello.com/c/Gf6YxFp2/42-sql-support

But currently, there are some third party initiatives such as the meteor-sql smart package on atmosphere which opens up the first opportunities to develop against SQL.

The full reactivity is what you need to handle, though. Since it is implemented using publish/subscribe/observe api's of meteor and actually don't care much about the underlying data structure. Mongodb is just there for general convenience, but you can implement just about anything as your reactive data source.

In fact this video tutorial from eventedmind takes you through the steps of creating a custom reactive data source.

like image 67
Serkan Durusoy Avatar answered Oct 03 '22 19:10

Serkan Durusoy