IBM Cloud University: Java, Node.js and Swift

135
Chris Bailey @Chris__Bailey STSM, Runtime Technologies Java, Node.js and Swift: Which, When and Why

Transcript of IBM Cloud University: Java, Node.js and Swift

Page 1: IBM Cloud University: Java, Node.js and Swift

Chris Bailey @Chris__Bailey STSM, Runtime Technologies

Java, Node.js and Swift: Which, When and Why

Page 2: IBM Cloud University: Java, Node.js and Swift
Page 3: IBM Cloud University: Java, Node.js and Swift
Page 4: IBM Cloud University: Java, Node.js and Swift
Page 5: IBM Cloud University: Java, Node.js and Swift
Page 6: IBM Cloud University: Java, Node.js and Swift

6 1/17/17

Page 7: IBM Cloud University: Java, Node.js and Swift

7 1/17/17

GATEWAY

PUBLIC NETWORK CLOUD NETWORK

Client Devices Application Tier Database Tier

Page 8: IBM Cloud University: Java, Node.js and Swift

8 1/17/17

Page 9: IBM Cloud University: Java, Node.js and Swift

0

10

20

30

40

50

60

01/02/12

01/08/12

01/02/13

01/08/13

01/02/14

01/08/14

01/02/15

01/08/15

01/02/16

01/08/16

Java

JavaScript

9 1/17/17Redmonk Programming Languages Rankings

http://redmonk.com/sogrady/category/programming-languages/

Page 10: IBM Cloud University: Java, Node.js and Swift

0

10

20

30

40

50

60

01/02/12

01/08/12

01/02/13

01/08/13

01/02/14

01/08/14

01/02/15

01/08/15

01/02/16

01/08/16

Java

JavaScript

10 1/17/17Redmonk Programming Languages Rankings

http://redmonk.com/sogrady/category/programming-languages/

Page 11: IBM Cloud University: Java, Node.js and Swift

0

10

20

30

40

50

60

01/02/12

01/08/12

01/02/13

01/08/13

01/02/14

01/08/14

01/02/15

01/08/15

01/02/16

01/08/16

Java

JavaScript

Swi5

11 1/17/17Redmonk Programming Languages Rankings

http://redmonk.com/sogrady/category/programming-languages/

Page 12: IBM Cloud University: Java, Node.js and Swift

12

Page 13: IBM Cloud University: Java, Node.js and Swift

13

Runtime Language

Page 14: IBM Cloud University: Java, Node.js and Swift

14

Scripting LanguageRuntime Language

Page 15: IBM Cloud University: Java, Node.js and Swift

15

Scripting Language Modern Native LanguageRuntime Language

Page 16: IBM Cloud University: Java, Node.js and Swift

16

Type Safe Type Safe, with InferenceDynamically Typed

Scripting Language Modern Native LanguageRuntime Language

Page 17: IBM Cloud University: Java, Node.js and Swift

17

Type Safe Type Safe, with InferenceDynamically Typed

Scripting Language Modern Native LanguageRuntime Language

Pre-Compiled and JIT Compiled JIT Compiled Pre-Compiled

Page 18: IBM Cloud University: Java, Node.js and Swift

18

Type Safe Type Safe, with InferenceDynamically Typed

Garbage Collected

Scripting Language Modern Native LanguageRuntime Language

Garbage Collected Reference Counted

JIT Compiled Pre-CompiledPre-Compiled and JIT Compiled

Page 19: IBM Cloud University: Java, Node.js and Swift

19

Type Safe Type Safe, with InferenceDynamically Typed

Threaded Multi-CPU

Garbage Collected

Scripting Language Modern Native LanguageRuntime Language

Garbage Collected Reference Counted

Async Single CPU Async Multi-CPU

JIT Compiled Pre-CompiledPre-Compiled and JIT Compiled

Page 20: IBM Cloud University: Java, Node.js and Swift

20

Type Safety

Page 21: IBM Cloud University: Java, Node.js and Swift

Swift @ IBM

func add(_ a: Int, to b: Int) -> Void { print(a + b) }

Swift Node.js

Page 22: IBM Cloud University: Java, Node.js and Swift

Swift @ IBM

var add = function (a, b) { console.log(a + b); }

func add(_ a: Int, to b: Int) -> Void { print(a + b) }

Swift Node.js

Page 23: IBM Cloud University: Java, Node.js and Swift

Swift @ IBM

var add = function (a, b) { console.log(a + b); }

func add(_ a: Int, to b: Int) -> Void { print(a + b) }

Swift Node.js

Page 24: IBM Cloud University: Java, Node.js and Swift

