going server-side with swift open source...going server-side with swift open source philippe hausler...

73
© 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. Developer Tools #WWDC16 Session 415 Going Server-side with Swift Open Source Philippe Hausler Frameworks Engineer John Ponzo IBM MobileFirst CTO Patrick Bohrer Swift Technical Lead, IBM

Upload: others

Post on 28-May-2020

33 views

Category:

Documents


0 download

TRANSCRIPT

© 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.

Developer Tools #WWDC16

Session 415Going Server-side with Swift Open Source

Philippe Hausler Frameworks EngineerJohn Ponzo IBM MobileFirst CTOPatrick Bohrer Swift Technical Lead, IBM

Agenda

Why Server-side SwiftArchitectureWhat’s IncludedExamplesContribution

BenefitsServer-side Swift

BenefitsServer-side Swift

Same code runs in both places

BenefitsServer-side Swift

Same code runs in both placesReduce development time by sharing code

BenefitsServer-side Swift

Same code runs in both placesReduce development time by sharing codeLeverage great APIs on the serve

Architecture

System Libraries

Darwin Linux

System Libraries/Frameworks

Architecture

System Libraries

Standard Library

Darwin Linux

System Libraries/Frameworks

Standard Library

Architecture

System Libraries

Standard Library

Core Libraries

Darwin Linux

System Libraries/Frameworks

Standard Library

Overlay

Architecture

System Libraries/Frameworks

Standard Library

OverlayApplication

System Libraries

Standard Library

Core LibrariesApplication

Darwin Linux

Included projectsWhat’s In

Included projectsWhat’s In

Linux and Mac Platform support

Included projectsWhat’s In

Linux and Mac Platform supportStandard Library

Included projectsWhat’s In

Linux and Mac Platform supportStandard LibraryFoundation, Dispatch, and XCTest

Included projectsWhat’s In

Linux and Mac Platform supportStandard LibraryFoundation, Dispatch, and XCTestCompiler Command Line Tools

Developer opportunitiesYour Code Goes Here

Developer opportunitiesYour Code Goes Here

New platforms

Developer opportunitiesYour Code Goes Here

New platformsUser interface

Developer opportunitiesYour Code Goes Here

New platformsUser interfaceDeployment

Developer opportunitiesYour Code Goes Here

New platformsUser interfaceDeploymentYour applications

Real-world Server-side Swift

John PonzoIBM MobileFirst CTO

Swift @ IBM

Bringing Swift to the serverSwift @ IBM

Bringing Swift to the serverSwift @ IBM

Community enablement• Swift Sandbox• Swift Package Catalog

Bringing Swift to the serverSwift @ IBM

Community enablement• Swift Sandbox• Swift Package Catalog

Consistent developer experience• Kitura Web Framework• Core swift.org contributions

Bringing Swift to the serverSwift @ IBM

Community enablement• Swift Sandbox• Swift Package Catalog

Consistent developer experience• Kitura Web Framework• Core swift.org contributions

Cloud enablement• IBM Cloud Deployment• IBM Cloud Tools for Swift

IBM Swift SandboxCommunity Enablement

http://swiftlang.ng.bluemix.net

IBM Swift SandboxCommunity Enablement

http://swiftlang.ng.bluemix.net

IBM Swift SandboxCommunity Enablement

http://swiftlang.ng.bluemix.net

Code runs since December 4, 2015

1.5M+

IBM Swift SandboxCommunity Enablement

http://swiftlang.ng.bluemix.net

IBM Swift SandboxCommunity Enablement

http://swiftlang.ng.bluemix.netCross-platform Interest

Other56%

iOS/ Mac44%

IBM Swift SandboxCommunity Enablement

IBM Swift SandboxCommunity Enablement

Worldwide Interest

IBM Swift Package CatalogCommunity Enablement

http://swiftpkgs.ng.bluemix.net

IBM Swift Package CatalogCommunity Enablement

http://swiftpkgs.ng.bluemix.net

IBM Swift Package CatalogCommunity Enablement

1,500+IBM Swift Package Manager Packages

http://swiftpkgs.ng.bluemix.net

Kitura web frameworkConsistent Developer Experience

System Libraries/Frameworks

Standard Library

OverlayApplication

System Libraries

Standard Library

Core LibrariesApplication

Darwin Linux

Open sourced in February 2016

Kitura web frameworkConsistent Developer Experience

System Libraries/Frameworks

Standard Library

OverlayApplication

System Libraries

Standard Library

Core LibrariesApplication

Darwin Linux

Open sourced in February 2016Modular package-based web framework

Kitura web frameworkConsistent Developer Experience

System Libraries/Frameworks

Standard Library

OverlayApplication

System Libraries

Standard Library

Core LibrariesApplication

Darwin Linux

Open sourced in February 2016Modular package-based web frameworkLeverages libdispatch and Foundation

Kitura web frameworkConsistent Developer Experience

System Libraries/Frameworks

Standard Library

