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.
Lutz Hühnken | @lutzhuehnken | Typesafe
Von „Enterprise“ zu „Reactive“
Von Enterprise zu Reactive
@lutzhuehnken
Reactive „for the rest of us“..
Big Data
Web Scale
HFT
Tomcat
Web MVC
RDBMS
Von Enterprise zu Reactive
@lutzhuehnken
Was ist Enterprise?
Im Sinne diesesVortrags:
• Alles, was auf Java EE basiert
• I...
Von Enterprise zu Reactive
@lutzhuehnken
Was ist Reactive?
Von Enterprise zu Reactive
@lutzhuehnken
Was ist Reactive?
Behauptet doch jeder von sich…
Von Enterprise zu Reactive
@lutzhuehnken
Was ist Reactive?
Alles Akka, oder was?
Von Enterprise zu Reactive
@lutzhuehnken
Mal anders: Fragen, die
wir immer wieder
hören
Von Enterprise zu Reactive
@lutzhuehnken
WAR?
Servlet Container?
Web Layer
Library X
(nutzt ThreadLocal)
?
Von Enterprise zu Reactive
@lutzhuehnken
Kann ich das
nutzen mit RDBMS/
JDBC?
Backend
Wie mache ich 2PC?
Von Enterprise zu Reactive
@lutzhuehnken
Thread per Request
Von Enterprise zu Reactive
@lutzhuehnken
n Threads per m Requests
Von Enterprise zu Reactive
@lutzhuehnken
n Threads per m Requests
Effekt: Kleinere Einheit der Nebenläufigkeit (Task level
...
Von Enterprise zu Reactive
@lutzhuehnken
Kleiner Exkurs: Gilt auch für Aktoren
(Überhaupt: Gemeinsamkeit (einiger) reaktiv...
Von Enterprise zu Reactive
@lutzhuehnken
n Threads per m Requests
Was heißt das für ThreadLocal?
Von Enterprise zu Reactive
@lutzhuehnken
n Threads per m Requests
Was heißt das für I/O?
Von Enterprise zu Reactive
@lutzhuehnken
n Threads per m Requests
In Tomcat / Servlet Container?
Von Enterprise zu Reactive
@lutzhuehnken
Konsequenzen (alpha)
• Servlet Container
• ThreadLocal
• Blocking I/O
werden zu A...
Von Enterprise zu Reactive
@lutzhuehnken
Jetzt habe ich aber so etwas..
try {
stmt = con.createStatement();
ResultSet rs =...
Von Enterprise zu Reactive
@lutzhuehnken
Isolieren!
Bei vert.x „WorkerVerticle“
Bei Play/Akka: Volle Kontrolle über Dispat...
Von Enterprise zu Reactive
@lutzhuehnken
Konsequenzen (beta)
• auf Servlet Container und ThreadLocal
verzichten
• Blocking...
Von Enterprise zu Reactive
@lutzhuehnken
Jetzt habe ich aber so etwas..
@Transactional
public static class GreetingService...
Von Enterprise zu Reactive
@lutzhuehnken
Von Enterprise zu Reactive
@lutzhuehnken
Vermeiden
this.entityManager.persist(greeting);
this.jmsTemplate.convertAndSend("...
Von Enterprise zu Reactive
@lutzhuehnken
Trennen
Jeder 2 PC kann durch asynchrones Messaging
ausgedrückt werden!
Von Enterprise zu Reactive
@lutzhuehnken
2PC => Messaging
Kleine Einschränkung -Voraussetzungen:
•tentative operations
•at...
Von Enterprise zu Reactive
@lutzhuehnken
Verwerten
Service A
(Reactive)
Service B
(Legacy)
Von Enterprise zu Reactive
@lutzhuehnken
Konsequenzen (1.0)
• auf Servlet Container und ThreadLocal
verzichten
• Blocking ...
Von Enterprise zu Reactive
@lutzhuehnken
Warum das Ganze?
• Wir haben gesehen: Ich kann auch meine
„normale“ Geschäftsanwe...
Von Enterprise zu Reactive
@lutzhuehnken
• Heißt nicht nur „web scale“.
• Effizient sein. Moderne Hardware nutzen
(Many Cor...
Von Enterprise zu Reactive
@lutzhuehnken
Nicht von mir! Sondern von John Rose, Java VM Architect, JFokus, Stockholm, Febru...
Von Enterprise zu Reactive
@lutzhuehnken
• Prinzipien der Supervision & Isolation
• Let it crash!
Von Enterprise zu Reactive
@lutzhuehnken
• Spaß!!
• Ernsthaft. All das ist nicht entwickelt
worden, um unser Leben kompliz...
Von Enterprise zu Reactive
@lutzhuehnken
Vielen Dank
lutz.huehnken@typesafe.com
Twitter: @lutzhuehnken
Kommt zum Typesafe-...
Upcoming SlideShare
Loading in …5
×

Von "Enterprise" zu "Reactive" (JAX 2015)

1,435 views

Published on

Vortrag "Von Enterprise zu Reactive" von der JAX 2015.

Published in: Technology
  • DOWNLOAD THE BOOK INTO AVAILABLE FORMAT (New Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full EPUB Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full doc Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download EPUB Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download doc Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THE can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THE is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBOOK .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, CookBOOK, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, EBOOK, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THE Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THE the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THE Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • accessibility Books Library allowing access to top content, including thousands of title from favorite author, plus the ability to read or download a huge selection of books for your pc or smartphone within minutes.........ACCESS WEBSITE Over for All Ebooks ..... (Unlimited) ......................................................................................................................... Download FULL PDF EBOOK here { http://bit.ly/2m6jJ5M } .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Von "Enterprise" zu "Reactive" (JAX 2015)

  1. 1. Lutz Hühnken | @lutzhuehnken | Typesafe Von „Enterprise“ zu „Reactive“
  2. 2. Von Enterprise zu Reactive @lutzhuehnken Reactive „for the rest of us“.. Big Data Web Scale HFT Tomcat Web MVC RDBMS
  3. 3. Von Enterprise zu Reactive @lutzhuehnken Was ist Enterprise? Im Sinne diesesVortrags: • Alles, was auf Java EE basiert • Insbesondere Servlet API basierte Webapps, z.B. auf Tomcat
  4. 4. Von Enterprise zu Reactive @lutzhuehnken Was ist Reactive?
  5. 5. Von Enterprise zu Reactive @lutzhuehnken Was ist Reactive? Behauptet doch jeder von sich…
  6. 6. Von Enterprise zu Reactive @lutzhuehnken Was ist Reactive? Alles Akka, oder was?
  7. 7. Von Enterprise zu Reactive @lutzhuehnken Mal anders: Fragen, die wir immer wieder hören
  8. 8. Von Enterprise zu Reactive @lutzhuehnken WAR? Servlet Container? Web Layer Library X (nutzt ThreadLocal) ?
  9. 9. Von Enterprise zu Reactive @lutzhuehnken Kann ich das nutzen mit RDBMS/ JDBC? Backend Wie mache ich 2PC?
  10. 10. Von Enterprise zu Reactive @lutzhuehnken Thread per Request
  11. 11. Von Enterprise zu Reactive @lutzhuehnken n Threads per m Requests
  12. 12. Von Enterprise zu Reactive @lutzhuehnken n Threads per m Requests Effekt: Kleinere Einheit der Nebenläufigkeit (Task level concurrency)
  13. 13. Von Enterprise zu Reactive @lutzhuehnken Kleiner Exkurs: Gilt auch für Aktoren (Überhaupt: Gemeinsamkeit (einiger) reaktiver Systeme)
  14. 14. Von Enterprise zu Reactive @lutzhuehnken n Threads per m Requests Was heißt das für ThreadLocal?
  15. 15. Von Enterprise zu Reactive @lutzhuehnken n Threads per m Requests Was heißt das für I/O?
  16. 16. Von Enterprise zu Reactive @lutzhuehnken n Threads per m Requests In Tomcat / Servlet Container?
  17. 17. Von Enterprise zu Reactive @lutzhuehnken Konsequenzen (alpha) • Servlet Container • ThreadLocal • Blocking I/O werden zu Anti-Pattern.Vermeiden!
  18. 18. Von Enterprise zu Reactive @lutzhuehnken Jetzt habe ich aber so etwas.. try { stmt = con.createStatement(); ResultSet rs = stmt.executeQuery(query); while (rs.next()) { String coffeeName = rs.getString("COF_NAME"); int supplierID = rs.getInt("SUP_ID"); float price = rs.getFloat("PRICE"); int sales = rs.getInt("SALES"); int total = rs.getInt("TOTAL"); System.out.println(coffeeName + "t" + supplierID + "t" + price + "t" + sales + Blocking I/O, Sorgenkind JDBC
  19. 19. Von Enterprise zu Reactive @lutzhuehnken Isolieren! Bei vert.x „WorkerVerticle“ Bei Play/Akka: Volle Kontrolle über Dispatcher Nicht nur für JDBC, generell für „blocking“ code
  20. 20. Von Enterprise zu Reactive @lutzhuehnken Konsequenzen (beta) • auf Servlet Container und ThreadLocal verzichten • Blocking I/O vermeiden. Im Notfall: Isolieren.
  21. 21. Von Enterprise zu Reactive @lutzhuehnken Jetzt habe ich aber so etwas.. @Transactional public static class GreetingService { @Inject private JmsTemplate jmsTemplate; @PersistenceContext private EntityManager entityManager; public void createGreeting(String name) { Greeting greeting = new Greeting(name); this.entityManager.persist(greeting); this.jmsTemplate.convertAndSend("greetings", greeting); … Verteilte Transaktion
  22. 22. Von Enterprise zu Reactive @lutzhuehnken
  23. 23. Von Enterprise zu Reactive @lutzhuehnken Vermeiden this.entityManager.persist(greeting); this.jmsTemplate.convertAndSend("greetings", greeting); … Warum nicht separater Abgleich (Reconciliation)? In unserem kleinen Beispiel:
  24. 24. Von Enterprise zu Reactive @lutzhuehnken Trennen Jeder 2 PC kann durch asynchrones Messaging ausgedrückt werden!
  25. 25. Von Enterprise zu Reactive @lutzhuehnken 2PC => Messaging Kleine Einschränkung -Voraussetzungen: •tentative operations •at-least-once delivery •idempotent messages Item-BCancellation Tentative Op Item-A
  26. 26. Von Enterprise zu Reactive @lutzhuehnken Verwerten Service A (Reactive) Service B (Legacy)
  27. 27. Von Enterprise zu Reactive @lutzhuehnken Konsequenzen (1.0) • auf Servlet Container und ThreadLocal verzichten • Blocking I/O vermeiden. Im Notfall: Isolieren. • Distributed Tx: Vermeiden, trennen, verwerten
  28. 28. Von Enterprise zu Reactive @lutzhuehnken Warum das Ganze? • Wir haben gesehen: Ich kann auch meine „normale“ Geschäftsanwendung reactive machen, und dabei Kompromisse eingehen. • Was bringt mir das?
  29. 29. Von Enterprise zu Reactive @lutzhuehnken • Heißt nicht nur „web scale“. • Effizient sein. Moderne Hardware nutzen (Many Core, NUMA) • Von Innovation profitieren (s. Brian Goetz gestern)
  30. 30. Von Enterprise zu Reactive @lutzhuehnken Nicht von mir! Sondern von John Rose, Java VM Architect, JFokus, Stockholm, February 2015
  31. 31. Von Enterprise zu Reactive @lutzhuehnken • Prinzipien der Supervision & Isolation • Let it crash!
  32. 32. Von Enterprise zu Reactive @lutzhuehnken • Spaß!! • Ernsthaft. All das ist nicht entwickelt worden, um unser Leben komplizierter zu machen. Sondern einfacher! • Wie würdest du es mit Menschen lösen..?
  33. 33. Von Enterprise zu Reactive @lutzhuehnken Vielen Dank lutz.huehnken@typesafe.com Twitter: @lutzhuehnken Kommt zum Typesafe-Stand!
 (In der Nähe der Garderobe) Geht zu den anderen „Reactive“Vorträgen!

×