Shubhra Kar | Products & Education
twitter:@shubhrakar mail:skar@strongloop.com
Frameworks or a Design Pattern ?
About me
StrongLoop Confidential and Proprietary Information – © 2015
u J2EE and SOA architect – Infosys
u Performance architect – Wily à CA
u Node, mBaaS and API stacks - StrongLoop
These guys sent me !
Bert
Belder
Ben
Noordhuis
Node Core
Raymond
Feng
Ritchie
Martori
LoopBack / Express Core
Sam
Roberts
Miroslav
Bajtos
Ryan
Graham
Plus 15 other full-time open source
developers working on Node.js core,
modules and tools.
Contributing to over 100 open source
modules.
Supporting banks, retail, IoT companies,
startups and internet companies on Node.js
Patterns evolve to serve
market needs; not opinions
Thick	
  
Web	
  
SaaS	
  
Mobile	
   IoT	
  
The new curve: Innovate or Die
10
25
50
100100
50
10
15
40
100
25
Web SaaS Mobile IoT
The new curve
Concurrent Users Latency Adoption
StrongLoop Confidential and Proprietary Information – © 2015
Pattern 0: Natal patterns
StrongLoop Confidential and Proprietary Information – © 2015
Philosophy: KISS (Keep It Simple Stupid)
u small core
u small modules
u small surface area
Patterns
u reactor
u callback
u module
u observer
Pattern 1: Convention
Web Middleware REST API
Pros and Cons
StrongLoop Confidential and Proprietary Information – © 2015
u Pseudo-Opinionated, Express and Restify are DIY
u Middleware
u Strengths
u Express: Web templating, ecosystem
u  Restify: REST API
u Low learning curve
u Restify: Dtrace and SPDY Support
u Weakness
u Manual CRUD
u Manual recursive Testing/Refactoring
Router
in
Express
StrongLoop	
  Confiden.al	
  and	
  Proprietary	
  Informa.on	
  –	
  ©	
  2015	
  
Pattern 2: Configuration
u  Opinionated
u Configuration over
Convention
u Granular HTTP/Webserver
control
u Good plug-in ecosystem
u Supported and well
documented
u Weakness
u Manual CRUD/Refactor/
Testing
u No plug & play with
Express ecosystem
StrongLoop Confidential and Proprietary Information – © 2015
Web Middleware
Router
in
hapi
StrongLoop	
  Confiden.al	
  and	
  Proprietary	
  Informa.on	
  –	
  ©	
  2015	
  
Pattern 3 : Full Stack JS
StrongLoop Confidential and Proprietary Information – © 2015
{“..”} JSON is the new first class citizen
Pattern 4: ORM & Isomorphic JS
u Model Driven Development
u Any data source
u Isomorphic JS
u Omni-Channel
u Share Models (Client/Server)
u Loopback & Meteor
u Automatic REST API
generation, routing, etc
u Weakness
u Higher learning curve
StrongLoop Confidential and Proprietary Information – © 2015
ORM & Isomorphic JS – Loopback.io
JS
client
JS
Server
Remoting
JS
client
StrongLoop Confidential and Proprietary Information – © 2015
Developer SDKs
Router &
Swagger
in Loopback
StrongLoop	
  Confiden.al	
  and	
  Proprietary	
  Informa.on	
  –	
  ©	
  2015	
  
API Economy driven by Mobile / IoT
Mobile	
  and	
  IoT	
  explosion	
  
u Sheer	
  number	
  of	
  
clients	
  has	
  
increased	
  
u Clients	
  are	
  
increasingly	
  
sophis.cated	
  
u Node.js	
  is	
  the	
  
plaHorm	
  of	
  choice	
  
for	
  these	
  API	
  
StrongLoop	
  Confiden.al	
  and	
  Proprietary	
  Informa.on	
  –	
  ©	
  2015	
  
StrongLoop Confidential and Proprietary Information – © 2015
mobile/web
clients
social &
analytics
JSON API
API
XML
SQL
SOAP
Etc.
mBaaS
Mobile API tier
Enterprise	
  
