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

Learn how to build Functional Reactive Applicat...

Learn how to build Functional Reactive Applications with Elm, Node.js and Infinispan

Developers aim to write responsive, scalable, fault tolerant, reactive applications to can handle the business needs of the modern web applications without hiccups. This talk shows you how to do just that! And to add a twist, we will do it in a (pure) functional style.

Node.js is a very popular framework for developing asynchronous, event-driven, reactive applications. Infinispan, an in-memory distributed data grid designed for fast, scalable, elastic access to large volumes of data, has recently gained compatibility with the Node.js ecosystem enabling reactive applications to use it as persistence layer. When combined with Elm, a functional programming language for declaratively creating reactive web applications, these technologies offer a great platform for working with highly responsive, data-heavy applications seamlessly. In this live-coding talk, we will demonstrate how to use these technologies to build a reactive web application composed of an Elm frontend, a Node.js microservice layer and a scalable, fault tolerant Infinispan data grid for persistence.

Galder Zamarreño

May 19, 2017
Tweet

More Decks by Galder Zamarreño

Other Decks in Programming

Transcript

  1. Learn how to Build Functional Reactive Applications with Elm, Node.js

    and Infinispan Galder Zamarreño Arrizabalaga 19th May 2017
  2. Moi • @ • Infinispan developer & co-founder • Polyglot

    programmer • Functional programming @galderz #infinispan
  3. defining FRP • What is FRP? • Definition • Why

    is FRP interesting? • Usefulness
  4. Elm HTTP TCP/IP statically compiled building web user interfaces promotes

    FRP compiles to fast Javascript most helpful compiler
  5. Elm HTTP TCP/IP statically compiled building web user interfaces promotes

    FRP compiles to fast Javascript most helpful compiler no runtime exceptions
  6. Node.js HTTP TCP/IP based on express.js FRP friendly (async, events)

    stateless, listens on port 3000 talks binary to data grid
  7. infinispan HTTP TCP/IP in- memory data grid open source (ASL2)

    3 server node domain 2 copies redundant
  8. infinispan HTTP TCP/IP in- memory data grid open source (ASL2)

    3 server node domain 2 copies redundant Java, Node.js, C/C++... clients
  9. infinispan HTTP TCP/IP in- memory data grid open source (ASL2)

    3 server node domain 2 copies redundant Java, Node.js, C/C++... clients remote event listeners
  10. Elm Architecture Elm Runtime Model Html + Msg (Click) update

    Msg (Click) + Model Cmd e.g. http call … Msg (Http Resp) + Model Model updated Model view … button click …
  11. demo: insert Talk (4) POST /events putIfAbsent true/false created event

    JSON true/false WS: JSON event WS: JSON event
  12. Elm limitations • typeclasses → +boiler plate code • dictionary

    type • Less FRPy version 0.17+ • Interacting with complex Javascript libraries • Alternative: Purescript (+complex)
  13. Learn How To Build Functional Reactive Apps what is FRP

    why FRP is useful how to build an FR app
  14. Learn How To Build Functional Reactive Apps what is FRP

    why FRP is useful how to build an FR app live coding an FR app
  15. credits Approve by Aha-Soft from the Noun Project 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