SlideShare a Scribd company logo
1 of 39
Server Side Swift
Hüseyin APTİOĞLU | Software Infrastructure
Agenda
• Crash-Course Swift
• Swift Package Manager
• Server Side
• Benchmarking
Swift
• 1940s -> 9 programming languages
• 1950s -> 58 programming languages
• Fortran (concept)
• Fortran II
• Lisp
• …
• 1960s -> 113 programming languages
• Fortran IV
• Basic
• Cobol
• …
• 1970s -> 170 programming languages
• Pascal
• Smaltalk
• C
• ….
• 1980s -> 231 programming languages
• Turbo Pascal
• Erlang
• C ++
• Objective C
• ….
http://www.slideshare.net/GiordanoScalzo/the-joy-of-serverside-swift-development?qid=c2bc7c73-5bac-47e1-b834-45ac4b35edde&v=&b=&from_search=7
Swift
• 1990s -> 292 programming languages
• Python
• Java
• Ruby
• Visual Basic
• Delphi
• ….
• 2000s -> 339 programming languages
• C#
• Scala
• Go
• ….
• 2010s -> 354 programming languages
• Rust
• Kotlin
• Elm
• ….
http://www.slideshare.net/GiordanoScalzo/the-joy-of-serverside-swift-development?qid=c2bc7c73-5bac-47e1-b834-45ac4b35edde&v=&b=&from_search=7
Swift
• 355. Swift
• v1.0 in September 2014
• Opened in Dec 2015
• v2.2 first ver. in the Open
• v3.0.1
Swift Tour
Mutable
Variables
Immutable
Swift Tour
Mutable
Type Inference
Immutable
Swift Tour
Optionals
Swift Tour
Function parameter names
Swift Tour
Guard Statement
Swift Tour
Closures
Swift Tour
Tuples
Swift Tour
Extensions
Swift Tour
and more …
• Enumerations
• Inheritance
• Initialization
• Error Handling
• Type Casting
• Generics
• Access Control
• …
• …
Swift
Why is Swift a good choice for server-side ?
• Fast
• Modern
• Safe
• Interactive
• Open Source
• Apple
Server-side App Trade Off
Why is Swift a good choice for server-side ?AppPerformance
Developer Productivity
C
C++
Obj.C
Java
Perl
JavaScript
Python
Ruby
Lua
Groovy
ARC
Automatic Reference Counting (ARC)
Swift manages the memory for you, but unlike many other high level
languages, it doesn’t use a garbage collector to do this.
- No periodically running
- No pause
- The CPU cycles for your own program
Automatic Reference Counting (ARC)
LLVM
LLVM is actually an umbrella project that includes a variety of compilers and low
level tools
In short, LLVM compiles your code to a platform-neutral Intermediary Representation (IR), which can then be
optimised and converted to the desired architecture. This allows all platform optimisation efforts to be
concentrated in one place
For Swift, Apple added a new layer to this architecture: the Swift Intermediate Language (SIL).
SPM
Swift Package Manager
• Part of Swift 3
• Init project
• Generate Xcode Proj
• Resolve dependencies
The Swift Package Manager is a tool for managing the distribution of Swift
code. It’s integrated with the Swift build system to automate the process
of downloading, compiling, and linking dependencies.
Package.swift
Swift
• Swift is easier to read
• Swift is easier to maintain
• Swift is safe
• Swift is unified with memory management
• Swift requires less code
Swift vs Objective-C
Swift
Swift vs Java
Swift version 3.0-dev (LLVM 491f98861f, Clang 2ff6ce54d0, Swift fd4bd4c965)
swift-DEVELOPMENT-SNAPSHOT-2016-11-29-a-ubuntu16.04
Target: x86_64-unknown-linux-gnu
java version "1.8.0_92"
Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)
https://benchmarksgame.alioth.debian.org/u64q/swift.html
II. Most Loved
GitHub - apple/swift
Server Side Swift
open-source
Officially, only Linux is supported
open-source
Unofficially
Swift on Android
Install swift to linux
• Install required dependencies
$ sudo apt-get install clang libicu-dev
• Download the latest swift binary release from https://swift.org/download/#releases
• Extract the archive
$ tar xzf swift-<VERSION>-<PLATFORM>.tar.gz
• Add the Swift toolchain to your path
$ export PATH=/path/to/usr/bin:"${PATH}"
• Test with REPL (Read Eval Print Loop)
Swift Scripts
#!/usr/bin/env swift
let fruits = ["Banana", "Mango", "Apple", "Orange"]
let sortedFruits = fruits.sorted{$0 < $1}
print(sortedFruits)
chmod +x sort.swift
./sort.swift
Creating an Executable
Contents of file hello.swift
println("Hello world")
$ swiftc hello.swift
$ ./hello Hello world
Web Frameworks
• Perfect (9871)
• Vapor (7786)
• IBM Kitura (5002)
• Swifton (2042)
• Swifter (1852)
• Zewo (1502)
• …
• ...
• ...
Perfect 2.0
Vapor
Kitura
Benchmarking
wrk -d 10m -t 4 -c 20 http://10.0.1.11:(PORT)/blog
Benchmarking
wrk -d 10m -t 4 -c 20 http://10.0.1.11:(PORT)/json
Ready for Production?
Not Yet !!!
- Web frameworks < 1 year
- Server = Maturity
IBTECH

