It's been a while since I posted anything to my blog. I thought I would write this article though because it has been an issue that has had a lot of discussion among key members of the swift on server community.We recently released version 2.0 of Hummingbird the swift server framework. During its development the thing that has probably taken the most of my head space is how to return an HTTP response with a streamed payload within the structured concurrency paradigm.To provide some context, each request to…
For most of this year I have been working on the Swift extension for Visual Studio Code. The work is part of the Swift Server Workgroup push to improve the Swift development experience outside of the Apple eco-system. In July I posted an article on the swift.org website giving an overview of the extension and what functionality it provides. Given this was a general overview a number of the more minor features were not included in that article…
In this article I am going to cover how to build a HTTP Proxy server using Swift. We will use the Hummingbird HTTP server framework as the basis for the server and use the Swift server AsyncHTTPClient HTTP client to forward on requests to the target service.A proxy server is a service that sits between a client and another service. It forwards messages from the client onto the…
The Hummingbird server framework is designed to be flexible. It imposes as little structure as possible on how you build your application, but sometimes you need some structure. Do you really want to build all your application setup boilerplate every time you create a new app? To avoid this I have written a hummingbird project template which can be your starting point for your next app.GitHub has a feature called template repositories. These allow you to create a new project repository setup for a…
Swift 5.5 has been released. This new release includes a series of new concurrency features including, async/await, structured concurrency and actors. Probably one of the most exciting series of additions to Swift in a long time (and this is from a language with new features appearing, what seems like, every other week).The recently released version of Hummingbird (v0.13.0) includes new APIs that allow you to take…