Swift @ IBM

var add = function (a, b) { console.log(a + b); }

func add(_ a: Int, to b: Int) -> Void { print(a + b) }

Swift Node.js

Page 25: IBM Cloud University: Java, Node.js and Swift

Swift @ IBM

var add = function (a, b) { console.log(a + b); }

var a = 5; var b = 3;

func add(_ a: Int, to b: Int) -> Void { print(a + b) }

let a = 5 let b = 3

Swift Node.js

Page 26: IBM Cloud University: Java, Node.js and Swift

Swift @ IBM

var add = function (a, b) { console.log(a + b); }

var a = 5; var b = 3;

add(a, b);

func add(_ a: Int, to b: Int) -> Void { print(a + b) }

let a = 5 let b = 3

add(a, to: b)

Swift Node.js

Page 27: IBM Cloud University: Java, Node.js and Swift

Swift @ IBM

var add = function (a, b) { console.log(a + b); }

var a = 5; var b = 3;

add(a, b);

func add(_ a: Int, to b: Int) -> Void { print(a + b) }

let a = 5 let b = 3

add(a, to: b)

> swiftc main.swift

Swift Node.js

Page 28: IBM Cloud University: Java, Node.js and Swift

Swift @ IBM

var add = function (a, b) { console.log(a + b); }

var a = 5; var b = 3;

add(a, b);

> node app.js

func add(_ a: Int, to b: Int) -> Void { print(a + b) }

let a = 5 let b = 3

add(a, to: b)

> swiftc main.swift

> main

Swift Node.js

Page 29: IBM Cloud University: Java, Node.js and Swift

Swift @ IBM

var add = function (a, b) { console.log(a + b); }

var a = 5; var b = 3;

add(a, b);

> node app.js 8

func add(_ a: Int, to b: Int) -> Void { print(a + b) }

let a = 5 let b = 3

add(a, to: b)

> swiftc main.swift

> main 8

Swift Node.js

Page 30: IBM Cloud University: Java, Node.js and Swift

Swift @ IBM

var add = function (a, b) { console.log(a + b); }

var a = '5'; var b = 3;

add(a, b);

func add(_ a: Int, to b: Int) -> Void { print(a + b) }

let a = ”5” let b = 3

add(a, to: b)

Swift Node.js

Page 31: IBM Cloud University: Java, Node.js and Swift

Swift @ IBM

var add = function (a, b) { console.log(a + b); }

var a = '5'; var b = 3;

add(a, b);

func add(_ a: Int, to b: Int) -> Void { print(a + b) }

let a = ”5” let b = 3

add(a, to: b)

> swiftc main.swift

Swift Node.js

Page 32: IBM Cloud University: Java, Node.js and Swift

Swift @ IBM

var add = function (a, b) { console.log(a + b); }

var a = '5'; var b = 3;

add(a, b);

func add(_ a: Int, to b: Int) -> Void { print(a + b) }

let a = ”5” let b = 3

add(a, to: b)

> swiftc main.swift

> Error line 6: Cannot convert value of type ‘String’ into argument of type ‘Int’

Swift Node.js

Page 33: IBM Cloud University: Java, Node.js and Swift

Swift @ IBM

var add = function (a, b) { console.log(a + b); }

var a = '5'; var b = 3;

add(a, b);

> node app.js

> 53

func add(_ a: Int, to b: Int) -> Void { print(a + b) }

let a = ”5” let b = 3

add(a, to: b)

> swiftc main.swift > Error line 6: Cannot convert value of type ‘String’ into argument of type ‘Int’

Swift Node.js

Page 34: IBM Cloud University: Java, Node.js and Swift

34

Performance

Page 35: IBM Cloud University: Java, Node.js and Swift

Runtime cost of dynamic typing

func add(_ a: Int, to b: Int) -> Int { return(a + b) }

Page 36: IBM Cloud University: Java, Node.js and Swift

Runtime cost of dynamic typing

func add(_ a: Int, to b: Int) -> Int { return(a + b) }

Page 37: IBM Cloud University: Java, Node.js and Swift

Runtime cost of dynamic typing

func add(_ a: Int, to b: Int) -> Int { return(a + b) }

addi

Page 38: IBM Cloud University: Java, Node.js and Swift

Runtime cost of dynamic typing

var add = function (a, b) { return(a + b); }

Page 39: IBM Cloud University: Java, Node.js and Swift

Check type of A

var add = function (a, b) { return(a + b); }

Page 40: IBM Cloud University: Java, Node.js and Swift

Runtime cost of dynamic typing

