Fastly Case Studies Swift SDK for Compute@Edge: A Leap for Serverless Swift
Fastly Logo

Swift SDK for Compute@Edge: A Leap for Serverless Swift

Fastly
Analytics & Modeling - Machine Learning
Platform as a Service (PaaS) - Application Development Platforms
Cement
Equipment & Machinery
Product Research & Development
Edge Computing & Edge Intelligence
Fog Computing
System Integration
Testing & Certification
Andrew Barba, an engineer and iOS developer, was faced with the challenge of running Swift, a programming language developed by Apple and the open-source community, on servers. Despite the popularity of Swift in the Apple ecosystem, there was no clear pathway for its use on servers. The Swift community had been laying the groundwork for this, including adding support for compiling code to WebAssembly, but there was little traction. Barba found the development experience of writing JavaScript on Node.js to be lacking compared to building native applications in Swift. He also found the process of getting Swift packages into AWS to be too complex, requiring extensive knowledge about cloud architecture and Docker files.
Read More
Andrew Barba is an engineer and iOS developer who has a deep understanding and love for Swift, a programming language developed by Apple and the open-source community. He started his career as an iOS developer and adopted Swift early on, appreciating its safety and performance. However, his career took a different path towards the backend, and he found himself writing a lot of JavaScript on Node.js. Despite this, his passion for Swift remained, and he sought a way to run Swift on servers. Barba is a problem-solver who is not afraid to tackle complex challenges. He is also a believer in the potential of edge computing and sees opportunities for new use cases in this area.
Read More
Barba decided to write a Swift runtime for Compute@Edge to decrease the barrier to entry for the iOS developer community to run Swift on the server. He was inspired by the work of the Swift Wasm team, which allowed Swift to compile to WebAssembly. His solution was to implement the entire runtime spec, removing any obstacles between the compiler and the platform. Barba chose Compute@Edge for his project because it allowed for direct integration with Swift. Fastly, the company behind Compute@Edge, exposes the platform’s core system hostcalls, which resulted in fewer layers of abstraction and much smaller packages. Barba believes that edge computing is evolving and that developers want fine-grained control of caching. He also sees potential for new use cases at the edge, such as image optimization and machine learning.
Read More
The creation of a Swift runtime for Compute@Edge by Andrew Barba has opened up new possibilities for the use of Swift on servers. This development has made it easier for the iOS developer community to run Swift on the server, reducing the need for extensive knowledge about cloud architecture and Docker files. The direct integration of Swift and Compute@Edge has resulted in fewer layers of abstraction and much smaller packages, simplifying the development process. Furthermore, Barba's work has highlighted the potential of edge computing and has sparked discussions about new use cases, such as image optimization and machine learning. His work has also contributed to the broader community of developers, aligning with Fastly's ethos of 'by developers, for developers'.
Download PDF Version
test test