Cultured Code: Server backend of Things now also in Swift

The Swift programming language is being used in more and more apps for Apple platforms. Cultured Code has now done the same for the server.

listen Print view
Things architecture with Swift at the center

Things architecture with Swift at the center: Not only suitable locally.

(Image: Cultured Code)

2 min. read

Apple's Swift programming language, in which numerous iPhone, Mac and increasingly also Windows apps are developed, is also suitable for server operation. The creators behind the popular Things task manager from German developer Cultured Code have now demonstrated this for their application: the backend of Things Cloud has been running on it since spring.

The synchronization service ensures that the data from Things is distributed between the supported devices – which currently includes almost all Apple platforms, i.e., iPhone, iPad, Mac, Apple Watch and Vision Pro. Originally, the backend ran with Python 2 on Google's App Engine. Although this was stable, limitations were quickly felt, writes Cultured Code. These included high memory requirements, which drove up infrastructure costs, relatively slow response times and the problematic static typing in Python 2, which complicated storage processes.

Videos by heise

In addition, the creators had to develop and maintain their own C-based service for their push notification system. Due to all these difficulties and the fact that various libraries were due to be discontinued, the Things creators finally decided completely to rewrite Things Cloud. This was to be done in Swift, just like Things itself, after other development environments such as Java, Go, C++ or a jump to Python 3 were ruled out. Another positive aspect, writes Cultured Code, was that Swift has been compiling cleanly on Linux “for a long time” and there has been a Swift server workgroup for almost ten years. Cultured Code also decided to use the Swift-on-a-Server package Vapor and the SwiftNIO library.

The result is that the Things Cloud now runs on AWS with Terraform and Kubernetes. Content from Things lands on the Swift server via HAProxy, mail content via Lambda and SQS. RediStack, MySQLKit, Soto (in the direction of S3) and Apple's APNSwift (for notifications) are used to play out and store data.

As a result, both compute costs and response times have been reduced: The Swift architecture is said to be three times cheaper, with a four times lower response time. Cultured Code has summarized further details on the switch from Things Cloud to Swift in a presentation from the ServerSide.Swift conference.

Empfohlener redaktioneller Inhalt

Mit Ihrer Zustimmung wird hier ein externer Preisvergleich (heise Preisvergleich) geladen.

Ich bin damit einverstanden, dass mir externe Inhalte angezeigt werden. Damit können personenbezogene Daten an Drittplattformen (heise Preisvergleich) übermittelt werden. Mehr dazu in unserer Datenschutzerklärung.

(bsc)

Don't miss any news – follow us on Facebook, LinkedIn or Mastodon.

This article was originally published in German. It was translated with technical assistance and editorially reviewed before publication.