OverlayApplication

System Libraries

Standard Library

Core LibrariesApplication

Darwin Linux

Open sourced in February 2016Modular package-based web frameworkLeverages libdispatch and FoundationDriving IBM’s contributions into swift.org

Kitura web frameworkConsistent Developer Experience

System Libraries/Frameworks

Standard Library

OverlayApplication

System Libraries

Standard Library

Core LibrariesApplication

Darwin Linux

Open sourced in February 2016Modular package-based web frameworkLeverages libdispatch and FoundationDriving IBM’s contributions into swift.orgUsed at IBM for Swift server-side applications

Kitura web frameworkConsistent Developer Experience

System Libraries/Frameworks

Standard Library

OverlayApplication

System Libraries

Standard Library

Core LibrariesApplication

Darwin Linux

Open sourced in February 2016Modular package-based web frameworkLeverages libdispatch and FoundationDriving IBM’s contributions into swift.orgUsed at IBM for Swift server-side applicationsAvailable at github.com/ibm-swift/kitura

Kitura web frameworkConsistent Developer Experience

System Libraries/Frameworks

Standard Library

OverlayApplication

System Libraries

Standard Library

Core LibrariesApplication

Darwin Linux

IBM Cloud DeploymentCloud Enablement

+

IBM Cloud DeploymentCloud Enablement

+

IBM Cloud Tools for SwiftCloud Enablement

http://cloudtools.bluemix.net

Let’s Jump In!

Patrick BohrerSwift Technical Lead, IBM

Request

Response

Client

Safari

Routing Service Logic

Linux / Docker

Web Server

DemoSimple, Swift Web Server running on Linux

BluePicEnd-to-end Swift

BluePicEnd-to-end Swift

Sample photo sharing app

BluePicEnd-to-end Swift

Sample photo sharing appRich client interface written in Swift

BluePicEnd-to-end Swift

Sample photo sharing appRich client interface written in SwiftSwift Server built with Kitura, IBM Cloud, Watson,

BluePicEnd-to-end Swift

Sample photo sharing appRich client interface written in SwiftSwift Server built with Kitura, IBM Cloud, Watson,and OpenWhisk

BluePicEnd-to-end Swift

Sample photo sharing appRich client interface written in SwiftSwift Server built with Kitura, IBM Cloud, Watson,and OpenWhiskAvailable at github.com/IBM-Swift/BluePic

BluePic design patternEnd-to-end Swift

BluePic design patternEnd-to-end Swift

Response

iOS App

ModelControllersViews

User Interaction

Request

BluePic design patternEnd-to-end Swift

Response

iOS App

ModelControllersViews

User Interaction

Request

Application Server

Client and ServiceIntegration

Routing Service Logic

BluePic design patternEnd-to-end Swift

Other Services

Object Storage

Watson Image Recognition

Cloudant

Core Cloud Services

Response

iOS App

ModelControllersViews

User Interaction

Request

Application Server

Client and ServiceIntegration

Routing Service Logic

BluePic design patternEnd-to-end Swift

Application Server Other Services

Client and ServiceIntegration

Core Cloud Services

UsersPhotos

Image Insights = TagsPush Notifications Mountain, Sunset,

River

Meta Data

Application tiersEnd-to-end Swift

Clients

Application Server Other Services

Mountain, Sunset, River

Meta Data

Cloud

BluePic development setupEnd-to-end Swift

macOS

Develop and Debug Application Server Other Services

Mountain, Sunset, River

Meta Data

Cloud

Other Services

Cloud

Develop and Debug

macOS

Develop and Debug

Mountain, Sunset, River

Meta Data

BluePic development setupEnd-to-end Swift

Other Services

Cloud

Develop and Debug

macOS

Develop and Debug

Mountain, Sunset, River

Meta Data

IBM Cloud Tools for Swift (Mac App)

BluePic development setupEnd-to-end Swift

+

Develop and Debug Develop and Debug Other Services

Mountain, Sunset, River

Meta Data

CloudmacOS

End-to-end Swift DevelopmentIBM Cloud Tools for Swift

DemoEnd-to-end Swift Application

IBM Swift tools and techGet Started Today

http://developer.ibm.com/swift

IBM reviewReal-world Server-side Swift

Open source contributionsHelping to grow the communityBuilding tools for a consistent world

Chipping inContribution

ImplementationsAPI Design, guidelines and language FeaturesYour Packages

More Information

https://developer.apple.com/wwdc16/415

Related Sessions

Swift API Design Guidelines Presidio Tuesday 10:00AM

What's New in Foundation for Swift Mission Tuesday 4:00PM

Understanding Swift Performance Mission Friday 11:00AM

Concurrent Programming with GCD in Swift 3 Pacific Heights Friday 4:00PM

Labs

Swift Open Hours Developer Tools Lab A Friday 9:00AM

Cocoa Lab Frameworks Lab A Friday 1:00PM

GCD Lab Frameworks Lab D Friday 5:00PM