REAL TERRACOTTA. Real-world scalability patterns with Terracotta. SERGIO BOSSA Pro-Netics / Sourcesense



Similar documents
LinuxWorld Conference & Expo Server Farms and XML Web Services

White Paper: 1) Architecture Objectives: The primary objective of this architecture is to meet the. 2) Architecture Explanation

Chapter 1 - Web Server Management and Cluster Topology

Client/Server Computing Distributed Processing, Client/Server, and Clusters

Hadoop: Embracing future hardware

In Memory Accelerator for MongoDB

This talk is mostly about Data Center Replication, but along the way we'll have to talk about why you'd want transactionality arnd the Low-Level API.

High Availability Storage

High Availability Solutions for the MariaDB and MySQL Database

CHAPTER 2 MODELLING FOR DISTRIBUTED NETWORK SYSTEMS: THE CLIENT- SERVER MODEL

Tier Architectures. Kathleen Durant CS 3200

Module 14: Scalability and High Availability

A Java-based system support for distributed applications on the Internet

Oracle Spatial and Graph. Jayant Sharma Director, Product Management

Client/Server and Distributed Computing

Oracle BI Publisher Enterprise Cluster Deployment. An Oracle White Paper August 2007

Responsive, resilient, elastic and message driven system

MuleSoft Blueprint: Load Balancing Mule for Scalability and Availability

Distributed Objects and Components

HA Configuration Approach

A standards-based approach to application integration

B) Using Processor-Cache Affinity Information in Shared Memory Multiprocessor Scheduling

Agenda. SSIS - enterprise ready ETL

AquaLogic ESB Design and Integration (3 Days)

Summer Internship 2013 Group No.4-Enhancement of JMeter Week 1-Report-1 27/5/2013 Naman Choudhary

Chapter 7: Distributed Systems: Warehouse-Scale Computing. Fall 2011 Jussi Kangasharju

HDFS Federation. Sanjay Radia Founder and Hortonworks. Page 1

Apache Tomcat Clustering

Agenda. Enterprise Application Performance Factors. Current form of Enterprise Applications. Factors to Application Performance.

IBM WebSphere Distributed Caching Products

WebLogic Server Foundation Topology, Configuration and Administration

WebSphere ESB Best Practices

Glassfish Architecture.

ArcGIS for Server Reference Implementations. An ArcGIS Server s architecture tour

be architected pool of servers reliability and

XTM Web 2.0 Enterprise Architecture Hardware Implementation Guidelines. A.Zydroń 18 April Page 1 of 12

Virtualized Security: The Next Generation of Consolidation

IBM WebSphere Process Server V7.0 Deployment Exam.

BigMemory & Hybris : Working together to improve the e-commerce customer experience

Windows Server 2008 R2 Hyper V. Public FAQ

CERTIFIED MULESOFT DEVELOPER EXAM. Preparation Guide

Architecting For Failure Why Cloud Architecture is Different! Michael Stiefel

Practical Cassandra. Vitalii

The Sierra Clustered Database Engine, the technology at the heart of

ZEN LOAD BALANCER EE v3.04 DATASHEET The Load Balancing made easy

Appendix A Core Concepts in SQL Server High Availability and Replication

An Oracle White Paper October Maximize the Benefits of Oracle SOA Suite 11g with Oracle Service Bus

Mobile Application Development Platform Comparison

Caching SMB Data for Offline Access and an Improved Online Experience

Bruce Momjian June, Postgres Plus Technical Overview

Bigdata High Availability (HA) Architecture

OVERLAYING VIRTUALIZED LAYER 2 NETWORKS OVER LAYER 3 NETWORKS

High-Availability, Fault Tolerance, and Resource Oriented Computing

BUILDING HIGH-AVAILABILITY SERVICES IN JAVA

Using Multipathing Technology to Achieve a High Availability Solution

Interconnection Networks

The Service Availability Forum Specification for High Availability Middleware

Best Practices on monitoring Solaris Global/Local Zones using IBM Tivoli Monitoring

Resource Utilization of Middleware Components in Embedded Systems

Chapter 10: Scalability

HIGHLY AVAILABLE MULTI-DATA CENTER WINDOWS SERVER SOLUTIONS USING EMC VPLEX METRO AND SANBOLIC MELIO 2010

ZEN LOAD BALANCER EE v3.02 DATASHEET The Load Balancing made easy

