Building a server from first principles

I'm primarily an iOS developer and would like to learn more about server-side development, preferably with an aim towards creating a Swift-based server from first principles (i.e., "We get in request data with this format, and we want to return response data with this format, now let's build out how we translate that, here's what each of these pieces do," etc). Are there any recommended resources in this area?

Thanks!

4 Likes

here is a short tutorial (project files) i wrote a while back which goes over how to write a basic SwiftNIO server application (no Vapor, no AWS, etc.).

aside

i didn’t publish it anywhere because it was actually a “pretryout” for the ray wenderlich website (nowadays renamed ‘Kodeco’.) i would not recommend writing for them, they did not pay me for nearly a year after i wrote Performance-Profiling Swift on Linux: Getting Started | Kodeco for them.

edit: added link to project files

8 Likes

Awesome, thanks a ton!

Re: aside

Oof. Sorry you had to go through that. Very good to know, thank you for sharing. I thought I got bad vibes from there...

1 Like

One thing that I would like to call out here is to look at solutions like GitHub - apple/swift-openapi-generator: Swift OpenAPI Generator package plugin.. This is especially helpful if you want to create APIs that are consumed by clients and allows you generate the code for both sides (server and client). The package provides great documentation to get you started.

1 Like

I'd second that. Watch this from just passed WWDC.

1 Like