Comment

A lot has happened last week. It was hard to choose what links to pick up. In the end, I've decided to focus more on some performance and optimization articles I read while I was putting together the previous issue of this newsletter and other links I found last week. Enjoy!

Gianluca Tranchedone

News

Google is expanding it's offering with a set of products dedicated to Docker. Last week they introduced Google Container Engine, a powerful cluster manager and orchestration system for running Docker containers. GCE schedules your containers into the cluster and manages them automatically based on requirements you define (such as CPU and memory).

All the leading platforms offering servers as a service are supporting (or starting to support) containers one way or another. If you haven't looked into Docker already, it's probably about time to start learning about it. I certainly have to commit more time to it myself: I've only been fooling around with Docker on my MacBook and run a few tests on AWS for now.

Another good news from Google. Starting today, they're offering a fully managed database service that makes it easy to set up, maintain, manage, and administer PostgreSQL databases on Google Cloud Platform.

We often talk about Swift performance and how that makes it an excellent language for server-side code and algorithms. However, optimization doesn't stop there. The team behind Tower, a well-known git client, has put together a guide to help!

Swift

Ole Begemann with another fantastic article. This time he explores something that bothered me already in Objective-C: ensuring the implementation of equality methods considers changes to its data structure's properties over time. I didn't even remember Swift's standard library exposes a dump method!

Code

Adam Derewecki wrote down a simple but effective list of attentions you can give your server-side application and to significantly improve performance and scalability. Most of all, they all help to make the most out of the available resources on your (virtual) server and DB.

Coming from a purely iOS background, I know that when building apps for mobile devices it's easy to forget about optimization. At the end of the day, our apps will only run on one machine for one user. However, on the server, every instance of our app runs for potentially thousands of users simultaneously. And our costs for running that application most likely depend on how much CPU and Disk space they use. Therefore, optimizing those things really matters, not only to provide a better user experience, but also to provide a reliable one and to keep our costs down.

Like with the previous link, when I hear about optimization techniques, it often only refers to the back-end, but what about the front-end? Shouldn't we try to optimize that too? If your Swift web application has a somewhat complex website, and it doesn't just focus on serving JSON, you may want to read this. (It's probably and worthwhile read even if you haven't got a website yet. It will help you better understand what happens on sites you use daily.)

In this short article, Madhur Ahuja talks about what he learned over the years about scaling Linux servers. Worth a read, although, most likely, we'll never have to deal with these problems ourselves. This is what DevOps and companies like Amazon and Google do.