SlideShare ist ein Scribd-Unternehmen logo
1 von 47
Downloaden Sie, um offline zu lesen
@Chris__Bailey | Swift@IBM #swiftsummit
Swift @ IBM Engineering Team
Chris Bailey(@Chris__Bailey)
November 7th, 2016
Pushing Swift to the Server
@Chris__Bailey | Swift@IBM #swiftsummit
Why Swift on the Server?
@Chris__Bailey | Swift@IBM #swiftsummit
Performant Applications
4.0	 4.3	
15.8	
134.2	
0.0	
20.0	
40.0	
60.0	
80.0	
100.0	
120.0	
				
Duration(s)
(lowerisbetter)
http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=spectralnorm
@Chris__Bailey | Swift@IBM #swiftsummit
15.0	
32.2	
25.3	
54.6	
0.0	
10.0	
20.0	
30.0	
40.0	
50.0	
60.0	
			
Low Memory
MemoryUsage(MB)
(lowerisbetter)
http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=spectralnorm
@Chris__Bailey | Swift@IBM #swiftsummit
Swift is ideal for Cloud
@Chris__Bailey | Swift@IBM #swiftsummit@Chris__Bailey | Swift@IBM #swiftsummit
@Chris__Bailey | Swift@IBM #swiftsummit
MARS
@Chris__Bailey | Swift@IBM #swiftsummit
@Chris__Bailey | Swift@IBM #swiftsummit
1998 Mars Climate ORbiteR
@Chris__Bailey | Swift@IBM #swiftsummit
@Chris__Bailey | Swift@IBM #swiftsummit
DeC 11: Launch from Cape Canaveral1998 Mars Climate ORbiteR
@Chris__Bailey | Swift@IBM #swiftsummit
@Chris__Bailey | Swift@IBM #swiftsummit
1998 Mars Climate ORbiteR
DeC 11: Launch from Cape Canaveral
@Chris__Bailey | Swift@IBM #swiftsummit
@Chris__Bailey | Swift@IBM #swiftsummit
1999 Mars Climate ORbiteR
Sept 23rd: Lost Radio Contact
@Chris__Bailey | Swift@IBM #swiftsummit
@Chris__Bailey | Swift@IBM #swiftsummit
1999 Mars Climate ORbiteR
Sept 25th: Mission Declared a LOSS
@Chris__Bailey | Swift@IBM #swiftsummit
@Chris__Bailey | Swift@IBM #swiftsummit
@Chris__Bailey | Swift@IBM #swiftsummit
PLANNED TRAJECTORY
@Chris__Bailey | Swift@IBM #swiftsummit
PLANNED TRAJECTORY
TCM-4
@Chris__Bailey | Swift@IBM #swiftsummit
PLANNED TRAJECTORY
TCM-4
@Chris__Bailey | Swift@IBM #swiftsummit
PLANNED TRAJECTORY
TCM-4
226 KM
@Chris__Bailey | Swift@IBM #swiftsummit
PLANNED TRAJECTORY
TCM-4
ACTUAL TRAJECTORY
226 KM
@Chris__Bailey | Swift@IBM #swiftsummit
PLANNED TRAJECTORY
TCM-4
ACTUAL TRAJECTORY
226 KM
TCM-4
@Chris__Bailey | Swift@IBM #swiftsummit
PLANNED TRAJECTORY
TCM-4
TCM-4 ACTUAL TRAJECTORY
226 KM
@Chris__Bailey | Swift@IBM #swiftsummit
PLANNED TRAJECTORY
TCM-4
ACTUAL TRAJECTORY
226 KM
57 KM
TCM-4
@Chris__Bailey | Swift@IBM #swiftsummit@Chris__Bailey | Swift@IBM #swiftsummit
@Chris__Bailey | Swift@IBM #swiftsummit
Lockheed Martin

Ground SoftwareNasa Jet Propulsion Laboratory

Trajectory Calculation Software
@Chris__Bailey | Swift@IBM #swiftsummit
Lockheed Martin

Ground Software
Nasa Jet Propulsion Laboratory

Trajectory Calculation Software
SIS