More Related Content

What's hot

Eclipse OMR: a modern toolkit for building language runtimes
Eclipse OMR: a modern toolkit for building language runtimesEclipse OMR: a modern toolkit for building language runtimes
Eclipse OMR: a modern toolkit for building language runtimesMark Stoodley
 
RISC-V software state of the union
RISC-V software state of the unionRISC-V software state of the union
RISC-V software state of the unionRISC-V International
 
Continuous Integration with Puppet
Continuous Integration with PuppetContinuous Integration with Puppet
Continuous Integration with PuppetMiguel Zuniga
 
Repository Management with JFrog Artifactory
Repository Management with JFrog ArtifactoryRepository Management with JFrog Artifactory
Repository Management with JFrog ArtifactoryStephen Chin
 
RISC-V 30910 kassem_ summit 2020 - so_c_gen
RISC-V 30910 kassem_ summit 2020 - so_c_genRISC-V 30910 kassem_ summit 2020 - so_c_gen
RISC-V 30910 kassem_ summit 2020 - so_c_genRISC-V International
 
TDC 2016 SP - Continuous Delivery para aplicações Java com ferramentas open-s...
TDC 2016 SP - Continuous Delivery para aplicações Java com ferramentas open-s...TDC 2016 SP - Continuous Delivery para aplicações Java com ferramentas open-s...
TDC 2016 SP - Continuous Delivery para aplicações Java com ferramentas open-s...Stefan Teixeira
 
Embedded Webinar #13: "From Zero to Hero: contribute to Linux Kernel in 15 mi...
Embedded Webinar #13: "From Zero to Hero: contribute to Linux Kernel in 15 mi...Embedded Webinar #13: "From Zero to Hero: contribute to Linux Kernel in 15 mi...
Embedded Webinar #13: "From Zero to Hero: contribute to Linux Kernel in 15 mi...GlobalLogic Ukraine
 
Iceberg
IcebergIceberg
IcebergESUG
 

What's hot (8)

Eclipse OMR: a modern toolkit for building language runtimes
Eclipse OMR: a modern toolkit for building language runtimesEclipse OMR: a modern toolkit for building language runtimes
Eclipse OMR: a modern toolkit for building language runtimes
 
RISC-V software state of the union
RISC-V software state of the unionRISC-V software state of the union
RISC-V software state of the union
 
Continuous Integration with Puppet
Continuous Integration with PuppetContinuous Integration with Puppet
Continuous Integration with Puppet
 
Repository Management with JFrog Artifactory
Repository Management with JFrog ArtifactoryRepository Management with JFrog Artifactory
Repository Management with JFrog Artifactory
 
RISC-V 30910 kassem_ summit 2020 - so_c_gen
RISC-V 30910 kassem_ summit 2020 - so_c_genRISC-V 30910 kassem_ summit 2020 - so_c_gen
RISC-V 30910 kassem_ summit 2020 - so_c_gen
 
TDC 2016 SP - Continuous Delivery para aplicações Java com ferramentas open-s...
TDC 2016 SP - Continuous Delivery para aplicações Java com ferramentas open-s...TDC 2016 SP - Continuous Delivery para aplicações Java com ferramentas open-s...
TDC 2016 SP - Continuous Delivery para aplicações Java com ferramentas open-s...
 
