Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meteor with mysql

Tags:

mysql

meteor

I'm curious to know if meteor can be connected to or display the contents of RDBMS, such as mysql. I have a database that is constantly changing and, if I can use meteor as a web server for the fronted, then it will be great.

thanks,

Ryosuke

like image 499
user1396808 Avatar asked May 15 '12 17:05

user1396808


4 Answers

From http://docs.meteor.com

You can substitute another database for MongoDB by providing a server-side database driver and/or a client-side cache that implements an alternative API. The mongo-livedata is a good starting point for such a project.

So, it is possible. Right now, there is no mention of any RDBMS in meteor project, someone might have started such project/plugin. Or you can implement it based on mongo-livedata implementation.

like image 130
Nachiket Avatar answered Nov 07 '22 02:11

Nachiket


https://github.com/drorm/meteor-sql is an implementation of livedata for mysql. It's only just been released so it might still contain a few bugs but I think you will find it up there as a viable option.

like image 30
Benjamin Conlan Avatar answered Nov 07 '22 03:11

Benjamin Conlan


Basically, there are 3 ways to achieve this:

1.- Use SQL Sintax in client side: Get rid of minimongo limitations on grouping and unions. Use Alasql on the client and normalize mongo collections.

2.- Use a SQL Connector: Try numltel's MySql connector. The disadvantage is it breaks deployments to meteor.

3.- Use mongo as a slave for relational database, keeping them in synch. MySql Shadow uses this. Also you might want to look at symmetric.ds to set mongo bidirectional replication with a lot of Sql engines.

I have collected my research in this repo:

https://github.com/vchigne/sqlAndMeteor

like image 26
Victor Chigne Avatar answered Nov 07 '22 02:11

Victor Chigne


I see this question is a bit old. Meteor is now at 1.0.1. One of the notable changes since this question was asked is that Meteor how has the ability to tail the Mongodb OpLog. This makes subscriptions truly instant real-time. Prior implementation used 10 second poll and diff. So, yes there are projects to develop drivers for alternative databases but if they do not have the equivalent of OpLog then it will not be real-time.

SQL support is on the roadmap but still far off, not until 1.1+ https://twitter.com/meteorjs/status/399904048683290625

like image 45
user3354036 Avatar answered Nov 07 '22 02:11

user3354036