Terracotta And  Hibernate
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

Terracotta And Hibernate

  • 3,702 views
Uploaded on

Terracotta is a high performance open source Java clustering technology which includes native support via plug-ins to seamlessly integrate with applications based on Hibernate, EHCache, Spring and......

Terracotta is a high performance open source Java clustering technology which includes native support via plug-ins to seamlessly integrate with applications based on Hibernate, EHCache, Spring and more. In this session, learn how to integrate Terracotta into your Hibernate application in just a few simple steps. Then visualize your application in real-time and tune it's performance using the Terracotta developer console, a sophisticated runtime visualization, profiling and debugging tool included with the core Terracotta kit.

More in: Business , Sports , Career
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
3,702
On Slideshare
3,689
From Embeds
13
Number of Embeds
3

Actions

Shares
Downloads
207
Comments
0
Likes
7

Embeds 13

http://www.linkedin.com 10
https://www.linkedin.com 2
http://www.slideshare.net 1

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Scaling Hibernate with Terracotta Taylor Gautier Code Camp, October 3, 2009
  • 2. Agenda
  • 3. Agenda • Caching 101
  • 4. Agenda • Caching 101 • Intro to Terracotta
  • 5. Agenda • Caching 101 • Intro to Terracotta • Installation and Setup
  • 6. Agenda • Caching 101 • Intro to Terracotta • Installation and Setup • Demo
  • 7. About me...
  • 8. About me... • Java enthusiast since 1996
  • 9. About me... • Java enthusiast since 1996 • Have built scalable systems since 1999
  • 10. About me... • Java enthusiast since 1996 • Have built scalable systems since 1999 • Terracotta Product Manager 2006-2009
  • 11. About me... • Java enthusiast since 1996 • Have built scalable systems since 1999 • Terracotta Product Manager 2006-2009 • Principal Architect - Grid Dynamics
  • 12. About me... • Java enthusiast since 1996 • Have built scalable systems since 1999 • Terracotta Product Manager 2006-2009 • Principal Architect - Grid Dynamics • Technical Advisor - Terracotta
  • 13. About me... • Java enthusiast since 1996 • Have built scalable systems since 1999 • Terracotta Product Manager 2006-2009 My Blog - java.think() • Principal Architect - Grid Dynamics http:// • Technical Advisor - Terracotta javathink.blogspot.com
  • 14. Quick poll...
  • 15. • How many have heard of Terracotta?
  • 16. • How many have heard of Terracotta? • How many have downloaded it?
  • 17. • How many have heard of Terracotta? • How many have downloaded it? • Anyone running in production?
  • 18. Why are you here?
  • 19. Your app needs... something
  • 20. Your app needs... better latency
  • 21. Your app needs... better throughput
  • 22. Your app needs... better efficiency
  • 23. Your app needs... to cost less
  • 24. Let’s see if modern system architecture can help us...
  • 25. Memory Hierarchy
  • 26. Why a hierarchy?
  • 27. Modern Hardware
  • 28. Modern Hardware CPU Speed (2GHZ) 1 nanosecond (1x10 -9)
  • 29. Modern Hardware CPU Speed (2GHZ) 1 nanosecond (1x10 -9) L1 Cache Access Time 2 nanoseconds (2x10 -9)
  • 30. Modern Hardware CPU Speed (2GHZ) 1 nanosecond (1x10 -9) L1 Cache Access Time 2 nanoseconds (2x10 -9) L2 Cache Access Time 20 nanoseconds (20x10 -9)
  • 31. Modern Hardware CPU Speed (2GHZ) 1 nanosecond (1x10 -9) L1 Cache Access Time 2 nanoseconds (2x10 -9) L2 Cache Access Time 20 nanoseconds (20x10 -9) Main Memory Access Time 60 nanoseconds (60x10 -9)
  • 32. How common is this? Modern Hardware
  • 33. How common is this? File-system
  • 34. How common is this? Web Architecture
  • 35. But not JEE?
  • 36. But not JEE? Hibernate (Session)
  • 37. But not JEE? Hibernate (Session) Hibernate Second Level Cache
  • 38. Hibernate Architecture CPU Architecture
  • 39. Hibernate Architecture CPU Architecture Hibernate Architecture
  • 40. How to add a second level cache to your application?
  • 41. Terracotta!
  • 42. What is Terracotta?
  • 43. IS IT...
  • 44. A proprietary JVM?
  • 45. Proprietary software?
  • 46. Expensive?
  • 47. Of course not!
  • 48. Terracotta, is...
  • 49. Terracotta, is... Open source
  • 50. Terracotta, is... Open source High Performance Availability and Scalability
  • 51. Terracotta, is... Open source High Performance Availability and Scalability For J2SE & J2EE
  • 52. Terracotta, is... Open source High Performance Availability and Scalability For J2SE & J2EE Really fun!
  • 53. Terracotta Platform Terracotta Platform (Server Array)
  • 54. Terracotta Platform - coherent data replication - automatic data persistence - ACID transactions - automatic data routing - cluster coordination - visual profiling and debugging Terracotta Platform (Server Array)
  • 55. Terracotta Platform Application Application Application - coherent data replication - automatic data persistence - ACID transactions - automatic data routing - cluster coordination - visual profiling and debugging Terracotta Platform (Server Array)
  • 56. Terracotta Platform Application Application Application Terracotta Server Instance Terracotta Server Instance
  • 57. Terracotta Platform Application Application Application Terracotta Server Terracotta Server Instance Instance Terracotta Server Terracotta Server Instance Instance
  • 58. Terracotta Platform Application Application Application Terracotta Server Terracotta Server Terracotta Server Terracotta Server Instance Instance Instance Instance Terracotta Server Terracotta Server Terracotta Server Terracotta Server Instance Instance Instance Instance
  • 59. Terracotta Platform Application Application Application POJOs POJOs POJOs Terracotta Server Terracotta Server Terracotta Server Terracotta Server Instance Instance Instance Instance Terracotta Server Terracotta Server Terracotta Server Terracotta Server Instance Instance Instance Instance
  • 60. Terracotta Platform Application Application Application Hibernate Spring EHCache Terracotta Server Terracotta Server Terracotta Server Terracotta Server Instance Instance Instance Instance Terracotta Server Terracotta Server Terracotta Server Terracotta Server Instance Instance Instance Instance
  • 61. TIMs Terracotta Platform ------------ Application Application Application Hibernate Spring EHCache Terracotta Server Terracotta Server Terracotta Server Terracotta Server Instance Instance Instance Instance Terracotta Server Terracotta Server Terracotta Server Terracotta Server Instance Instance Instance Instance
  • 62. TIMs Terracotta Platform ------------ Application Application Application Hibernate Spring EHCache Hibernate TIM Spring TIMs EHCache TIM Terracotta Server Terracotta Server Terracotta Server Terracotta Server Instance Instance Instance Instance Terracotta Server Terracotta Server Terracotta Server Terracotta Server Instance Instance Instance Instance
  • 63. Terracotta Use Cases • Hibernate • Spring • EHCache • Web Sessions • Batch or Distributed Workload • POJOs
  • 64. Support...
  • 65. Support... • Community • ES
  • 66. Support... • Community • ES • Commercial (24x7 SLA, official patches) • EX • FX
  • 67. Terracotta for Hibernate
  • 68. Features...
  • 69. Features... • Second-Level Cache
  • 70. Features... • Second-Level Cache • Replicated, Coherent Cache
  • 71. Features... • Second-Level Cache • Replicated, Coherent Cache • Configurable settings at run-time
  • 72. Features... • Second-Level Cache • Replicated, Coherent Cache • Configurable settings at run-time • Visual Profiling of Cache and Performance
  • 73. Terracotta for Hibernate Architecture Standalone Architecture
  • 74. Terracotta for Hibernate Architecture Standalone Architecture Distributed Architecture
  • 75. Performance 100% Read 90 % Read 0% Write 10% Write 2ms 7ms Terracotta 55k TPS 16k TPS 106ms 95ms MySQL alone 1,122 TPS 1,259 TPS PetClinic with 1,000,000 objects
  • 76. so, with a cache, you get...
  • 77. so, with a cache, you get... ✓ Better performance
  • 78. so, with a cache, you get... ✓ Better performance ✓ Better latency
  • 79. so, with a cache, you get... ✓ Better performance ✓ Better latency ✓ Better throughput
  • 80. so, with a cache, you get... ✓ Better performance ✓ Better latency ✓ Better throughput ✓ Better efficiency
  • 81. so, with a cache, you get... ✓ Better performance ✓ Better latency ✓ Better throughput ✓ Better efficiency ✓ Lower cost
  • 82. Your app needs...
  • 83. Your app needs... a cache!
  • 84. Installation and Setup
  • 85. Step 1 - Download...
  • 86. ...and Install Terracotta
  • 87. Step 2 - Copy the Hibernate JARs
  • 88. Step 2 - Copy the Hibernate JARs
  • 89. Step 3 - Update your Hibernate Config
  • 90. Step 4 - Update and re- build your Application
  • 91. Step 4 - Update and re- build your Application
  • 92. Step 5 - Start a Terracotta server
  • 93. Step 6 - Start your application server
  • 94. Always start a developer console!
  • 95. DEMO!