Clustering Java applications with Terracotta and Hazelcast

  • 4,037 views
Uploaded on

Presentation prepared for JavaBreese in Odessa, Ukraine (18 May 2013)

Presentation prepared for JavaBreese in Odessa, Ukraine (18 May 2013)

More in: Technology , Travel
  • 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
4,037
On Slideshare
0
From Embeds
0
Number of Embeds
3

Actions

Shares
Downloads
70
Comments
0
Likes
6

Embeds 0

No embeds

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
  • Hello and welcome to Sigma Ukraine!

Transcript

  • 1. CLUSTERING JAVA APPLICATIONSWITH TERRACOTTA AND HAZELCASTBoris Trofimov @ Sigma Ukraine
  • 2. Why clasterizationTerracottaHazelcastSummarySigma Ukraine2AGENDA
  • 3. Sigma Ukraine3WHY CLASTERIZATION?Moores law is brokenEra of Big Data
  • 4. Application clusterization Horizontal scaling, vertical scaling, MapReduce, MPI,...Data Claterization Distributed Data Exchanging Distributed Coordination Distributed HeapSigma Ukraine4KINDS OF CLASTERIZATION
  • 5. SOMETIMES ITS HARD TO CHOOSE...Sigma Ukraine5
  • 6. Sigma Ukraine6
  • 7. Maintained by private companySupports Quartz and EhcacheTerracota modesSigma Ukraine7ABOUT TERRACOTTA
  • 8. Sigma Ukraine8
  • 9. BigMemory uses Ehcache as its main programming interfaceOff-Heap without Garbage Collection Pauses3 major bricks: CacheManager, Cache and ElementSerializable data classesSigma Ukraine9DISTRIBUTED CACHE MODE
  • 10. Sigma Ukraine10EXAMPLE — CONFIGURATION
  • 11. 11EXAMPLE CRUD
  • 12. 12EXAMPLE — IN-MEMORY SEARCH
  • 13. BigMemory GO vs BigMemory MAXMight use Server ArrayRespecting CA (CAP theorem)Linear grouthSigma Ukraine13CLUSTERIZATION
  • 14. Sigma Ukraine14
  • 15. Sigma Ukraine15HOW IT WORKSSpecify root objectsLaunch terracotta serverLaunch app instances
  • 16. Terracotta uses aspect-oriented technologies to adapt theapplication at class load time.Terracotta does not use serialization.DSO uses object identity, instrumented classes (byte-codeinstrumentation), object-graph roots, and cluster-wide locks tomaintain data coherenceDistributed GCSigma Ukraine16DSO INTERNALS
  • 17. All Standard non-value types like maps, listsPOJO ObjectsSynchronization Java objects like locks, semaphoresSigma Ukraine17OBJECTS TO SYNC
  • 18. Sigma Ukraine18EXAMPLE — DEFINE CONFIGURATION
  • 19. Sigma Ukraine19EXAMPLE — CODE
  • 20. Start Terracotta Server (local or cluster)Launch two Java application instances through terracottascript launcher.Sigma Ukraine20EXAMPLE — LAUNCH
  • 21. Sharing ordinary objectsLegacy clasteringDistributed CacheHibernate 2nd Cache (through DSO)Web Session clustering (through DSO)Clastering read/write data with fast updateSigma Ukraine21USE CASES
  • 22. Internal ACID TransactionsOnly data changes are broadcastLocal cachesDSO- POJO transparent clasterizationsMonitoring Control toolsSigma Ukraine22BENEFITS
  • 23. Sigma Ukraine23
  • 24. InMemory Distributed CacheOpen Source solutionSupports own special distributed data structuresSupports locks and eventsMight be slcaled outEasy to use and integrateAll objects must be serializableSupports standard collection interfacesSigma Ukraine24WHAT IS HAZELCAST
  • 25. Distributed QueueDistributed TopicDistributed MapDistributed MultiMapDistributed SetDistributed ListDistributed LocksDistribured Event (Listeners)Distributed Topic (Hello JMS)Distributed SemaphoreDistributed Executor ServiceSigma Ukraine25SUPPORTED DATA
  • 26. 26EXAMPLE — DISTRIBUTED MAP
  • 27. Partitioning with replicasScalable Peer-toPeer architectureAvailability over ConsistencyFailover clusterNative Client supportSigma Ukraine27CLUSTERIZATION
  • 28. User ASID Transactions over several operationsIt is free, unlimited community license *PersistenceSearch enhanced by user-defined indexesSpring support (beans, cachable)Simple interfaces in comparison to Terracotta BigMemorySigma Ukraine28BENEFITS
  • 29. Share data across clusterSend/receive messagesDistributed Coordination (locks)Hibernate 2nd CacheHttp Session Clustering with HazelcastWM (based on Servletspecification)Sigma Ukraine29USE CASES
  • 30. Sigma Ukraine30SUMMARY
  • 31. Thank you for your attention!