Once a year, the Swift Server workgroup (SSWG) reflects on recent community accomplishments and lays out focus areas for the year ahead.
Since our last update, the Swift on server ecosystem has welcomed new projects, seen significant progress in the adoption of structured concurrency, improved its tooling, and more.
Let’s start by reviewing the progress made in 2022 then look ahead at the goals for the next 12 months.
2022 in Review
Continued focus on growing the ecosystem
The ecosystem has seen a number of new libraries introduced including:
- a Kafka client library that started as a GSoC project
- a Cassandra client library released by Apple and pitched to the SSWG incubation process
- a GraphQL library pitched to the SSWG incubation process
- a RabbitMQ library
- a Memcached client library was proposed as a GSoC project
There were also three new packages proposed and accepted into the SSWG’s incubation process:
Continuing the concurrency journey
We are happy to see that the adoption of Swift Concurrency in the ecosystem has progressed significantly. All libraries in the SSWG incubation process have adopted new
await APIs where applicable and are continuing to roll out
We are also seeing a trend of new APIs using only Swift Concurrency, and new projects with internals written using Swift Concurrency, like the Kafka client library.
We’re also excited to see the introduction of Custom Actor Executors. The introduction of Custom Actor Executors offers more control over the behavior of concurrent code, helps improve performance, and will enable us to bridge more code into Swift concurrency.
Expanding the tooling
Notable highlights in tooling include:
- The Swift Extension for Visual Studio Code reached version 1.0.0 and added new features like Swift Package plugin integration, Test Coverage and Test Explorer support, and more.
- Swift Package plugins have seen adoption in many libraries, from formatters and linters, to code generators such as SwiftProtobuf, gRPC swift, Smoke, and Soto.
- Swiftly is now available to try out and provides a simple way to install Swift on Linux and switch between versions.
Improving build times
There have been a number of improvements to build times for Swift projects, including compiler optimizations, new build systems, and package manager enhancements.
Swift Crypto Extras continues to add new APIs that allow libraries to avoid vending their own copies of BoringSSL. This, combined with the new Swift Certificates and ASN.1 libraries, helps libraries like WebAuthn Swift avoid including their own cryptography libraries and instead use these new packages and APIs. This avoids compiling the same code multiple times and provides a significant speed improvement during compilation.
Additionally, SSWG member Gwynne merged a PR for Swift 5.9 that offers a 90% improvement to link time and memory usage on Linux, which should greatly help when building Swift applications in constrained environments.
Increasing adoption of server-side Swift
The SSWG has continued to work with the community to increase adoption of Swift on the server:
- The SSWG Guides and incubation processes have been migrated to Swift.org to make them more discoverable.
- Many of the Swift server packages have adopted Swift Package Index documentation hosting to make discovering and using packages easier.
- The SSWG has created a survey to better understand the Swift on server community and help ensure efforts are applied to the right areas.
- We are observing an increase in the number of conference talks focused on production success stories and technical deep dives, reflecting a maturity in adoption and recognition of Swift on server.
Goals for 2023
The SSWG believes 2023 is turning out to be another exciting year for Swift on the server, with a continued focus on the following goals:
- Continued focus on growing the ecosystem
- Adoption of structured concurrency
- Expand the documentation and guides
- Improve tooling
Continued focus on growing the ecosystem
In addition to supporting existing libraries, there are a number of areas of focus for this year:
- a Swift-native Memcached client
- a common connection pool library to make it easy to adopt connection pooling
- a shared middleware implementation for use in web frameworks like Smoke, Hummingbird, and Vapor
- Encouraging adoption of distributing tracing to round out the observability story
- Better showcases of Swift on server deployments and success stories
- Better visibility of Swift as a server language
Adoption of structured concurrency
The SSWG believe that structured concurrency is a key feature that will make Swift on server stand out and provide a clear benefit to the ecosystem.
Some plans for this year include:
- Produce an adoption guide for structured concurrency covering best practices around
- Apply concurrency best practices to core ecosystem libraries such as swift-service-lifecycle.
Expand the documentation and guides
Documentation can always be improved and the SSWG will continue to expand our guides and usage documentation for the ecosystem.
The SSWG are working with the Swift Website Workgroup to add guides for those new to Swift on the server as well as ensure that the existing guides can be easily found.
The SSWG also plan to expand the documentation in key areas like security and deployment, covering topics like GitHub’s Dependabot and AWS’s Swift support in their CDK.
Some of the upcoming design changes to Swift.org will help place Swift on server documentation in a more prominent position to increase visibility.
Swiftly is growing in popularity on Linux for managing multiple toolchains, and the SSWG would like to port it to Windows and macOS as well.
There are a number of other tooling enhancements being explored, including:
- Adding support for Swift Package Manager to GitHub’s dependabot
- Investigating Canonical’s Chiseled Containers to see if we can provide Swift containers with a very small footprint and a hardened security profile
- Investigating what we can do with Swift Package plugins to improve the deployment experience of Swift on server
New SSWG Members
The SSWG is happy to welcome four new members:
- Dave Moser - Dave joined the SSWG in May. Dave is part of the solution architecture team driving Swift on AWS, and has been involved with the Swift on server efforts for the last couple of years.
- Jimmy McDermott - Jimmy also joined the SSWG in May and represents Transeo. Jimmy has been involved with Swift on server since Vapor’s early days and is the CTO of Transeo, where he and his team use Vapor to scale services to millions of users.
- Franz Busch - Franz officially joined the SSWG on October 23rd and works on the SwiftNIO team at Apple.
- Joannis Orlandos - Joannis joined the SSWG at the start of this year. Joannis was a core contributor to Vapor and maintains a number of libraries in the ecosystem including MongoKitten.
Franz takes over from Fabian Fett who has completed a two year stint on the SSWG. Dave takes over from Todd Varland who also completed a long stint on the SSWG. Kaitlin Mahar has changed roles at MongoDB and also completed a number of years on the SSWG. We are extremely grateful for all they’ve done in their time on the SSWG and thank them for their hard work!
If you have any ideas to share with the SSWG or want to pitch a library to the SSWG Incubation Process, please get in touch with us, either via the forums or through Slack.