FrenchKit 2017: Server(less) Swift
-
Upload
chris-bailey -
Category
Software
-
view
342 -
download
0
Transcript of FrenchKit 2017: Server(less) Swift
![Page 1: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/1.jpg)
Server(less) Swiftwith Kitura and OpenWhisk
Chris Bailey@Chris__Bailey
FrenchKit 2017September 22nd
![Page 2: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/2.jpg)
2
(less) SwiftServer
![Page 3: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/3.jpg)
3
SwiftServer
![Page 4: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/4.jpg)
4
FullStack
0
17.5
35
52.5
70
Full
Stac
k
Back
end
Fron
tend
11.9
24.4
63.7
![Page 5: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/5.jpg)
5
FullStack
0
17.5
35
52.5
70
Full
Stac
k
Back
end
Fron
tend
11.9
24.4
63.7
0
40
80
120
160
141.5
16.24.34
Fast
![Page 6: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/6.jpg)
6
FullStack
0
17.5
35
52.5
70
Full
Stac
k
Back
end
Fron
tend
11.9
24.4
63.7
0
40
80
120
160
141.5
16.24.34
Fast
0
15
30
45
60
50.2
31.329.9
11.7
Efficient
![Page 7: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/7.jpg)
7
iOS APP
Hosted ServicesGATEWAY
PUBLIC NETWORK CLOUD NETWORK
SWAGGERDATA
PUSH ANALYTICS
DEVOPS AVAILABILITY MONITORINGSCALING
SOCIAL
COGNATIVE
AUTH
WEB APP
![Page 8: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/8.jpg)
8
![Page 9: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/9.jpg)
import Kitura import SwiftyJSON
9
![Page 10: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/10.jpg)
import Kitura import SwiftyJSON
router.all("/*", middleware: BodyParser()) router.post(path, handler: handleCreate)
10
![Page 11: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/11.jpg)
import Kitura import SwiftyJSON
router.all("/*", middleware: BodyParser()) router.post(path, handler: handleCreate)
func handleCreate(request: RouterRequest, response: RouterResponse, next: @escaping () -> Void) {
}
11
![Page 12: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/12.jpg)
import Kitura import SwiftyJSON
router.all("/*", middleware: BodyParser()) router.post(path, handler: handleCreate)
func handleCreate(request: RouterRequest, response: RouterResponse, next: @escaping () -> Void) { guard case .json(let json)? = request.body else { response.status(.badRequest) response.send(json: JSON([ "error": "Request not JSON" ])) return next() }
}
12
![Page 13: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/13.jpg)
import Kitura import SwiftyJSON
router.all("/*", middleware: BodyParser()) router.post(path, handler: handleCreate)
func handleCreate(request: RouterRequest, response: RouterResponse, next: @escaping () -> Void) { guard case .json(let json)? = request.body else { response.status(.badRequest) response.send(json: JSON([ "error": "Request not JSON" ])) return next() } let name = json["name"].string let rating = json[“rating"].number // etc // etc
}
13
![Page 14: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/14.jpg)
import Kitura import SwiftyJSON
router.all("/*", middleware: BodyParser()) router.post(path, handler: handleCreate)
func handleCreate(request: RouterRequest, response: RouterResponse, next: @escaping () -> Void) { guard case .json(let json)? = request.body else { response.status(.badRequest) response.send(json: JSON([ "error": "Request not JSON" ])) return next() } let name = json["name"].string let rating = json[“rating"].number // etc // etc next() }
14
![Page 15: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/15.jpg)
15
Decreasing concern (and control) over stack implementation
Incr
easi
ng fo
cus
on b
usin
ess
logi
c
IaaS
![Page 16: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/16.jpg)
16
Decreasing concern (and control) over stack implementation
Incr
easi
ng fo
cus
on b
usin
ess
logi
c
IaaS
![Page 17: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/17.jpg)
17
Decreasing concern (and control) over stack implementation
Incr
easi
ng fo
cus
on b
usin
ess
logi
c
IaaS
CaaS
![Page 18: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/18.jpg)
18
Decreasing concern (and control) over stack implementation
Incr
easi
ng fo
cus
on b
usin
ess
logi
c
IaaS
CaaS
PaaS
![Page 19: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/19.jpg)
19
Decreasing concern (and control) over stack implementation
Incr
easi
ng fo
cus
on b
usin
ess
logi
c
IaaS
CaaS
PaaS
?
![Page 20: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/20.jpg)
20
Decreasing concern (and control) over stack implementation
Incr
easi
ng fo
cus
on b
usin
ess
logi
c
IaaS
CaaS
PaaS
? Serverless
Serverless
![Page 21: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/21.jpg)
21
Functions-as-a-Service
![Page 22: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/22.jpg)
22
PaaS FaaS
OpenWhisk
![Page 23: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/23.jpg)
23
PaaSWrite application centric business logic.
FaaSWrite event-driven business logic.
OpenWhisk
![Page 24: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/24.jpg)
24
PaaSWrite application centric business logic.
Treat compute resources as utilities.
FaaSWrite event-driven business logic.Treat compute resources as utilities.
OpenWhisk
![Page 25: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/25.jpg)
25
PaaSWrite application centric business logic.
Treat compute resources as utilities.
Provides scaling, resilience and availability
FaaSWrite event-driven business logic.Treat compute resources as utilities.
Provides scaling, resilience andavailability
OpenWhisk
![Page 26: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/26.jpg)
26
“If your PaaS can efficiently start instances in 20ms that run for half a second, then call it serverless.”
- Adrian Cockcroft
![Page 27: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/27.jpg)
27
![Page 28: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/28.jpg)
28
![Page 29: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/29.jpg)
29
func main(args: [String:Any]) -> [String:Any] { // Action code // goes here return [ “result" : "value" ] }
![Page 30: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/30.jpg)
30
func main(args: [String:Any]) -> [String:Any] { // Action code // goes here return [ “result" : "value" ] }
Entry Point
![Page 31: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/31.jpg)
31
func main(args: [String:Any]) -> [String:Any] { // Action code // goes here return [ “result" : "value" ] }
Entry Point Event Parameters
![Page 32: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/32.jpg)
32
func main(args: [String:Any]) -> [String:Any] { // Action code // goes here return [ “result" : "value" ] }
Entry Point Event Parameters
Result
![Page 33: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/33.jpg)
33
func main(args: [String:Any]) -> [String:Any] {
}
![Page 34: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/34.jpg)
34
func main(args: [String:Any]) -> [String:Any] { if let name = args["name"] as? String {
} }
![Page 35: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/35.jpg)
35
func main(args: [String:Any]) -> [String:Any] { if let name = args["name"] as? String { return [ "greeting" : "Hello \(name)!" ]
} }
![Page 36: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/36.jpg)
36
func main(args: [String:Any]) -> [String:Any] { if let name = args["name"] as? String { return [ "greeting" : "Hello \(name)!" ] } else { return [ "greeting" : "Hello stranger!" ] } }
![Page 37: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/37.jpg)
37
$ git clone https://github.com/openwhisk/openwhisk.git
Get OpenWhisk
![Page 38: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/38.jpg)
38
$ git clone https://github.com/openwhisk/openwhisk.git
$ cd openwhisk/tools/vagrant
$ vagrant up
Get OpenWhisk
![Page 39: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/39.jpg)
39
$ git clone https://github.com/openwhisk/openwhisk.git
$ cd openwhisk/tools/vagrant
$ vagrant up
Get OpenWhisk
Start OpenWhisk (in a Linux VM)
![Page 40: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/40.jpg)
40
![Page 41: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/41.jpg)
$ wsk action create hello main.swift
41
![Page 42: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/42.jpg)
$ wsk action create hello main.swift
42
Create Action
![Page 43: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/43.jpg)
$ wsk action create hello main.swift
43
Create Action Called
![Page 44: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/44.jpg)
$ wsk action create hello main.swift
44
Create Action Called From
![Page 45: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/45.jpg)
$ wsk action create hello main.swift ok: created action hello
45
Create Action Called From
![Page 46: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/46.jpg)
$ wsk action create hello main.swift ok: created action hello
$ wsk action list
46
Create Action Called From
![Page 47: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/47.jpg)
$ wsk action create hello main.swift ok: created action hello
$ wsk action list
actions hello private
47
Create Action Called From
![Page 48: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/48.jpg)
$ wsk action create hello main.swift ok: created action hello
$ wsk action list
actions hello private
48
Create Action
Our Action
Called From
![Page 49: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/49.jpg)
$ wsk action invoke --result hello --param name World
49
![Page 50: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/50.jpg)
$ wsk action invoke --result hello --param name World
50
Invoke Action
![Page 51: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/51.jpg)
$ wsk action invoke --result hello --param name World
51
Invoke Action Called
![Page 52: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/52.jpg)
$ wsk action invoke --result hello --param name World
52
Invoke Action Called
With Parameters
![Page 53: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/53.jpg)
$ wsk action invoke --result hello --param name World
{
“greeting" : “Hello World!”
}
53
Invoke Action Called
With Parameters
![Page 54: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/54.jpg)
54
TTriggers• Database update • IoT sensor activation • GitHub hook • Slack notification • REST request
T
![Page 55: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/55.jpg)
55
T ATriggers• Database update • IoT sensor activation • GitHub hook • Slack notification • REST request
Actions• Your code • Single task • Any language • Docker binary • Returns JSON
AT
![Page 56: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/56.jpg)
56
T A RTriggers• Database update • IoT sensor activation • GitHub hook • Slack notification • REST request
Actions• Your code • Single task • Any language • Docker binary • Returns JSON
Rules• Link Triggers to
Actions • Create sequences • Many to many maps
become possible
ATR :=
![Page 57: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/57.jpg)
57
T A RTriggers• Database update • IoT sensor activation • GitHub hook • Slack notification • REST request
Actions• Your code • Single task • Any language • Docker binary • Returns JSON
Rules• Link Triggers to
Actions • Create sequences • Many to many maps
become possible
ATR A A1 A2 A3:= + +:=
![Page 58: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/58.jpg)
58
T A R PTriggers• Database update • IoT sensor activation • GitHub hook • Slack notification • REST request
Actions• Your code • Single task • Any language • Docker binary • Returns JSON
Rules• Link Triggers to
Actions • Create sequences • Many to many maps
become possible
Packages• Collection of triggers and actions
ATR A A1 A2 A3
AB A2 A1 A4TR
:=
:=
+
+
+
+
:=
:=
![Page 59: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/59.jpg)
$ wsk api create /hello get hello —response-type json
59
![Page 60: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/60.jpg)
$ wsk api create /hello get hello —response-type json
60
Create API
![Page 61: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/61.jpg)
$ wsk api create /hello get hello —response-type json
61
Create API
REST Route Method
![Page 62: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/62.jpg)
$ wsk api create /hello get hello —response-type json
62
Create API
REST Route Method From
Action
![Page 63: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/63.jpg)
$ wsk api create /hello get hello —response-type json
ok: created API /hello GET for action /_/hello https://${APIHOST}:9001/api/21ef035/hello
63
Create API
REST Route Method From
Action
![Page 64: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/64.jpg)
$ wsk api create /hello get hello —response-type json
ok: created API /hello GET for action /_/hello https://${APIHOST}:9001/api/21ef035/hello
$ curl https://${APIHOST}:9001/api/21ef035/hello?name=World
64
Create API
REST Route Method From
Action
![Page 65: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/65.jpg)
65
![Page 66: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/66.jpg)
66
• Mobile client SDK for iOS and watchOS.
• Fire remote triggers and invoke remote actions.
• Swift 3, iOS9+ and watchOS 3.
• Install by using CocoaPods, Carthage, Swift Package Manager, or from the source directory.
https://github.com/apache/incubator-openwhisk-client-swift
![Page 67: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/67.jpg)
var params = [String: String]() params["payload"] = "Hello"
67
![Page 68: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/68.jpg)
var params = [String: String]() params["payload"] = "Hello"
do { try whisk.invokeAction(name: "hello", parameters: params, hasResult: true, callback: {(reply, error) -> Void in
}) } catch { print("Error \(error)") }
68
![Page 69: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/69.jpg)
var params = [String: String]() params["payload"] = "Hello"
do { try whisk.invokeAction(name: "hello", parameters: params, hasResult: true, callback: {(reply, error) -> Void in if let error = error { print("Error invoking action \(error.localizedDescription)") } else { var result = reply["result"] print("Got result \(result)") } }) } catch { print("Error \(error)") }
69
![Page 70: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/70.jpg)
70
Weather Gods
![Page 71: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/71.jpg)
Weather Gods
• Premium app from Meyume Ltd.
• Offers a rich interactive experience unlike other weather apps.
• Sources high quality weather data from multiple providers including The Weather Company.
• Provides weather notifications: • type (rain, snow etc.) • schedule (evening, morning, or live) • options (e.g. only notify about heavy
rain).
71
![Page 72: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/72.jpg)
72
3-minute alarm
Group scanner
Weather collector
Wind scanner
Rain scanner
Fog scanner
Alarm trigger
Alarm trigger
Alarm trigger
Send push
Send push
Send push
Push notification
service
![Page 73: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/73.jpg)
73
BluePic
![Page 74: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/74.jpg)
74
BluePic
• Sample app from IBM • iOS and Web front ends
• Provides photo sharing
• Adds image recognition and weather data to the photo
• Provides notifications to users • Social sharing • Updates to data
https://github.com/IBM/BluePic
![Page 75: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/75.jpg)
75
PUBLIC NETWORK CLOUD NETWORK
iOS APP
WEB APP
![Page 76: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/76.jpg)
76
PUBLIC NETWORK CLOUD NETWORK
iOS APP
WEB APP
![Page 77: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/77.jpg)
77
PUBLIC NETWORK CLOUD NETWORK
iOS APP
WEB APP
![Page 78: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/78.jpg)
78
PUBLIC NETWORK CLOUD NETWORK
iOS APP
WEB APP
![Page 79: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/79.jpg)
79
PUBLIC NETWORK CLOUD NETWORK
iOS APP
WEB APP
![Page 80: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/80.jpg)
80
PUBLIC NETWORK CLOUD NETWORK
iOS APP
WEB APP
![Page 81: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/81.jpg)
81
PUBLIC NETWORK CLOUD NETWORK
iOS APP
WEB APP
![Page 82: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/82.jpg)
82
PUBLIC NETWORK CLOUD NETWORK
iOS APP
WEB APP
![Page 83: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/83.jpg)
83
Decreasing concern (and control) over stack implementation
Incr
easi
ng fo
cus
on b
usin
ess
logi
c
![Page 84: FrenchKit 2017: Server(less) Swift](https://reader035.fdocuments.in/reader035/viewer/2022062906/5a64cf397f8b9ac21c8b6439/html5/thumbnails/84.jpg)
84
Decreasing concern (and control) over stack implementation
Incr
easi
ng fo
cus
on b
usin
ess
logi
c
Server
Serverless