publiclab / plots2

a collaborative knowledge-exchange platform in Rails; we welcome first-time contributors! :balloon:
https://publiclab.org
GNU General Public License v3.0
959 stars 1.84k forks source link

Defaulting to the use of one DBMS #4896

Open siaw23-retired opened 5 years ago

siaw23-retired commented 5 years ago

I've been away from plots2 for a while. Coming back and following the README I found it cumbersome to get up to running quickly because there are traces of a number of database management systems in plots2. This makes it hard to set up and have tests running smoothly.

It'd be nice to have one DBMS for all to avoid the configuration headache encountered through this. I believe this will get new contributors up and running quickly and encourage more contribution from people as I think the current multi-db setup/config is a bit intimidating considering we like to welcome first-time coders on board.

I think once this is acceptable to everyone and we get to implement this, we can completely avoid https://github.com/publiclab/plots2/issues/3840 where @milaaraujo correctly states:

Getting set up can be tough.

Setup is the last thing we want to make hard for new contributors.

jywarren commented 5 years ago

thanks everyone for the great input here! One last thing before we make a final decision - does someone want to ask in the next weekly Check-In what databases people use? Especially first-timers? It'd be great to have extra confirmation - do most newcomers use mysql or sqlite?

On Fri, Mar 1, 2019 at 6:57 AM Emmanuel Hayford notifications@github.com wrote:

I've been away from plots2 for a while. Coming back and following the README I found it cumbersome to get up and running quickly because there are traces of a number of database management systems in plots2. This makes it hard to set up and have tests running smoothly.

It'd be nice to have one DBMS for all to avoid the configuration headache encountered through this. I believe this will get new contributors up and running quickly and encourage more contribution from people as I think the current multi-db setup/config is a bit intimidating considering we like to welcome first-time coders on board.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/4896, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJwLIb--1cZwbxtXM84jWtEQ03ltYks5vSRVvgaJpZM4bY3P_ .

grvsachdeva commented 5 years ago

Nice idea @jywarren. Also, many contributors faced issues while getting started with Mapknitter due to MySQL - https://github.com/publiclab/mapknitter/issues/307.

How about a poll? @siaw23 @jywarren

jywarren commented 5 years ago

+1!

On Fri, Mar 1, 2019 at 10:48 AM Gaurav Sachdeva notifications@github.com wrote:

Nice idea @jywarren https://github.com/jywarren. Also, many contributors faced issues while getting started with Mapknitter due to MySQL - publiclab/mapknitter#307 https://github.com/publiclab/mapknitter/issues/307.

How about a poll? @siaw23 https://github.com/siaw23 @jywarren https://github.com/jywarren

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/4896#issuecomment-468709669, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ_9R8-bIsKCS6d08jgyBOuyAKoZHks5vSUubgaJpZM4bY3P_ .

siaw23-retired commented 5 years ago

Personally I find it unnecessary to create a poll. We use MySQL in production, so, if people vote SQLite, are we are going to switch from MySQL to SQLite? Or are we still going to keep SQLite and MySQL (still multiple DB problems here if people want SQLite).