Performance And Scalability In Oracle9i And SQL Server 2000

Running a Workflow on a PowerCenter Grid

High Performance Cluster Support for NLB on Window

BBM467 Data Intensive ApplicaAons

SCALABILITY AND AVAILABILITY

How To Manage An Sap Solution

Code:1Z Titre: Oracle WebLogic. Version: Demo. Server 12c Essentials.

Availability Digest. MySQL Clusters Go Active/Active. December 2006

Configuration Management of Massively Scalable Systems

Building Scalable Applications Using Microsoft Technologies

Non-Stop for Apache HBase: Active-active region server clusters TECHNICAL BRIEF

Cisco Virtual Wide Area Application Services: Technical Overview

WAN Optimization, Web Cache, Explicit Proxy, and WCCP. FortiOS Handbook v3 for FortiOS 4.0 MR3

Active/Active HA Clustering on Shared Storage with Samba

emind Webydo Moves to the Google Cloud Platform (GCP) with Emind For a Scalable Cloud Customers Stories by Overview About Webydo

Siebel Application Deployment Manager Guide. Siebel Innovation Pack 2013 Version 8.1/8.2 September 2013

Lab 5 Explicit Proxy Performance, Load Balancing & Redundancy

Decomposition into Parts. Software Engineering, Lecture 4. Data and Function Cohesion. Allocation of Functions and Data. Component Interfaces

APPLICATION NOTE. Elastic Scalability. for HetNet Deployment, Management & Optimization

Managing your Red Hat Enterprise Linux guests with RHN Satellite

Carrier-grade VoIP platform with Kamailio at 1&1

EMC VPLEX FAMILY. Continuous Availability and Data Mobility Within and Across Data Centers

GoGrid Implement.com Configuring a SQL Server 2012 AlwaysOn Cluster

How To Virtualize A Storage Area Network (San) With Virtualization

Creating Web Farms with Linux (Linux High Availability and Scalability)

Apache Tomcat. Load-balancing and Clustering. Mark Thomas, 20 November Pivotal Software, Inc. All rights reserved.

XtreemFS Extreme cloud file system?! Udo Seidel

Ikasan ESB Reference Architecture Review

Full and Para Virtualization

A Middleware Strategy to Survive Compute Peak Loads in Cloud

ORACLE DATABASE 10G ENTERPRISE EDITION

High-Availability Using Open Source Software

Server-side OSGi with Apache Sling. Felix Meschberger Day Management AG 124

SQL Server 2012 Optimization, Performance Tuning and Troubleshooting

Transcription:

REAL TERRACOTTA Real-world scalability patterns with Terracotta SERGIO BOSSA Pro-Netics / Sourcesense

About Me Software architect and engineer http://www.pronetics.it http://www.sourcesense.com Blogger http://sbtourist.blogspot.com Open Source Enthusiast Lead at Scarlet - Clustering for Jira http://scarlet.sf.net Committer at Spring Modules http://springmodules.dev.java.net Committer at Terracotta Forge http://forge.terracotta.org

Agenda Do I need a cluster? Terracotta concepts. Scalability patterns with Terracotta.

Do I need a cluster? The old, dummy, question: Do I need a clustered architecture? The correct one: Do I need scalability? Do I need availability? Nowadays, the answer is: yes, you need.

Why should I need a cluster? Several changes in the social and market landscape... In a few words: More and more users surfing the web. More and more hardware at cheaper price. More and more processors... even on a single machine.

What should I use for my cluster?

The Terracotta Revolution

The Terracotta Revolution Transparent clustering. Everything happens under the hood. Easy to work with. If you know Java, you can cluster your application with no-to-minimal code changes. Deep integration with common frameworks and patterns. Optimized for performance. No cross-node communication. Built on the concept of diff. Open Source. With a great community.

Terracotta Technology Overview Network Attached Memory All cluster nodes share part of their memory heap: a shared object graph starting from one or more roots. Shared objects changes are propagated at the byte level: only the different bytes get propagated! Shared objects changes are delimited by lock-guarded transactions. Shared objects are backed by the cluster server filesystem. With preserved Java semantics (i.e. object identity)!

Terracotta Technology Overview Hub-and-Spoke network architecture A central cluster server with one or more cluster client nodes. Clients talk only with the server. Server can be put in active-passive mode (no SPOF). For enterprise customers only: server can be put in active-active mode (no SPOB).

