The document discusses building fault tolerant Java applications using Apache Cassandra. It provides an overview of fault tolerance, Cassandra's architecture, failure scenarios, and using the Cassandra Java driver. Examples are given of modeling data in Cassandra and performing common operations like getting all events for a customer or events within a time slice.
AWS Webcast - Backup & Restore for ElastiCache/Redis: Getting Started & Best ...Amazon Web Services
ElastiCache is a web service that makes it easy to deploy, operate, and scale an in-memory cache in the cloud. With the introduction of Redis Backup and Restore, you can now create a snapshot of your entire ElastiCache for Redis cluster as it exists at a specific point in time. Schedule automatic, recurring daily snapshots, as well as initiate a manual snapshot at any time.
In this webinar, we'll discuss what you can do with this new capability, explain how it works, and describe how to get the most out of it. Key reasons to attend:
- Get a brief overview of Amazon ElastiCache for Redis
- Learn about use cases for the new backup/restore functionality
- Discover important best practices
- Get answers about the service
Slides from my Planning to Fail talk given at PHP North East conference 2013. This is a slightly longer version of the same talk given at the PHP UK conference. The talk was on how you can build resilient systems by embracing failure.
AWS Webcast - Backup & Restore for ElastiCache/Redis: Getting Started & Best ...Amazon Web Services
ElastiCache is a web service that makes it easy to deploy, operate, and scale an in-memory cache in the cloud. With the introduction of Redis Backup and Restore, you can now create a snapshot of your entire ElastiCache for Redis cluster as it exists at a specific point in time. Schedule automatic, recurring daily snapshots, as well as initiate a manual snapshot at any time.
In this webinar, we'll discuss what you can do with this new capability, explain how it works, and describe how to get the most out of it. Key reasons to attend:
- Get a brief overview of Amazon ElastiCache for Redis
- Learn about use cases for the new backup/restore functionality
- Discover important best practices
- Get answers about the service
Slides from my Planning to Fail talk given at PHP North East conference 2013. This is a slightly longer version of the same talk given at the PHP UK conference. The talk was on how you can build resilient systems by embracing failure.
Gophers Riding Elephants: Writing PostgreSQL tools in GoAJ Bahnken
This talk will start with an overview of Go, then dive into some examples of using it to work with Postgres. We'll show basics like running queries, then demonstrate how Go makes difficult things easy, such as inspecting Postgres's TCP wire protocol and providing retry mechanisms and monitoring for restores (including fun stories, tips and tricks).
Join us and see why Go - with it's powerful concurrency primitives and unbeatable performance - can be one of the most powerful tools in your toolbox.
Powerpoint file(incl. animations!): http://db.tt/oQiXb9lq
This is the slides of the presentation "Wordpress optimization" who presented at WordCamp 2013.
How to improve your wordpress performance and speed up your website more than 700% faster!
Message Queuing on a Large Scale: IMVUs stateful real-time message queue for ...Jon Watte
These slides are the ones I presented at the 2011 Game Developer's Conference.
Social game and entertainment company IMVU built a real-time lightweight networked messaging back-end suitable for chat and social gaming. Here's how we did it!
Building an Impenetrable ZooKeeper - Kathleen Tingjaxconf
ZooKeeper is the unsung hero. Although a critical component, ZooKeeper is often noticed only after it’s missing. In this presentation, we'll talk about how to efficiently resolve some of the common issues that can cause ZooKeeper’s unavailability. An impenetrable ZooKeeper makes for a healthy cluster. ZooKeeper provides reliable and timely coordination of processes.
Most mid-sized Django websites thrive by relying on memcached. Though what happens when basic memcached is not enough? And how can one identify when the caching architecture is becoming a bottleneck? We'll cover the problems we've encountered and solutions we've put in place.
(SDD402) Amazon ElastiCache Deep Dive | AWS re:Invent 2014Amazon Web Services
Peek behind the scenes to learn about Amazon ElastiCache's design and architecture. See common design patterns of our Memcached and Redis offerings and how customers have used them for in-memory operations and achieved improved latency and throughput for applications. During this session, we review best practices, design patterns, and anti-patterns related to Amazon ElastiCache.
Emerging technologies /frameworks in Big DataRahul Jain
A short overview presentation on Emerging technologies /frameworks in Big Data covering Apache Parquet, Apache Flink, Apache Drill with basic concepts of Columnar Storage and Dremel.
On the eve of what was hoped to be of the biggest traffic days for New York Magazine’s sites, the company was the target of a DDoS attack that caused their sites to go dark. New York quickly turned to Fastly to deflect and overcome the attack. Larry discusses how New York Mag went from zero page views per second to getting back online and recording one of their biggest traffic days of the year with the aid of Fastly’s team and tech. In addition he discusses how New York is leveraging Fastly as part of a larger strategy of performance improvements to deliver the build a better web and deliver the best premium content experience in the context of alternative distribution and consumption channels, such as Google Amp and FB Instant Article.
Building a Fast, Reliable SQL Server for kCura RelativityBrent Ozar
You want Relativity to run as fast as possible, but you don't have an unlimited budget. Microsoft Certified Master Brent Ozar will give you real-life stories from shops with high-performance environments. You’ll learn how to choose between virtual and physical servers, understand different high-availability methods, and discover why clustering is such a no-brainer.
Gophers Riding Elephants: Writing PostgreSQL tools in GoAJ Bahnken
This talk will start with an overview of Go, then dive into some examples of using it to work with Postgres. We'll show basics like running queries, then demonstrate how Go makes difficult things easy, such as inspecting Postgres's TCP wire protocol and providing retry mechanisms and monitoring for restores (including fun stories, tips and tricks).
Join us and see why Go - with it's powerful concurrency primitives and unbeatable performance - can be one of the most powerful tools in your toolbox.
Powerpoint file(incl. animations!): http://db.tt/oQiXb9lq
This is the slides of the presentation "Wordpress optimization" who presented at WordCamp 2013.
How to improve your wordpress performance and speed up your website more than 700% faster!
Message Queuing on a Large Scale: IMVUs stateful real-time message queue for ...Jon Watte
These slides are the ones I presented at the 2011 Game Developer's Conference.
Social game and entertainment company IMVU built a real-time lightweight networked messaging back-end suitable for chat and social gaming. Here's how we did it!
Building an Impenetrable ZooKeeper - Kathleen Tingjaxconf
ZooKeeper is the unsung hero. Although a critical component, ZooKeeper is often noticed only after it’s missing. In this presentation, we'll talk about how to efficiently resolve some of the common issues that can cause ZooKeeper’s unavailability. An impenetrable ZooKeeper makes for a healthy cluster. ZooKeeper provides reliable and timely coordination of processes.
Most mid-sized Django websites thrive by relying on memcached. Though what happens when basic memcached is not enough? And how can one identify when the caching architecture is becoming a bottleneck? We'll cover the problems we've encountered and solutions we've put in place.
(SDD402) Amazon ElastiCache Deep Dive | AWS re:Invent 2014Amazon Web Services
Peek behind the scenes to learn about Amazon ElastiCache's design and architecture. See common design patterns of our Memcached and Redis offerings and how customers have used them for in-memory operations and achieved improved latency and throughput for applications. During this session, we review best practices, design patterns, and anti-patterns related to Amazon ElastiCache.
Emerging technologies /frameworks in Big DataRahul Jain
A short overview presentation on Emerging technologies /frameworks in Big Data covering Apache Parquet, Apache Flink, Apache Drill with basic concepts of Columnar Storage and Dremel.
On the eve of what was hoped to be of the biggest traffic days for New York Magazine’s sites, the company was the target of a DDoS attack that caused their sites to go dark. New York quickly turned to Fastly to deflect and overcome the attack. Larry discusses how New York Mag went from zero page views per second to getting back online and recording one of their biggest traffic days of the year with the aid of Fastly’s team and tech. In addition he discusses how New York is leveraging Fastly as part of a larger strategy of performance improvements to deliver the build a better web and deliver the best premium content experience in the context of alternative distribution and consumption channels, such as Google Amp and FB Instant Article.
Building a Fast, Reliable SQL Server for kCura RelativityBrent Ozar
You want Relativity to run as fast as possible, but you don't have an unlimited budget. Microsoft Certified Master Brent Ozar will give you real-life stories from shops with high-performance environments. You’ll learn how to choose between virtual and physical servers, understand different high-availability methods, and discover why clustering is such a no-brainer.
Cassandra from the trenches: migrating Netflix (update)Jason Brown
Update talk on Cassandra at Netflix, presented at the Silicon Valley NoSQL meetup on 9 Feb 2012. Includes an introduction to Astyanax, an open source cassandra client written in java.
C* Summit 2013 - Hindsight is 20/20. MySQL to Cassandra by Michael KjellmanDataStax Academy
Abstract A brief intro to how Barracuda Networks uses Cassandra and the ways in which they are replacing their MySQL infrastructure, with Cassandra. This presentation will include the lessons they've learned along the way during this migration.
What We Learned About Cassandra While Building go90 (Christopher Webster & Th...DataStax
Go90 is a mobile entertainment platform offering access to live and on demand videos. We built the web services platform and social features like activity feed for go90 by making heavy use of Cassandra and Scala, and would like to share what we learned during development and while operating go90. In this presentation, we cover our data model evolution from the initial prototypes to the current production version and the significant performance gain by using a better data model. We will explain how we apply time series data modeling and the benefits of using expiring columns with DateTieredCompactionStrategy. We will also talk about interesting experiences related to table modifications, tombstones and table pagination. On the operations side, we will discuss our findings on java driver usage, performance, monitoring, cluster maintenance, version upgrade, 2-way ssl and many more. We hope you can learn from our mistakes instead of making them yourself!
About the Speakers
Christopher Webster Software Engineer, AOL
Christopher Webster works on the web services platform for the go90 AOL project. Previously he was a Computer Scientist for the Mission Control Technologies project at NASA Ames Center. Chris worked as a senior staff engineer at Sun Microsystems for Project zembly, the cloud development and deployment environment as well as technical lead in many NetBeans projects. Chris is an author of the NetBeans Field Guide and Assemble the Social Web With Zembly.
Thomas Ng Software Engineer, AOL
Thomas Ng is a software engineer at AOL, building web services for the go90 mobile entertainment platform using Cassandra, Scala and Kafka.
Cassandra Community Webinar: MySQL to Cassandra - What I Wish I'd KnownDataStax
A brief intro to how Barracuda Networks uses Cassandra and the ways in which they are replacing their MySQL infrastructure, with Cassandra. This presentation will include the lessons they've learned along the way during this migration.
Speaker: Michael Kjellman, Software Engineer at Barracuda Networks
Michael Kjellman is a Software Engineer, from San Francisco, working at Barracuda Networks. Michael works across multiple products, technologies, and languages. He primarily works on Barracuda's spam infrastructure and web filter classification data.
DataStax: Making Cassandra Fail (for effective testing)DataStax Academy
Interacting with a distributed database is inherently more complex than with a single server database. Add in a few datacenters and some network issues and things get even more hairy.
I'm a firm believer in automated tests, functionality of software that is not covered by an automated test is nothing more than a rumor.
If we want to build fault tolerant applications with Cassandra we better start testing the faults. The first step is to understand them, so we'll go through in detail:
- Read timeouts
- Write timeouts
- Unavailable
- Connectivity issues between the driver and the coordinator
Understanding these scenarios lets you decide when you should be re-trying your queries. Then how do we test our application under these scenarios? I'll go through three approaches you can use:
- Inserting a proxy between the driver and the cluster to drop traffic
- Getting into the Cassandra code and overriding the QueryHandler to inject faults (see https://github.com/chbatey/cassandra-killr)
- Stubbing Cassandra out at the protocol level (http://www.scassandra.org/)
You should leave this talk with an appreciation of the failures you can get from the driver and what you should do about them, and hopefully you'll be inspired to test all these scenarios.
Similar to LJC: Fault tolerance with Apache Cassandra (20)
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Globus
The Earth System Grid Federation (ESGF) is a global network of data servers that archives and distributes the planet’s largest collection of Earth system model output for thousands of climate and environmental scientists worldwide. Many of these petabyte-scale data archives are located in proximity to large high-performance computing (HPC) or cloud computing resources, but the primary workflow for data users consists of transferring data, and applying computations on a different system. As a part of the ESGF 2.0 US project (funded by the United States Department of Energy Office of Science), we developed pre-defined data workflows, which can be run on-demand, capable of applying many data reduction and data analysis to the large ESGF data archives, transferring only the resultant analysis (ex. visualizations, smaller data files). In this talk, we will showcase a few of these workflows, highlighting how Globus Flows can be used for petabyte-scale climate analysis.
Navigating the Metaverse: A Journey into Virtual Evolution"Donna Lenk
Join us for an exploration of the Metaverse's evolution, where innovation meets imagination. Discover new dimensions of virtual events, engage with thought-provoking discussions, and witness the transformative power of digital realms."
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Globus
Large Language Models (LLMs) are currently the center of attention in the tech world, particularly for their potential to advance research. In this presentation, we'll explore a straightforward and effective method for quickly initiating inference runs on supercomputers using the vLLM tool with Globus Compute, specifically on the Polaris system at ALCF. We'll begin by briefly discussing the popularity and applications of LLMs in various fields. Following this, we will introduce the vLLM tool, and explain how it integrates with Globus Compute to efficiently manage LLM operations on Polaris. Attendees will learn the practical aspects of setting up and remotely triggering LLMs from local machines, focusing on ease of use and efficiency. This talk is ideal for researchers and practitioners looking to leverage the power of LLMs in their work, offering a clear guide to harnessing supercomputing resources for quick and effective LLM inference.
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus
As part of the DOE Integrated Research Infrastructure (IRI) program, NERSC at Lawrence Berkeley National Lab and ALCF at Argonne National Lab are working closely with General Atomics on accelerating the computing requirements of the DIII-D experiment. As part of the work the team is investigating ways to speedup the time to solution for many different parts of the DIII-D workflow including how they run jobs on HPC systems. One of these routes is looking at Globus Compute as a way to replace the current method for managing tasks and we describe a brief proof of concept showing how Globus Compute could help to schedule jobs and be a tool to connect compute at different facilities.
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...Juraj Vysvader
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I didn't get rich from it but it did have 63K downloads (powered possible tens of thousands of websites).
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
We describe the deployment and use of Globus Compute for remote computation. This content is aimed at researchers who wish to compute on remote resources using a unified programming interface, as well as system administrators who will deploy and operate Globus Compute services on their research computing infrastructure.
Atelier - Innover avec l’IA Générative et les graphes de connaissancesNeo4j
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Allez au-delà du battage médiatique autour de l’IA et découvrez des techniques pratiques pour utiliser l’IA de manière responsable à travers les données de votre organisation. Explorez comment utiliser les graphes de connaissances pour augmenter la précision, la transparence et la capacité d’explication dans les systèmes d’IA générative. Vous partirez avec une expérience pratique combinant les relations entre les données et les LLM pour apporter du contexte spécifique à votre domaine et améliorer votre raisonnement.
Amenez votre ordinateur portable et nous vous guiderons sur la mise en place de votre propre pile d’IA générative, en vous fournissant des exemples pratiques et codés pour démarrer en quelques minutes.
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteGoogle
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-pilot-review/
AI Pilot Review: Key Features
✅Deploy AI expert bots in Any Niche With Just A Click
✅With one keyword, generate complete funnels, websites, landing pages, and more.
✅More than 85 AI features are included in the AI pilot.
✅No setup or configuration; use your voice (like Siri) to do whatever you want.
✅You Can Use AI Pilot To Create your version of AI Pilot And Charge People For It…
✅ZERO Manual Work With AI Pilot. Never write, Design, Or Code Again.
✅ZERO Limits On Features Or Usages
✅Use Our AI-powered Traffic To Get Hundreds Of Customers
✅No Complicated Setup: Get Up And Running In 2 Minutes
✅99.99% Up-Time Guaranteed
✅30 Days Money-Back Guarantee
✅ZERO Upfront Cost
See My Other Reviews Article:
(1) TubeTrivia AI Review: https://sumonreview.com/tubetrivia-ai-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeAftab Hussain
Understanding variable roles in code has been found to be helpful by students
in learning programming -- could variable roles help deep neural models in
performing coding tasks? We do an exploratory study.
- These are slides of the talk given at InteNSE'23: The 1st International Workshop on Interpretability and Robustness in Neural Software Engineering, co-located with the 45th International Conference on Software Engineering, ICSE 2023, Melbourne Australia
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
Check out the webinar slides to learn more about how XfilesPro transforms Salesforce document management by leveraging its world-class applications. For more details, please connect with sales@xfilespro.com
If you want to watch the on-demand webinar, please click here: https://www.xfilespro.com/webinars/salesforce-document-management-2-0-smarter-faster-better/
How to Position Your Globus Data Portal for Success Ten Good PracticesGlobus
Science gateways allow science and engineering communities to access shared data, software, computing services, and instruments. Science gateways have gained a lot of traction in the last twenty years, as evidenced by projects such as the Science Gateways Community Institute (SGCI) and the Center of Excellence on Science Gateways (SGX3) in the US, The Australian Research Data Commons (ARDC) and its platforms in Australia, and the projects around Virtual Research Environments in Europe. A few mature frameworks have evolved with their different strengths and foci and have been taken up by a larger community such as the Globus Data Portal, Hubzero, Tapis, and Galaxy. However, even when gateways are built on successful frameworks, they continue to face the challenges of ongoing maintenance costs and how to meet the ever-expanding needs of the community they serve with enhanced features. It is not uncommon that gateways with compelling use cases are nonetheless unable to get past the prototype phase and become a full production service, or if they do, they don't survive more than a couple of years. While there is no guaranteed pathway to success, it seems likely that for any gateway there is a need for a strong community and/or solid funding streams to create and sustain its success. With over twenty years of examples to draw from, this presentation goes into detail for ten factors common to successful and enduring gateways that effectively serve as best practices for any new or developing gateway.
May Marketo Masterclass, London MUG May 22 2024.pdfAdele Miller
Can't make Adobe Summit in Vegas? No sweat because the EMEA Marketo Engage Champions are coming to London to share their Summit sessions, insights and more!
This is a MUG with a twist you don't want to miss.
2. @chbatey
Who am I?
• Technical Evangelist for Apache Cassandra
• Founder of Stubbed Cassandra
• Help out Apache Cassandra users
• DataStax
• Builds enterprise ready version of Apache
Cassandra
• Previous: Cassandra backed apps at BSkyB
3. @chbatey
Overview
• ‘Building fault tolerant Java applications with Apache
Cassandra’
-Fault tolerance?
-Building an ‘always on’ (HA) service
-Cassandra architecture overview
-Cassandra failure scenarios
-Cassandra Java Driver
4. @chbatey
The evolution of a developer
• A few years ago I used to write a lot of code in an IDE
• Recently not so much:
- Config management (Ansible, Puppet etc)
- Solution architecture
• Frequently bootstrapping new services
12. @chbatey
The drawbacks
• Latency :(
• Tricky to setup
• New DB/Cache = new component in your architecture to
scale and make HA
• Tightly coupled to your container now
• Move to embedded container in executable jars :(
19. @chbatey
Decisions decisions… CAP theorem
Are these really that different??
Relational Database
Mongo, Redis
Highly Available Databases:
Voldermort, Cassandra
20. @chbatey
PAC-ELC
• If Partition: Trade off Availability vs Consistency
• Else: Trade off Latency vs Consistency
• http://dbmsmusings.blogspot.co.uk/2010/04/problems-
with-cap-and-yahoos-little.html
23. @chbatey
Datacenter and rack aware
Europe
• Distributed master less
database (Dynamo)
• Column family data model
(Google BigTable)
• Multi data centre replication
built in from the start
USA
24. @chbatey
Cassandra
Online
• Distributed master less
database (Dynamo)
• Column family data model
(Google BigTable)
• Multi data centre replication
built in from the start
• Analytics with Apache
Spark
Analytics
25. @chbatey
Dynamo 101
• The parts Cassandra took
- Consistent hashing
- Replication
- Strategies for replication
- Gossip
- Hinted handoff
- Anti-entropy repair
• And the parts it left behind
- Key/Value
- Vector clocks
26. @chbatey
Picking the right nodes
• You don’t want a full table scan on a 1000 node cluster!
• Dynamo to the rescue: Consistent Hashing
• Then the replication strategy takes over:
- Network topology
- Simple
27. @chbatey
Murmer3 Example
• Data:
• Murmer3 Hash Values:
jim age: 36 car: ford gender: M
carol age: 37 car: bmw gender: F
johnny age: 12 gender: M
suzy: age: 10 gender: F
Primary Key Murmur3 hash value
jim -2245462676723223822
carol 7723358927203680754
johnny -6723372854036780875
suzy 1168604627387940318
Primary Key
29. @chbatey
Pictures are better
Hash range: -9223372036854775808 to 9223372036854775807
A
B
C
D
-4611686018427387903
-1
4611686018427387903
-9223372036854775808
9223372036854775807
-4611686018427387904
0
4611686018427387904
B
CD
A
30. @chbatey
Murmer3 Example
Data is distributed as:
Node Start range End range Primary
key
Hash value
A -9223372036854775808 -4611686018427387903 johnny -67233728540367808
75
B -4611686018427387904 -1 jim -22454626767232238
22
C 0 4611686018427387903 suzy 116860462738794031
8
D 4611686018427387904 9223372036854775807 carol 772335892720368075
4
33. @chbatey
Replication strategy
• Simple
- Give it to the next node in the ring
- Don’t use this in production
• NetworkTopology
- Every Cassandra node knows its DC and Rack
- Replicas won’t be put on the same rack unless Replication Factor > # of racks
- Unfortunately Cassandra can’t create servers and racks on the fly to fix this :(
34. @chbatey
Tunable Consistency
•Data is replicated N times
•Every query that you execute you give a consistency
-ALL
-QUORUM
-LOCAL_QUORUM
-ONE
• Christos Kalantzis Eventual Consistency != Hopeful Consistency: http://
youtu.be/A6qzx_HE3EU?list=PLqcm6qE9lgKJzVvwHprow9h7KMpb5hcUU
40. @chbatey
But what happens when they come back?
• Hinted handoff to the rescue
• Coordinators keep writes for downed nodes for a
configurable amount of time, default 3 hours
• Longer than that run a repair
42. @chbatey
Don’t forget to be social
• Each node talks to a few of its other and shares
information
Did you hear node
1 was down???
43. @chbatey
Scaling shouldn’t be hard
• Throw more nodes at a cluster
• Bootstrapping + joining the ring
• For large data sets this can take some time
49. @chbatey
How do I test this? The test double
• Release it - great book
• Wiremock - mocking HTTP
services
• Saboteur - adding network latency
If you want to build a fault tolerant application
you better test faults!
51. @chbatey
Test with a real Cassandra
• Reduced throughput / increased latency
- Nodes down
- Racks down
- DC down
52. @chbatey
Test with a real Cassandra
• Reduced throughput / increased latency
- Nodes down
- Racks down
- DC down
• Automate this if possible
• Load test your schema
- Cassandra stress
- JMeter Cassandra plugin
53. @chbatey
Summary
•Don’t build services with a single point of failure
•Cassandra deployed correctly means you can handle
node, rack and entire DC failure
•Know when to pick availability over consistency
•Accessing Cassandra from Java is boringly easy so I left
it out
54. @chbatey
Thanks for listening
• Follow me on twitter @chbatey
• Cassandra + Fault tolerance posts a plenty:
- http://christopher-batey.blogspot.co.uk/
55. @chbatey
Write path on an individual server
• A commit log for durability
• Data also written to an in-memory structure (memtable)
and then to disk once the memory structure is full (an
SStable)
63. @chbatey
Mapping API
@Accessor
public interface CustomerEventDao {
@Query("select * from customers.customer_events where customer_id = :customerId")
Result<CustomerEvent> getCustomerEvents(String customerId);
@Query("select * from customers.customer_events")
Result<CustomerEvent> getAllCustomerEvents();
@Query("select * from customers.customer_events where customer_id = :customerId
and time > minTimeuuid(:startTime) and time < maxTimeuuid(:endTime)")
Result<CustomerEvent> getCustomerEventsForTime(String customerId, long startTime,
long endTime);
}
@Bean
public CustomerEventDao customerEventDao() {
MappingManager mappingManager = new MappingManager(session);
return mappingManager.createAccessor(CustomerEventDao.class);
}
64. @chbatey
Adding some type safety
public enum StoreType {
ONLINE, RETAIL, FRANCHISE, MOBILE
}
@Table(keyspace = "customers", name = "customer_events")
public class CustomerEvent {
@PartitionKey
@Column(name = "customer_id")
private String customerId;
@ClusteringColumn()
private UUID time;
@Column(name = "staff_id")
private String staffId;
@Column(name = "store_type")
@Enumerated(EnumType.STRING) // could be EnumType.ORDINAL
private StoreType storeType;
65. @chbatey
User defined types
create TYPE store (name text, type text, postcode text) ;
CREATE TABLE customer_events_type(
customer_id text,
staff_id text,
time timeuuid,
store frozen<store>,
event_type text,
tags map<text, text>,
PRIMARY KEY ((customer_id), time));
66. @chbatey
Mapping user defined types
@UDT(keyspace = "customers", name = "store")
public class Store {
private String name;
private StoreType type;
private String postcode;
// getters etc
}
@Table(keyspace = "customers", name = "customer_events_type")
public class CustomerEventType {
@PartitionKey
@Column(name = "customer_id")
private String customerId;
@ClusteringColumn()
private UUID time;
@Column(name = "staff_id")
private String staffId;
@Frozen
private Store store;
@Column(name = "event_type")
private String eventType;
private Map<String, String> tags;
67. @chbatey
Mapping user defined types
@UDT(keyspace = "customers", name = "store")
public class Store {
private String name;
private StoreType type;
private String postcode;
// getters etc
}
@Table(keyspace = "customers", name = "customer_events_type")
public class CustomerEventType {
@PartitionKey
@Column(name = "customer_id")
private String customerId;
@ClusteringColumn()
private UUID time;
@Column(name = "staff_id")
private String staffId;
@Frozen
private Store store;
@Column(name = "event_type")
private String eventType;
private Map<String, String> tags;
@Query("select * from customers.customer_events_type")
Result<CustomerEventType> getAllCustomerEventsWithStoreType();
69. @chbatey
Summary
•Don’t build services with a single point of failure
•Cassandra deployed correctly means you can handle
node, rack and entire DC failure
•Know when to pick availability over consistency
•Accessing Cassandra from Java is boringly easy so I left
it out
70. @chbatey
Thanks for listening
• Follow me on twitter @chbatey
• Cassandra + Fault tolerance posts a plenty:
- http://christopher-batey.blogspot.co.uk/