IMHO we should use the DB that we have in production locally for development (installing MySQL/MariaDB is fairly easy and there are lots of docs for newbies who'd get lost). I updated the README in my PR that shows how to get MariaDB running on Mac and Ubuntu. And by the way I think SQLite should be out completely because I think there has been some added raw SQL queries that won't work on SQLite. This raw SQL here among others is an example.

jywarren commented 5 years ago

I think we could ask just to know especially who we'd be asking to switch over - and actually we could point them at your PR readme additions and ask them to try going through the steps to see if there are any common pitfalls? Mainly we just don't know currently if there are people using sqlite, or if perhaps almost everyone uses mysql and we shouldn't be worrying about it. Thanks!

On Fri, Mar 1, 2019 at 11:31 AM Emmanuel Hayford notifications@github.com wrote:

Personally I find it unnecessary to create a poll. We use MySQL in production, so, if people vote SQLite, are we are going to switch from MySQL to SQLite? Or are we still going to keep SQLite and MySQL (still multiple DB problems here if people want SQLite).

IMHO we should use the DB that we have in production locally for development (installing MySQL/MariaDB is fairly easy and there are lots of docs for newbies who'd get lost). I updated the README in my PR that shows how to get MariaDB running on Mac and Ubuntu. And by the way I think SQLite should be out completely because I think there has been some added raw SQL queries that won't work on SQLite. This raw https://github.com/publiclab/plots2/blob/master/app/models/user.rb#L385 SQL here among others is an example.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/4896#issuecomment-468725038, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ3WRbkAniK0tbrRunv-BWgS7Tt38ks5vSVXMgaJpZM4bY3P_ .

siaw23-retired commented 5 years ago

OK. Sounds good then.

milaaraujo commented 5 years ago

I think the poll is a good idea! But I agree 100% with @siaw23 that we should use the DB that we have in production locally for development. :)

jywarren commented 5 years ago

Just noting that @stefannibrasil and @sashadev-sky have also both voiced support for dropping sqlite -- here! https://github.com/publiclab/plots2/issues/2712#issuecomment-468382671

jywarren commented 5 years ago

I saw a poll app was installed by someone and approved it. @SidharthBansal any thoughts to add here? @cesswairimu ?

siaw23-retired commented 5 years ago

@jywarren where's the poll? I did recommend for a poll app to be installed but didn't do the actual installation. Can you please create the poll for us Jeff?

jywarren commented 5 years ago

oh -- ok can you link me to the poll app? Sorry...

On Tue, Mar 5, 2019 at 11:40 AM Emmanuel Hayford notifications@github.com wrote:

@jywarren https://github.com/jywarren where's the poll? I did recommend for a poll app to be installed but didn't do the actual installation. Can you please create the poll for us Jeff?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/4896#issuecomment-469752783, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ0u_OtAbginStSQudHZ5Z3jfzQoYks5vTp3ggaJpZM4bY3P_ .

siaw23-retired commented 5 years ago

https://github.com/apps/polls @jywarren

sashadev-sky commented 5 years ago

@jywarren @siaw23 I think you might find that a lot of contributors have worked with sqlite and if they have worked with another DBMS with similar setup configurations as mysql, such as Postgres, that should be taken into consideration in the poll too. If you can set one up, conceptually the setup for the other one will make sense. (This was my own experience).

Also, it would be good to create some setup instructions and send them to the people that poll that they have never used mysql. If they can follow the instructions and setup, we know we are good to go.

I already have this going for macOS in another repo https://github.com/publiclab/mapknitter/pull/355, still need people to test run that one.

jywarren commented 5 years ago

Testing out here before posting to https://github.com/publiclab/plots2/issues/4917

Hi all, we're curious what database do you use with plots2? We're discussing in https://github.com/publiclab/plots2/issues/4896 whether to continue supporting sqlite or not -- and want to know how many people currently use different database types!

/polls MySQL MariaDB SQLite Other

jywarren commented 5 years ago

/polls MySQL MariaDB SQLite Other

jywarren commented 5 years ago

Oh, maybe it has to be the first item in the issue?

jywarren commented 5 years ago

Aha - ok, here it is: https://github.com/publiclab/plots2/issues/4919

sashadev-sky commented 5 years ago

@jywarren I added a quick note about it under the check-in description towards the top so hopefully we'll get some more input. Can you see who is voting or is the poll anonymous?

sashadev-sky commented 5 years ago

also if this issue becomes high priority and we're not sure how to move forward still I can work with @siaw23 (if you have the time too!) to try and make a complete report pinpointing causes of the issue, possible ways to fix it without getting rid of one DBMS, pros and cons, recommendations, etc.

johnmidavis commented 5 years ago

@gauravano I would like help any way I can to help here.

grvsachdeva commented 5 years ago

your preference of db - https://github.com/publiclab/plots2/issues/4919