Embedded Webinar #13: "From Zero to Hero: contribute to Linux Kernel in 15 mi...
Embedded Webinar #13: "From Zero to Hero: contribute to Linux Kernel in 15 mi...Embedded Webinar #13: "From Zero to Hero: contribute to Linux Kernel in 15 mi...
Embedded Webinar #13: "From Zero to Hero: contribute to Linux Kernel in 15 mi...
 
Iceberg
IcebergIceberg
Iceberg
 

Viewers also liked

Enumはデキる子 ~ case .Success(let value): ~
 Enumはデキる子 ~ case .Success(let value): ~ Enumはデキる子 ~ case .Success(let value): ~
Enumはデキる子 ~ case .Success(let value): ~Takaaki Tanaka
 
An introduction to Microservices
An introduction to MicroservicesAn introduction to Microservices
An introduction to MicroservicesCisco DevNet
 
An Introduction to OAuth 2
An Introduction to OAuth 2An Introduction to OAuth 2
An Introduction to OAuth 2Aaron Parecki
 
Server-side Swift
Server-side SwiftServer-side Swift
Server-side SwiftDaijiro Abe
 
Authentication: Cookies vs JWTs and why you’re doing it wrong
Authentication: Cookies vs JWTs and why you’re doing it wrongAuthentication: Cookies vs JWTs and why you’re doing it wrong
Authentication: Cookies vs JWTs and why you’re doing it wrongDerek Perkins
 
IBM Presentation
IBM PresentationIBM Presentation
IBM Presentationrolsen3
 

Viewers also liked (8)

Server Side? Swift
Server Side? SwiftServer Side? Swift
Server Side? Swift
 
Enumはデキる子 ~ case .Success(let value): ~
 Enumはデキる子 ~ case .Success(let value): ~ Enumはデキる子 ~ case .Success(let value): ~
Enumはデキる子 ~ case .Success(let value): ~
 
Server-side Swift
Server-side SwiftServer-side Swift
Server-side Swift
 
An introduction to Microservices
An introduction to MicroservicesAn introduction to Microservices
An introduction to Microservices
 
An Introduction to OAuth 2
An Introduction to OAuth 2An Introduction to OAuth 2
An Introduction to OAuth 2
 
Server-side Swift
Server-side SwiftServer-side Swift
Server-side Swift
 
Authentication: Cookies vs JWTs and why you’re doing it wrong
Authentication: Cookies vs JWTs and why you’re doing it wrongAuthentication: Cookies vs JWTs and why you’re doing it wrong
Authentication: Cookies vs JWTs and why you’re doing it wrong
 
IBM Presentation
IBM PresentationIBM Presentation
IBM Presentation
 

Similar to Server Side Swift

Honza Dvorský: Swift Package Manager
Honza Dvorský: Swift Package ManagerHonza Dvorský: Swift Package Manager
Honza Dvorský: Swift Package Managermdevtalk
 
Rapid application development with spring roo j-fall 2010 - baris dere
Rapid application development with spring roo   j-fall 2010 - baris dereRapid application development with spring roo   j-fall 2010 - baris dere
Rapid application development with spring roo j-fall 2010 - baris dereBaris Dere
 
Magento 2 Workflows
Magento 2 WorkflowsMagento 2 Workflows
Magento 2 WorkflowsRyan Street
 
Fluo CICD OpenStack Summit
Fluo CICD OpenStack SummitFluo CICD OpenStack Summit
Fluo CICD OpenStack SummitMiguel Zuniga
 
Server Side Swift with Kitura@IBM by Sangeeth K Sivakumar
Server Side Swift with Kitura@IBM by Sangeeth K Sivakumar Server Side Swift with Kitura@IBM by Sangeeth K Sivakumar
Server Side Swift with Kitura@IBM by Sangeeth K Sivakumar Sangeeth K Sivakumar
 
Try! Swift Tokyo2017
Try! Swift Tokyo2017Try! Swift Tokyo2017
Try! Swift Tokyo2017Amy Cheong
 
RubyStack: the easiest way to deploy Ruby on Rails
RubyStack: the easiest way to deploy Ruby on RailsRubyStack: the easiest way to deploy Ruby on Rails
RubyStack: the easiest way to deploy Ruby on Railselliando dias
 
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
차세대컴파일러, VM의미래: 애플 오픈소스 LLVMJung Kim
 
