Swift on the Server
Robert F. Dickerson
Devoxx US, March 2017
@rfdickerson
Swift Programming
Language
Strong types
Static types
Automatic Reference Counting
Optionals
Algebraic Data types
Closures
@rfdickerson
Swift language growth
RedMonk rating: 11
@rfdickerson
Why Swift on the Server?
@rfdickerson
Performant Applications
Duration(s)lowerisbetter
0
33.5
67
100.5
134
Swift Java NodeJS Ruby
134.2
15.84.34
@rfdickerson
Low Memory
Duration(s)lowerisbetter
0.00
15.00
30.00
45.00
60.00
Swift Java NodeJS Ruby
54.6
25.3
32.2
15
@rfdickerson
Swift is ideal for Cloud
@rfdickerson
Isomorphic Development
mobile
backend
@rfdickerson
Use familiar libraries
@rfdickerson
Server-side Swift Frameworks
KituraVaporPerfect Zewo
kitura.io
http://www.zewo.io/
www.vapor.io
@rfdickerson
Routing with Kitura
router.get("/hello") { request, response,
callNextHandler in
response.status(.OK).send("Hello, World!") 

callNextHandler()
}
@rfdickerson
FROM ibmcom/swift-ubuntu-runtime:latest
LABEL Description=""
EXPOSE 8080
WORKDIR $HOME
COPY . $HOME
RUN swift build —configuration release
CMD .build/release/Server
@rfdickerson
Swift Working Group
Create standards for:
• Basic Networking
• Security and Encryption
• HTTP and Websockets
@rfdickerson
Swift Sandbox
https://swift.sandbox.bluemix.net
@rfdickerson
Package Catalog
https://packagecatalog.com
@rfdickerson
Book
Learn about:
• Eliminate bugs in your programs
• Managing asynchrony
• Swift Package Manager
• Writing a REST webservice
• Authentication
• Database

Swift on the Server