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

Distributed Caching for Your next Node.js Project

Distributed Caching for Your next Node.js Project

0680be1c881abcf19219f09f1e8cf140?s=128

Viktor Gamov

June 15, 2017
Tweet

More Decks by Viktor Gamov

Other Decks in Programming

Transcript

  1. @gamussa @hazelcast #cloudfoundry #cfsummit17 Distributed Caching for Your next Node.js

    Project @gamussa @hazelcast #cloudfoundry #cfsummit17
  2. @gamussa @hazelcast #cloudfoundry #cfsummit17 > whoami

  3. @gamussa @hazelcast #cloudfoundry #cfsummit17 Señor Solutions Architect > whoami

  4. @gamussa @hazelcast #cloudfoundry #cfsummit17 Señor Solutions Architect Developer Advocate >

    whoami
  5. @gamussa @hazelcast #cloudfoundry #cfsummit17 Señor Solutions Architect Developer Advocate @gamussa

    in internetz > whoami
  6. @gamussa @hazelcast #cloudfoundry #cfsummit17 Señor Solutions Architect Developer Advocate @gamussa

    in internetz Please, follow me on Twitter > whoami
  7. @gamussa @hazelcast #cloudfoundry #cfsummit17 Señor Solutions Architect Developer Advocate @gamussa

    in internetz Please, follow me on Twitter I’m very interesting © > whoami
  8. @gamussa @hazelcast #cloudfoundry #cfsummit17 Why cache?

  9. @gamussa @hazelcast #cloudfoundry #cfsummit17

  10. @gamussa @hazelcast #cloudfoundry #cfsummit17

  11. @gamussa @hazelcast #cloudfoundry #cfsummit17

  12. @gamussa @hazelcast #cloudfoundry #cfsummit17 Applications are like onions Applications have

    layers
  13. @gamussa @hazelcast #cloudfoundry #cfsummit17 Business Application (instance 1) Service Service

    Service RDBMS Mainframe MongoDB
 NoSQL REST
  14. @gamussa @hazelcast #cloudfoundry #cfsummit17 Business Application (instance 2) Business Application

    (instance 1) Service Service Service RDBMS Mainframe MongoDB
 NoSQL REST
  15. @gamussa @hazelcast #cloudfoundry #cfsummit17

  16. @gamussa @hazelcast #cloudfoundry #cfsummit17 Business Application (instance 2) Business Application

    (instance 1) Service Service Service RDBMS Mainframe NoSQL REST CACHE
  17. @gamussa @hazelcast #cloudfoundry #cfsummit17 Business Application (instance 2) Business Application

    (instance 1) Service Service Service RDBMS Mainframe NoSQL REST CACHE Scale out
  18. @gamussa @hazelcast #cloudfoundry #cfsummit17 Business Application (instance 2) Business Application

    (instance 1) Service Service Service RDBMS Mainframe NoSQL REST CACHE Scale out Read thought Write through
  19. @gamussa @hazelcast #cloudfoundry #cfsummit17 CACHES CACHES EVERYWHERE!

  20. @gamussa @hazelcast #cloudfoundry #cfsummit17 Cache is good for…

  21. @gamussa @hazelcast #cloudfoundry #cfsummit17 Cache is good for… ◇Improving performance

  22. @gamussa @hazelcast #cloudfoundry #cfsummit17 Cache is good for… ◇Improving performance

    ◇Offload expensive parts of the architecture
  23. @gamussa @hazelcast #cloudfoundry #cfsummit17 Cache is good for… ◇Improving performance

    ◇Offload expensive parts of the architecture ◇Scale up your – get the most out of one machine
  24. @gamussa @hazelcast #cloudfoundry #cfsummit17

  25. @gamussa @hazelcast #cloudfoundry #cfsummit17 Cache is good for… ◇Performance ◇Offload

    expensive parts of the architecture ◇Scale up – get the most out of one machine ◇Scale out – add more capacity with more machines
  26. @gamussa @hazelcast #cloudfoundry #cfsummit17

  27. @gamussa @hazelcast #cloudfoundry #cfsummit17 Caching use cases: ◇Performance ◇Offload expensive

    parts of the architecture ◇Scale up – get the most out of one machine ◇Scale out – add more capacity with more machines ◇Usually very fast and easy to apply
  28. @gamussa @hazelcast #cloudfoundry #cfsummit17 Problem ◇Data doesn’t fit just one

    machine ONE DOES NOT SIMPLY FIT ALL DATA IN ONE MACHINE
  29. @gamussa @hazelcast #cloudfoundry #cfsummit17 ◇Amount of data is 
 too

    big to fit 

  30. @gamussa @hazelcast #cloudfoundry #cfsummit17 ◇Data is too important to have

    it only one machine
  31. @gamussa @hazelcast #cloudfoundry #cfsummit17 What’s

  32. @gamussa @hazelcast #cloudfoundry #cfsummit17

  33. @gamussa @hazelcast #cloudfoundry #cfsummit17 REPLICATION

  34. @gamussa @hazelcast #cloudfoundry #cfsummit17 REPLICATION SHARDING

  35. @gamussa @hazelcast #cloudfoundry #cfsummit17 Replication or Sharding? http://book.mixu.net/distsys/single-page.html

  36. @gamussa @hazelcast #cloudfoundry #cfsummit17 What’s Hazelcast IMDG?

  37. @gamussa @hazelcast #cloudfoundry #cfsummit17 What’s Hazelcast IMDG? ◇In-memory Data Grid

  38. @gamussa @hazelcast #cloudfoundry #cfsummit17 What’s Hazelcast IMDG? ◇In-memory Data Grid

    ◇Apache v2 Licensed
  39. @gamussa @hazelcast #cloudfoundry #cfsummit17 What’s Hazelcast IMDG? ◇In-memory Data Grid

    ◇Apache v2 Licensed ◇Distributed ■Caches (IMap, JCache) ■Collections (IList, ISet, IQueue) ■Messaging (Topic, RingBuffer) ■Computation (ExecutorService, M-R)
  40. @gamussa @hazelcast #cloudfoundry #cfsummit17 https://network.pivotal.io/products/hazelcast

  41. @gamussa @hazelcast #cloudfoundry #cfsummit17 Tile Capabilities ◇dedicated VM for service

    ◇Support for multiple availability zones ◇Bosh ensures the availability of all VMs ◇Only Tile, no separate Bosh release for ODB
  42. @gamussa @hazelcast #cloudfoundry #cfsummit17 Polyglot Platform

  43. @gamussa @hazelcast #cloudfoundry #cfsummit17 Demo time! Let’s see some code,

    yay!
  44. @gamussa @hazelcast #cloudfoundry #cfsummit17 Useful materials ◇ Features https://hazelcast.org/clients/node-js/ ◇Refcard

    http://bit.ly/hzNodeRefcard ◇NPM package https://www.npmjs.com/package/hazelcast-client
  45. @gamussa @hazelcast #cloudfoundry #cfsummit17 https:/ /github.com/hazelcast/ cfsummit17-wednesday

  46. @gamussa @hazelcast #cloudfoundry #cfsummit17 Thanks! Any questions? You can find

    me at: ◇@gamussa ◇viktor@hazelcast.com ◇http://gamov.io