Terracotta Technology Details Bytecode instrumentation Instrument classes in order to: Share classes among cluster nodes. Intercept and propagate changes. Apply transactions. Distribute method invocations.

Terracotta Technology Details Roots AKA super-static: created only for the first time, and then shared among all cluster nodes. Start of the shared object graph: all objects reachable from roots are shared among all cluster nodes. Except transient ones.

Terracotta Technology Details Locks Every read or write operation on a shared object state must be guarded by locks. Synchronized blocks. java.util.concurrent.locks.reentrantreadwritelock Acting as a transaction boundary. Acting as a change propagation boundary.

Terracotta Technology Details Distributed Method Invocation Methods called on a shared object from a cluster node, are automatically fired on the same object instance of all other cluster nodes.

Terracotta Technology Details Declarative configuration: XML file. Java annotations.

Terracotta Quick Start Plan Identify roots and related shared object graphs. Identify transactional methods. Identify classes that need to be instrumented. Identify distributed methods (optional). Choose your cluster deployment configuration: How many client nodes? How many server nodes? How much memory?...

Terracotta Quick Start Operate Configure the cluster. Start the Terracotta cluster server: sh tc_home/bin/start-tc-server.sh -f path/to/tc-conf.xml Start the Terracotta cluster client(s): TC_INSTALL_DIR=... TC_CONFIG_PATH=.... $TC_INSTALL_DIR/bin/dso-env.sh -q export JAVA_OPTS=${TC_JAVA_OPTS} java...

What about real world scalability? Feeling like lost at sea?

Scalability in the real world We need some patterns! Cache your data in a distributed fashion. Partition your cached data and collocate with your processing. Asynchronously write-behind to your back-end. Asynchronously de-couple components communication. Asynchronously de-couple components processing.

Data-affinity caching

Data-affinity caching In a nutshell Key concepts: Use a partition function for grouping related entries on the same distributed cache instance. Use the partition function to look up the cache instance and put/get related entries. Process the cached data on the same node it belongs to. Key features: No network traffic between cache instances. Distributed load. Higher scalability.

Data-affinity caching With Terracotta Use: Tim-Tree-Map-Cache http://forge.terracotta.org/releases/projects/tim-tree-map-cache/ Key classes: org.tc.cache.cachefactory org.tc.cache.iterracottacache

Asynchronous write-behind

Asynchronous write-behind In a nutshell Key concepts: Always write and read from your (distributed) cache. Asynchronously schedule writes to the storage. Key features: Higher throughput. Load throttling.

Asynchronous write-behind With Terracotta Use: Tim-Async http://forge.terracotta.org/releases/projects/tim-async/ Key classes: org.terracotta.modules.async.asynccoordinator org.terracotta.modules.async.itemprocessor

Asynchronous messaging

Asynchronous messaging In a nutshell Key concepts: Connects application components through pipes. Configure processing filters to elaborate messages and make them flow through pipes. Key features: De-coupled application components. Higher reliability. Higher scalability.

Asynchronous messaging With Terracotta Use: Tim-Pipes http://forge.terracotta.org/releases/projects/tim-messaging/ Key classes: org.terracotta.message.topology.topologymanager org.terracotta.message.topology.topology org.terracotta.message.routing.router org.terracotta.message.pipe.pipe org.terracotta.message.pipe.pipeprocessor org.terracotta.message.subscriber.subscriber org.terracotta.message.subscriber.subscriberprocessor

Asynchronous processing

Asynchronous processing In a nutshell Key concepts: Create a set of tasks. Submit tasks to a master. Tasks will be executed by workers. Eventually wait for tasks to be completed. Key features: De-coupled execution of expensive tasks. Parallel execution of tasks. Customisable routing logic. Load distribution.

Asynchronous processing With Terracotta Use: Tim-MasterWorker http://forge.terracotta.org/releases/projects/tim-messaging/ Key classes: org.terracotta.executor.distributedexecutorservice org.terracotta.executor.distributedcompletionservice org.terracotta.workmanager.statik.staticworkmanager org.terracotta.workmanager.statik.staticworker org.terracotta.workmanager.dynamic.dynamicworkmanager org.terracotta.workmanager.dynamic.dynamicworker

Conclusion Enjoy scalability challenges! Design your scalable architecture... Program in plain old Java... Run with Terracotta!

Q & A