TIP: Single Developer Using Multiple Machines

Find out how to get things done with Servoy. Post how YOU get things done with Servoy

TIP: Single Developer Using Multiple Machines

Postby Kahuna » Mon Feb 16, 2009 4:55 pm

Hi Folks

As a stand alone developer I have been struggling with the challenge of needing to develop on multiple PC's. I travel between 3 offices and also use my laptop whilst away from the office and always want my development environment and latest version of my app to hand. I want my data and Servoy solution ready to run without the need to continually export and import etc.

Options I considered / tried:

USB Memory: I've tried using USB sticks (lost 1 and destroyed another over the last year), and have been using 'AlwaySynch' to keep the laptop in synch, then each PC from the laptop. Messy! Also calls for SQL dumps etc to sync the data.

Export / Import: One of the problems with ex/import is data. If using the 'export data too' selection with Servoy, if the table already has data then the import does not add the data - and often times I've added just a little data to an existing table to test certain aspects of the app - so the new data is essential.

SVN / CVS: Using a multi developer environment would offer certain benefits such as staged versioning etc. But the extra complexity and necessity to manually synch changes and check-in/out is not really warranted (recall I'm a single developer and I'll be using only 1 PC at a time). I'd also need my data on an accessible server someplace too - which is not something I have to hand. SVN just feels like 'overkill' for my requirements.

So, long-story-short, what I needed was a means to have the same stuff on each PC without exporting and SQL dumping etc. Something where I could simply fire-up my development PC (which ever one it is) and start developing from where I left off last time.

I've been experimenting with an on-line synch tool called DropBox for some of my VB and Access development, and all my Client Db files - so that they are available to me on whatever PC or laptop I'm at. These files are also available via a web browser too, so no excuse for not having the right files with me :o Using DropBox, and after some head scratching and helpful feedback from Paul Bakker, I was able to get exactly the synchronisation functionality I need.

