Saturday, May 24, 2014

Reactive REST, JSONPath

Very interesting generalization of data access and caching:
  • IObservable (reactive extensions) for both synchronous and async calls,
    making possible to mix fast (cache) and slower (remote REST) calls
  • JSON object (dictionary) as universal representation, including for arrays,
    that are effectively mapping of integer index to value.
    Dictionary properties can be "split" and "re-assembled", to help partial data retrieval and updates. 
  • References inside of JSON, to avoid duplication
  • Re-assembling "objects graph" from JSON references and simple structures.
Reactive REST: @ InfoQ
Jafar Husain explains how Netflix uses reactive programming to build and consume REST endpoints, and how they work around the limitations of the HTTP protocol to create high-performance REST APIs.

qconsf.com/system/files/presentation-slides/Reactive REST.pdf

cufp.org/sites/all/files/slides/2013/husain.pdf

Medium/falkor · GitHub

json-path - Java JsonPath implementation - Google Project Hosting

JSONPath (JavaScript / npm)



http://netflix.com/user 
{ 
  videoLists: { 
    “0”: { 
      “name”: “Thrillers”, 
      “0”: [“videos”, 2654], 
      // more titles 
     length: 74, 
    }, 
    “1”: { 
      “name”: “Action Movies”, 
      “0”: [“videos”, 2654], 
      // more titles 
      length: 74 
    }, // more lists… 
    length: 25 
  }, 
  videos: { 
    2654: { 
      name: “Die hard”, 
      rating: 4.0 
    } 
  } 
}