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
Search
Volodymyr Shevchenko
December 16, 2017
Programming
50
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Server-side on Swift
Volodymyr Shevchenko
December 16, 2017
Transcript
48 slides
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!
More Decks by Volodymyr Shevchenko
See All by Volodymyr Shevchenko
Module architecture in iOS applications
thesantaclaus
2
170
Other Decks in Programming
See All in Programming
Kotlin Fest 2026: Kotlin コンパイラに Contribute してみよう! - Kotlin/Wasm で深い再帰を書けるようにした話
ternbusty
1
420
AIコーディング時代のKotest ユニットテストから APIレベルの仕様固定化テストへ
ooga04
0
330
Claude Codeのおかげでやりたいことがやれるようになったんだよォー!
sms_tech
0
190
Claude Code ハーネスDeep Dive – 君はどこまで制御する? -
takateeen_knj
6
6.3k
正解の無い問題を 「できるだけ上手く」解く ヒューリスティックで感性を磨こう。〜現実課題をプログラミングで解きあうコミュニティについて〜
allegrogiken
0
110
特急いなほ as a Workflow / 20261107jaws-festa-2026-akita-lt
kasacchiful
PRO
0
110
Growing PicoRuby's Ecosystem on ESP32
yuuu
2
150
AIが実装を担う時代の「技術設計」と「チームマネジメント」
kamina_zzz
2
440
読みやすい!と評判(?)の発表の準備にかける私のこだわり
shoheimitani
0
160
flutter_test のその先へ — Flutter アプリの LLM 機能に「評価」という品質保証を
kosukesaigusa
0
210
例外からRich Errorsまで Kotlinエラーハンドリングの進化を読み解く
shiita0903
0
240
SODA - FACT BOOK(EN)
sodainc
1
280
Featured
See All Featured
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
500
For a Future-Friendly Web
brad_frost
184
11k
Everyday Curiosity
cassininazir
0
420
The Curse of the Amulet
leimatthew05
4
17k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
990
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
680
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
580
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Making Projects Easy
brettharned
120
6.9k
GraphQLとの向き合い方2022年版
quramy
50
15k
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
910