Check type of A

String

var add = function (a, b) { return(a + b); }

Page 41: IBM Cloud University: Java, Node.js and Swift

Check type of A

StringCheck type of B

var add = function (a, b) { return(a + b); }

Page 42: IBM Cloud University: Java, Node.js and Swift

Check type of A

StringConcatenate Check type of B

String

var add = function (a, b) { return(a + b); }

Page 43: IBM Cloud University: Java, Node.js and Swift

Check type of A

String

Number

Concatenate Check type of B

String

Convert Number to String

var add = function (a, b) { return(a + b); }

Page 44: IBM Cloud University: Java, Node.js and Swift

Check type of A

String

Number

Concatenate Check type of B

String

Convert Number to String

Concatenate

var add = function (a, b) { return(a + b); }

Page 45: IBM Cloud University: Java, Node.js and Swift

Check type of A

StringConcatenate Check type of B

String Number

Number

Convert Number to String

Concatenate

var add = function (a, b) { return(a + b); }

Page 46: IBM Cloud University: Java, Node.js and Swift

Check type of A

StringConcatenate Check type of B

Check type of B

String Number

Number

Convert Number to String

Concatenate

var add = function (a, b) { return(a + b); }

Page 47: IBM Cloud University: Java, Node.js and Swift

Check type of A

StringConcatenate Check type of B

Check type of B

StringString Number

Number

Convert Number to String

Concatenate

Convert Number to String

var add = function (a, b) { return(a + b); }

Page 48: IBM Cloud University: Java, Node.js and Swift

Check type of A

StringConcatenate Check type of B

Check type of B

StringString Number

Number

Convert Number to String

Concatenate

Convert Number to String

Concatenate

var add = function (a, b) { return(a + b); }

Page 49: IBM Cloud University: Java, Node.js and Swift

Convert Number to String

Check type of A

StringConcatenate Check type of B

Check type of B

StringString Number

Number

Convert Number to String

Concatenate

ConcatenateNumber

var add = function (a, b) { return(a + b); }

Page 50: IBM Cloud University: Java, Node.js and Swift

Check type of A

StringConcatenate

FloatingPoint or Normal

Check type of B

Check type of B

StringString Number

Number

Convert Number to String

Concatenate

ConcatenateNumber

Convert Number to String

var add = function (a, b) { return(a + b); }

Page 51: IBM Cloud University: Java, Node.js and Swift

Check type of A

StringConcatenate

FloatingPoint or Normal

Float Calculation

Check type of B

Check type of B

StringString

Float

Number

Number

Convert Number to String

Concatenate

ConcatenateNumber

Convert Number to String

var add = function (a, b) { return(a + b); }

Page 52: IBM Cloud University: Java, Node.js and Swift

Check type of A

StringConcatenate

FloatingPoint or Normal

Normal Add InstructionFloat Calculation

Check type of B

Check type of B

StringString

Float

Number

Number

Convert Number to String

Concatenate

ConcatenateNumber

Convert Number to String

var add = function (a, b) { return(a + b); }

Page 53: IBM Cloud University: Java, Node.js and Swift

0

2

4

6

8

10

12

14

16

18

Dur

atio

n (s

) (lo

wer

is b

ette

r)

http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=spectralnorm

Typed vs Untyped Performance

Page 54: IBM Cloud University: Java, Node.js and Swift

4

0

2

4

6

8

10

12

14

16

18

http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=spectralnorm

Typed vs Untyped Performance

Dur

atio

n (s

) (lo

wer

is b

ette

r)

Page 55: IBM Cloud University: Java, Node.js and Swift

4 4.3

0

2

4

6

8

10

12

14

16

18

http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=spectralnorm

Typed vs Untyped Performance

Dur

atio

n (s

) (lo

wer

is b

ette

r)

Page 56: IBM Cloud University: Java, Node.js and Swift

4 4.3

15.8

0

2

4

6

8

10

12

14

16

18

http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=spectralnorm

Typed vs Untyped Performance

Dur

atio

n (s

) (lo

wer

is b

ette

r)

Page 57: IBM Cloud University: Java, Node.js and Swift

0

20

40

60

80

100

120

JSONSerialization SingleQuery DataUpdates

TechEmpowerPerformance(%ageofbest- higherisbetter)

Node.js

Java

Increasing levels of I/O

Page 58: IBM Cloud University: Java, Node.js and Swift

58

DeveloperProductivity

Page 59: IBM Cloud University: Java, Node.js and Swift

0

100

200

300

400

500

600

700

800

900

1000Vo

lum

e of

Cod