Pattern 5: mBaaS
mBaaS could be on cloud or premises
StrongLoop Confidential and Proprietary Information – © 2015
u Closed Source / Commercial
u Open Source
Key API
u Push Notification
u Geo Location
u Offline Sync
u Storage
u User Management
u Metering, Analytics
u Native SDK
u Isomorphic JS
REST
API
PUSH
GEO
OFF
SYNC
DEVICE
USER FILE
Relational Database Clustered Database Security Gateway Cloud
Laptop ( not requested but useful)
Connections
Tablet Phone IoT SDK API SERVER
Quick Example of Use
App S
Add
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
C
O
N
N
E
C
T
O
R
s
A
P
I
S
D
K
s
Open Source ORM, mBaaS and API framework
REST API
atabase Security Gateway Cloud Firewall SOA Bus ( not sure on this one)
Phone IoT SDK API SERVER Items for ACL
Quick Example of Use
App Server
Add On
App Server
API
Explorer
GeoLocation in Loopback
Is micro services a pattern too ?
StrongLoop	
  Confiden.al	
  and	
  Proprietary	
  Informa.on	
  –	
  ©	
  2015	
  
Not just infrastructure virtualization !
API “Re-Composition” is good…
Relational Database Clustered Database Security Gateway Cloud
Laptop ( not requested but useful)
Connections
Tablet Phone IoT SDK API SERVER
Quick Example of Use
App Server
Relational Database Clustered Database Security Gateway
Laptop ( not requested but useful)
Connections
Tablet Phone IoT SDK
Quick E
App Server
Auth
Routing
Rate-Limit
Proxy
Mediation
Orchestration
Analytics
StrongLoop Confidential and Proprietary Information – © 2015
Why not an API Gateway pattern ? Pattern 6
Security & Social Logins
Marquee – Auth, Routing, Throttling, Proxy, Mediation, Aggregation, Virtualization
StrongLoop Confidential and Proprietary Information – © 2015
The need is “DE-COMPOSITION”
SaaS Mobile IoTWeb
App Server API Server
HTML JSON
{JSON}
{JSON}
{JSON}<SOAP/XML>
<TABLE>
StrongLoop Confidential and Proprietary Information – © 2015
Pattern 7: Micro-services (Design Time)
StrongLoop Confidential and Proprietary Information – © 2015
StrongLoop Confidential and Proprietary Information – © 2015
Pattern 8: Micro-services (Run Time)
Now I know !!!
A Shameless Plug…
StrongLoop Confidential and Proprietary Information – © 2015
First there was Node
Thank you!
JUST WIN,
BABY!

