Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
'Server-side on Swift' by Volodymyr Shevchenko
Search
CocoaHeads Ukraine
December 16, 2017
Programming
73
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
'Server-side on Swift' by Volodymyr Shevchenko
This talk was made for CocoaHeads Kyiv #13 which took place Dec 16 2017.
CocoaHeads Ukraine
December 16, 2017
More Decks by CocoaHeads Ukraine
See All by CocoaHeads Ukraine
Reasons to love functional programming
cocoaheadsukraine
1
58
Effective A/B testing in iOS Apps
cocoaheadsukraine
1
87
How to hide from very curious users
cocoaheadsukraine
1
74
Hacking iOS Simulator
cocoaheadsukraine
1
230
Dig into Value types. It's really obvious when to use them. Or not?!
cocoaheadsukraine
0
630
Классифицируем текст в iOS без CoreML: как и зачем?
cocoaheadsukraine
0
150
Managed side effects
cocoaheadsukraine
3
220
10 lines of encryption, 1500 lines of key management
cocoaheadsukraine
1
130
Мифический full-stack разработчик
cocoaheadsukraine
2
230
Other Decks in Programming
See All in Programming
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.5k
AHC070解法紹介
eijirou
0
140
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
310
MCP Appsでつくるチャット駆動な地図アプリ
nakamori1024
0
110
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
18
18k
Are APIs Still Relevant in the AI Era?
soyuka
0
330
TiDB Cloudのカスタムコントローラーによるオートスケール対応
takaidohigasi
0
140
App Storeの外へ──日本のiOSサイドローディング入門 for iOSDC Japan 2026
yuukiw00w
0
260
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
410
JRuby: Past, Present, and Future
headius
0
210
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
240
SONY CISC-NEWS NWS-1750 + NWB-225 フレームバッファの NetBSD/news68k ドライバ実装 / OSC2026Hiroshima
tsutsui
0
150
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
So, you think you're a good person
axbom
PRO
2
2.2k
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
350
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
58k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
HDC tutorial
michielstock
2
920
How Software Deployment tools have changed in the past 20 years
geshan
2
34k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
410
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Transcript
Server-side on Swift by Volodymyr Shevchenko
What for? - We will do mobile better - Can’t
build App on our own - Backend is a black-box with API
Why Swift? ??
Why Swift? - we know Swift - we can reuse
some code - Swift is faster
Kitura Perfect Vapor Zewo What do we have:
⭐ GitHub Req/sec Looks Good? Kitura 6K 2.1K No Perfect
12.3K 4.2K Yes Vapor 11.6K 3.2K Yes Zewo 1.7K 1.7K No Benchmarks of the Top Server-Side Swift frameworks
Vapor Perfect
Let’s build something
Pet Store - Authorization - Domain CRUD - REST API
Check Local Credentials Create new User Check FB Credentials Create
Session Object Success? Facebook Database Cache Yes No ERROR response TOKEN response
Success? Database Cache Yes Proceed with request 401 response Fetch
session from Cache Fetch session from DB Success? No No Yes
User Pet Order Tag Category Domain relations *
Our stack: - Perfect as a framework - Mongo DB
as storage - StORM as ORM
Few words from Cap…
Leaks are evil
None
Crashes are evil
! Force unwrap is evil
Cocoapods Carthage SPM
XCode just an editor
≠
- this won’t compile on Linux: - after fix:
Foundation is NOT ported for 100% https://github.com/apple/swift-corelibs-foundation/blob/master/Docs/Status.md … …
≠ (curl + libssl) (curl + openssl)
[“a”, “b”, ”c”] -> “a, b, c” Bugs in MongoDBStORM
[“a”, “b”, ”c”] -> “a, b, c” - Work without
ORM - Switch to an other DB - Switch to Vapor + Fluent - Fix bug
Nested objects are MongoDBStORM not supported
¯\_(ツ)_/¯
Lets Deploy
Where?
Where? - Amazon EC2 - Microsoft Azure - Google Cloud
- Digital Ocean - Linode - Alibaba cloud - IBM cloud - Packet - Vultr - …
Where? - Amazon EC2 - Microsoft Azure - Google Cloud
- Digital Ocean - Linode - Alibaba cloud - IBM cloud - Packet - Vultr - …
How to deploy?
Perfect Assistant
Perfect Assistant
Docker
Plain
2) Connect to remote machine via SSH 3) Install all
required tools and libs 4) Setup Database server 5) Clone sources from Git repo 6) Compile 7) Configure firewall to allow http(s) traffic 8) Run executable 1) Create remote virtual machine on selected provider Plain Deploy
Performance - apib tool - Latency (MIN, MAX, AVG) -
Requests/second
Performance req/sec Lat, min Lat, max Lat, avg Healthcheck 26.8K
0.6 42 7.4 Empty Auth 739 9 643 269 Auth + Read 407 10.1 952 487 Auth + Write 389 9.4 1028 511
Scale - Vertical - Horizontal
Database is Server Database Server API Server Network
Scaled infrastructure Database Server API Server II API Server I
API Server III Load Balancer
0 500 1000 1500 2000 Empty Auth Auth + read
Auth + write Requests per second
0 150 300 450 600 Empty Auth Auth + read
Auth + write Average latency, ms
Cluster Performance req/sec Lat, min Lat, max Lat, avg Healthcheck
21.1K 1.4 1105 9.4 Empty Auth 1820 4.7 473 109 Auth + Read 897 3.1 243 55.6 Auth + Write 916 13 617 217.5
Questions?
Thanks!