The blog post at https://anvil.works/blog/open-source says that Anvil has open sourced two things: the Anvil Runtime and the Anvil App Server – however, the links for each point to the same GitHub repo.
Are these, in fact, two separate things – and if so what distinguishes them?
They are two (related) things!
The Anvil Runtime is the code that serves an Anvil app - the UI system, the code to serve an app over HTTP, the code for routing calls to server functions, the built-in functionality for Data Tables, the Users Service, Email, and so on. However, the Runtime isn’t something you can use on its own - it is a library that needs to be hooked up to (for example) provide source code for apps, or to receive HTTP requests.
The App Server is a standalone server for serving Anvil apps. It uses the Anvil Runtime library, and fills in the details - for example, it provides the app’s source code by loading it from files on the disk, and runs a standalone web server to receive HTTP requests - all configured by a config file, and supporting things like Let’s Encrypt.
The hosted Anvil service at anvil.works, and Anvil Enterprise, also use the Anvil runtime. They provide app source code out of a series of Git repositories, which can be push/pulled over SSH or edited via the Anvil Editor. They serve HTTP requests over a distributed multitenant HTTP front end that allows many apps to be served from the same installation (or to manage dedicated resources for particular apps/deployments). Configuration is handled via a database. The anvil.works service and Anvil Enterprise are not open source, but because all the apps they produce are run on top of the same code (the Anvil Runtime), they will all work on the App Server.
The GitHub repository contains both the Anvil Runtime and the App Server, and the scripts inside it build both together.
Does this make sense?
7 Likes
It does!
Thank you very much, @meredydd, for this explanation.