e (lo

wer

is b

ette

r)

http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=spectralnorm

Typed vs Untyped Developer Productivity

Page 60: IBM Cloud University: Java, Node.js and Swift

601

0

100

200

300

400

500

600

700

800

900

1000

http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=spectralnorm

Typed vs Untyped Developer Productivity

Volu

me

of C

ode

(low

er is

bet

ter)

Volu

me

of C

ode

(low

er is

bet

ter)

Page 61: IBM Cloud University: Java, Node.js and Swift

601

950

0

100

200

300

400

500

600

700

800

900

1000

http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=spectralnorm

Typed vs Untyped Developer Productivity

Volu

me

of C

ode

(low

er is

bet

ter)

Volu

me

of C

ode

(low

er is

bet

ter)

Page 62: IBM Cloud University: Java, Node.js and Swift

601

950

413

0

100

200

300

400

500

600

700

800

900

1000

http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=spectralnorm

Typed vs Untyped Developer Productivity

Volu

me

of C

ode

(low

er is

bet

ter)

Volu

me

of C

ode

(low

er is

bet

ter)

Page 63: IBM Cloud University: Java, Node.js and Swift
Page 64: IBM Cloud University: Java, Node.js and Swift

64

Memory Management

Page 65: IBM Cloud University: Java, Node.js and Swift

Mem

ory

Heap Size

Page 66: IBM Cloud University: Java, Node.js and Swift

Mem

ory

Live in-use data(Retained Set)

Heap Size

Page 67: IBM Cloud University: Java, Node.js and Swift

Mem

ory

Live in-use data(Retained Set)

Heap Size

Temporary Data(Garbage)

Temporary Data(Garbage)

Page 68: IBM Cloud University: Java, Node.js and Swift

Mem

ory

Live in-use data(Retained Set)

Heap Size

Temporary Data(Garbage)

Page 69: IBM Cloud University: Java, Node.js and Swift

Mem

ory

Live in-use data(Retained Set)

Heap Size

Temporary Data(Garbage)

Temporary Data(Garbage)

Page 70: IBM Cloud University: Java, Node.js and Swift

Mem

ory

Live in-use data(Retained Set)

Heap Size

Temporary Data(Garbage)

Temporary Data(Garbage)

40 to 60%

Page 71: IBM Cloud University: Java, Node.js and Swift

Mem

ory

Live in-use data(Retained Set)

Heap Size

Temporary Data(Garbage)

Temporary Data(Garbage)

40 to 60%

~2X additional memory for additional performance

Page 72: IBM Cloud University: Java, Node.js and Swift

0

5

10

15

20

25

30

35

ARC vs Garage Collection

Mem

ory

Usa

ge (M

B)

(low

er is

bet

ter)

http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=spectralnorm

Page 73: IBM Cloud University: Java, Node.js and Swift

15

0

5

10

15

20

25

30

35

ARC vs Garage Collection

http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=spectralnorm

Mem

ory

Usa

ge (M

B)

(low

er is

bet

ter)

Page 74: IBM Cloud University: Java, Node.js and Swift

15

32.2

0

5

10

15

20

25

30

35

ARC vs Garage Collection

http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=spectralnorm

Mem

ory

Usa

ge (M

B)

(low

er is

bet

ter)

Page 75: IBM Cloud University: Java, Node.js and Swift

15

32.2

25.3

0

5

10

15

20

25

30

35

ARC vs Garage Collection

http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=spectralnorm

Mem

ory

Usa

ge (M

B)

(low

er is

bet

ter)

Page 76: IBM Cloud University: Java, Node.js and Swift

Cloud CostsProvider Type Memory CPUs Cost/month

Amazon EC2 Linux t2.nano 512MB 1 vCPU US$4.68

Digital Ocean Standard 512MB 1 Core Processor US$5.00

Pivotal Cloud Foundry

App Instance 512MB 4 vCPUs US$10.80

Heroku Standard 1x 512MB 1 Share US$25.00

IBM Bluemix Instant Runtimes

512MB 4 vCPUs US$24.15

Containers 512MB 4 vCPUs US$10.22

Page 77: IBM Cloud University: Java, Node.js and Swift

Cloud CostsProvider Type Memory CPUs Cost/month

Amazon EC2 Linux t2.nano 512MB 1 vCPU US$4.68Linux t2.micro 1GB 1 vCPU US$9.36

Digital Ocean Standard 512MB 1 Core Processor US$5.00Standard 1GB 1 Core Processor US$10.00

Pivotal Cloud Foundry

App Instance 512MB 4 vCPUs US$10.80App Instance 1GB 4 vCPUs US$21.60

