Server-Side Swift 2024 Recap

Unveiling the Future of Backend Development
Andrea Scuderi - 10/2/24

The Server-Side Swift 2024 conference, held at the London Science Museum, brought together hundreds of Swift developers for an enlightening two-day event focused on backend development using Swift.

This gathering, reminiscent of a miniature WWDC in London, featured five Apple employee speakers who shared insights into their contributions to open-source projects related to the Swift language and the Server-Side ecosystem.


Keynote: Swift & Interoperability

Speakers: Tony Parker and Ben Cohen (Apple)

Foundation in Swift: A Strategic Rewrite

The keynote delved into the incremental strategy employed to rewrite the Foundation framework in Swift while maintaining compatibility with legacy Objective-C and C code. This approach involved a three-step process:

  • Building Swift Foundation on top of Foundation in Objective-C and C
  • Reversing the dependency chain, making Foundation Objective-C dependent on Foundation Swift and Foundation C
  • Establishing Foundation Objective-C's dependency on Foundation C, which in turn depends on Foundation Swift
Swift Foundation Refactoring

This methodical approach avoided a disruptive rewrite while keeping the code stable, usable, and significantly faster. The key to this success was the introduction of Swift interoperability with Objective-C, C, and C++.

Expanding Interoperability with Java

The success of the Foundation framework rewrite has demonstrated substantial performance improvements for applications using Swift, both on the frontend and backend. Building on this success, Apple has introduced the Swift-Java interoperability open-source project (github.com/swiftlang/swift-java) to support Java interoperability.

Swift-Java Interoperability

Swift Everywhere: A Clear Strategy

Apple's strategy has become evident: leveraging interoperability frameworks to transition legacy code to Swift, positioning it as the de facto standard to replace languages such as Objective-C, C, C++, Java, and Python. This strategy provides the building block to allow incremantal adoption on Server Side.

Swift is the best choice to succeed C++

Swift Language Insights

When to make a Macro

Daniel Steinberg delivered an insightful talk on the art of writing Swift macros, complete with practical examples and implementation tips.

So You Think You Know Swift?

Nick Lockwood (Bloomberg) provided a deep dive into lesser-known Swift features, expanding attendees' understanding of the language's capabilities.

Swift switch with tuple

Server-Side Swift Tools and Frameworks

The conference featured numerous talks focused on tools and frameworks for Server-Side Swift development:

Swift, Server-Side, Serverless

Swift on AWS Lambda

Sebastien Stormacq (AWS) presented a comprehensive journey on utilizing AWS Lambda with SAM and Swift, highlighting key resources:

Swift to the cloud in a single step

Build a docker image in Swift

Euan Harris (Apple) demonstrated how to generate Docker images without Docker using Swift, showcasing:

Leveraging structured concurrency in your applications

Franz Busch (Apple) introduced the Swift Service Lifecycle package for improved resource management:

Introduction to Hummingbird 2

Joannis Orlandos previewed Hummingbird 2, highlighting its integration with Swift 6 Structured Concurrency:

Generating static websites using Swift on the server

Tibor Bödecs presented Toucan, a CMS built with Swift using Hummingbird:

Swift for WebAssembly

Steven Van Impe showcased practical examples of Swift on WebAssembly:

Swift WASM

Stop worrying about routes with OpenAPI Generator

Babeth Velgh introduced the Swift OpenAPI Generator:


Real-World Server-Side Swift Applications

The conference featured numerous presentations on production applications and experiences with Server-Side Swift:

  • Cory Benfield (Apple) discussed the complexities of using Swift for Private Cloud Compute. Swift Private Cloud
  • Leo Dion (gBeat) shared challenges in developing a real-time heart rate monitor using Vapor.
  • Thomas Durand offered practical tips for production-ready Vapor applications.
  • Vojtech Rylko presented Cultured Code's success story with Things, powered by Server-Side Swift.
Things architecture
  • Mikaela Caron (Fruitful) recounted adventures with Heroku, Vapor, and AWS S3.
  • Adegboyega Olusunmade shared lessons learned from building a trivia app backend.
  • Petr Pavlik discussed shipping a SaaS backend using Vapor and AWS.

Conclusion

Server-Side Swift 2024 showcased the growing momentum behind Swift as a backend language. The strong presence of Apple developers and the quality of presentations demonstrated the commitment of the open-source community to Server-Side Swift. While backend development requires specialized skills, iOS developers can leverage their Swift expertise in this domain.

Server-Side Swift Resources


One More Thing!

Introducing Breeze: Simplifying Serverless Swift

Breeze

As a side project, I'm developing Breeze (github.com/swift-serverless/Breeze) to streamline the process of starting with Serverless on AWS. Breeze provides customizable templates to set up the essentials for creating a mobile app backend using Serverless on AWS. Give it a try, leave feedback, and get involved in shaping the future of Server-Side Swift development!

Thanks for reading!