Design patterns talk_node_summit

  • 1.
    Shubhra Kar |Products & Education twitter:@shubhrakar mail:skar@strongloop.com Frameworks or a Design Pattern ?
  • 2.
    About me StrongLoop Confidentialand Proprietary Information – © 2015 u J2EE and SOA architect – Infosys u Performance architect – Wily à CA u Node, mBaaS and API stacks - StrongLoop
  • 3.
    These guys sentme ! Bert Belder Ben Noordhuis Node Core Raymond Feng Ritchie Martori LoopBack / Express Core Sam Roberts Miroslav Bajtos Ryan Graham Plus 15 other full-time open source developers working on Node.js core, modules and tools. Contributing to over 100 open source modules. Supporting banks, retail, IoT companies, startups and internet companies on Node.js
  • 5.
    Patterns evolve toserve market needs; not opinions Thick   Web   SaaS   Mobile   IoT  
  • 6.
    The new curve:Innovate or Die 10 25 50 100100 50 10 15 40 100 25 Web SaaS Mobile IoT The new curve Concurrent Users Latency Adoption StrongLoop Confidential and Proprietary Information – © 2015
  • 7.
    Pattern 0: Natalpatterns StrongLoop Confidential and Proprietary Information – © 2015 Philosophy: KISS (Keep It Simple Stupid) u small core u small modules u small surface area Patterns u reactor u callback u module u observer
  • 8.
    Pattern 1: Convention WebMiddleware REST API
  • 9.
    Pros and Cons StrongLoopConfidential and Proprietary Information – © 2015 u Pseudo-Opinionated, Express and Restify are DIY u Middleware u Strengths u Express: Web templating, ecosystem u  Restify: REST API u Low learning curve u Restify: Dtrace and SPDY Support u Weakness u Manual CRUD u Manual recursive Testing/Refactoring
  • 10.
    Router in Express StrongLoop  Confiden.al  and  Proprietary  Informa.on  –  ©  2015  
  • 11.
    Pattern 2: Configuration u Opinionated u Configuration over Convention u Granular HTTP/Webserver control u Good plug-in ecosystem u Supported and well documented u Weakness u Manual CRUD/Refactor/ Testing u No plug & play with Express ecosystem StrongLoop Confidential and Proprietary Information – © 2015 Web Middleware
  • 12.
    Router in hapi StrongLoop  Confiden.al  and  Proprietary  Informa.on  –  ©  2015  
  • 13.
    Pattern 3 :Full Stack JS StrongLoop Confidential and Proprietary Information – © 2015 {“..”} JSON is the new first class citizen
  • 14.
    Pattern 4: ORM& Isomorphic JS u Model Driven Development u Any data source u Isomorphic JS u Omni-Channel u Share Models (Client/Server) u Loopback & Meteor u Automatic REST API generation, routing, etc u Weakness u Higher learning curve StrongLoop Confidential and Proprietary Information – © 2015
  • 15.
    ORM & IsomorphicJS – Loopback.io JS client JS Server Remoting JS client StrongLoop Confidential and Proprietary Information – © 2015 Developer SDKs
  • 16.
    Router & Swagger in Loopback StrongLoop  Confiden.al  and  Proprietary  Informa.on  –  ©  2015  
  • 17.
    API Economy drivenby Mobile / IoT Mobile  and  IoT  explosion   u Sheer  number  of   clients  has   increased   u Clients  are   increasingly   sophis.cated   u Node.js  is  the   plaHorm  of  choice   for  these  API   StrongLoop  Confiden.al  and  Proprietary  Informa.on  –  ©  2015  
  • 18.
    StrongLoop Confidential andProprietary Information – © 2015 mobile/web clients social & analytics JSON API API XML SQL SOAP Etc. mBaaS Mobile API tier Enterprise   Pattern 5: mBaaS
  • 19.
    mBaaS could beon cloud or premises StrongLoop Confidential and Proprietary Information – © 2015 u Closed Source / Commercial u Open Source Key API u Push Notification u Geo Location u Offline Sync u Storage u User Management u Metering, Analytics u Native SDK u Isomorphic JS
  • 20.
    REST API PUSH GEO OFF SYNC DEVICE USER FILE Relational DatabaseClustered Database Security Gateway Cloud Laptop ( not requested but useful) Connections Tablet Phone IoT SDK API SERVER Quick Example of Use App S Add 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 C O N N E C T O R s A P I S D K s Open Source ORM, mBaaS and API framework REST API atabase Security Gateway Cloud Firewall SOA Bus ( not sure on this one) Phone IoT SDK API SERVER Items for ACL Quick Example of Use App Server Add On App Server API Explorer
  • 21.
  • 22.
    Is micro servicesa pattern too ? StrongLoop  Confiden.al  and  Proprietary  Informa.on  –  ©  2015   Not just infrastructure virtualization !
  • 23.
    API “Re-Composition” isgood… Relational Database Clustered Database Security Gateway Cloud Laptop ( not requested but useful) Connections Tablet Phone IoT SDK API SERVER Quick Example of Use App Server Relational Database Clustered Database Security Gateway Laptop ( not requested but useful) Connections Tablet Phone IoT SDK Quick E App Server Auth Routing Rate-Limit Proxy Mediation Orchestration Analytics StrongLoop Confidential and Proprietary Information – © 2015
  • 24.
    Why not anAPI Gateway pattern ? Pattern 6 Security & Social Logins Marquee – Auth, Routing, Throttling, Proxy, Mediation, Aggregation, Virtualization StrongLoop Confidential and Proprietary Information – © 2015
  • 25.
    The need is“DE-COMPOSITION” SaaS Mobile IoTWeb App Server API Server HTML JSON {JSON} {JSON} {JSON}<SOAP/XML> <TABLE> StrongLoop Confidential and Proprietary Information – © 2015
  • 26.
    Pattern 7: Micro-services(Design Time) StrongLoop Confidential and Proprietary Information – © 2015
  • 27.
    StrongLoop Confidential andProprietary Information – © 2015 Pattern 8: Micro-services (Run Time)
  • 28.
  • 29.
    A Shameless Plug… StrongLoopConfidential and Proprietary Information – © 2015
  • 31.
    First there wasNode Thank you! JUST WIN, BABY!