(Software Interface Specification)
Total Impulse
pounds-seconds
(United States Customary Unit)
newton-seconds
(International System of Units)
11.488
@Chris__Bailey | Swift@IBM #swiftsummit
“Software interop is hard”
@Chris__Bailey | Swift@IBM #swiftsummit
@Chris__Bailey | Swift@IBM #swiftsummit
“Software interop is hard”
—Rocket Scientists
@Chris__Bailey | Swift@IBM #swiftsummit
@Chris__Bailey | Swift@IBM #swiftsummit
Siloed Development
API

Specification
Collaborate
on API
Collaborate
on API
Create
Deploy
Create
Deploy
@Chris__Bailey | Swift@IBM #swiftsummit
Collaborate
on Project
Collaborate
on Project
Collaborative Development
Deploy DeployGenerate
API

Specification
@Chris__Bailey | Swift@IBM #swiftsummit
Swift Development
Collaborate on
Swift Project
Deploy DeployGenerate
Swagger API

Specification
Collaborate on
Swift Project
@Chris__Bailey | Swift@IBM #swiftsummit
Collaboratively Building

Applications
@Chris__Bailey | Swift@IBM #swiftsummit
December 3rd, 2015
Apache 2.0 Software Licence
Swift Everywhere
@Chris__Bailey | Swift@IBM #swiftsummit
Kitura: A Swift Web Framework and HTTP Server
http://kitura.io
@Chris__Bailey | Swift@IBM #swiftsummit
Server / Cloud DeploymentServer / Cloud DeploymentApple Client Deployment
Client Facing App
Client-Specific
Libraries
Kitura Web Framework
Swift
Standard

Library
Foundation Dispatch
Swift
Standard

Library
Foundation Dispatch
Networking
Security
HTTPParsing
Application
Libraries
Application Specific Cloud Services
Server-Specific Libraries
Application
Libraries
Consistent
Runtime across
Clients/Servers
Kitura-based Server!
Built with Dispatch &
Foundation
Swift
“Server”
APIs
Application
Libraries
@Chris__Bailey | Swift@IBM #swiftsummit


Swift on the Server is Real
Swift 3.0 + Kitura 1.0

@Chris__Bailey | Swift@IBM #swiftsummit
Let’s take a tour…
@Chris__Bailey | Swift@IBM #swiftsummit
Create an Application
First, create a new project directory:
$ mkdir myFirstProject
Next, create a new Swift project using the Swift Package Manager.
$ cd myFirstProject
$ swift package init —-type executable
In Package.swift, add Kitura as a dependency for your project.
import PackageDescription
let package = Package(
name: "myFirstProject",
dependencies: [
.Package(url: "https://github.com/IBM-Swift/Kitura.git", majorVersion: 1, minor: 0)
])
@Chris__Bailey | Swift@IBM #swiftsummit
Create an Application
In Sources/main.swift, add the following code.
import Kitura
// Create a new router
let router = Router()
// Handle HTTP GET requests to /
router.get("/") {
request, response, next in
response.send("Hello, World!")
next()
}
// Add an HTTP server and connect it to the router
Kitura.addHTTPServer(onPort: 8090, with: router)
// Start the Kitura runloop (this call never returns)
Kitura.run()
@Chris__Bailey | Swift@IBM #swiftsummit
Deploy an Application
Open your browser at http://localhost:8090
Compile and run your application:
$ swift build
$ .build/debug/myFirstProject
@Chris__Bailey | Swift@IBM #swiftsummit
Demo
@Chris__Bailey | Swift@IBM #swiftsummit
Use Services
@Chris__Bailey | Swift@IBM #swiftsummit
Deploy to Cloud
$ docker pull ibmcom/kitura-ubuntu:latest $ git clone https://github.com/IBM-Swift/
Kitura-Starter-Bluemix
@Chris__Bailey | Swift@IBM #swiftsummit
Using Cloud Tools
http://cloudtools.bluemix.net
• Deployment made easy
• Clone, code, push
• Demo projects to try
@Chris__Bailey | Swift@IBM #swiftsummit
http://www.kitura.io/en/resources/tutorials.html
Tutorials
• Creating a Todo-List Backend
• Adding Authentication with Kitura-Credentials
• Adding Sessions with Kitura-Session
• Using Templating Engines with Kitura
• Enabling SSL/TLS on Kitura
• Using FastCGI with Kitura
• Special Types of Response Handlers
• Parsing Requests
@Chris__Bailey | Swift@IBM #swiftsummit
Examples
Blitter Social Network
https://github.com/ibm-swift/blitter
BluePic Application
https://github.com/ibm-swift/bluepic
@Chris__Bailey | Swift@IBM #swiftsummit
Discover Try
Build
IBM Cloud Tools
Package Catalog Swift Sandbox
Kitura + Packages
DeploySwift @ IBM
https://developer.ibm.com/swift/
@Chris__Bailey | Swift@IBM #swiftsummit
Swift
@Chris__Bailey | Swift@IBM #swiftsummit
Swift
For safer missions to Mars
@Chris__Bailey | Swift@IBM #swiftsummit

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Writing Slack Bots in JavaScript
Writing Slack Bots in JavaScriptWriting Slack Bots in JavaScript
Writing Slack Bots in JavaScript
 
