Exploring Terracotta

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Exploring Terracotta - Presentation Transcript

    1. Exploring Terracotta Alex Miller (@puredanger)
    2. Agenda • Architecture and scale • Examinator reference application • What do people use it for? • How does it work? • Terracotta 3.0
    3. Applications in Three Tiers Client Server Database
    4. How do we scale? Client Client Client Server Server Server Database
    5. But what about failover?
    6. Option 1: Servers share state Client Client Client Server Server Server Database
    7. How? • RMI • JMS • Custom (JGroups, etc)
    8. Option 2: Database (“stateless”) Client Client Client Server Server Server Database
    9. Stateless == “State in the database” • Database load • Serialization to and from the database • Network bandwidth • Object / relational mapping due to impedance mismatch
    10. Option 3: Terracotta! Client Client Client Server Server Server Terracotta Terracotta Terracotta Terracotta Terracotta Database Server Server Instance Instance
    11. Why is this better? • Hub and spoke vs peer to peer • Avoid object / relational translation • Avoid serialization • Reduce database overload • Programming model you already know • Focus on your app, not scalability and high availability
    12. Agenda • Architecture and scale • Examinator reference application • What do people use it for? • How does it work? • Terracotta 3.0
    13. Examinator • Terracotta reference web application • Online exams • “Session” use case • http://reference.terracotta.org
    14. Examinator stack • Spring-based stack • MVC View • Web Flow Spring Web Flow Model Spring MVC • Security Sitemesh Controller • Transactions Spring Security • Open source Service Freemarker • Tomcat / Jetty DAO • Hibernate / JPA JPA Hibernate Domain • Site Mesh • Freemarker
    15. What state should go in Terracotta? Appropriateness Memory Terracotta Database Data Lifetime
    16. Examinator Terracotta Usage • User registration codes • Password reset codes • Exam cache • Session clustering • Spring security (via session) • Spring web flow (via session) • Exam in progress session - answers, choice ordering, marked to review
    17. Demo
    18. Agenda • Architecture and scale • Examinator reference application • What do people use it for? • How does it work? • Terracotta 3.0
    19. Business Use Cases • Distributed cache • Clustered HTTP sessions • Batch processing • Grid • Messaging and events
    20. Terracotta Elements • Replicated sessions • Async processor • Cache evictor • ConcurrentStringMap • Queues • Master-worker • TC Cache
    21. Who Uses It? • e-Commerce • Online gaming • Financial services • Travel & leisure • Social networking
    22. Agenda • Architecture and scale • Examinator reference application • What do people use it for? • How does it work? • Terracotta 3.0
    23. Core Concepts • Roots • Instrumented Classes • Locks • Integration Modules
    24. Clustered Heap App App app = new App(); app.run();
    25. Clustered Heap App EmployeeManager employeeMgr = new EmployeeManager(); Employee Manager Object lock Object lock = new Object(); Map<String,Employee> = new HashMap<String,Employee>(); HashMap employees
    26. Clustered Heap App Employee \"U99411\" Manager Object lock Employee.ACT IVE == 1 Employee \"Gandalf\" HashMap employees Employee employee = new Employee( “U99411”, “Gandalf”, Employee.ACTIVE);
    27. Clustered Heap App employeeMgr.addEmployee(employee); Employee \"U99411\" Manager Object lock Employee.ACT IVE == 1 \"U99411\" Employee \"Gandalf\" HashMap employees synchronized(lock) { employees.put(e.getId(), e); }
    28. Clustered Heap App Employee \"U99411\" Manager Object lock Employee.ACT IVE == 1 \"U99411\" Employee \"Gandalf\" HashMap employees \"U23526\" Employee \"U23526\" Employee.ACT IVE = 1 \"U99411\"
    29. Let’s look at how to do that...
    30. Agenda • Architecture and scale • Examinator reference application • What do people use it for? • How does it work? • Terracotta 3.0
    31. Terracotta 3.0 • Server Array Striping - server scalability • Operations Center / Developer Console - new dashboard, DGC stats • Cluster events API - topology, data locality • Application groups - sharing data across heterogeneous applications • Platform support - Oracle WebLogic 10.2, 10.3 and RHEL 5.0
    32. Thanks! • Terracotta Open Source JVM clustering: • http://www.terracotta.org • Apress: “The Definitive Guide to Terracotta” • by Ari Zilka, Alex Miller, Geert Bevin, Jonas Boner, Orion Letizi, Taylor Gautier • Alex Miller • @puredanger • http://tech.puredanger.com

    + Alex MillerAlex Miller, 5 months ago

    custom

    545 views, 0 favs, 1 embeds more stats

    How Terracotta enables scaled Spring/Hibernate appl more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 545
      • 534 on SlideShare
      • 11 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 15
    Most viewed embeds
    • 11 views on http://tech.puredanger.com

    more

    All embeds
    • 11 views on http://tech.puredanger.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories