ibm_interconnect_restapi_workshop

18
Shubhra Kar | Products Marketing, Alliances & Education twitter:@shubhrakar mail:[email protected] Enterprise Node.js to Hyperscale the API Economy About me ! J2EE & Enterprise Architecture ! Performance engineering ! Solution advisory ! Node, mBaaS and APIs

Upload: shubhra-kar

Post on 15-Jul-2015

234 views

Category:

Software


0 download

TRANSCRIPT

Page 1: Ibm_interconnect_restapi_workshop

Shubhra Kar | Products Marketing, Alliances & Education twitter:@shubhrakar mail:[email protected]

Enterprise Node.js to Hyperscale the API Economy

About me

!  J2EE & Enterprise Architecture !  Performance engineering !  Solution advisory !  Node, mBaaS and APIs

Page 2: Ibm_interconnect_restapi_workshop

These guys sent me !

Bert Belder

Ben Noordhuis

Node Core

Raymond Feng

Ritchie Martori

LoopBack & Express Core

Sam Roberts

Miroslav Bajtos

Ryan Graham

What’s on the table ?

  API use cases –  Mobile/Omni-Channel Backends –  High performance ESBs –  IOT

  Why Node   Which Node.js framework to choose   Design patterns   Code and deploy an API in 10 minutes

Page 3: Ibm_interconnect_restapi_workshop

Channels are looking for Isomorphic APIs

Isomorphic API

Data and services integration has a new protocol

Mainframe

Mobile

REST/JSON

Page 4: Ibm_interconnect_restapi_workshop

Internet of Everything

The devices are taking over !!!

Why Node?

Node is FAST…er Node is perfect for APIs

Node is JavaScript & JSON

…and highly concurrent!

Page 5: Ibm_interconnect_restapi_workshop

Threads Don’t Wait !

Proof in the Pudding

0

500

1000

1500

2000

2500

3000

1000 10000

Tran

sact

ions

/ se

cond

Back-end response (ms)

StrongLoop’s Node.js Solution vs. 5 leading competitive integration solutions Fortune 25 financial services customer evaluation in October 2014 "

leading competitor closest competitor

Page 6: Ibm_interconnect_restapi_workshop

Patterns evolve to serve market needs; not opinions

Thick&

Web&SaaS&

Mobile&IoT&

Innovate or Die !

10

25

50

100 100

50

10 1 5

40

100

25

Web SaaS Mobile IoT

The new curve Concurrent Users Latency Adoption

Page 7: Ibm_interconnect_restapi_workshop

API “Decomposition” is the game changer

SaaS Mobile IoT Web

App Server API Server

HTML JSON

{JSON} {JSON}

{JSON}

<SOAP/XML>

<TABLE>

Micro-services has arrived

StrongLoop Confidential and Proprietary Information – © 2015

Page 8: Ibm_interconnect_restapi_workshop

Umm…but how ?

Big Picture?

Page 9: Ibm_interconnect_restapi_workshop

Frameworks evolve as well !

KISS MVC

MBaaS ORM / MEAN

Micro / IoT

•  Callback •  Reactor •  Observer

•  Express •  HAPI •  Restify •  Total •  Partial

•  Loopback •  Parse •  Meteor •  Feedhenry*

•  Loopback •  Sails •  Meteor •  Geddy

•  Loopback •  NodeRED •  Proprietary

Loopback: Open Source nirvana (mBaaS, ORM, Micro)

REST API

PUSH

GEO OFF SYNC

DEVICE

USER FILE

Relational Database Clustered Database Security Gateway Cloud Firewall SOA Bus ( not sure on this one)

Laptop ( not requested but useful)

Connections

Tablet Phone IoT SDK API SERVER Items for ACL

Quick Example of Use

App Server Add On

App Server

Storage

Relational Database Clustered Database Security Gateway Cloud Firewall SOA Bus ( not sure on this one)

Laptop ( not requested but useful)

Connections

Tablet Phone IoT SDK API SERVER Items for ACL

Quick Example of Use

App Server Add On

App Server

REST

API GATEWAY

Channel SDKs

API ENGINE

CONNECTORs

API

SDKs REST

Relational Database Clustered Database Security Gateway Cloud Firewall SOA Bus ( not sure on this one)

Laptop ( not requested but useful)

Connections

Tablet Phone IoT SDK API SERVER Items for ACL

Quick Example of Use

App Server Add On

App Server

API Explorer

ORM

ACLs

Page 10: Ibm_interconnect_restapi_workshop

Marquee Features

! Object Discovery and Model translation

! Migration / Replication

! Object Relationship Mapping

! Mixins - Aggregation

!  Access Control

!  User Management

!  Isomorphic JS / Remoting / Mobile Services !  Routing

