SlideShare ist ein Scribd-Unternehmen logo
1 von 18
Play2
Ein flexibles Full-Stack Framework
für skalierbare Webanwendungen
        http://www.playframework.com
Martin Grotzke
                                           inoio gmbh

                              Twitter: @martin_grotzke
                                Web: http://inoio.de




Play2 ... für skalierbare Webanwendungen                 2/18
For the impatient...

            “Play is a high-productivity Java and Scala
            web application framework [..] based on a
            lightweight, stateless, web-friendly
            architecture and features predictable and
            minimal resource consumption (CPU, memory,
            threads) for highly-scalable applications.”
            http://www.playframework.com/documentation/2.1.1/Home




Play2 ... für skalierbare Webanwendungen                            3/18
JEE Complexity




                                           Servlet API

                                 Mojarra ...             JS
                                                         F
                                   Facelets         Seam

                                           Application



Play2 ... für skalierbare Webanwendungen                      4/18
Play simply


                     Servlet API

             Mojarra ...              JS            Play Framework
                                      F
              Facelets          Seam                  Application

                     Application



                 Architecture of the World Wide Web, Volume One,
                 W3C, 2004 http://www.w3.org/TR/webarch/


Play2 ... für skalierbare Webanwendungen                             5/18
Cloud




Play2 ... für skalierbare Webanwendungen           6/18
Play Elastic




Play2 ... für skalierbare Webanwendungen         7/18
Realtime




Play2 ... für skalierbare Webanwendungen         8/18
Realtime




Play2 ... für skalierbare Webanwendungen         9/18
Play async




Play2 ... für skalierbare Webanwendungen        10/18
Productivity




Play2 ... für skalierbare Webanwendungen         11/18
Productivity




“On our next similar project, we'll be able to deliver 30% cost savings over
the Java bid [..]. And remember, these numbers come after paying
developers more.”
http://thinkrelevance.com/blog/2005/12/20/bidding-projects-with-ruby-rails-take-2


 Play2 ... für skalierbare Webanwendungen                                           12/18
Productivity
                                                                                        2x

Martin Fowler: Is Ruby More Productive?
  http://martinfowler.com/articles/rubyAtThoughtWorks.html




                         How much did Ruby improve productivity for this project? (Compared to the best mainstream tools you know.)



  Play2 ... für skalierbare Webanwendungen                                                                               13/18
Play full stack

                                               Akka      DB
                                 WebSockets           Evolutions

                         Async I/O                          Persistence




                   Java                                                    Scala

                           sbt                                     Templates
                                                                   +JSON/XML

                             Dev, Test, Prod              Asset
                             Environments
                                                   HTTP Compiler
                                           Testing Server


Play2 ... für skalierbare Webanwendungen                                           14/18
Play demo




Play2 ... für skalierbare Webanwendungen    15/18
Play reality check

 ●   IDE Support: Continuously improved
 ●   Hot Code Reloading: Compile time + app reload
 ●   Async: More async drivers needed




Play2 ... für skalierbare Webanwendungen             16/18
Play is...

            “a high-productivity Java and Scala web
            application framework [..] based on a
            lightweight, stateless, web-friendly
            architecture and features predictable and
            minimal resource consumption (CPU, memory,
            threads) for highly-scalable applications.”
            http://www.playframework.com/documentation/2.1.1/Home




Play2 ... für skalierbare Webanwendungen                            17/18
Questions!
                 @martin_grotzke
                 http://inoio.de




Play2 ... für skalierbare Webanwendungen   18/18

Weitere ähnliche Inhalte

Ähnlich wie Play2 Framework für skalierbare Webanwendungen

Viridians on Rails
Viridians on RailsViridians on Rails
Viridians on RailsViridians
 
Running your Java EE applications in the Cloud
Running your Java EE applications in the CloudRunning your Java EE applications in the Cloud
Running your Java EE applications in the CloudArun Gupta
 
Camel Day Italia 2021 - Camel K
Camel Day Italia 2021 - Camel KCamel Day Italia 2021 - Camel K
Camel Day Italia 2021 - Camel KNicola Ferraro
 
Running your Java EE 6 applications in the clouds
Running your Java EE 6 applications in the clouds Running your Java EE 6 applications in the clouds
Running your Java EE 6 applications in the clouds Arun Gupta
 
Server Side Javascript
Server Side JavascriptServer Side Javascript
Server Side Javascriptrajivmordani
 
