Hosting an Ada web app

I am exploring the idea of using Ada to write a web backend mainly because it seems like a nice language. I am just curious - do you have any thoughts about the best way to write and host Ada code for the cloud? I can think of some possibilities and am looking for feedback on which of these might be a good idea and which are a bad idea. Any other ideas are welcome too:

Idea 1: Write the Ada code as CGI scripts running on a Linux cloud virtual machine using something like Lighttpd. Seems simple enough, but I would have to sys admin a Linux system and CGI is kinda low performance.

Idea 2: Use an Ada web framework and run the Ada code as a process on a Linux cloud virtual machine. Also seems simple enough but I would have to sys admin a Linux system.

Idea 3: Write some serverless functions for AWS Lambda in Ada. Similar to the CGI idea the code would be simple but I would not have to sys admin anything. Has anyone done this before? Seems a bit tricky as Ada is not one of the officially supported languages and apparently you have to create some kind of container image.

Idea 4: Since Ada can be used for embedded use cases, is there maybe a way to create a VM image of Ada code that can run as a web server on something like EC2 without any operating system? Would probably have challenges but I imagine that if Ada can run on baremetal hardware without an OS, there might be a way to run in the cloud without an OS?

Idea 5: Create a Docker Container Image with the Ada binary and use that with some cloud service like Kubernetes. There do seem to be some Docker containers for Ada, like this container, → https://hub.docker.com/r/esolang/ada. Has anyone used anything like that?

Thanks for any insight

3 Likes

Hi Patrick,

You can give a try to:

Transactional (http)

AWA : Ada Web Application from Stéphane Carrez. It’s based on Ada Web Server, comes with an ORM and a lot of goodies.

Bi-directional (ws)

Now (which is the past somewhere), our POC called v22, with real industrial apps created with it, running 365/214: https:/v22.soweb.io
It’s based on Gnoga and comes with a highly effective overlay to boost productivity and everything you need to make a complete application.

The future (coming quickly): https://www.libreframe.com

Based on v22 but replacing Gnoga with something completly new. After a presentation at AEIC2025 in Paris, which used an existing Ada websocket layer, we are now recoding this part, for greater simplicity and performance. Our initial feedback has been excellent (speed gains of over x200 and 1,5M req/s on an average server !), and we are now recoding the http web server (websocket starts from http 1.1). When that’s finished, we’ll extend the available widgets and theming. Expect all this by the end of the year.

As far as CGI is concerned, Matreska has a Fast CGI implementation which, when coupled with a Fast_CGI cache via Nginx, delivers extraordinary performance, but this only applies to static pages.

On the production side, we’re not seduced by docker (old technology with a new look) and kubernetes (too complex and irrelevant in our case). We don’t use microservices (inefficient and difficult to debug) and we don’t use the cloud (too expensive and not so reliable).

We host our own infrastructure on real bare-metal servers, using the Xen hypervisor in PVH mode (no qemu, full para-virtualization and bare metal speed), with Debian everywhere…

There are other ways of doing things, it’s just ours :slight_smile: If you feel more comfortable with Docker, that’s not a problem.

Administering a Linux server is no more difficult than administering the cloud. On the other hand, a Linux server is much cheaper to run, especially if you’ve virtualized it so you can have lots of instances. A little effort up front for a big financial gain and greater autonomy.

Regards,

Stéphane

5 Likes

Nothing to add, but just some references for Gnoga mentioned above:

I don’t know enough about the topic to say if it is related directly or indirectly, but just providing the links.

2 Likes

Some information for you:

Docker and Kubernetes bring another level of complexity and you can probably leave that later in the deployment phase.

4 Likes

Thank you for taking the time to write a detailed reply. Those projects look interesting, I will have to check them out.

Thank you for the links, I’ll have to check them out.

Thank you for sharing. It was interesting to read some example code of what a real project looks like.