Data & Services Integration

Services

Relational Database Clustered Database Security Gateway Cloud Firewall SOA Bus ( not sure on this one)

Laptop ( not requested but useful)

Connections

Tablet Phone IoT SDK API SERVER Items for ACL

Quick Example of Use

App Server Add On

App Server

Storage

Relational Database Clustered Database Security Gateway Cloud Firewall SOA Bus ( not sure on this one)

Laptop ( not requested but useful)

Connections

Tablet Phone IoT SDK API SERVER Items for ACL

Quick Example of Use

App Server Add On

App Server

REST

Messaging

Database

NoSQL

Marquee - Discovery & Migration !

Page 11: Ibm_interconnect_restapi_workshop

Developer SDKs

Isomorphic JS and Channel SDKs

JS client

JS Server

Remoting

JS client

API Explorer (Swagger) – Iterative build and test w/o frontend

Page 12: Ibm_interconnect_restapi_workshop

Right interface for the right user

  Arc UI – architect view –  Widget driven –  Visual composition,

management & operations –  Marquee featured, evolving

platform

  StrongLoop Console (slc) - developer view –  Command Line Interface –  Full featured –  Greater customization

support

Mobile Backend Services

Page 13: Ibm_interconnect_restapi_workshop

Let’s Code !

Preso: http://tinyurl.com/nodejsAPI Exercise : http://tinyurl.com/NodeAPISample Pre-Built Project: git clone https://github.com/strongloop/loopback-getting-started-intermediate.git Datasources: MySQL "name": "mysqlDs", "connector": "mysql”, "host": "demo.strongloop.com", "port": 3306, "database": "demo", "username": "demo", "password": "L00pBack” MongoDB "name": "mongoDs", "connector": "mongodb", "host": "demo.strongloop.com", "port": 27017, "database": "getting_started_intermediate", "username": "demo", "password": "L00pBack”

Page 14: Ibm_interconnect_restapi_workshop

Models CoffeeShop name Review date y rating n comments y Reviewer Relationships A coffee shop has many reviews. (review) A coffee shop has many reviewers. (reviewers) A review belongs to a coffee shop. (coffeeShop) A review belongs to a reviewer. (reviewer, fk: publisherId) A reviewer has many reviews. (reviews, fk: publisherId) ACLs Deny everyone all endpoints. Now allow everyone to read reviews. Allow authenticated users to write to the create a review Now, enable the author of a review (its "owner") to make any changes to it. Custom Hook: common/models/review.js module.exports = function(Review) { Review.beforeRemote('create', function(context, user, next) { var req = context.req; req.body.date = Date.now(); req.body.publisherId = req.accessToken.userId; next(); }); };

Cloud

IoT

Mobile

Web

SOA Database

Big Data

Hyperscale Integration Platform

Page 15: Ibm_interconnect_restapi_workshop

StrongLoop Product Roadmap

Build and Deploy

Automate Lifecycle

Performance Metrics

Real-time production monitoring

Profiler Root cause

CPU & Memory API Composer Visual modeling

StrongLoop Arc

Process Manager

Scale applications"

Q1 2015 Q2

2015

Mesh Deploy

containerized

1.0 Better support for ES6

5.0 Composable generator

2.5 Realtime messaging

StrongLoop)Confiden.al)and)Proprietary)Informa.on)–)©)2015)

What else is possible ?

Page 16: Ibm_interconnect_restapi_workshop

Hyperscale is the promise of micro services

Micro-services - Hyperscale*

StrongLoop)Confiden.al)and)Proprietary)Informa.on)–)©)2015)

Page 17: Ibm_interconnect_restapi_workshop

Synchronous API “Re-Composition” is an anti-pattern

Relational Database Clustered Database Security Gateway Cloud Firewall SOA Bus ( not sure on this one)

Laptop ( not requested but useful)

Connections

Tablet Phone IoT SDK API SERVER Items for ACL

Quick Example of Use

App Server Add On

App Server

Relational Database Clustered Database Security Gateway Cloud Firewall SOA Bus ( not sure on this one)

Laptop ( not requested but useful)

Connections

Tablet Phone IoT SDK API SERVER Items for ACL

Quick Example of Use

App Server Add On

App Server

Auth Routing Rate-Limit Proxy Mediation Orchestration Analytics

StrongLoop)Confiden.al)and)Proprietary)Informa.on)–)©)2015)

But a Node.js Gateway* can set it right !

Security & Social Logins Evolving *

Marquee – Auth, Routing, Throttling, Proxy, Mediation, Aggregation, Virtualization

StrongLoop)Confiden.al)and)Proprietary)Informa.on)–)©)2015)

Page 18: Ibm_interconnect_restapi_workshop

Now I know !!!