
A case study from app developer Cultured Code shows a four times performance gain at one third the cost, compared to a legacy system running Python 2.
Swift is mainly used for application development on Apple computers and devices. The language is in principle suitable for server-side work as well, but the momentum behind server-side Swift has been weak. IBM, an early enthusiast for the idea, abandoned its Kitura Swift framework in 2019.
The notion of using the same language on both client and server remains attractive though, and Cultured Code, the developer of a popular personal task manager for Apple platforms, has documented the replacement of a Python 2 application running on Google App Engine with Swift running on Kubernetes, hosted by AWS.
According to Vojtěch Rylko, responsible for development and operations, and Werner Jainek CEO, the move improved the average response time of the cloud application, which stores and synchronizes user data across multiple devices, by four times; while also reducing average compute cost by three times.
Regarding the legacy application, the duo cited Python’s lack of static typing as an issue which “made every change risky,” and said that it suffered from slow response times and high memory usage, such that a full rewrite was the only viable solution.
The new Linux application uses Vapor for building HTTP servers and APIs, which uses Apple’s SwiftNIO for asynchronous event-driven network programming.

The application is around 30,000 lines of code and builds in around 10 minutes, using Xcode for coding and debugging. The database is AWS Aurora MySQL, Redis is used for ephemeral data, and the application is deployed to a small four-node Kubernetes cluster. Python is still used for a service deployed to AWS Lambda for processing emails, thanks to the existence of suitable mature libraries for this purpose.
The team is encouraging others to look at server-side Swift, noting that recent work on Swift-Java interoperability may make gradual adoption easier. The particular appeal is for Apple-centric development where using Swift everywhere from device to cloud simplifies programming.
There are risks though, in particular the one mentioned by Cultured Code, that Swift’s server support is not as mature as for other languages. It was lack of a suitable library, for example, that persuaded the team to use Python 3 for email processing.
The lengthy build time noted by this team is another issue, being enough to cause frustration for developers testing code changes. “It is a slow to compile language, and that’s my primary complaint about it … if not for this quality it would be my clear favorite language,” said one comment on the new case study.