AWS re:Invent "The secrets to building and delivering amazing apps at scale"
AWS re:Invent "The secrets to building and delivering amazing apps at scale"AWS re:Invent "The secrets to building and delivering amazing apps at scale"
AWS re:Invent "The secrets to building and delivering amazing apps at scale"
 
Taking Spring Apps for a Spin on Microsoft Azure Cloud
Taking Spring Apps for a Spin on Microsoft Azure CloudTaking Spring Apps for a Spin on Microsoft Azure Cloud
Taking Spring Apps for a Spin on Microsoft Azure Cloud
 
Jakarta Tech Talk: How to develop your first cloud-native Application with Java
Jakarta Tech Talk: How to develop your first cloud-native Application with JavaJakarta Tech Talk: How to develop your first cloud-native Application with Java
Jakarta Tech Talk: How to develop your first cloud-native Application with Java
 
LaunchingYourAppTheAmazonWay_SFStartupDay
LaunchingYourAppTheAmazonWay_SFStartupDayLaunchingYourAppTheAmazonWay_SFStartupDay
LaunchingYourAppTheAmazonWay_SFStartupDay
 
DevOps and AWS - Code PaLOUsa 2017
DevOps and AWS  - Code PaLOUsa 2017DevOps and AWS  - Code PaLOUsa 2017
DevOps and AWS - Code PaLOUsa 2017
 
10 Steps to Cloud Happiness
10 Steps to Cloud Happiness10 Steps to Cloud Happiness
10 Steps to Cloud Happiness
 
NetflixOSS: The Netflix Way
NetflixOSS: The Netflix WayNetflixOSS: The Netflix Way
NetflixOSS: The Netflix Way
 
Shift Left - How to improve your security with checkov before it’s going to p...
Shift Left - How to improve your security with checkov before it’s going to p...Shift Left - How to improve your security with checkov before it’s going to p...
Shift Left - How to improve your security with checkov before it’s going to p...
 
10 things you can do at the edge
10 things you can do at the edge10 things you can do at the edge
10 things you can do at the edge
 
Intro to AWS IOT
Intro to AWS IOTIntro to AWS IOT
Intro to AWS IOT
 
Nils Rhode - Does it always have to be k8s - TeC Day 2019
Nils Rhode - Does it always have to be k8s - TeC Day 2019Nils Rhode - Does it always have to be k8s - TeC Day 2019
Nils Rhode - Does it always have to be k8s - TeC Day 2019
 
A DevOps State of Mind with Microservices, Containers and Kubernetes
A DevOps State of Mind with Microservices, Containers and KubernetesA DevOps State of Mind with Microservices, Containers and Kubernetes
A DevOps State of Mind with Microservices, Containers and Kubernetes
 
Azure labs Vinicius
Azure labs ViniciusAzure labs Vinicius
Azure labs Vinicius
 
Harnessing the power of aws using dot net core
Harnessing the power of aws using dot net coreHarnessing the power of aws using dot net core
Harnessing the power of aws using dot net core
 
DevOps on AWS - Building Systems to Deliver Faster
DevOps on AWS - Building Systems to Deliver FasterDevOps on AWS - Building Systems to Deliver Faster
DevOps on AWS - Building Systems to Deliver Faster
 
From GitHub Source to GitHub Release: Free CICD Pipelines For JavaFX Apps
From GitHub Source to GitHub Release: Free CICD Pipelines For JavaFX AppsFrom GitHub Source to GitHub Release: Free CICD Pipelines For JavaFX Apps
From GitHub Source to GitHub Release: Free CICD Pipelines For JavaFX Apps
 