Heroku Standard 1x 512MB 1 Share US$25.00Standard 2x 1GB 2 Shares US$50.00

IBM Bluemix Instant Runtimes

512MB 4 vCPUs US$24.15Instant

Runtimes1GB 4 vCPUs US$49.35

Containers 512MB 4 vCPUs US$10.22Containers 1GB 4 vCPUs US$20.59

Page 78: IBM Cloud University: Java, Node.js and Swift

Cloud CostsProvider Type Memory CPUs Cost/month

Amazon EC2 Linux t2.nano 512MB 1 vCPU US$4.68Linux t2.micro 1GB 1 vCPU US$9.36Linux t2.small 2GB 1 vCPU US$18.72

Digital Ocean Standard 512MB 1 Core Processor US$5.00Standard 1GB 1 Core Processor US$10.00Standard 2GB 2 Core

ProcessorsUS$20.00

Pivotal Cloud Foundry

App Instance 512MB 4 vCPUs US$10.80App Instance 1GB 4 vCPUs US$21.60App Instance 2GB 4 vCPUs US$43.20

Heroku Standard 1x 512MB 1 Share US$25.00Standard 2x 1GB 2 Shares US$50.00

IBM Bluemix Instant Runtimes

512MB 4 vCPUs US$24.15Instant

Runtimes1GB 4 vCPUs US$49.35

Containers 512MB 4 vCPUs US$10.22Containers 1GB 4 vCPUs US$20.59

Page 79: IBM Cloud University: Java, Node.js and Swift

Cloud CostsProvider Type Memory CPUs Cost/month

Amazon EC2 Linux t2.nano 512MB 1 vCPU US$4.68Linux t2.micro 1GB 1 vCPU US$9.36Linux t2.small 2GB 1 vCPU US$18.72

Linux t2.medium 4GB 2 vCPUs US$37.44Digital Ocean Standard 512MB 1 Core Processor US$5.00

Standard 1GB 1 Core Processor US$10.00Standard 2GB 2 Core

ProcessorsUS$20.00

Pivotal Cloud Foundry

App Instance 512MB 4 vCPUs US$10.80App Instance 1GB 4 vCPUs US$21.60App Instance 2GB 4 vCPUs US$43.20

Heroku Standard 1x 512MB 1 Share US$25.00Standard 2x 1GB 2 Shares US$50.00

IBM Bluemix Instant Runtimes

512MB 4 vCPUs US$24.15Instant

Runtimes1GB 4 vCPUs US$49.35

Containers 512MB 4 vCPUs US$10.22Containers 1GB 4 vCPUs US$20.59

Page 80: IBM Cloud University: Java, Node.js and Swift

80

Full Stack Development

Page 81: IBM Cloud University: Java, Node.js and Swift

81 1/17/17

Page 82: IBM Cloud University: Java, Node.js and Swift

82

Unless it is absolutely necessary to run Java in web browsers, disable it as described below, even after updating to 7u11. This will help mitigate other Java vulnerabilities that may be discovered in the future.

This and previous Java vulnerabilities have been widely targeted by attackers, and new Java vulnerabilities are likely to be discovered. To defend against this and future Java vulnerabilities, consider disabling Java in web browsers…

Page 83: IBM Cloud University: Java, Node.js and Swift

83

Unless it is absolutely necessary to run Java in web browsers, disable it as described below, even after updating to 7u11. This will help mitigate other Java vulnerabilities that may be discovered in the future.

This and previous Java vulnerabilities have been widely targeted by attackers, and new Java vulnerabilities are likely to be discovered. To defend against this and future Java vulnerabilities, consider disabling Java in web browsers…

Page 84: IBM Cloud University: Java, Node.js and Swift

84

•Reuse of code components •Write One Run Anywhere

•Sharing of data models •Less maintenance

•Server-side rendering •Pre-Initialise UI on the server •Improves first paint time •Enables search indexing

Page 85: IBM Cloud University: Java, Node.js and Swift

85

+

Page 86: IBM Cloud University: Java, Node.js and Swift

86

+

Page 87: IBM Cloud University: Java, Node.js and Swift

87

+

Page 88: IBM Cloud University: Java, Node.js and Swift

88 1/17/17

Page 89: IBM Cloud University: Java, Node.js and Swift

89

Page 90: IBM Cloud University: Java, Node.js and Swift

90

Page 91: IBM Cloud University: Java, Node.js and Swift

91

+

Page 92: IBM Cloud University: Java, Node.js and Swift

92

+

Page 93: IBM Cloud University: Java, Node.js and Swift