Swift Buildpack for Cloud Foundry
Swift Buildpack for Cloud FoundrySwift Buildpack for Cloud Foundry
Swift Buildpack for Cloud FoundryRobert Gogolok
 
Open Source Swift Under the Hood
Open Source Swift Under the HoodOpen Source Swift Under the Hood
Open Source Swift Under the HoodC4Media
 
Understand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java ApplicationsUnderstand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java ApplicationsC4Media
 
20171122 aws usergrp_coretech-spn-cicd-aws-v01
20171122 aws usergrp_coretech-spn-cicd-aws-v0120171122 aws usergrp_coretech-spn-cicd-aws-v01
20171122 aws usergrp_coretech-spn-cicd-aws-v01Scott Miao
 
Cloudsolutionday 2016: DevOps workflow with Docker on AWS
Cloudsolutionday 2016: DevOps workflow with Docker on AWSCloudsolutionday 2016: DevOps workflow with Docker on AWS
Cloudsolutionday 2016: DevOps workflow with Docker on AWSAWS Vietnam Community
 
Show and Tell: Building Applications on Cisco Open SDN Controller
Show and Tell: Building Applications on Cisco Open SDN Controller Show and Tell: Building Applications on Cisco Open SDN Controller
Show and Tell: Building Applications on Cisco Open SDN Controller Cisco DevNet
 
[OWASP Poland Day] Security knowledge framework
[OWASP Poland Day] Security knowledge framework[OWASP Poland Day] Security knowledge framework
[OWASP Poland Day] Security knowledge frameworkOWASP
 
CocoaConf DC - Automate with Swift - Tony Ingraldi
CocoaConf DC -  Automate with Swift - Tony IngraldiCocoaConf DC -  Automate with Swift - Tony Ingraldi
CocoaConf DC - Automate with Swift - Tony IngraldiTony Ingraldi
 
Introducing ASP.NET vNext - A tour of the new ASP.NET platform
Introducing ASP.NET vNext - A tour of the new ASP.NET platformIntroducing ASP.NET vNext - A tour of the new ASP.NET platform
Introducing ASP.NET vNext - A tour of the new ASP.NET platformJeffrey T. Fritz
 
Scalding by Adform Research, Alex Gryzlov
Scalding by Adform Research, Alex GryzlovScalding by Adform Research, Alex Gryzlov
Scalding by Adform Research, Alex GryzlovVasil Remeniuk
 
Modern application development with oracle cloud sangam17
Modern application development with oracle cloud sangam17Modern application development with oracle cloud sangam17
Modern application development with oracle cloud sangam17Vinay Kumar
 
Moving microsoft .net applications one container at a time
 Moving microsoft .net applications one container at a time  Moving microsoft .net applications one container at a time
Moving microsoft .net applications one container at a time Amazon Web Services
 

Similar to Server Side Swift (20)

Honza Dvorský: Swift Package Manager
Honza Dvorský: Swift Package ManagerHonza Dvorský: Swift Package Manager
Honza Dvorský: Swift Package Manager
 
Rapid application development with spring roo j-fall 2010 - baris dere
Rapid application development with spring roo   j-fall 2010 - baris dereRapid application development with spring roo   j-fall 2010 - baris dere
Rapid application development with spring roo j-fall 2010 - baris dere
 
Magento 2 Workflows
Magento 2 WorkflowsMagento 2 Workflows
Magento 2 Workflows
 
Fluo CICD OpenStack Summit
Fluo CICD OpenStack SummitFluo CICD OpenStack Summit
Fluo CICD OpenStack Summit
 
Server Side Swift with Kitura@IBM by Sangeeth K Sivakumar
Server Side Swift with Kitura@IBM by Sangeeth K Sivakumar Server Side Swift with Kitura@IBM by Sangeeth K Sivakumar
Server Side Swift with Kitura@IBM by Sangeeth K Sivakumar
 
Try! Swift Tokyo2017
Try! Swift Tokyo2017Try! Swift Tokyo2017
Try! Swift Tokyo2017
 
RubyStack: the easiest way to deploy Ruby on Rails
RubyStack: the easiest way to deploy Ruby on RailsRubyStack: the easiest way to deploy Ruby on Rails
RubyStack: the easiest way to deploy Ruby on Rails
 
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
 
