Closed stayhero closed 12 years ago
I imagine the network latency could get annoying.
Unconventional, but what if we used Sqlite for the dev environment. This would allow us to share a small database file amongst each other - giving us best of both worlds?
Saqib
-----Original Message----- From: Christian Sent: Tuesday, November 08, 2011 12:34 AM To: SaqibS Subject: [youPM] Development Environment: mysql locally or remote? (#3)
I usually develop using my local mysql-server (dedicated server in our office). The database.yml looks as this:
development:
username: rails
password: xxx
adapter: mysql2
encoding: utf8
host: local_mysql
database: project_dev
production:
username: rails
password: xxx
adapter: mysql2
encoding: utf8
host: liveserver.mycompany.com
database: project_live
Because sometimes I want to work from home, I add
11.122.222.222 local_mysql
to my /etc/hosts file. That I'm always talking to the right mysql-server (depending on where I am).
Ryanicle suggested that we should work on the live mysql-server because it's easier to work on the same database and sample data (that's true). Because of that for this project I setup the database.yml to talk with the mysql-server at Amazon.
Unfortunately this feels slow on my system ( maybe because it's a micro instance, maybe because I'm in Germany and the connection is too slow, and maybe because Rails connects to the database on each page view and every page impression of a javascript and css file in development mode).
I added a new environment development_local so that I can still work on my local mysql-server. If would love to change it so that by default we'd develop on our local mysql-server, and for everyone who doesn't want to use a local server they could use the development_remote environment.
But this depends on how you guys prefer to work? Connecting to the remote mysql-server at Amazon, on using a database copy on your local system?
Reply to this email directly or view it on GitHub: https://github.com/halixand/youPM/issues/3
That exactly was my first idea. ;-) At least for the early stage development. But ryanicle thought that would be bad?
@ryanicle: Can you tell us more about your doubts for this solution ? Maybe we're forgetting something.
I also thought about setting up a replication slave locally but writes would still have some latency.
We can develop using local database. But at least update it to the server for any changes such as database tables and etc. So, we'd see how to coordinate with each other. That is more for coordination and communication.
Using Sqlite is good, but the little differences in two DBMS (MySQL and Sqlite) could annoy us. So, we will use MySQL locally but we will update it to the server for any changes which we can see it live.
That's my thought.
I found this company http://nimbus.io, would they be better than AWS ?
@halixand: They offer cloud storage only. That's not the same like EC2 (where we host our server). This issue does mostly not relate to AWS because we would have latency anywhere. Don't care about that, Alex. :-)
Try this: http://www.nephoscale.com You'll get a free server for 1 year with 256 Mb - Ram and 5 gb of storage. :)
The free AWS instance ( 613MB RAM, 10 GB EBS storage) seems like a better deal?
I usually develop using my local mysql-server (dedicated server in our office). The database.yml looks as this:
Because sometimes I want to work from home, I add
to my /etc/hosts file. That way I'm always talking to the right mysql-server (depending on where I am).
Ryanicle suggested that we should work on the live mysql-server because it's easier to work on the same database and sample data (that's true). Because of that for this project I setup the database.yml to talk with the mysql-server at Amazon.
Unfortunately this feels slow on my system ( maybe because it's a micro instance, maybe because I'm in Germany and the connection is too slow, and maybe because Rails connects to the database on each page view and every page impression of a javascript and css file in development mode).
I added a new environment development_local so that I can still work on my local mysql-server. I would love to change it so that by default we'd develop on our local mysql-server, and for everyone who doesn't want to use a local server they could use the development_remote environment.
But this depends on how you guys prefer to work? Connecting to the remote mysql-server at Amazon, or using a database copy on your local system?