So, DropBox is a synchronisation solution. It calls for you to create a designated directory on your PC, and sign it in to your on-line DropBox account. Any other PC can install DropBox too and if its also signed into your account it will be automatically synched. Any number of PC's can be signed in at one time. It runs as a service so whenever your PC is on, it's synched! This has worked great for non-system files (such as back-end mdb's and documents etc), but I was concerned how it could be used to solve my challenge with live Db data and Servoy solutions. Turned out to be super easy and heres how I got it all working.

1. Install DropBox. (https://www.getdropbox.com/)

2. Copy servoy_workspace to MyDropBox directory (that starts it synching with all my other connected PC's - or it will when they are switched on).

3. Start Servoy and 'File>Switch Workspace' to select the workspace in the DropBox directory. Close Servoy.

4. Copy MySQL data directory from my C drive to the DropBox directory.

5. From MySQL bin directory fire-up the InstanceConfig app and when prompted select the DropBox directory (MySQL sub dir) as the new 'datadir' for that instance of MySQL.

Re-open Servoy and your system will now be using the synchronised copy of the workspace and the database too. No more export and import etc.

After installing MySQL, Servoy and DropBox on any other PC's, redo steps 2 and 4 to set-up the working environment + copy the servoy_properties file from the initial Dev PC to the new one (application server directory) and you should be good to go! Obviously connectors etc will be required as usual, but once set-up this structure allows (almost) carefree movement between dev PC's. Just close one down, open the next and all my 'stuff' is as I left it! I did initially think that the servoy_properties file might need to be synched too but it seems once this is set (with servers etc) I don't often change it. I do tend to copy it to DropBox occasionally though just for safety's sake!

I'm not sure how I could set Servoy to look for the properties file in another directory anyway (if its possible - it would make the synching even more risk free)?
This will work on MSSQL too, though I don't know enough about Sybase to comment on that. Since all your data is actually on the hard drive of each PC your data server and Servoy Solution will be as fast as it is running from the usual install locations.

DropBox is free with storage up to (9G - corrected to 2G - thanks Harjo) and up to 50G for an annual fee. The DropBox solution is NOT A BACK-UP SYSTEM and if you delete a file or accidentally change some data - then those deletions / changes will propagate across all your synched files, though this structure makes it easy to set-up a regular back-up routine on the DrobBox dir too.

Perhaps I'm the only developer to have this multi PC requirement, but even if you just need to move your development solution from PC to laptop regularly (visiting Clients etc), perhaps this tool will be useful?

Addendum:
I just realised that since DropBox only sends synch info to the web server once the files changed have been closed - and in my case MySQL run as a service is always on keeping a file open - it's necessary to stop the MySQL service after data has changed and before closing down that PC. This gives the few seconds necessary for the synch to take place. This is easy in Win (I have a shortcut to Services). The MySQL service restarts automatically when Win opens of course. The synching is very fast as only the data blocks that have changed are re-synched. This kind of reduces the automatic nature I was targeting but its still significantly easier than export etc.

Feedback and comments welcome!

Cheers

Ian
Last edited by Kahuna on Tue Feb 17, 2009 12:31 pm, edited 2 times in total.
(Servoy Version: 6.0.7 Win XP / 7 - SQL Server 2008 R2)
Ian Cordingley (Kahuna)
Kahuna
 
Posts: 1235
Joined: Thu Oct 26, 2006 1:39 am
Location: 1/2 NE UK 1/2 Olvera Spain

Re: TIP: Single Developer Using Multiple Machines

Postby bobcusick » Tue Feb 17, 2009 7:08 am

Ian,

GREAT TIP! Thanks very much!
User avatar
bobcusick
 
Posts: 126
Joined: Mon Jan 12, 2009 9:13 pm

Re: TIP: Single Developer Using Multiple Machines

Postby tgs » Tue Feb 17, 2009 9:32 am

And maybe there is a way to get that working for Mac by using the sync function of iDisk (mobileme account)?

Thomas
Thomas Schnaus
SAN Developer
yomotec GmbH
User avatar
tgs
 
Posts: 886
Joined: Wed Oct 04, 2006 12:05 pm
Location: Germany

Re: TIP: Single Developer Using Multiple Machines

Postby Kahuna » Tue Feb 17, 2009 11:10 am

tgs wrote:And maybe there is a way to get that working for Mac by using the sync function of iDisk (mobileme account)?

Thomas


My understanding is that DropBox works on Mac too (though perhaps there are better Apple specific tools as you suggest)!

Ian
(Servoy Version: 6.0.7 Win XP / 7 - SQL Server 2008 R2)
Ian Cordingley (Kahuna)
Kahuna
 
Posts: 1235
Joined: Thu Oct 26, 2006 1:39 am
Location: 1/2 NE UK 1/2 Olvera Spain

Re: TIP: Single Developer Using Multiple Machines

Postby ROCLASI » Tue Feb 17, 2009 11:19 am

Kahuna wrote:4. Copy MySQL data directory from my C drive to the DropBox directory.

I am very surprised that this works. You are letting MySQL run from the Dropbox directory ? If so don't you gave issues with files being in use and all ?
Or are you copying the directory after you close MySQL. But that would defeat the purpose of the auto-sync. You can forget to do it.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: TIP: Single Developer Using Multiple Machines

Postby Kahuna » Tue Feb 17, 2009 11:31 am

ROCLASI wrote:
Kahuna wrote:4. Copy MySQL data directory from my C drive to the DropBox directory.

I am very surprised that this works. You are letting MySQL run from the Dropbox directory ? If so don't you gave issues with files being in use and all ?
Or are you copying the directory after you close MySQL. But that would defeat the purpose of the auto-sync. You can forget to do it.


Hi Robert - the DropBox directory is a dir like any other.The MySQL data dir can be anyplace of course. See my addendum above - as I'd not taken account of the MySQL service running. But since DropBox only updates the synchronisation after the file closes - stopping the service works fine.
(Servoy Version: 6.0.7 Win XP / 7 - SQL Server 2008 R2)
Ian Cordingley (Kahuna)
Kahuna
 
Posts: 1235
Joined: Thu Oct 26, 2006 1:39 am
Location: 1/2 NE UK 1/2 Olvera Spain

Re: TIP: Single Developer Using Multiple Machines

Postby Harjo » Tue Feb 17, 2009 11:55 am

Hi Kahuna,

we also use dropbox a lot, but never thought about this idea!
thanks for sharing!!

btw: with the free version use can use 2GB, not 9GB as you mentioned. ;-)
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: TIP: Single Developer Using Multiple Machines

Postby tgs » Tue Feb 17, 2009 12:05 pm

Kahuna wrote:
My understanding is that DropBox works on Mac too (though perhaps there are better Apple specific tools as you suggest)!



You are right! But do you feel good to store your data on a foreign server (also true for the Apple account)?
Should the syncronisation by DropBox is working with my own server? In the preferences of DropBox I can set manually a server connection.

Thomas
Thomas Schnaus
SAN Developer
yomotec GmbH
User avatar
tgs
 
Posts: 886
Joined: Wed Oct 04, 2006 12:05 pm
Location: Germany

Re: TIP: Single Developer Using Multiple Machines

Postby Harjo » Tue Feb 17, 2009 12:10 pm

oh, and btw: dropbox IS also a BACKUP

I just restored a file, that I deleted 38 day's ago! :-)
you can even restore back in revisions of the file!
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: TIP: Single Developer Using Multiple Machines

Postby Kahuna » Tue Feb 17, 2009 12:39 pm

[quote="tgs]
You are right! But do you feel good to store your data on a foreign server (also true for the Apple account)?
Should the syncronisation by DropBox is working with my own server? In the preferences of DropBox I can set manually a server connection.

Thomas[/quote]

Hi Thomas - I don't know how the server aspects of DropBox work, but they have a pretty active and well supported forum.

As for data on a foreign server - I'd likely not use live client data on DropBox but I really don't need to. This is my development environment so I'm happy that data stored there is either secure or I'm not too concerned about it. Possible concern might be the Servoy solution being seen / copied etc. But to be honest someone would need to know me, what I store, what Servoy is and have my security info. Pretty unlikely - but see your point.

Ian
(Servoy Version: 6.0.7 Win XP / 7 - SQL Server 2008 R2)
Ian Cordingley (Kahuna)
Kahuna
 
Posts: 1235
Joined: Thu Oct 26, 2006 1:39 am
Location: 1/2 NE UK 1/2 Olvera Spain

Re: TIP: Single Developer Using Multiple Machines

Postby full_noize » Wed Feb 18, 2009 1:08 am

Hi Ian,

That is a great idea and thank you for sharing it. I have similar issues and was using Servoy on our server and accessing using windows terminal services/RDP but this obviuosly only works while connected, no good on a train or plane etc. I am not sure if what I am about to ask was covered in a previous post, but do you have to remember to shut down the DB before it will sync? I imagine that you would unless DropBox has shadow copy functionality or something like it.
Phil Barnett

Servoy 4.1.3 build 672
Sybase
Windows 2003
North Shore & Hills District Moving and Storage
Removalist Sydney
Storage Sydney
full_noize
 
Posts: 50
Joined: Mon Mar 10, 2008 1:41 pm
Location: Sydney, Australia

Re: TIP: Single Developer Using Multiple Machines

Postby Kahuna » Wed Feb 18, 2009 1:22 am

full_noize wrote:Hi Ian,

That is a great idea and thank you for sharing it. I have similar issues and was using Servoy on our server and accessing using windows terminal services/RDP but this obviuosly only works while connected, no good on a train or plane etc. I am not sure if what I am about to ask was covered in a previous post, but do you have to remember to shut down the DB before it will sync? I imagine that you would unless DropBox has shadow copy functionality or something like it.


Hi Phil - I found out 'after the fact' :oops: that you need to stop the service (if you have MySQL or MSSQL running as an automatic service, as I do) because DropBox waits for the file to close before synching.

What I now do is leave the service running until such time as I need to have DropBox synch (when in the office its on all the time on my dev PC) then stop it wen I know I will want my other PC's synched, remembering the dev PC must be running (with the service off) long enough for the synch to take place - which is typically a couple of minutes. I also have my Laptop running for a while in wireless range too (with the service off) to synch before I pack it away for a trip. Of course if you'll be in wireless range when you next open the laptop that doesn't matter.

Hope that helps.

Ian
(Servoy Version: 6.0.7 Win XP / 7 - SQL Server 2008 R2)
Ian Cordingley (Kahuna)
Kahuna
 
Posts: 1235
Joined: Thu Oct 26, 2006 1:39 am
Location: 1/2 NE UK 1/2 Olvera Spain


Return to How To

Who is online

Users browsing this forum: No registered users and 6 guests