Swift Buildpack for Cloud Foundry
Swift Buildpack for Cloud FoundrySwift Buildpack for Cloud Foundry
Swift Buildpack for Cloud Foundry
 
Open Source Swift Under the Hood
Open Source Swift Under the HoodOpen Source Swift Under the Hood
Open Source Swift Under the Hood
 
Understand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java ApplicationsUnderstand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java Applications
 
20171122 aws usergrp_coretech-spn-cicd-aws-v01
20171122 aws usergrp_coretech-spn-cicd-aws-v0120171122 aws usergrp_coretech-spn-cicd-aws-v01
20171122 aws usergrp_coretech-spn-cicd-aws-v01
 
Cloudsolutionday 2016: DevOps workflow with Docker on AWS
Cloudsolutionday 2016: DevOps workflow with Docker on AWSCloudsolutionday 2016: DevOps workflow with Docker on AWS
Cloudsolutionday 2016: DevOps workflow with Docker on AWS
 
Show and Tell: Building Applications on Cisco Open SDN Controller
Show and Tell: Building Applications on Cisco Open SDN Controller Show and Tell: Building Applications on Cisco Open SDN Controller
Show and Tell: Building Applications on Cisco Open SDN Controller
 
[OWASP Poland Day] Security knowledge framework
[OWASP Poland Day] Security knowledge framework[OWASP Poland Day] Security knowledge framework
[OWASP Poland Day] Security knowledge framework
 
CocoaConf DC - Automate with Swift - Tony Ingraldi
CocoaConf DC -  Automate with Swift - Tony IngraldiCocoaConf DC -  Automate with Swift - Tony Ingraldi
CocoaConf DC - Automate with Swift - Tony Ingraldi
 
Introducing ASP.NET vNext - A tour of the new ASP.NET platform
Introducing ASP.NET vNext - A tour of the new ASP.NET platformIntroducing ASP.NET vNext - A tour of the new ASP.NET platform
Introducing ASP.NET vNext - A tour of the new ASP.NET platform
 
Scalding by Adform Research, Alex Gryzlov
Scalding by Adform Research, Alex GryzlovScalding by Adform Research, Alex Gryzlov
Scalding by Adform Research, Alex Gryzlov
 
Modern application development with oracle cloud sangam17
Modern application development with oracle cloud sangam17Modern application development with oracle cloud sangam17
Modern application development with oracle cloud sangam17
 
Moving microsoft .net applications one container at a time
 Moving microsoft .net applications one container at a time  Moving microsoft .net applications one container at a time
Moving microsoft .net applications one container at a time
 

More from Software Infrastructure (20)

Kotlin
KotlinKotlin
Kotlin
 
NoSql
NoSqlNoSql
NoSql
 
Stream Analytics
Stream AnalyticsStream Analytics
Stream Analytics
 
Quartz Scheduler
Quartz SchedulerQuartz Scheduler
Quartz Scheduler
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Deep Learning
Deep Learning Deep Learning
Deep Learning
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
Java9
Java9Java9
Java9
 
Machine learning
Machine learningMachine learning
Machine learning
 
Raspberry PI
Raspberry PIRaspberry PI
Raspberry PI
 
Golang
GolangGolang
Golang
 
Codename one
Codename oneCodename one
Codename one
 
Hazelcast sunum
Hazelcast sunumHazelcast sunum
Hazelcast sunum
 
Microsoft bot framework
Microsoft bot frameworkMicrosoft bot framework
Microsoft bot framework
 
Blockchain use cases
Blockchain use casesBlockchain use cases
Blockchain use cases
 
The Fintechs
The FintechsThe Fintechs
The Fintechs
 
Push Notification
Push NotificationPush Notification
Push Notification
 
.Net Core
.Net Core.Net Core
.Net Core
 
Java Batch
Java BatchJava Batch
Java Batch
 
Big Data & Hadoop
Big Data & HadoopBig Data & Hadoop
Big Data & Hadoop
 

Recently uploaded

XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 

Recently uploaded (20)

XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 