We4IT LCTY 2013 - x-pages-men - ibm domino xpages - performance in a nutshell
We4IT LCTY 2013 - x-pages-men - ibm domino xpages - performance in a nutshellWe4IT LCTY 2013 - x-pages-men - ibm domino xpages - performance in a nutshell
We4IT LCTY 2013 - x-pages-men - ibm domino xpages - performance in a nutshellWe4IT Group
 
Five cool ways the JVM can run Apache Spark faster
Five cool ways the JVM can run Apache Spark fasterFive cool ways the JVM can run Apache Spark faster
Five cool ways the JVM can run Apache Spark fasterTim Ellison
 
Isomorphic JavaScript with Nashorn
Isomorphic JavaScript with NashornIsomorphic JavaScript with Nashorn
Isomorphic JavaScript with NashornMaxime Najim
 
The Cloud-natives are RESTless @ JavaOne
The Cloud-natives are RESTless @ JavaOneThe Cloud-natives are RESTless @ JavaOne
The Cloud-natives are RESTless @ JavaOneKonrad Malawski
 
Predictable reactive state management for enterprise apps using NGRX/platform
Predictable reactive state management for enterprise apps using NGRX/platformPredictable reactive state management for enterprise apps using NGRX/platform
Predictable reactive state management for enterprise apps using NGRX/platformIlia Idakiev
 
Dynamic Languages Web Frameworks Indicthreads 2009
Dynamic Languages Web Frameworks Indicthreads 2009Dynamic Languages Web Frameworks Indicthreads 2009
Dynamic Languages Web Frameworks Indicthreads 2009Arun Gupta
 
WebGL games with Minko - Next Game Frontier 2014
WebGL games with Minko - Next Game Frontier 2014WebGL games with Minko - Next Game Frontier 2014
WebGL games with Minko - Next Game Frontier 2014Minko3D
 
Java and OpenJDK: disecting the ecosystem
Java and OpenJDK: disecting the ecosystemJava and OpenJDK: disecting the ecosystem
Java and OpenJDK: disecting the ecosystemRafael Winterhalter
 
Simplify and Boost Spark 3 Deployments with Hypervisor-Native Kubernetes
Simplify and Boost Spark 3 Deployments with Hypervisor-Native KubernetesSimplify and Boost Spark 3 Deployments with Hypervisor-Native Kubernetes
Simplify and Boost Spark 3 Deployments with Hypervisor-Native KubernetesDatabricks
 
Deep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UKDeep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UKJosé Paumard
 
[Unite Seoul 2019] Mali GPU Architecture and Mobile Studio
[Unite Seoul 2019] Mali GPU Architecture and Mobile Studio [Unite Seoul 2019] Mali GPU Architecture and Mobile Studio
[Unite Seoul 2019] Mali GPU Architecture and Mobile Studio Owen Wu
 
Die Qual der Wahl bei den Single Page Application Frameworks
Die Qual der Wahl bei den Single Page Application FrameworksDie Qual der Wahl bei den Single Page Application Frameworks
Die Qual der Wahl bei den Single Page Application FrameworksJonas Bandi
 

Ähnlich wie Play2 Framework für skalierbare Webanwendungen (20)

Viridians on Rails
Viridians on RailsViridians on Rails
Viridians on Rails
 
Running your Java EE applications in the Cloud
Running your Java EE applications in the CloudRunning your Java EE applications in the Cloud
Running your Java EE applications in the Cloud
 
Camel Day Italia 2021 - Camel K
Camel Day Italia 2021 - Camel KCamel Day Italia 2021 - Camel K
Camel Day Italia 2021 - Camel K
 
Running your Java EE 6 applications in the clouds
Running your Java EE 6 applications in the clouds Running your Java EE 6 applications in the clouds
Running your Java EE 6 applications in the clouds
 
Node.js an Exectutive View
Node.js an Exectutive ViewNode.js an Exectutive View
Node.js an Exectutive View
 
Server Side Javascript
Server Side JavascriptServer Side Javascript
Server Side Javascript
 
We4IT LCTY 2013 - x-pages-men - ibm domino xpages - performance in a nutshell
We4IT LCTY 2013 - x-pages-men - ibm domino xpages - performance in a nutshellWe4IT LCTY 2013 - x-pages-men - ibm domino xpages - performance in a nutshell
We4IT LCTY 2013 - x-pages-men - ibm domino xpages - performance in a nutshell
 
Five cool ways the JVM can run Apache Spark faster
Five cool ways the JVM can run Apache Spark fasterFive cool ways the JVM can run Apache Spark faster
Five cool ways the JVM can run Apache Spark faster
 
