Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Building a Business Intelligence Application with ExtJS and Couchbase

Building a Business Intelligence Application with ExtJS and Couchbase

Darrell Pratt

July 12, 2014
Tweet

More Decks by Darrell Pratt

Other Decks in Technology

Transcript

  1. Darrell  Pra(   3  June  2014 BUILDING  AN  BUSINESS  

    INTELLIGENCE  APPLICATION   WITH  EXTJS  AND  COUCHBASE WHERE  ARE  WE  NOW  
  2. tar y. NIELSEN  ANSWERS  ON  DEMAND   6 Flexibility  

    • On-­‐Demand,  ad-­‐hoc   processing   • Custom  data  definiVons Speed  to  Insights   • Expedited  reporVng   • Roadmaps  and  guided   analysis Integra5on   • Internal  and  external  data   sources   • Channel  Consistency
  3. tar y. 8 OUR  CLIENTS • Manufacturers  -­‐  Kra=,  Procter

     &  Gamble,  Hershey’s,  Red  Bull     • Measure  Product  Success   • Understand  Consumer  Behavior   • Target  new  product  opportuniVes   • Product  Pricing   • Retailers  -­‐  Safeway,  Tesco,  Walmart   • Understand  consumer  buying  behavior   • Store  performance   • Comparison  to  compeVtors   • Product  pricing
  4. tar y. 11 POINT  OF  SALE,  PANEL  AND  LOYALTY •

    Point  of  Sale   • Weekly  data  daily   • Disaggregated,  anonymous   • TB/week   • Billions  of  records   • Panel   • Data  from  more  than  250K  households  across  25  countries   • Trip  and  Demographic  data   • Similar  to  Nielsen  families  from  TV   • Loyalty   • Basket  level  loyalty  card  data  from  retailers   • Daily  data  from  thousands  of  stores
  5. XML  and  SQL  are  the  way   of  the  future.

      -­‐  Said  no  one  ever
  6. tar y. 17 FEATURES • One  applicaVon  to  interface  n

     warehouses     • Advanced  Business  Intelligence   • Infinite  user  capabiliVes   • Reports  render  in  less  than  2  minutes       • ApplicaVon  load  Vmes  under  3  seconds
  7. tar y. 18 FEATURES • Full  drag  and  drop  of

     reporVng  objects   • Objects  know  what  they  are  and  how  to  interact  with  others   • “Where  to  Drop?”  assistance   • Full  “undo”  of  acVons   • LocalStorage  in  browser  for  cache  backup   • Responsive  design  for  different  client  profiles  
  8. tar y. APPLICATION  VIEW 27 Report'Builder'UI <<ExtJS>> Progress'Queue' Manager Applica2on'Model

    Report'Model Applica2on'Controller Naviga2on'Manager Model Layer Controller Layer View'(n) View Layer View'Controller De>.JS Data'Selec2on'Model
  9. tar y. DATA  SIZE 28 • 5  large  buckets,  10s

     of  smaller  (might  change  this)   • 4  -­‐  5  TB  of  data  across  both  Couchbase  and  Elas5c  per  datacenter   • 100s  of  thousands  of  user  data  records     • Favorites,  saved  selec5ons,  report  specifica5ons   • Millions  of  dimensional  metadata  items
  10. tar y. TECHNOLOGY  STACK 29 • UI  Built  on  Sencha

     ExtJS  4.2   • Single  page  applicaVon   • MVC  framework   • Middle  Tier  built  on  Spring  MVC  and  Spring  IOC   • JSON  REST  endpoints  through  configuraVon   • XML  to  JSON  conversion  with  GSON  where  needed   • Legacy  SOA  Tier  in  Tibco  AMX  3.2   • Couchbase  2.5  -­‐  Storage,  Caching,  and  View  based  search  (upgrading  with  our  Summer   release)   • Elas5cSearch  -­‐  0.9x  for  full  text  search     • Hudson,  Ar5factory,  Gradle,  Jasmine,  JS  Duck
  11. tar y. HARDWARE 30 • Couchbase  Cluster   • 8x

     Dell  R815,  132  GB  RAM,  1.2TB  PCIe  SSD,  16  CPUs  in  2  data  centers   • Web  Cluster   • 8x  VMWare  VM,  48  GB  RAM,  4  Cores  in  2  data  centers   • Tibco   • 4x  Dell  R815,  132  GB  RAM,  NAS  Storage,  16  CPUs  in  2  data  centers   • Oracle  RAC   • 2  *  2  data  centers   • Composite  Data  Federa5on   • 8x  VMWare  VM,  48  GB  RAM,  4  cores  in  2  data  centers   • IBM  Pure  Data  (a.k.a.  Netezza  Twin  Fins)   • Many  in  2  data  centers
  12. tar y. TECHNOLOGY  STACK 34 • Couchbase  2.5   •

    Schema-­‐less  clustered  JSON  storage   • Key/value  cache  based  on  memcached   • Full  text  search  integra5on  with  XDCR  with  Elas5c  Search   • JSON   • Na5ve  JSON  encoding  down  the  stack   • No  unnecessary  transforma5ons   • No  tables   • Incremental  Map  Reduce   • Used  for  Analy5cs  on  our  data   • Creates  views  which  are  analogous  to  tables
  13. tar y. 55 {          "locale":  "en_US",

             "requestInstance":  {                  "categoryId":  "NACNLSPI",                  "clientId":  "9997",                  "coreData":  {                          "friendlyUrl":  "https://answers.nielsen.com/portal/site/answers/menuitem.b96e53097992bc115aac7970f75072a0/",                          "guid":  "FFFB2C9F220141DD972F63C755197A42",                          "internalTitle":  "QF01",                          "nativeName":  "QF01",                          "runType":  "HIDDEN",                          "title":  "Nielsen  Quick  Facts"                  },                  "dataSet":  [                          {                                  "basePromptId":  "Fact_QF",                                  "hiddenPrompt":  false,                                  "logicalDimId":  "FCT",                                  "logicalId":  "FCT",                                  "maxSelections":  0,                                  "minSelections":  1,                                  "originalPromptId":  "Fact_QF",                                  "promptId":  "Fact_QF",                                  "promptLabel":  "Facts",                                  "promptName":  "Facts",                                  "selections":  [                                          {                                                  "active":  true,                                                  "id":  "0",                                                  "items":  [                                                          {                                                                  "addTotal":  false,                                                                  "appDesc":  "Groups  (Folders)",                                                                  "baseUuid":  "GRP|VIEW|Fact_QF|0",                                                                  "children":  [                                                                          {                                                                                  "addTotal":  false,                                                                                  "appDesc":  "Fact  Groups",                                                                                  "baseUuid":  "Groups|GROUP|Fact_QF|0",                                                                                  "children":  [                                                                                          {                                                                                                  "addTotal":  false,                                                                                                  "appDesc":  "Sales  Volume",                                                                                                  "baseUuid":  "7836|GROUP_LEVEL|Fact_QF|0",                                                                                                  "children":  [                                                                                                          {                                                                                                                  "addTotal":  false,                                                                                                                  "appDesc":  "Dollars",                                                                                                                  "baseUuid":  "7848|GROUP_LEVEL|Fact_QF|0",                                                                                                                  "children":  [                                                                                                                          {                                                                                                                                  "addTotal":  false,                                                                                                                                  "appDesc":  "$",                                                                                                                                  "baseUuid":  "7848|GROUP_LEVEL|Fact_QF|0|DOL",  
  14. tar y. MAKE  IT  RESPONSIVE 57 • Asynchronous  UI  

    • ProgressQueueManager  class  with  Promises  and  Defered’s   • Use  Deo.js  framework  for  IOC   • Controllers  extend  base  controllers   • Incorporates  access  to  PQM   • Data  fetches  can  be  truly  asynchronous   • Repor5ng  data  gets  BIG   • Breaking  up  reports  into  objects   • Asynchronously  store  chunked  data  into  Couchbase   • UI  only  request  the  chunk  of  data  that  is  needed