Live data from Hacker News

Using BitTorrent Sync to live-edit or deploy websites

antler.co.za

1–10 of 16 posts

Re: Using BitTorrent Sync to live-edit or deploy websites

#2
So I am big fan of BTSync, it works really well and displaced used of DropBox mostly. I use DB only with apps on ipad that have that integration.

I think both use dropbox or btsync for this is a little weird. I wouldn't do it. It is not hard to publish sites.

Re: Using BitTorrent Sync to live-edit or deploy websites

#3
I was using it to deploy my web apps, and keep my 2 servers in sync. But lately i am facing issues with it. Once in a while my bittorrent sync on server shows No device connected, even if my local machine is online. Thankfully i am using ec2, so spinning up a new instance from few days old AMI is easy and usually btsync starts to work again on the new server. Now looking into different solutions.

Re: Using BitTorrent Sync to live-edit or deploy websites

#4

I was using it to deploy my web apps, and keep my 2 servers in sync. But lately i am facing issues with it. Once in a while my bittorrent sync on server shows No device connected, even if my local machine is online. Thankfully i am using ec2, so spinning up a new instance from few days old AMI is easy and usually btsync starts to work again on the new server. Now looking into different solutions.

A commenter on my blog post suggested Syncthing (http://syncthing.net/) as an alternative.

Re: Using BitTorrent Sync to live-edit or deploy websites

#6
post #4

I was using it to deploy my web apps, and keep my 2 servers in sync. But lately i am facing issues with it. Once in a while my bittorrent sync on server shows No device connected, even if my local machine is online. Thankfully i am using ec2, so spinning up a new instance from few days old AMI is easy and usually btsync starts to work again on the new server. Now looking into different solutions.

A commenter on my blog post suggested Syncthing ( http://syncthing.net/ ) as an alternative.

I remember seeing this earlier. Looks good. But i am looking towards solutions which can be integrated with our version control. Maybe Chef or Puppet

Re: Using BitTorrent Sync to live-edit or deploy websites

#7
post #4

Earlier quoted context omitted.

A commenter on my blog post suggested Syncthing ( http://syncthing.net/ ) as an alternative.

I remember seeing this earlier. Looks good. But i am looking towards solutions which can be integrated with our version control. Maybe Chef or Puppet

I am looking into CD tools rather than simple sync tools. It's time to grow.

Re: Using BitTorrent Sync to live-edit or deploy websites

#8
post #4

Earlier quoted context omitted.

A commenter on my blog post suggested Syncthing ( http://syncthing.net/ ) as an alternative.

I remember seeing this earlier. Looks good. But i am looking towards solutions which can be integrated with our version control. Maybe Chef or Puppet

Have a look at Docker (http://www.docker.com/), I was introduced to it recently and it looks like a powerful yet simple alternative to Chef or Puppet.

Re: Using BitTorrent Sync to live-edit or deploy websites

#9
This is a bad idea for several reasons.

The first issue is security. Loads of text editors create temporary files (.swp, .php~, etc) in the same directory as the file you're editing. These can render as text instead of going through php, thus revealing things like database secrets and such. Now, this problem won't always occur and can be configured around.

However, perhaps the bigger problem is that this is simply a bad workflow when a better one exists. For "live editing", run a local webserver. Don't expose your playing around to the world, potentially breaking your site for others. Heck, if it's a static site, just run "python -m SimpleHTTPServer" if you like. Second, for deploying, you should have a better process than "sync this directory". Specifically, you should have git hooks that handle deployment if you want don't-think-about-it instant deployment. Preferably you have CI that deploys after it passes a few tests. Using git also has other benefits like letting you have commit messages, easy rollbacks, different branches (which you can auto-deploy to test / dev / etc).

Basically, the problem with using Dropbox or BTSync to edit websites is that you rarely want to throw partial changes to the world, and file sync programs like to sync as often as possible. It's a cool idea, but those sync programs simply don't replace proper version control and CI.

I'd even prefer rsync if you're not using version control simply so you can control when it syncs and setup complex excludes / shell scripts to run around it. You could easily have a script that runs a minimizer and then rsyncs the output while having rsync exclude any potentially accidental files. You can't do that nearly as easily with the workflow the author is talking about.

Re: Using BitTorrent Sync to live-edit or deploy websites

#10
post #8

Earlier quoted context omitted.

I remember seeing this earlier. Looks good. But i am looking towards solutions which can be integrated with our version control. Maybe Chef or Puppet

Have a look at Docker ( http://www.docker.com/ ), I was introduced to it recently and it looks like a powerful yet simple alternative to Chef or Puppet.

Docker is linux only, and we are a windows shop. So docker not an alternative for me
Post reply on HN