I am excited to share that we just cut new releases of some of our packages which include brand new async APIs.
We have been working on the new APIs for some time, letting them bake behind the AsyncChannel
SPI. With the latest releases we promoted the SPIs to stable APIs.
The goal of the new async APIs is to allow developers to easily and safely bridge between NIO Channel
s and Swift Concurrency. An important part of the new APIs is that they carry type information about the ChannelPipeline
whilst remaining flexible, made possible by utilizing the power of generics. You can find more documentation about the new APIs in our brand-new NIO and Swift Concurrency article. If you are interested in reading more about our thoughts behind the new APIs and seeing an overview of the API additions across the packages feel free to check out our developer documentation.
One important thing that I would like to call out, is that the new APIs provide a clear separation of concerns between business logic and networking. Network protocols live in the channel pipeline and business logic should be implemented directly in Swift Concurrency, outside of the channel pipeline. Lots of existing applications have both residing inside the channel pipeline and we strongly recommend to move the business logic out.
We can’t wait to see what the community builds with the new APIs and are looking forward to your feedback!