Cloudy Ajax 08 10
Cloudy Ajax 08 10Cloudy Ajax 08 10
Cloudy Ajax 08 10
 
Isomorphic JavaScript with Nashorn
Isomorphic JavaScript with NashornIsomorphic JavaScript with Nashorn
Isomorphic JavaScript with Nashorn
 
The Cloud-natives are RESTless @ JavaOne
The Cloud-natives are RESTless @ JavaOneThe Cloud-natives are RESTless @ JavaOne
The Cloud-natives are RESTless @ JavaOne
 
Running Spark in Production
Running Spark in ProductionRunning Spark in Production
Running Spark in Production
 
Predictable reactive state management for enterprise apps using NGRX/platform
Predictable reactive state management for enterprise apps using NGRX/platformPredictable reactive state management for enterprise apps using NGRX/platform
Predictable reactive state management for enterprise apps using NGRX/platform
 
Dynamic Languages Web Frameworks Indicthreads 2009
Dynamic Languages Web Frameworks Indicthreads 2009Dynamic Languages Web Frameworks Indicthreads 2009
Dynamic Languages Web Frameworks Indicthreads 2009
 
WebGL games with Minko - Next Game Frontier 2014
WebGL games with Minko - Next Game Frontier 2014WebGL games with Minko - Next Game Frontier 2014
WebGL games with Minko - Next Game Frontier 2014
 
Java and OpenJDK: disecting the ecosystem
Java and OpenJDK: disecting the ecosystemJava and OpenJDK: disecting the ecosystem
Java and OpenJDK: disecting the ecosystem
 
Simplify and Boost Spark 3 Deployments with Hypervisor-Native Kubernetes
Simplify and Boost Spark 3 Deployments with Hypervisor-Native KubernetesSimplify and Boost Spark 3 Deployments with Hypervisor-Native Kubernetes
Simplify and Boost Spark 3 Deployments with Hypervisor-Native Kubernetes
 
Deep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UKDeep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UK
 
[Unite Seoul 2019] Mali GPU Architecture and Mobile Studio
[Unite Seoul 2019] Mali GPU Architecture and Mobile Studio [Unite Seoul 2019] Mali GPU Architecture and Mobile Studio
[Unite Seoul 2019] Mali GPU Architecture and Mobile Studio
 
Die Qual der Wahl bei den Single Page Application Frameworks
Die Qual der Wahl bei den Single Page Application FrameworksDie Qual der Wahl bei den Single Page Application Frameworks
Die Qual der Wahl bei den Single Page Application Frameworks
 

Kürzlich hochgeladen

A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 

Kürzlich hochgeladen (20)

A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 

Play2 Framework für skalierbare Webanwendungen

  • 1. Play2 Ein flexibles Full-Stack Framework für skalierbare Webanwendungen http://www.playframework.com
  • 2. Martin Grotzke inoio gmbh Twitter: @martin_grotzke Web: http://inoio.de Play2 ... für skalierbare Webanwendungen 2/18
  • 3. For the impatient... “Play is a high-productivity Java and Scala web application framework [..] based on a lightweight, stateless, web-friendly architecture and features predictable and minimal resource consumption (CPU, memory, threads) for highly-scalable applications.” http://www.playframework.com/documentation/2.1.1/Home Play2 ... für skalierbare Webanwendungen 3/18
  • 4. JEE Complexity Servlet API Mojarra ... JS F Facelets Seam Application Play2 ... für skalierbare Webanwendungen 4/18
  • 5. Play simply Servlet API Mojarra ... JS Play Framework F Facelets Seam Application Application Architecture of the World Wide Web, Volume One, W3C, 2004 http://www.w3.org/TR/webarch/ Play2 ... für skalierbare Webanwendungen 5/18
  • 6. Cloud Play2 ... für skalierbare Webanwendungen 6/18
  • 7. Play Elastic Play2 ... für skalierbare Webanwendungen 7/18
  • 8. Realtime Play2 ... für skalierbare Webanwendungen 8/18
  • 9. Realtime Play2 ... für skalierbare Webanwendungen 9/18
  • 10. Play async Play2 ... für skalierbare Webanwendungen 10/18
  • 11. Productivity Play2 ... für skalierbare Webanwendungen 11/18
  • 12. Productivity “On our next similar project, we'll be able to deliver 30% cost savings over the Java bid [..]. And remember, these numbers come after paying developers more.” http://thinkrelevance.com/blog/2005/12/20/bidding-projects-with-ruby-rails-take-2 Play2 ... für skalierbare Webanwendungen 12/18
  • 13. Productivity 2x Martin Fowler: Is Ruby More Productive? http://martinfowler.com/articles/rubyAtThoughtWorks.html How much did Ruby improve productivity for this project? (Compared to the best mainstream tools you know.) Play2 ... für skalierbare Webanwendungen 13/18
  • 14. Play full stack Akka DB WebSockets Evolutions Async I/O Persistence Java Scala sbt Templates +JSON/XML Dev, Test, Prod Asset Environments HTTP Compiler Testing Server Play2 ... für skalierbare Webanwendungen 14/18
  • 15. Play demo Play2 ... für skalierbare Webanwendungen 15/18
  • 16. Play reality check ● IDE Support: Continuously improved ● Hot Code Reloading: Compile time + app reload ● Async: More async drivers needed Play2 ... für skalierbare Webanwendungen 16/18
  • 17. Play is... “a high-productivity Java and Scala web application framework [..] based on a lightweight, stateless, web-friendly architecture and features predictable and minimal resource consumption (CPU, memory, threads) for highly-scalable applications.” http://www.playframework.com/documentation/2.1.1/Home Play2 ... für skalierbare Webanwendungen 17/18
  • 18. Questions! @martin_grotzke http://inoio.de Play2 ... für skalierbare Webanwendungen 18/18