X-celerate 2019: Iterating fast with the MERN Stack
X-celerate 2019: Iterating fast with the MERN StackX-celerate 2019: Iterating fast with the MERN Stack
X-celerate 2019: Iterating fast with the MERN Stack
 
AWS EKS Security Best Practices
AWS EKS Security Best PracticesAWS EKS Security Best Practices
AWS EKS Security Best Practices
 
From Dev To Prod: How theScore deploys Elixir applications
From Dev To Prod: How theScore deploys Elixir applicationsFrom Dev To Prod: How theScore deploys Elixir applications
From Dev To Prod: How theScore deploys Elixir applications
 

Andere mochten auch (11)

Dai consigli di strada alla segreteria arancione
Dai consigli di strada alla segreteria arancioneDai consigli di strada alla segreteria arancione
Dai consigli di strada alla segreteria arancione
 
Desa wuna kec. tongkuno
Desa wuna kec. tongkunoDesa wuna kec. tongkuno
Desa wuna kec. tongkuno
 
Activitat prova bmacris
Activitat prova bmacrisActivitat prova bmacris
Activitat prova bmacris
 
Razestrigonomtricaslista1
Razestrigonomtricaslista1Razestrigonomtricaslista1
Razestrigonomtricaslista1
 
Mark Sheet
Mark SheetMark Sheet
Mark Sheet
 
INSPIRE 2nd Ed
INSPIRE 2nd EdINSPIRE 2nd Ed
INSPIRE 2nd Ed
 
Accesorii pentru picurare
Accesorii pentru picurareAccesorii pentru picurare
Accesorii pentru picurare
 
Evaluation part 2.
Evaluation part 2.Evaluation part 2.
Evaluation part 2.
 
H&S School Talk Case Study
H&S School Talk Case StudyH&S School Talk Case Study
H&S School Talk Case Study
 
Tarea 12
Tarea 12Tarea 12
Tarea 12
 
Data collection
Data collectionData collection
Data collection
 

Ähnlich wie Pushing Swift to the Server

Ähnlich wie Pushing Swift to the Server (20)

Swift Summit: Pushing the boundaries of Swift to the Server
Swift Summit: Pushing the boundaries of Swift to the ServerSwift Summit: Pushing the boundaries of Swift to the Server
Swift Summit: Pushing the boundaries of Swift to the Server
 
FrenchKit: End to End Application Development with Swift
FrenchKit: End to End Application Development with SwiftFrenchKit: End to End Application Development with Swift
FrenchKit: End to End Application Development with Swift
 
SWIFTly, Go Cloud!! - Swift@IBM
SWIFTly, Go Cloud!! - Swift@IBMSWIFTly, Go Cloud!! - Swift@IBM
SWIFTly, Go Cloud!! - Swift@IBM
 
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
 
CI/CD best practices for building modern applications - MAD301 - Santa Clara ...
CI/CD best practices for building modern applications - MAD301 - Santa Clara ...CI/CD best practices for building modern applications - MAD301 - Santa Clara ...
CI/CD best practices for building modern applications - MAD301 - Santa Clara ...
 
A Swift Path to Productivity
A Swift Path to ProductivityA Swift Path to Productivity
A Swift Path to Productivity
 
How to deploy machine learning models into production
How to deploy machine learning models into productionHow to deploy machine learning models into production
How to deploy machine learning models into production
 
Serverless Swift for Mobile Developers
Serverless Swift for Mobile DevelopersServerless Swift for Mobile Developers
Serverless Swift for Mobile Developers
 
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer ToolsA Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
 
Sst hackathon express
Sst hackathon expressSst hackathon express
Sst hackathon express
 
Using Databases and Containers From Development to Deployment
Using Databases and Containers  From Development to DeploymentUsing Databases and Containers  From Development to Deployment
Using Databases and Containers From Development to Deployment
 
Serverless in production, an experience report (FullStack 2018)
Serverless in production, an experience report (FullStack 2018)Serverless in production, an experience report (FullStack 2018)
Serverless in production, an experience report (FullStack 2018)
 
SD Times - Docker v2
SD Times - Docker v2SD Times - Docker v2
SD Times - Docker v2
 
Spring on PAS - Fabio Marinelli
Spring on PAS - Fabio MarinelliSpring on PAS - Fabio Marinelli
Spring on PAS - Fabio Marinelli
 
