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

Play Framework

Play Framework

Sharing Session Play Framework

Eko Kurniawan Khannedy

March 14, 2016
Tweet

More Decks by Eko Kurniawan Khannedy

Other Decks in Technology

Transcript

  1. PLAY FRAMEWORK OUTLINE ▸ Getting Started ▸ Hot Reload ▸

    Error Handling ▸ Threaded & Evented ▸ Non Blocking IO ▸ Performance
  2. PLAY FRAMEWORK OUTLINE ▸ Getting Started ▸ Hot Reload ▸

    Error Handling ▸ Threaded & Evented ▸ Non Blocking IO ▸ Performance
  3. PLAY FRAMEWORK OUTLINE ▸ Getting Started ▸ Hot Reload ▸

    Error Handling ▸ Threaded & Evented ▸ Non Blocking IO ▸ Performance
  4. PLAY FRAMEWORK OUTLINE ▸ Getting Started ▸ Hot Reload ▸

    Error Handling ▸ Threaded & Evented ▸ Non Blocking IO ▸ Performance
  5. EVENTED SERVERS HAVE ONE THREAD/ PROCESS PER CPU CORE AND

    USE NON- BLOCKING I/O PLAY FRAMEWORK
  6. PLAY FRAMEWORK MICROSERVICES LOAD BALANCER INTERNET FRONTEND SERVER FRONTEND SERVER

    FRONTEND SERVER BACKEND SERVER BACKEND SERVER BACKEND SERVER BACKEND SERVER BACKEND SERVER DATABASE DATABASE DATABASE
  7. PLAY FRAMEWORK THREADED DILEMMA ▸ Create new thread is expensive.

    ▸ Use a thread pool. ▸ Too many threads in thread pool. ▸ Memory overhead. ▸ Context switching overhead. ▸ Too few threads in thread pool. ▸ Run out of threads, latency goes up. ▸ Sensitive to timeout.
  8. PLAY FRAMEWORK MICROSERVICES LOAD BALANCER INTERNET FRONTEND SERVER FRONTEND SERVER

    FRONTEND SERVER BACKEND SERVER BACKEND SERVER BACKEND SERVER BACKEND SERVER BACKEND SERVER DATABASE DATABASE DATABASE LET’S SAY LATENCY GOES UP HERE
  9. PLAY FRAMEWORK MICROSERVICES LOAD BALANCER INTERNET FRONTEND SERVER FRONTEND SERVER

    FRONTEND SERVER BACKEND SERVER BACKEND SERVER BACKEND SERVER BACKEND SERVER BACKEND SERVER DATABASE DATABASE DATABASE THREAD BLOCKED HERE
  10. PLAY FRAMEWORK MICROSERVICES LOAD BALANCER INTERNET FRONTEND SERVER FRONTEND SERVER

    FRONTEND SERVER BACKEND SERVER BACKEND SERVER BACKEND SERVER BACKEND SERVER BACKEND SERVER DATABASE DATABASE DATABASE LATENCY GOES UP HERE
  11. PLAY FRAMEWORK MICROSERVICES LOAD BALANCER INTERNET FRONTEND SERVER FRONTEND SERVER

    FRONTEND SERVER BACKEND SERVER BACKEND SERVER BACKEND SERVER BACKEND SERVER BACKEND SERVER DATABASE DATABASE DATABASE THREAD BLOCKED HERE
  12. PLAY FRAMEWORK MICROSERVICES LOAD BALANCER INTERNET FRONTEND SERVER FRONTEND SERVER

    FRONTEND SERVER BACKEND SERVER BACKEND SERVER BACKEND SERVER BACKEND SERVER BACKEND SERVER DATABASE DATABASE DATABASE AND HERE
  13. PLAY FRAMEWORK MICROSERVICES LOAD BALANCER INTERNET FRONTEND SERVER FRONTEND SERVER

    FRONTEND SERVER BACKEND SERVER BACKEND SERVER BACKEND SERVER BACKEND SERVER BACKEND SERVER DATABASE DATABASE DATABASE HERE TOO
  14. PLAY FRAMEWORK MICROSERVICES LOAD BALANCER INTERNET FRONTEND SERVER FRONTEND SERVER

    FRONTEND SERVER BACKEND SERVER BACKEND SERVER BACKEND SERVER BACKEND SERVER BACKEND SERVER DATABASE DATABASE DATABASE AND THERE
  15. PLAY FRAMEWORK MICROSERVICES LOAD BALANCER INTERNET FRONTEND SERVER FRONTEND SERVER

    FRONTEND SERVER BACKEND SERVER BACKEND SERVER BACKEND SERVER BACKEND SERVER BACKEND SERVER DATABASE DATABASE DATABASE AND THERE UPS JANGAN PANIK
  16. PLAY FRAMEWORK PLAY FRAMEWORK Play Framework is build on top

    Netty and Akka, so it supports non-blocking I/O.
  17. PLAY FRAMEWORK NIO BENEFITS ▸ No sensitive to downstream slowness.

    ▸ Easy to parallelize I/O ▸ Support many concurrent and long-running connections, enabling : ▸ WebSocket ▸ Comet ▸ Server-Sent Events
  18. PLAY FRAMEWORK OUTLINE ▸ Getting Started ▸ Hot Reload ▸

    Error Handling ▸ Threaded & Evented ▸ Non Blocking IO ▸ Performance
  19. PLAY FRAMEWORK OUTLINE ▸ Getting Started ▸ Hot Reload ▸

    Error Handling ▸ Threaded & Evented ▸ Non Blocking IO ▸ Performance
  20. HOW EASY IT IS TO GET STARTED, HOW QUICKLY A

    SINGLE DEVELOPER CAN BUILD THINGS Single Developer PLAY FRAMEWORK
  21. PLAY FRAMEWORK OR SPECIFIC OPERATING SYSTEM ▸ windows:packageBin ▸ universal:packageOsxDmg

    ▸ debian:packageBin ▸ rpm:packageBin ▸ docker:publishLocal
  22. PLAY FRAMEWORK REFERENCES ▸ http://www.slideshare.net/brikis98/the-play-framework-at-linkedin ▸ https://www.playframework.com ▸ http://netty.io ▸

    http://akka.io ▸ https://www.lightbend.com/activator/download ▸ http://zeroturnaround.com/rebellabs/java-ee-productivity-report-2011/