One of the most interesting pieces of technology currently being developed at Sutoiku is our code loader. In a nutshell, it’s a way to dynamically load code from our code repository to deployed instances of our applications. Up until recently, it did the following:
- Looks up dependencies on a per-application basis
- Fetches the latest code from GitHub whenever the UI is loaded
- Builds and compiles the code in real-time
- Caches the compiled code with user-defined cache expiration
Today, we added the ability to select which branch in our master code base should be used, allowing different customers to use different branches. Tomorrow, we will also add the ability to manage such dynamic code branch referencing, in both centralized and decentralized fashions.
The centralized option will allow us to roll-out new versions of our code on an incremental basis, giving it to a handful of customers initially, then expanding the roll out gradually. The decentralized option will allow customers to manually specify which version of the code they want, usually selecting whether they want the latest version, or the most stable.
These mechanisms will be implemented at the application level, so that different applications can use different versions of the code, but we will also add the ability to apply changes for all applications at once. And while manual overrides for all this will be offered, the default behavior will be fully automated, so that it remains invisible to most users.
An interesting side benefit is that we will be able to give individual customers access to specific branches of our code, which will allow us to make rapid changes to pieces of our code that would be developed in partnership with some customers (the large deal we’re about to close will benefit from this).
As we’re adding these features, we’re also migrating from a monolithic architecture for our code loader, to one where applications only embed some kind of micro code loader, itself responsible for the dynamic loading of the full code loader. This will allow us to make changes to the code loader in the future, without having to manually upgrade applications one by one. There is a bit of a catch 22 to work around there, but we’re starting to get a fairly good sense of how we can make it work.