Hinweis der Redaktion

  1. Herzlich Willkommen zum Vortrag über Playframework 2 Mein Name ist Martin Grotzke -> [next slide]
  2. Webentwicklung mit Java seit mehr als 10 Jahren 2002 noch eigenes Servlet-Framework entwickelt Später dann Struts eingesetzt, JSF, Tapestry, Wicket, Spring MVC, GWT usw , neuerdings auch mal Rails Viele Jahre in Hamburger Softwarehaus gearbeitet, Projekte: libri, buch.de, smatch.com, tchibo Vor 2 Jahren eigene Firma gegründet Eigenes Produkt mit Play1, nun 2 Projekte mit Play2 _ Soviel zu mir... _ Was mich zu Beginn interessiert: Wer hat schonmal mit Play gearbeitet? Wer ist alles Java Entwickler? Wer schon mit Frameworks wie Rails oder Django? Nun möchte ich erstmal Play mit wenigen Worten einführen...
  3. * High-productivity * Lightweight * Stateless * Web-friendly (RESTful) * Effizient * Sehr gut skalierbar Ist Open Source Play1: 2007, Play2: 2012, nun bei Typesafe -> Das ist der Überblick über die nächsten 50 Minuten, wobei ich den Fokus dann auf die Produktivität lege. Im Folgenden stelle ich aktuelle Herausforderungen und Lösungen von Play gegenüber. Anfang: Komplexität bei Java Webentwicklung
  4. * Servlets (1997): Abstraktion der Web-Konzepte, Java-freundliche API (Web-Konzepte benennen!) * Komplexität u. Einschränkungen der Servlet-API: Gefixt mit zusätzlichen Schichten/Abstraktionen, mit Web-Frameworks wie JSF, Wicket, Spring-MVC, GWT etc. * Schwächen von JSF -> Seam => neue Abstraktionen * Weitere Dimension v. Komplexität durch Specs vs. Implementierungen -> Was gibt die Spec vor, was ist “Vendor-spezifisch”? * Diese Schichten/Abstraktionen/Specs/Implementierungen muss ich als Webdev durchdringen/verstehen, d.h. Ich muss einige Hürden/Stufen nehmen, um mein Ziel zu erreichen * -> Erschwert eher als zu erleichtern Lösung von Play? Anhang - Spezifikationen und Implementierungen: JAX-RS (Jersey, CXF, RESTEasy), JAX-WS 2.0/2.1/2.2 (Metro, Axis, CXF), JSF (Mojarra, MyFaces, PrimeFaces, ICEFaces), JSP, JSTL, WebProfiles, CDI, JPA 1/2, JMS, JTA, JCA.... Specs: das Ergebnis einer Expert Group von Vertretern unterschiedlicher Firmen mit unterschiedlichen Interessen (nicht immer Developer-orientiert) Dieser Wald will beherrscht werden
  5. Play: * losgelöst von Servlet Spec * Nicht mehrere Schichten, keine künstlichen Abstraktionen, sondern einfache und intuitive HTTP-API * Direktes Arbeiten mit Web-Konzepten * -> Wenn ich weiß, wie das Web funtioniert, habe ich schon einen großen Teil von Play verstanden - klick - * Gute Lektüre zu Web-Architektur: “Architecture of the World Wide Web, Volume One”, W3C, 2004 (http://www.w3.org/TR/webarch/) Nächste Herausforderung: Cloud / horizontale Skalierbarkeit
  6. Cloud / Elastizität: statt feste Zahl Server für max. Last werden je nach Bedarf die benötigten Ressourcen alloziert * Problem: Serverseitige Sessions (User, Warenkorb, ViewState) * Requests eines Besuchers müssen vom selben App-Server beantwortet werden -> Sticky Sessions (Kopplung mit LB) * Wenn Server aus Last-Verteilung genommen wird wären dessen Sessions verloren -> Session Replikation * Problem Session Replikation: oft nur begrenzt skalierbar, sehr komplex, zerbrechlich / nicht sehr robust Fazit: serverseitige Sessions stehen im Konflikt mit Elastizität/ dynamischer Skalierung Lösung von Play, wer hätte es gedacht, ist stateless zu arbeiten
  7. Play ist stateless, arbeitet ohne serverseitige Sessions – dem share-nothing Prinzip folgend * Jeder Request kann von jedem App-Server bearbeitet werden * Keine Session Replikation notwendig * Es können problemlos neue Server in Last-Verteilung aufgenommen oder herausgenommen werden * Elastisch, sehr gut dynamisch und horizontal skalierbar * Session auch in Play, clientseitig gelöst (signierter Cookie) Next: Realtime Webapps
  8. Beispiele: RT Dashboards (Google Analytics), Google Docs, Stock Ticker, Chat-Applikationen (Live Examples: http://en.lichess.org/ , http://live.gilt.com/ , http://console-demo.typesafe.com/ , https://docs.google.com ) Was ist die Herausforderung bei Realtime Anwendungen? Die Hohe Zahl von Clients, also gleichzeitige, lange bestehende Verbindungen, statt Request-/Response Zyklen -> Stichwort WebSockets
  9. Früher: Request-Verarbeitung mit Thread-per-Connection Modell Problem: * ein dedizierter Thread für einen Request, dieser Thread erledigt alle Arbeit für den Request bis die Response gesendet werden kann * I/O, typischerweise synchron/blocking, auch mit diesem Thread, d.h. dieser Thread ist blockiert und idle bis I/O abgeschlossen * (Randproblem: CPU context switches) * Konsequenz: es werden soviele Threads benötigt wie gleichzeitige Requests/Verbindungen bestehen ** -> RAM für Threads ** -> Ineffizient, schwer vorhersagbarer Ressourcenverbrauch, sehr begrenzt skalierbar * Bsp Threaded: Servlets, Rails, Django, PHP Weiter: Lösung von Play * Anhang: http://engineering.linkedin.com/play/play-framework-async-io-without-thread-pool-and-callback-hell http://www.scalaloader.org/2013/03/event-sourced-architecture-travelling_14.html http://de.slideshare.net/normanmaurer/netty4 http://www.kegel.com/c10k.html http://berb.github.io/diploma-thesis/original/042_serverarch.html
  10. Play: Event-basiertes Modell * typischerweise 1 Thread pro CPU Core * Idee: Threads werden nicht blockiert, d.h. I/O wird asynchron gemacht, und statt zu warten kann der Thread andere Requests verarbeiten. Wenn der I/O Aufruf fertig ist kann der Thread das Ergebnis aufnehmen und die Response an den Client ausliefern * Somit ist die Anzahl paralleler Verbindung nicht so stark durch Threads/Speicher begrenzt * Ok, seit Servlet Spec 3 auch async Requests, allerdings muss das jetzt erst von den verschiedenen Frameworks integriert/angebunden werden * Andere Event-driven Server: Node.js, Twisted * Für Request-Handling / NIO: Netty (bewährte NetworkingLib) * Intern Concurrency: Akka (Event-basiertes Middleware Framework f. nebenläufige u. verteilte Systeme) Event-driven -> Unterstützung von Streaming (Chunked transfer encoding, Comet, WebSockets) Next: Productivity
  11. Produktivität ist in der Java EE Welt eher mittelmäßig. Eine Ursache ist Komplexität, hatten wir schon. Anderer wichtiger Punkt: es müssen viele Werkzeuge miteinander kombiniert werden, z.B. Web-Framework, Template-Engine, IoC, Persistence, Testing-Libs, Remoting, evtl. Build-Tool etc. (ggf. nicht optimal aufeinander abgestimmt) Viele kleinere Ursachen, die ein flüssiges Arbeiten erschweren Produktivität schlägt sich in Entwicklungszeit nieder: Wenn man für ein Projekt anbietet und es Mitbewerber gibt, die z.B. mit Rails unterwegs sind, weiß man schon, dass die zu geringerem Preis anbieten können. Next: Rails: Batteries included
  12. Rails (oder auch Django) ist also eher das Smartphone, das alles mitbringt, was man braucht, man kann schnell seine Aufgaben erledigen -> “Batteries included” - klick - Statement einer Firma, die Rails neben Java eingeführt hat und deutliche Produktivitätssteigerungen festgestellt hat. * Sie verlangen höheren Tagessatz für Rails Entwicklung, sind schneller fertig, und Entwickler bekommen auch mehr Geld Anderes Beispiel ist Thoughtworks... [switch] Anhang: Eric Knipp, Research Director at Gartner: “Many high-profile consumer Web firms are choosing Ruby on Rails to rapidly build scalable web applications. Ruby on Rails has the potential to emerge as a strong alternative platform to traditional choices based on Java and .NET for next-generation enterprise applications, as companies seek improved agility, development speed and time to market.” http://www.businessinsider.com/heres-why-ruby-on-rails-is-hot-2011-5 We pay ourselves (and our contractors) better for Rails work than Java work. This is good for everybody: Developers have more fun, make more money, and customers get better products cheaper and faster.
  13. Martin Fowler hat bei Thoughtworks nach der Einführung von Rails bei den Teams/Team Leads nachgefragt, wie die Einschätzung bzgl. Produktivität sei Ergebnis: Peak bei doppelter Prod. Schon Fowler weist darauf hin, dass das natürlich mit Vorsicht zu genießen ist und es so gut wie unmöglich ist, objektive Auswertungen zu erhalten. Die Aussagen deuten aber darauf hin, dass es in jedem Fall Produktivitätssteigerungen gibt. Natürlich gibt's bei Rails auch Nachteile, wir arbeiten ja aus bestimmten (und auch guten) Gründen mit Java (z.B. Typsicherheit, Performance, Wartbarkeit) Hier kommt nun Play in's Spiel: es vereint die guten Seiten von Java / Scala mit den Vorteilen von Rails oder Django
  14. * Es bringt alles mit, was man zum Entwickeln einer Webapp braucht * RESTful MVC Framework (Template-Engine Twirl, like ASP.NET Razor, JSON/XML) * Persistenz-Framework * Asset-Compiler / Integration von Frontend-Technologien * Akka f. Nebenläufigkeit/Remote Kommunikation (Event-basiertes Middleware Framework f. nebenläufige u. verteilte Systeme) * Guter Testing Support (versch. Ebenen) * Build-Environment sbt mit incremental compilation / continuous Testing * Integrierter HTTP Server * Flexibel : einzelne Komponenten sind austauschbar * Native Unterstützung f. Java und Scala Das war Überblick über Full-Stack, nun mehr zu Produktivitäts-Features anhand von Source-Code
  15. Auch bei Play gibt es noch Potential: IDE Support (bei Eclipse) ist ok aber nicht perfekt – viel Entwicklung (IDEA Ultimate besser) Hot-Code Reloading: mit vielen Templates können die sich bemerkbar machen. Alternativen: Scalate (SCAML, Jade, Mustache), Jade, Velocity Async: Optimally backends would be accessed using NIO Check: async http client (play comes with a great wrapper for ning async http client) Check: Reactive Mongo JDBC: blocking interface - API, Driver, ConnPool, ORM/Libs Many other drivers are also blocking (SolrJ) Experimental non-blocking driver: adbcj, async-mysql-connector
  16. Um die Vorteile von Play noch einmal kurz zusammenzufassen... * Einfach/leichtgewichtig – nur 1 Framework, intuitive u. ausdrucksstarke HTTP API (web-friendly, RESTful) * Scalable – Stateless / sehr gut horizontal skalierbar / Elastisch / keine Probleme mit Elastizität * Effizient – durch async/non-blocking Request-Handling können viele Clients parallel bedient werden (RT) * Productive – hat sich viel von Rails/Django abgeschaut und kombiniert das mit vielen Compile-Time Checks - v.a. erwähnenswert Full-Stack, Hot-Code Reloading, kompilierte Templates+Routes, Evolutions, Integration Frontend-Technologien Damit vielen Dank für die Aufmerksamkeit, noch ein paar Minuten für Fragen