Use your favourite device, OS, IDE, and other tools for your code editing. Compile and execute the code and tests in the cloud, in realtime, as if it would all happen in locally.
TODO laptop price <-> power, laptop weight, cloud instances, shutdown when not in use, separate instances for separate clients,
In your local development environment you run your development IDE. When you hit save on your IDE gobin will detect changes on filesystem, send the changes to your cloud instance, save them on filesystem at the cloud, and respawn the application.
Running your code (and test, coverage tools, documentation generators, what ever) on the cloud has several benefits.
Firstly, your laptop does not need to be super expensive monster with latest CPU's and 64GB RAM. It's enough to be able to run your IDE (not a minor task itself). So you can use a laptop that meets your budget. Also, you can focus on laptops that are light weight and portable.
Secondly, cloud instances are cheap. They can be as powerful as you want (would 1 vCPU with 512MB RAM be enough, or would you like to have 92 vCPU's with 192GB RAM?). When your are not using it, you can turn it off. You can have separate instances for separate projects or clients. You can upgrade (or downgrade) with just a few clicks to meet the changed needs. No need to buy new laptop every year.
Third, when your application runs in full load, your laptop runs coolly with fans off. You can leave long running tests to run while your laptop is sleeping.
Finally, your application can access cloud services (database, event service, logging, monitoring, ...) exactly the same way in development as it does in production. You don't need to have local simulators to emulate client services, nor do you need SSH or VPN tunnels opened to services, or special access rules for locally running applications. Just assign the same IAM roles and security groups to your remote development host as you give your production instances. This ensures that if it works on your development instance, it will work on production as well.
Requirements for your local development host:
- Facebook Watchman installed on your local host
- gobin installed (TODO: link to installation) (TODO: run local gobin in container)
Requirements for your cloud instance:
- Cloud computing instance, for example from AWS, Google, UpCloud, DigitalOcean, or what ever you prefer
- Docker installed, configured and running
- Working SSH connectivity to your cloud instance, refer your cloud provider documentation
Watchman is required to do the surprisingly difficult task of detecting the changes on your files system reliably, fast, and with little load on CPU. Facebook has done excellent job with Watchman, it is extremely reliable and fast, and it does not use polling, saving your from working with hot laptop.
TODO: this section is under development
- auth to cloud
- start cloud instance, or use AWS or Google integration to manage instance
- ensure SSH is working
gobin [-h ssh-host]
[-u ssh-user]
[-i ssh-identity-file]
[-s source-dir]
[-r remote-cmd]
[-d docker-image]
-
Docker API integration ** ssh -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -i ~/path/to/key.pem -NL localhost:2377:/var/run/docker.sock [email protected]
-
Google integration
-
AWS integration
-
UpCloud integration