(java2days) Is the Future of Java Cloudy?
(java2days) Is the Future of Java Cloudy?(java2days) Is the Future of Java Cloudy?
(java2days) Is the Future of Java Cloudy?
 
Developing for Hybrid Cloud with Bluemix
Developing for Hybrid Cloud with BluemixDeveloping for Hybrid Cloud with Bluemix
Developing for Hybrid Cloud with Bluemix
 
Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018
Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018
Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018
 
CI/CD Best Practices for Building Modern Applications - MAD302 - Anaheim AWS ...
CI/CD Best Practices for Building Modern Applications - MAD302 - Anaheim AWS ...CI/CD Best Practices for Building Modern Applications - MAD302 - Anaheim AWS ...
CI/CD Best Practices for Building Modern Applications - MAD302 - Anaheim AWS ...
 
IBM BlueMix Architecture and Deep Dive (Powered by CloudFoundry)
IBM BlueMix Architecture and Deep Dive (Powered by CloudFoundry) IBM BlueMix Architecture and Deep Dive (Powered by CloudFoundry)
IBM BlueMix Architecture and Deep Dive (Powered by CloudFoundry)
 
Serverless in production, an experience report
Serverless in production, an experience reportServerless in production, an experience report
Serverless in production, an experience report
 

Mehr von ibmmobile

Mehr von ibmmobile (13)

The Disruptors: Redefining the possible, Vol. III
The Disruptors: Redefining the possible, Vol. IIIThe Disruptors: Redefining the possible, Vol. III
The Disruptors: Redefining the possible, Vol. III
 
The Disruptors: Redefining the possible, Vol. II
The Disruptors: Redefining the possible, Vol. IIThe Disruptors: Redefining the possible, Vol. II
The Disruptors: Redefining the possible, Vol. II
 
Ten rules for Bring Your Own Device (BYOD)
Ten rules for Bring Your Own Device (BYOD)Ten rules for Bring Your Own Device (BYOD)
Ten rules for Bring Your Own Device (BYOD)
 
Pushing the boundaries of Swift to the Server
Pushing the boundaries of Swift to the Server Pushing the boundaries of Swift to the Server
Pushing the boundaries of Swift to the Server
 
IBM Mobile Analyst Rankings 2016
IBM Mobile Analyst Rankings 2016IBM Mobile Analyst Rankings 2016
IBM Mobile Analyst Rankings 2016
 
Top 5 Insights: SXSW 2016
Top 5 Insights: SXSW 2016 Top 5 Insights: SXSW 2016
Top 5 Insights: SXSW 2016
 
Can content management change your business?
Can content management change your business?Can content management change your business?
Can content management change your business?
 
IBM MobileFirst Sessions at Insight2015 - A Pocket Guide
IBM MobileFirst Sessions at Insight2015 - A Pocket GuideIBM MobileFirst Sessions at Insight2015 - A Pocket Guide
IBM MobileFirst Sessions at Insight2015 - A Pocket Guide
 
IBM MobileFirst Technical Overview
IBM MobileFirst Technical OverviewIBM MobileFirst Technical Overview
IBM MobileFirst Technical Overview
 
An Overview on IBM MobileFirst Platform v7
An Overview on IBM MobileFirst Platform v7An Overview on IBM MobileFirst Platform v7
An Overview on IBM MobileFirst Platform v7
 
Mobile World Congress 2015 Recap
Mobile World Congress 2015 RecapMobile World Congress 2015 Recap
Mobile World Congress 2015 Recap
 
Mobile World Congress 2015 Recap - Day Four
Mobile World Congress 2015 Recap - Day FourMobile World Congress 2015 Recap - Day Four
Mobile World Congress 2015 Recap - Day Four
 
Mobile World Congress 2015 Recap - Day Three
Mobile World Congress 2015 Recap - Day ThreeMobile World Congress 2015 Recap - Day Three
Mobile World Congress 2015 Recap - Day Three
 

Kürzlich hochgeladen

Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 

Kürzlich hochgeladen (20)

Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 