93

Which, Where, When?

Page 94: IBM Cloud University: Java, Node.js and Swift

94

Node.js SwiftJava

Page 95: IBM Cloud University: Java, Node.js and Swift

95

High Processing Performance

Transaction Processing Frameworks

Node.js SwiftJava

Type Safety for Calculations

Page 96: IBM Cloud University: Java, Node.js and Swift

96

High Processing Performance

Transaction Processing Frameworks

Node.js SwiftJava

Type Safety for Calculations

Business Logic Performance Critical

Batch Processing

Page 97: IBM Cloud University: Java, Node.js and Swift

97

High Processing Performance High IO Performance

Transaction Processing Frameworks

Node.js SwiftJava

Fullstack Web Development

Type Safety for Calculations Async Programming for Scale

Business Logic Performance Critical

Batch Processing

Page 98: IBM Cloud University: Java, Node.js and Swift

98

High Processing Performance High IO Performance

Transaction Processing Frameworks

Node.js SwiftJava

Fullstack Web Development

Type Safety for Calculations Async Programming for Scale

Business Logic Performance Critical

Batch Processing

Delivery Tier REST APIs

Enterprise Modernisation

Page 99: IBM Cloud University: Java, Node.js and Swift

99

High Processing Performance High IO Performance

Transaction Processing Frameworks

Node.js SwiftJava

Fullstack Web Development

Type Safety for Calculations Async Programming for Scale ?Business Logic

Performance Critical Batch Processing

Delivery Tier REST APIs

Enterprise Modernisation

Page 100: IBM Cloud University: Java, Node.js and Swift

100

Emerging Architectures

Page 101: IBM Cloud University: Java, Node.js and Swift

101 1/17/17

GATEWAY

PUBLIC NETWORK CLOUD NETWORK

Client Devices Application Tier Database Tier

Page 102: IBM Cloud University: Java, Node.js and Swift

102 1/17/17

GATEWAY

PUBLIC NETWORK CLOUD NETWORK

Client Devices Service Tier Database Tier

Page 103: IBM Cloud University: Java, Node.js and Swift

103 1/17/17

GATEWAY

PUBLIC NETWORK CLOUD NETWORK

Client Devices Service Tier Database TierDelivery Tier

Page 104: IBM Cloud University: Java, Node.js and Swift

104 1/17/17

GATEWAY

PUBLIC NETWORK CLOUD NETWORK

Client Devices Service Tier Hosted ServicesDelivery Tier

Page 105: IBM Cloud University: Java, Node.js and Swift

105 1/17/17

GATEWAY

PUBLIC NETWORK CLOUD NETWORK

Client Devices Hosted ServicesDelivery Tier

ROUTING PROXY

Micro-Services

Page 106: IBM Cloud University: Java, Node.js and Swift

106 1/17/17

GATEWAY

PUBLIC NETWORK CLOUD NETWORK

Client Devices Hosted ServicesDelivery Tier

ROUTING PROXY

Micro-Services

Page 107: IBM Cloud University: Java, Node.js and Swift

107 1/17/17

GATEWAY

PUBLIC NETWORK CLOUD NETWORK

Client Devices Hosted ServicesDelivery Tier

ROUTING PROXY

Micro-Services

Page 108: IBM Cloud University: Java, Node.js and Swift

108 1/17/17

GATEWAY

PUBLIC NETWORK CLOUD NETWORK

Client Devices Hosted ServicesDelivery Tier

ROUTING PROXY

Micro-Services

Page 109: IBM Cloud University: Java, Node.js and Swift

109 1/17/17

GATEWAY

PUBLIC NETWORK CLOUD NETWORK

Client Devices Hosted ServicesDelivery Tier

ROUTING PROXY

Micro-Services

API Team

Page 110: IBM Cloud University: Java, Node.js and Swift

110 1/17/17

GATEWAY

PUBLIC NETWORK CLOUD NETWORK

Client Devices Hosted ServicesDelivery Tier

ROUTING PROXY

Micro-Services

API Team

Web Team

Android Team

iOS Team

Page 111: IBM Cloud University: Java, Node.js and Swift

111

Server Side Rendering

First Paint Time

Search Engine Optimisation

Page 112: IBM Cloud University: Java, Node.js and Swift

112

Server Side Rendering

First Paint Time

Search Engine Optimisation

Network Payload Size

CPU Usage

Request Frequency

Battery UsageMemory Usage

Page 113: IBM Cloud University: Java, Node.js and Swift

113

Page 114: IBM Cloud University: Java, Node.js and Swift

114 1/17/17

