Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Building Reactive Applications With Node.Js And Red Hat JBoss Data Grid (Galder Zamarreño & Divya Mehra)

1,139 views

Published on

Node.js is a very popular framework for developing asynchronous, event-driven, reactive applications. Red Hat JBoss Data Grid, an in-memory distributed database designed for fast access to large volumes of data and scalability, has recently gained compatibility with Node.js letting reactive applications use it as a persistence layer. Thanks to near caching, JBoss Data Grid offers excellent response times for data queried regularly, and its continuous remote event support means data can get pushed from the data grid to the Node.js application instead of having to wait for the data grid to serve it. In this session, we'll show how to build Node.js applications that use JBoss Data Grid as a persistence layer.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Building Reactive Applications With Node.Js And Red Hat JBoss Data Grid (Galder Zamarreño & Divya Mehra)

  1. 1. Building reactive applications with Node.js and Red Hat JBoss Data Grid Galder Zamarreño Arrizabalaga Divya Mehra
  2. 2. Galder Zamarreño Arrizabalaga • Senior Software Engineer @ Red Hat • Infinispan / JBoss Data Grid co-founder • JSR-107 expert group member • Keen interest in functional programming
  3. 3. Divya Mehra • Principal Product Manager @ Red Hat • Responsible for Red Hat JBoss Data Grid roadmap
  4. 4. Agenda • Introduction to Red Hat JBoss Data Grid • Building a reactive application with Node.js and Red Hat JBoss Data Grid
  5. 5. Introduction to Red Hat JBoss Data Grid
  6. 6. Red Hat JBoss Data Grid
  7. 7. Why in-memory data management? • Large volume, velocity, and variability of raw data • Enterprises that can extract meaningful, actionable information faster have competitive advantage • Increase revenues • Reduce risks
  8. 8. E-commerce website Challenge: Maintain page load times, while computing relevant purchase recommendations from data from different sources: • Mobile device → location • Social graph →what friends are buying or recommending • 3rd party sellers or partner sites -> current promotions • User’s purchase or click-through history -> behavioral targeting Relevant recommendation can increase conversion by 25% However, each 1-second increase in page load time → up 10% drop in overall revenue Can your data platform scale out to large volumes of often-changing data without affecting application performance?
  9. 9. SaaS Application Provider Challenge: Users of SaaS application should be unaffected by spikes in demand, node failure, and system upgrades of the data platform. Loss of availability and performance will affect SaaS app provider’s SLA to its customers • Revenue loss • Reputation impact Does your data platform support high availability, elasticity, and rolling upgrades, necessary for a cloud-native architecture?
  10. 10. Telecom service provider Challenge: Real-time billing and usage information for thousands of concurrent users • A customer sends a text, uses data, or makes a call • Transaction is recorded in the data platform, and the customer’s total usage and bill is updated immediately triggered by creation of this new entry. Can your business logic react to changes in the data in real-time and at scale?
  11. 11. JBoss Data Grid - 4-IN-1 package
  12. 12. Leader in Forrester Wave™: In-Memory Data Grids, Q3 2015 Ahead in both evaluation dimensions vs. open source competitors 1.Current offering 2.Strategy and vision Download free from: https://engage.redhat.com/ forrester-data-grid- s-201509240128
  13. 13. Reactive apps with Node.js and JBoss Data Grid 7
  14. 14. Architecture HTTP TCP/IP
  15. 15. Elm • Functional language for Web • Compiles to Javascript • No runtime errors in practice • Statically typed, friendly errors • Help build well-architected code • Easy to learn! Easy to use!
  16. 16. Event Manager Microservice • Node.js middleware • Based on Express.js • Listens for HTTP on port 3000 • Uses JDG 7 Node.js client • Requires Node 0.10 or higher
  17. 17. JDG Persistence • Runs a JDG 7 server domain • Formed of 3 nodes • Each element stored in 2 nodes • Redundancy via partial replication • Redundancy for failover
  18. 18. Event Iteration (1) GET /events
  19. 19. Event Iteration (2) GET /events iterate event 1 event 2 …
  20. 20. Event Iteration (3) GET /events iterate event 1 event 2 … JSON event[]
  21. 21. Demo Event Iteration
  22. 22. Event Insert (1) POST /events
  23. 23. Event Insert (2) POST /events putIfAbsent
  24. 24. Event Insert (3) POST /events putIfAbsent true/false created event
  25. 25. Event Insert (4) POST /events putIfAbsent true/false created event JSON true/false WS: JSON event WS: JSON event
  26. 26. Demo Event Insert
  27. 27. Event Search (1) GET /search ?q=query
  28. 28. Event Search (2) executeGET /search ?q=query
  29. 29. Event Search (3) execute resultsJSON results GET /search ?q=query
  30. 30. Demo Event Search
  31. 31. github.com/galderz/infinispan-events/tree/june16
  32. 32. Credits Window by Oleg Frolov from the Noun Project Server Error by Montu Yadav from the Noun Project Databases by Oliviu Stoian from the Noun Project

×