Pushing Swift to the Server

  • 1. @Chris__Bailey | Swift@IBM #swiftsummit Swift @ IBM Engineering Team Chris Bailey(@Chris__Bailey) November 7th, 2016 Pushing Swift to the Server
  • 2. @Chris__Bailey | Swift@IBM #swiftsummit Why Swift on the Server?
  • 3. @Chris__Bailey | Swift@IBM #swiftsummit Performant Applications 4.0 4.3 15.8 134.2 0.0 20.0 40.0 60.0 80.0 100.0 120.0 Duration(s) (lowerisbetter) http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=spectralnorm
  • 4. @Chris__Bailey | Swift@IBM #swiftsummit 15.0 32.2 25.3 54.6 0.0 10.0 20.0 30.0 40.0 50.0 60.0 Low Memory MemoryUsage(MB) (lowerisbetter) http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=spectralnorm
  • 5. @Chris__Bailey | Swift@IBM #swiftsummit Swift is ideal for Cloud
  • 6. @Chris__Bailey | Swift@IBM #swiftsummit@Chris__Bailey | Swift@IBM #swiftsummit
  • 7. @Chris__Bailey | Swift@IBM #swiftsummit MARS @Chris__Bailey | Swift@IBM #swiftsummit
  • 8. @Chris__Bailey | Swift@IBM #swiftsummit 1998 Mars Climate ORbiteR @Chris__Bailey | Swift@IBM #swiftsummit
  • 9. @Chris__Bailey | Swift@IBM #swiftsummit DeC 11: Launch from Cape Canaveral1998 Mars Climate ORbiteR @Chris__Bailey | Swift@IBM #swiftsummit
  • 10. @Chris__Bailey | Swift@IBM #swiftsummit 1998 Mars Climate ORbiteR DeC 11: Launch from Cape Canaveral @Chris__Bailey | Swift@IBM #swiftsummit
  • 11. @Chris__Bailey | Swift@IBM #swiftsummit 1999 Mars Climate ORbiteR Sept 23rd: Lost Radio Contact @Chris__Bailey | Swift@IBM #swiftsummit
  • 12. @Chris__Bailey | Swift@IBM #swiftsummit 1999 Mars Climate ORbiteR Sept 25th: Mission Declared a LOSS @Chris__Bailey | Swift@IBM #swiftsummit
  • 14. @Chris__Bailey | Swift@IBM #swiftsummit PLANNED TRAJECTORY
  • 15. @Chris__Bailey | Swift@IBM #swiftsummit PLANNED TRAJECTORY TCM-4
  • 16. @Chris__Bailey | Swift@IBM #swiftsummit PLANNED TRAJECTORY TCM-4
  • 17. @Chris__Bailey | Swift@IBM #swiftsummit PLANNED TRAJECTORY TCM-4 226 KM
  • 18. @Chris__Bailey | Swift@IBM #swiftsummit PLANNED TRAJECTORY TCM-4 ACTUAL TRAJECTORY 226 KM
  • 19. @Chris__Bailey | Swift@IBM #swiftsummit PLANNED TRAJECTORY TCM-4 ACTUAL TRAJECTORY 226 KM TCM-4
  • 20. @Chris__Bailey | Swift@IBM #swiftsummit PLANNED TRAJECTORY TCM-4 TCM-4 ACTUAL TRAJECTORY 226 KM
  • 21. @Chris__Bailey | Swift@IBM #swiftsummit PLANNED TRAJECTORY TCM-4 ACTUAL TRAJECTORY 226 KM 57 KM TCM-4
  • 22. @Chris__Bailey | Swift@IBM #swiftsummit@Chris__Bailey | Swift@IBM #swiftsummit
  • 23. @Chris__Bailey | Swift@IBM #swiftsummit Lockheed Martin
 Ground SoftwareNasa Jet Propulsion Laboratory
 Trajectory Calculation Software
  • 24. @Chris__Bailey | Swift@IBM #swiftsummit Lockheed Martin
 Ground Software Nasa Jet Propulsion Laboratory
 Trajectory Calculation Software SIS
 (Software Interface Specification) Total Impulse pounds-seconds (United States Customary Unit) newton-seconds (International System of Units) 11.488
  • 25. @Chris__Bailey | Swift@IBM #swiftsummit “Software interop is hard” @Chris__Bailey | Swift@IBM #swiftsummit
  • 26. @Chris__Bailey | Swift@IBM #swiftsummit “Software interop is hard” —Rocket Scientists @Chris__Bailey | Swift@IBM #swiftsummit
  • 27. @Chris__Bailey | Swift@IBM #swiftsummit Siloed Development API
 Specification Collaborate on API Collaborate on API Create Deploy Create Deploy
  • 28. @Chris__Bailey | Swift@IBM #swiftsummit Collaborate on Project Collaborate on Project Collaborative Development Deploy DeployGenerate API
 Specification
  • 29. @Chris__Bailey | Swift@IBM #swiftsummit Swift Development Collaborate on Swift Project Deploy DeployGenerate Swagger API
 Specification Collaborate on Swift Project
  • 30. @Chris__Bailey | Swift@IBM #swiftsummit Collaboratively Building
 Applications
  • 31. @Chris__Bailey | Swift@IBM #swiftsummit December 3rd, 2015 Apache 2.0 Software Licence Swift Everywhere
  • 32. @Chris__Bailey | Swift@IBM #swiftsummit Kitura: A Swift Web Framework and HTTP Server http://kitura.io
  • 33. @Chris__Bailey | Swift@IBM #swiftsummit Server / Cloud DeploymentServer / Cloud DeploymentApple Client Deployment Client Facing App Client-Specific Libraries Kitura Web Framework Swift Standard
 Library Foundation Dispatch Swift Standard
 Library Foundation Dispatch Networking Security HTTPParsing Application Libraries Application Specific Cloud Services Server-Specific Libraries Application Libraries Consistent Runtime across Clients/Servers Kitura-based Server! Built with Dispatch & Foundation Swift “Server” APIs Application Libraries
  • 34. @Chris__Bailey | Swift@IBM #swiftsummit 
 Swift on the Server is Real Swift 3.0 + Kitura 1.0

  • 35. @Chris__Bailey | Swift@IBM #swiftsummit Let’s take a tour…
  • 36. @Chris__Bailey | Swift@IBM #swiftsummit Create an Application First, create a new project directory: $ mkdir myFirstProject Next, create a new Swift project using the Swift Package Manager. $ cd myFirstProject $ swift package init —-type executable In Package.swift, add Kitura as a dependency for your project. import PackageDescription let package = Package( name: "myFirstProject", dependencies: [ .Package(url: "https://github.com/IBM-Swift/Kitura.git", majorVersion: 1, minor: 0) ])
  • 37. @Chris__Bailey | Swift@IBM #swiftsummit Create an Application In Sources/main.swift, add the following code. import Kitura // Create a new router let router = Router() // Handle HTTP GET requests to / router.get("/") { request, response, next in response.send("Hello, World!") next() } // Add an HTTP server and connect it to the router Kitura.addHTTPServer(onPort: 8090, with: router) // Start the Kitura runloop (this call never returns) Kitura.run()
  • 38. @Chris__Bailey | Swift@IBM #swiftsummit Deploy an Application Open your browser at http://localhost:8090 Compile and run your application: $ swift build $ .build/debug/myFirstProject
  • 39. @Chris__Bailey | Swift@IBM #swiftsummit Demo
  • 40. @Chris__Bailey | Swift@IBM #swiftsummit Use Services
  • 41. @Chris__Bailey | Swift@IBM #swiftsummit Deploy to Cloud $ docker pull ibmcom/kitura-ubuntu:latest $ git clone https://github.com/IBM-Swift/ Kitura-Starter-Bluemix
  • 42. @Chris__Bailey | Swift@IBM #swiftsummit Using Cloud Tools http://cloudtools.bluemix.net • Deployment made easy • Clone, code, push • Demo projects to try
  • 43. @Chris__Bailey | Swift@IBM #swiftsummit http://www.kitura.io/en/resources/tutorials.html Tutorials • Creating a Todo-List Backend • Adding Authentication with Kitura-Credentials • Adding Sessions with Kitura-Session • Using Templating Engines with Kitura • Enabling SSL/TLS on Kitura • Using FastCGI with Kitura • Special Types of Response Handlers • Parsing Requests
  • 44. @Chris__Bailey | Swift@IBM #swiftsummit Examples Blitter Social Network https://github.com/ibm-swift/blitter BluePic Application https://github.com/ibm-swift/bluepic
  • 45. @Chris__Bailey | Swift@IBM #swiftsummit Discover Try Build IBM Cloud Tools Package Catalog Swift Sandbox Kitura + Packages DeploySwift @ IBM https://developer.ibm.com/swift/
  • 46. @Chris__Bailey | Swift@IBM #swiftsummit Swift
  • 47. @Chris__Bailey | Swift@IBM #swiftsummit Swift For safer missions to Mars @Chris__Bailey | Swift@IBM #swiftsummit