GATEWAY

PUBLIC NETWORK CLOUD NETWORK

Client Devices Hosted ServicesDelivery Tier

ROUTING PROXY

Micro-Services

API Team

Web Team

Android Team

iOS Team

Page 115: IBM Cloud University: Java, Node.js and Swift

115 1/17/17

GATEWAY

PUBLIC NETWORK CLOUD NETWORK

Client Devices Hosted ServicesDelivery Tier

ROUTING PROXY

Micro-Services

Page 116: IBM Cloud University: Java, Node.js and Swift

116 1/17/17

GATEWAY

PUBLIC NETWORK CLOUD NETWORK

Client Devices Hosted ServicesDelivery Tier

ROUTING PROXY

Micro-Services

Page 117: IBM Cloud University: Java, Node.js and Swift

117 1/17/17

GATEWAY

PUBLIC NETWORK CLOUD NETWORK

Client Devices Hosted ServicesDelivery Tier

ROUTING PROXY

Micro-Services

Page 118: IBM Cloud University: Java, Node.js and Swift

118 1/17/17

GATEWAYClient Devices Hosted Services

ROUTING PROXY

Micro-ServicesBackend For Frontend(BFF)

PUBLIC NETWORK CLOUD NETWORK

Page 119: IBM Cloud University: Java, Node.js and Swift

119 1/17/17

GATEWAYClient Devices Hosted Services

ROUTING PROXY

Micro-ServicesBackend For Frontend(BFF)

UI Engineering

Page 120: IBM Cloud University: Java, Node.js and Swift

120

How?

Page 121: IBM Cloud University: Java, Node.js and Swift

$ idt create

Create:

Page 122: IBM Cloud University: Java, Node.js and Swift

$ idt create? Select a pattern: 1. Web App2. Mobile App3. Backend for Frontend4. MicroserviceEnter a number> 3

? Select a starter:1. Basic BackendEnter a number> 1

? Select a language:1. Java - MicroProfile / Java EE2. Node3. Java - Spring Framework4. SwiftEnter a number> 2

? Enter a name for your project> MyNodeProject

? Enter a hostname for your project> NodeProject22 ? Do you want to add services to your project? [y/n]> n The project, mynodeproject, has been successfully saved into the current directory.OK

Create:

Page 123: IBM Cloud University: Java, Node.js and Swift

$ idt deploy -t container

Deploy:

MICROSERVICEBUILDER JENKINS

BLUEMIX DEVOPS

Page 124: IBM Cloud University: Java, Node.js and Swift

$ idt deploy -t containerThe container deployment image name for the deployment of this project will be:(The image will be tagged by Docker with this base name and appended with a version)registry.ng.bluemix.net/namespace/myswiftproject

? Press [Return] to accept this, or enter a new value now>

The IBM cluster name for the deployment of this project will be:mycluster

? Press [Return] to accept this, or enter a new value now> Log in to the IBM Container RegistryOKConfigure for a Bluemix deployment with cluster ‘mycluster'

Deploying to CloudOK

Deploy:

MICROSERVICEBUILDER JENKINS

BLUEMIX DEVOPS

Page 125: IBM Cloud University: Java, Node.js and Swift

$ idt deploy -t containerThe container deployment image name for the deployment of this project will be:(The image will be tagged by Docker with this base name and appended with a version)registry.ng.bluemix.net/namespace/myswiftproject

? Press [Return] to accept this, or enter a new value now>

The IBM cluster name for the deployment of this project will be:mycluster

? Press [Return] to accept this, or enter a new value now> Log in to the IBM Container RegistryOKConfigure for a Bluemix deployment with cluster ‘mycluster'

Deploying to CloudOK

Deploy:

Page 126: IBM Cloud University: Java, Node.js and Swift

Monitor:

metrics-dash

Page 127: IBM Cloud University: Java, Node.js and Swift

127

IBM Foundation Support for Runtimes

generator-nodeserverappmetrics monitoring

generator-swiftserverswiftmetrics monitoringjavametrics monitoring

Support: Language Runtimes

IBM Support for Runtimes

Page 128: IBM Cloud University: Java, Node.js and Swift

128

LoopBack

IBM Foundation Support for Runtimes

generator-nodeserverappmetrics monitoring

generator-swiftserverswiftmetrics monitoringjavametrics monitoring

IBM Support for Runtimes

IBM Advanced Support for Runtime Frameworks

Support: Web Frameworks

Page 129: IBM Cloud University: Java, Node.js and Swift

129

LoopBack

IBM Foundation Support for Runtimes

IBM Advanced Support for Runtime Frameworks