Server Side Swift

  • 1. Server Side Swift Hüseyin APTİOĞLU | Software Infrastructure
  • 2. Agenda • Crash-Course Swift • Swift Package Manager • Server Side • Benchmarking
  • 3. Swift • 1940s -> 9 programming languages • 1950s -> 58 programming languages • Fortran (concept) • Fortran II • Lisp • … • 1960s -> 113 programming languages • Fortran IV • Basic • Cobol • … • 1970s -> 170 programming languages • Pascal • Smaltalk • C • …. • 1980s -> 231 programming languages • Turbo Pascal • Erlang • C ++ • Objective C • …. http://www.slideshare.net/GiordanoScalzo/the-joy-of-serverside-swift-development?qid=c2bc7c73-5bac-47e1-b834-45ac4b35edde&v=&b=&from_search=7
  • 4. Swift • 1990s -> 292 programming languages • Python • Java • Ruby • Visual Basic • Delphi • …. • 2000s -> 339 programming languages • C# • Scala • Go • …. • 2010s -> 354 programming languages • Rust • Kotlin • Elm • …. http://www.slideshare.net/GiordanoScalzo/the-joy-of-serverside-swift-development?qid=c2bc7c73-5bac-47e1-b834-45ac4b35edde&v=&b=&from_search=7
  • 5. Swift • 355. Swift • v1.0 in September 2014 • Opened in Dec 2015 • v2.2 first ver. in the Open • v3.0.1
  • 14. Swift Tour and more … • Enumerations • Inheritance • Initialization • Error Handling • Type Casting • Generics • Access Control • … • …
  • 15. Swift Why is Swift a good choice for server-side ? • Fast • Modern • Safe • Interactive • Open Source • Apple
  • 16. Server-side App Trade Off Why is Swift a good choice for server-side ?AppPerformance Developer Productivity C C++ Obj.C Java Perl JavaScript Python Ruby Lua Groovy
  • 17. ARC Automatic Reference Counting (ARC) Swift manages the memory for you, but unlike many other high level languages, it doesn’t use a garbage collector to do this. - No periodically running - No pause - The CPU cycles for your own program
  • 19. LLVM LLVM is actually an umbrella project that includes a variety of compilers and low level tools In short, LLVM compiles your code to a platform-neutral Intermediary Representation (IR), which can then be optimised and converted to the desired architecture. This allows all platform optimisation efforts to be concentrated in one place For Swift, Apple added a new layer to this architecture: the Swift Intermediate Language (SIL).
  • 20. SPM Swift Package Manager • Part of Swift 3 • Init project • Generate Xcode Proj • Resolve dependencies The Swift Package Manager is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies. Package.swift
  • 21. Swift • Swift is easier to read • Swift is easier to maintain • Swift is safe • Swift is unified with memory management • Swift requires less code Swift vs Objective-C
  • 22. Swift Swift vs Java Swift version 3.0-dev (LLVM 491f98861f, Clang 2ff6ce54d0, Swift fd4bd4c965) swift-DEVELOPMENT-SNAPSHOT-2016-11-29-a-ubuntu16.04 Target: x86_64-unknown-linux-gnu java version "1.8.0_92" Java(TM) SE Runtime Environment (build 1.8.0_92-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode) https://benchmarksgame.alioth.debian.org/u64q/swift.html
  • 29. Install swift to linux • Install required dependencies $ sudo apt-get install clang libicu-dev • Download the latest swift binary release from https://swift.org/download/#releases • Extract the archive $ tar xzf swift-<VERSION>-<PLATFORM>.tar.gz • Add the Swift toolchain to your path $ export PATH=/path/to/usr/bin:"${PATH}" • Test with REPL (Read Eval Print Loop)
  • 30. Swift Scripts #!/usr/bin/env swift let fruits = ["Banana", "Mango", "Apple", "Orange"] let sortedFruits = fruits.sorted{$0 < $1} print(sortedFruits) chmod +x sort.swift ./sort.swift
  • 31. Creating an Executable Contents of file hello.swift println("Hello world") $ swiftc hello.swift $ ./hello Hello world
  • 32. Web Frameworks • Perfect (9871) • Vapor (7786) • IBM Kitura (5002) • Swifton (2042) • Swifter (1852) • Zewo (1502) • … • ... • ...
  • 34. Vapor
  • 36. Benchmarking wrk -d 10m -t 4 -c 20 http://10.0.1.11:(PORT)/blog
  • 37. Benchmarking wrk -d 10m -t 4 -c 20 http://10.0.1.11:(PORT)/json
  • 38. Ready for Production? Not Yet !!! - Web frameworks < 1 year - Server = Maturity