Union Station

Service Orchestration Layer

Why the name?

  • Denver Union Station was built in 1868
  • Facilitated 80 trains a day by 6 different railroads
  • Recently evolved to serve FasTrack light rails and bus network

Publishing FE Portals

  • Client-side apps
  • Communicate w/ multiple BE services
    • Provsioning
    • Analytics
    • Curveball
    • Credstore
    • Atlas

Round One!

Set of /api/ routes embedded in node FE server

 

  • works ok for single application
  • redundancy as multiple applications share services
  • inconsistency as applications evolve
    • some may enforce validation, others may not

Round Two!

shared npm module for service interaction

 

  • Multiple applications reusing the same library 
  • As more applications consume library, becomes harder to enforce current versions.
  • Urgent bug fixes are harder to propogate/deploy across multiple applications
  • Each application requires redundant configuration

3rd times a charm

dedicated service orchestration layer

Node.js in the Industry

- Middle Tier Service

- Frontend backend

  • tailor-fit apis for your app
  • smaller area of focus gets better results
  • fast results - time from ideation to realization is low

Daniel Shaw

Service Orchestration

  • Communicate with various apis/services
  • Normalize data/api for UI
  • Separation of Responsibilities

API Communication

with Node.js

  • I/O fits well w/ javascript's asynchronous nature
  • Lightweight, low overhead

Pros

  • Local Mac development can be painful
    • yck, yca, ysecure, ostauth
    • dev proxy solutions

Cons

Normalization for Apps

  • Simplifies FE App Development
    • less dependencies
    • easier to follow for new team members
    • single client module for client/server
    • move quicker

Single API

  • Leaner applications
  • Less error prone
  • Consistent error handling
  • Move quicker

Consistent Data

Separation of Responsibilities

  • UI can focus on UI
  • Service Orchestration gets the attention it deserves
  • Each become easier to test
  • Each can scale independently

Platform

  • Node.js
  • Hapi.js by Walmart Labs
    • stable & reliable
    • eases api development
    • eases api testing
    • free api documentation
    • consistent i/o validation
    • plugin architecture
    • consistent error handling
      • status codes

Existing Infastructure

  • Manhattan
  • Replicatr

Current State & Future Plans

  • Partially Integrated into recommends.yahoo.com
    • Full integration, UI will only communicate w/ union-station
  • Plugin-based architecture allows for new FE consumers
  • Currently we tunnel calls to union-station from FE server
    • Look at using Media V2 ATS to mount union-station on FE domain directly, i.e. /api/... and remove the need to manually proxy

References

Union-Station

Brad Harris - bharris@yahoo-inc.com

Union Station

By Brad Harris