generator-nodeserverappmetrics monitoring

generator-swiftserverswiftmetrics monitoringjavametrics monitoring

IBM Support for Runtimes

Support: Module Ecosystem

Page 130: IBM Cloud University: Java, Node.js and Swift

130

Questions?

Page 131: IBM Cloud University: Java, Node.js and Swift

IBM Cloud University 2017 | October

Please Note

IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion.

Information regarding potential future products is intended to outline our general product direction and it should not be relied on in making a purchasing decision.

The information mentioned regarding potential future products is not a commitment, promise, or legal obligation to deliver any material, code or functionality. Information about potential future products may not be incorporated into any contract.

The development, release, and timing of any future features or functionality described for our products remains at our sole discretion.

Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will

experience will vary depending upon many factors, including considerations such as the amount of multiprogramming inthe user’s job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve results similar to those stated here.

Page 132: IBM Cloud University: Java, Node.js and Swift
Page 133: IBM Cloud University: Java, Node.js and Swift

IBM Cloud University 2017 | October

Notices and disclaimersCopyright © 2017 by International Business Machines Corporation (IBM). No part of this document may be reproduced or transmitted in any form without written permission from IBM.

U.S. Government Users Restricted Rights — use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM.

Information in these presentations (including information relating to products that have not yet been announced by IBM) has been reviewed for accuracy as of the date of initial publication and could include unintentional technical or typographical errors. IBM shall have no responsibility to update this information. This document is distributed “as is” without any warranty, either express or implied. In no event shall IBM be liable for any damage arising from the use of this information, including but not limited to, loss of data, business interruption, loss of profit or loss of opportunity. IBM products and services are warranted according to the terms and conditions of the agreements under which they are provided.

IBM products are manufactured from new parts or new and used parts. In some cases, a product may not be new and may have been previously installed. Regardless, our warranty terms apply.”

Any statements regarding IBM's future direction, intent or product plans are subject to change or withdrawal without notice. Performance data contained herein was generally obtained in a controlled, isolated environments. Customer examples are presented as illustrations of how those customers have used IBM products and

the results they may have achieved. Actual performance, cost, savings or other results in other operating environments may vary.

References in this document to IBM products, programs, or services does not imply that IBM intends to make such products, programs or services available in all countries in which IBM operates or does business.

Workshops, sessions and associated materials may have been prepared by independent session speakers, and do not necessarily reflect the views of IBM. All materials and discussions are provided for informational purposes only, and are neither intended to, nor shall constitute legal or other guidance or advice to any individual participant or their specific situation.

It is the customer’s responsibility to insure its own compliance with legal requirements and to obtain advice of competent legal counsel as to the identification and interpretation of any relevant laws and regulatory requirements that may affect the customer’s business and any actions the customer may need to take to comply with such laws. IBM does not provide legal advice or represent or warrant that its services or products will ensure that the customer is in compliance with any law.

Page 134: IBM Cloud University: Java, Node.js and Swift

IBM Cloud University 2017 | October

Notices and disclaimers continued

Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products in connection with this publication and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products. IBM does not warrant the quality of any third-party products, or the ability of any such third-party products to interoperate with IBM’s products. IBM expressly disclaims all warranties, expressed or implied, including but not limited to, the implied warranties of merchantability and fitness for a particular, purpose.

The provision of the information contained herein is not intended to, and does not, grant any right or license under any IBM patents, copyrights, trademarks or other intellectual property right.

IBM, the IBM logo, ibm.com, Aspera®, Bluemix, Blueworks Live, CICS, Clearcase, Cognos®, DOORS®, Emptoris®, Enterprise Document Management System™, FASP®, FileNet®, Global Business Services®,Global Technology Services®, IBM ExperienceOne™, IBM SmartCloud®, IBM Social Business®, Information on Demand, ILOG, Maximo®, MQIntegrator®, MQSeries®, Netcool®, OMEGAMON, OpenPower, PureAnalytics™, PureApplication®, pureCluster™, PureCoverage®, PureData®, PureExperience®, PureFlex®, pureQuery®, pureScale®, PureSystems®, QRadar®, Rational®, Rhapsody®, Smarter Commerce®, SoDA, SPSS, Sterling Commerce®, StoredIQ, Tealeaf®, Tivoli® Trusteer®, Unica®, urban{code}®, Watson, WebSphere®, Worklight®, X-Force® and System z® Z/OS, are trademarks of International Business Machines Corporation, registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at: www.ibm.com/legal/copytrade.shtml.

Page 135: IBM Cloud University: Java, Node.js and Swift