The team at Anvil recently open sourced the Anvil App Server, a runtime engine for hosting web apps built entirely in Python.
The community reaction has been overwhelmingly positive, and we, at Anvil, have already incorporated lots of that feedback into our next release. But one of the questions we keep getting asked is, "Why did you choose to open source such a core part of your product?"
Why we created Anvil
Anvil is a tool that makes it as simple as possible to build a web app. We do that by enabling you to build the whole application in one language—Python.
But even then, you're not done! You need to know all about Git and cloud hosting providers, how to secure the (most-likely) Linux operating system, how to tune the database, and then you're on call to keep it running. Forever.
So, instead, we built Anvil, an online IDE where you can build your UI with a drag-and-drop designer and write all your logic in Python, then Anvil takes care of the rest. We replace that whole teetering stack with "just write Python."
Simple web hosting is important, but not enough
Anvil can also host your apps for you. And why not? There is so much complexity in deploying a web app, so running our own cloud hosting service was the only way to provide the simplicity we need. Build an app in the Anvil editor, click a button, and it's live on the Internet.
But we kept hearing from people who said, "That's great, but…"
- "I need to run this on an offshore platform without reliable internet access."
- "I want to package my app into an IoT device I sell."
- "If I'm putting my eggs in this basket, how can I be sure I can still run my app in ten years?"
These are all good points! A cloud service isn't the right solution for everyone. If we want to serve these users, there's got to be some way for them to get their apps out of Anvil and run them locally, under their own complete control.
Open source is an escape hatch, not an ejector seat
We believe in escape hatches, not ejector seats. So we did it the right way—we open-sourced Anvil's runtime engine, which is the same code that serves your app in our hosted service. It's a standalone app; you can edit your code with a text editor and run it locally. But you can also
git push it right back into our online IDE. It's not an ejector seat; there's no explosive transition. It's an escape hatch; you can climb out, do what you need to do, and climb right back in.
If it's open, is it reliable?
A seeming contradiction in open source is that its free availability is its strength, but also sometimes creates a perception of instability. After all, if you're not charging for it, how are you keeping this platform up and healthy for the long term?
We're doing what we always have—providing a development tool that makes it drastically simpler to build web applications, though the apps you build using Anvil are 100% yours. We provide hosting for Anvil apps and we offer the entire development and hosting platform onsite for enterprise customers. This enables us to offer a free plan so that everyone can use Anvil for hobby or educational purposes, or to start building something and see where it goes.
More to gain, little to lose
Open sourcing our runtime engine isn't a detractor from our business—it makes our online IDE more useful and more trustworthy, today and in the future. We've open-sourced the Anvil App Server for the people who need it, and to provide the ultimate insurance policy. It's the right move for our users—now they can build with confidence, knowing that the open source code is right there if they need it.
If our development philosophy resonates with you, why not try Anvil yourself?
This post is an adaptation of Why We Open Sourced the Anvil App Server and is reused with permission.