Nodevember, 2015-11-15

This is not a talk about code

This is about architecture

Service Oriented Architecture

  • What is it
  • Why use it
  • Issues to avoid
  • Why node is good at SOA
  • How npm uses SOA

Part 1: what is SOA?

SOAs are a distributed system

Distributed systems feature:

  1. Concurrency
  2. No global clock
  3. Independent components

What about microservices?

Part 2: advantages of SOA

A: architectural

B: organizational

#1: Efficiency

#2: scalability

#3: tunable redundancy

#4: faster debugging

#5: robustness

#6: cheaper

Organizational advantages

Conway's Law in reverse

#1: simpler systems are simpler

#2: isolation simplifies architecture

#3: smaller systems allow for smaller teams

Team communication is N to infinity

#4: small teams have stronger ownership

Strong ownership means better code

Part 3: Issues with SOA

#1: failure modes

1 x 0.01 = 1% chance of failure

Chances of 100 boxes failing all at once?

0.01^100 = 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001%

Chances of 1 of 100 boxes failing on any given day?

0.01*100 = 100%

This is a tradeoff that's usually worth it

#2: redundancy is not optional

#3: automation is essential

#4: deployments become more complex

#5: isolated services also isolate your data

#6: shared logic

#7: distributed systems are hard

First conclusion:

Monoliths are better for v1 systems

SOAs are better as v2 systems

Part 4: why node is great at SOA

#1: Node is inherently good

at writing web services

#2: small modules make for efficient microservices

#3: node and npm make shared logic easier

and now, a shameless product plug

But wait! there's more!

Call now and we'll throw in this collectible wombat plushie!

Part 5: npm as SOA

What is npm?

4 things:

  1. CLI
  2. Registry
  3. www
  4. On-Site

One thing

One big, complicated thing

The CLI

The Registry

More registry

www

npm On-Site

Service re-use

npm install policies

Future directions for npm's SOA

Ecosystems

Second conclusion: this is awesome

  1. SOA is pretty good
  2. node and npm make SOA easier
  3. npm's SOA is pretty sweet

Thank you!

laurie@npmjs.com

@seldo on Twitter

npm booth right now

Nodevember: npm and soa

By seldo

Private

Nodevember: npm and soa

More from seldo