SlideShare a Scribd company logo
Extending the life of your
monolith
Hari Ramamurthy @hari_ram
Thomas Gamble @gambtho
Big and old, isn’t always bad…
Some Background…
Open discussion - monolith usage…
Traditional Tuning
▪ SQL
- Partitions
- Indexes
- Purges
- Reduce rate of growth of database overall
- Be good friends with DBAs 
▪ Know your bottlenecks
- Collect logs and measure
Traditional Tuning
▪ Upgrade Hardware
- Use SSD
- http://www.thessdreview.com/featured/ssd-throughput-latency-iopsexplained/
- For instance :
Extract Functionality
▪ Study where the logs indicate delays
▪ Take on the pieces that can be easily offloaded into a new process.
- Keep the current flow as fall back
▪ Strangler pattern the most useful
- Deploy for subset of volume and maintain low risk
Leverage Async communications and Reactive
▪ If its not needed don’t be sync.
▪ Leverage pub-sub style of processing (Kafka)
▪ Huge benefit in dealing with constant loads
▪ Constant response times for client calls
▪ Protect your processing capacity for where its really needed!
▪ Consider Reactive programming styles
▪ Parallelize calls –across threads and multiple machines
Reactive
▪ Responsive
▪ Resilient
▪ Elastic
▪ Message Driven
Search Engine?
▪ Offload searches to a search engine
- Elastic or Solr
- Also uses a strangler strategy
- Ideal as a supplement to the database
- Offload search queries, specifically complex queries
- Leverage distributed computing
- Faster in most cases
- Handles large data volumes
Reduce Workload
▪ Leverage NoSQL and offload workloads that don’t need ACID
- Reduce and keep reducing transaction boundaries
- Break up into multiple transactions where appropriate and introduce async processes
- Like writing Audits
CQRS
Event Sourcing
Leverage Caching
▪ Caching layer
- Reads
- Writes where possible
▪ NoSql open source solutions
- Low risk with circuit breakers anyway
- Cassandra could well be the cache for rdbms solutions
- In memory options
- Redis
▪ Distributed Lock handling
Open discussion - experiences…
Reducing Risk…
Circuit Breakers
Hystrix
Path to production
Deployment…
Closing - examples, questions, concerns…
Reference
▪ http://paulhammant.com/images/strangulation.jpg
▪ http://www.reactivemanifesto.org/
▪ https://www.martinfowler.com/bliki/StranglerApplication.html
▪ http://peoplesofttutorial.com/difference-between-synchronous-and-asynchronous-messaging/
▪ https://martinfowler.com/bliki/DeploymentPipeline.html
▪ https://www.linkedin.com/pulse/automating-build-deployment-oracle-bpm-soa-projects-matt-wright
▪ https://gist.github.com/staltz/868e7e9bc2a7b8c1f754
▪ http://microservices.io/patterns/data/cqrs.html
▪ https://www.linkedin.com/pulse/one-way-devops-continues-delivery-max-b%C3%B6reb%C3%A4ck
▪ https://www.confluent.io/blog/event-sourcing-cqrs-stream-processing-apache-kafka-whats-
connection/

More Related Content

What's hot (15)

PPT
No sql landscape_nosqltips
imarcticblue
 
PDF
HPTS 2011: The NoSQL Ecosystem
Adam Marcus
 
PDF
Recent advancements in cache technology
Paras Nath Chaudhary
 
PDF
Overview of no sql
Sean Murphy
 
PDF
Orchestrating Cassandra with Kubernetes: Challenges and Opportunities
Raghavendra Prabhu
 
PDF
SNIA SDC 2016 final
Dan Lambright
 
PDF
High availability system cache and queue - Write behind
Le Kien Truc
 
PPT
World Wide Web Caching
ersanbilik
 
PPTX
Navigating NoSQL in cloudy skies
shnkr_rmchndrn
 
PPTX
Speeduptechniques
kollatiMeenakshi
 
PPTX
Demystfying nosql databases
Mike King
 
PPTX
Redis by-hari
Hari Bachala
 
PDF
My S Q L Replication Getting The Most From Slaves
PerconaPerformance
 
PDF
What is Apache Cassandra? | Apache Cassandra Tutorial | Apache Cassandra Intr...
Edureka!
 
PDF
HBase
Abhilash Kumar
 
No sql landscape_nosqltips
imarcticblue
 
HPTS 2011: The NoSQL Ecosystem
Adam Marcus
 
Recent advancements in cache technology
Paras Nath Chaudhary
 
Overview of no sql
Sean Murphy
 
Orchestrating Cassandra with Kubernetes: Challenges and Opportunities
Raghavendra Prabhu
 
SNIA SDC 2016 final
Dan Lambright
 
High availability system cache and queue - Write behind
Le Kien Truc
 
World Wide Web Caching
ersanbilik
 
Navigating NoSQL in cloudy skies
shnkr_rmchndrn
 
Speeduptechniques
kollatiMeenakshi
 
Demystfying nosql databases
Mike King
 
Redis by-hari
Hari Bachala
 
My S Q L Replication Getting The Most From Slaves
PerconaPerformance
 
What is Apache Cassandra? | Apache Cassandra Tutorial | Apache Cassandra Intr...
Edureka!
 

Similar to Design and implementation patterns for reviving relational monoliths (20)

PDF
Modeling, estimating, and predicting Ceph (Linux Foundation - Vault 2015)
Lars Marowsky-Brée
 
PPTX
NoSQL A brief look at Apache Cassandra Distributed Database
Joe Alex
 
PDF
Using ScyllaDB for Real-Time Read-Heavy Workloads.pdf
ScyllaDB
 
PDF
In-memory Data Management Trends & Techniques
Hazelcast
 
PPT
How to improve design skills
Yun Yuan
 
PPTX
Maximizing performance via tuning and optimization
MariaDB plc
 
PPTX
Maximizing performance via tuning and optimization
MariaDB plc
 
KEY
Writing Scalable Software in Java
Ruben Badaró
 
PPT
As fast as a grid, as safe as a database
gojkoadzic
 
PPTX
Some thoughts on apache spark & shark
Viet-Trung TRAN
 
PDF
Persistence Pipelines in a Processing Graph: Mutable Big Data at Salesforce b...
ScyllaDB
 
PPTX
Drupal performance
Piyuesh Kumar
 
PDF
SUSE Storage: Sizing and Performance (Ceph)
Lars Marowsky-Brée
 
PPT
SQL or NoSQL, that is the question!
Andraz Tori
 
PPTX
Webinar: Overcoming the Storage Challenges Cassandra and Couchbase Create
Storage Switzerland
 
PDF
Seastore: Next Generation Backing Store for Ceph
ScyllaDB
 
PDF
Seastore: Next Generation Backing Store for Ceph
ScyllaDB
 
PDF
Optimizing RocksDB for Open-Channel SSDs
Javier González
 
PPT
ApacheCon2010: Cache & Concurrency Considerations in Cassandra (& limits of JVM)
srisatish ambati
 
PPT
SQL, NoSQL, BigData in Data Architecture
Venu Anuganti
 
Modeling, estimating, and predicting Ceph (Linux Foundation - Vault 2015)
Lars Marowsky-Brée
 
NoSQL A brief look at Apache Cassandra Distributed Database
Joe Alex
 
Using ScyllaDB for Real-Time Read-Heavy Workloads.pdf
ScyllaDB
 
In-memory Data Management Trends & Techniques
Hazelcast
 
How to improve design skills
Yun Yuan
 
Maximizing performance via tuning and optimization
MariaDB plc
 
Maximizing performance via tuning and optimization
MariaDB plc
 
Writing Scalable Software in Java
Ruben Badaró
 
As fast as a grid, as safe as a database
gojkoadzic
 
Some thoughts on apache spark & shark
Viet-Trung TRAN
 
Persistence Pipelines in a Processing Graph: Mutable Big Data at Salesforce b...
ScyllaDB
 
Drupal performance
Piyuesh Kumar
 
SUSE Storage: Sizing and Performance (Ceph)
Lars Marowsky-Brée
 
SQL or NoSQL, that is the question!
Andraz Tori
 
Webinar: Overcoming the Storage Challenges Cassandra and Couchbase Create
Storage Switzerland
 
Seastore: Next Generation Backing Store for Ceph
ScyllaDB
 
Seastore: Next Generation Backing Store for Ceph
ScyllaDB
 
Optimizing RocksDB for Open-Channel SSDs
Javier González
 
ApacheCon2010: Cache & Concurrency Considerations in Cassandra (& limits of JVM)
srisatish ambati
 
SQL, NoSQL, BigData in Data Architecture
Venu Anuganti
 
Ad

Recently uploaded (20)

PPTX
How Apagen Empowered an EPC Company with Engineering ERP Software
SatishKumar2651
 
PDF
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
PDF
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
 
PDF
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
PDF
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
PPTX
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
PDF
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
PDF
Capcut Pro Crack For PC Latest Version {Fully Unlocked} 2025
hashhshs786
 
PDF
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
PPTX
Human Resources Information System (HRIS)
Amity University, Patna
 
PPTX
Revolutionizing Code Modernization with AI
KrzysztofKkol1
 
PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
PDF
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
PDF
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
PDF
Efficient, Automated Claims Processing Software for Insurers
Insurance Tech Services
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PDF
GetOnCRM Speeds Up Agentforce 3 Deployment for Enterprise AI Wins.pdf
GetOnCRM Solutions
 
PPTX
Writing Better Code - Helping Developers make Decisions.pptx
Lorraine Steyn
 
PDF
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
PDF
Streamline Contractor Lifecycle- TECH EHS Solution
TECH EHS Solution
 
How Apagen Empowered an EPC Company with Engineering ERP Software
SatishKumar2651
 
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
 
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
Capcut Pro Crack For PC Latest Version {Fully Unlocked} 2025
hashhshs786
 
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
Human Resources Information System (HRIS)
Amity University, Patna
 
Revolutionizing Code Modernization with AI
KrzysztofKkol1
 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
Efficient, Automated Claims Processing Software for Insurers
Insurance Tech Services
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
GetOnCRM Speeds Up Agentforce 3 Deployment for Enterprise AI Wins.pdf
GetOnCRM Solutions
 
Writing Better Code - Helping Developers make Decisions.pptx
Lorraine Steyn
 
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
Streamline Contractor Lifecycle- TECH EHS Solution
TECH EHS Solution
 
Ad

Design and implementation patterns for reviving relational monoliths

  • 1. Extending the life of your monolith Hari Ramamurthy @hari_ram Thomas Gamble @gambtho
  • 2. Big and old, isn’t always bad…
  • 4. Open discussion - monolith usage…
  • 5. Traditional Tuning ▪ SQL - Partitions - Indexes - Purges - Reduce rate of growth of database overall - Be good friends with DBAs  ▪ Know your bottlenecks - Collect logs and measure
  • 6. Traditional Tuning ▪ Upgrade Hardware - Use SSD - http://www.thessdreview.com/featured/ssd-throughput-latency-iopsexplained/ - For instance :
  • 7. Extract Functionality ▪ Study where the logs indicate delays ▪ Take on the pieces that can be easily offloaded into a new process. - Keep the current flow as fall back ▪ Strangler pattern the most useful - Deploy for subset of volume and maintain low risk
  • 8. Leverage Async communications and Reactive ▪ If its not needed don’t be sync. ▪ Leverage pub-sub style of processing (Kafka) ▪ Huge benefit in dealing with constant loads ▪ Constant response times for client calls ▪ Protect your processing capacity for where its really needed! ▪ Consider Reactive programming styles ▪ Parallelize calls –across threads and multiple machines
  • 9. Reactive ▪ Responsive ▪ Resilient ▪ Elastic ▪ Message Driven
  • 10. Search Engine? ▪ Offload searches to a search engine - Elastic or Solr - Also uses a strangler strategy - Ideal as a supplement to the database - Offload search queries, specifically complex queries - Leverage distributed computing - Faster in most cases - Handles large data volumes
  • 11. Reduce Workload ▪ Leverage NoSQL and offload workloads that don’t need ACID - Reduce and keep reducing transaction boundaries - Break up into multiple transactions where appropriate and introduce async processes - Like writing Audits
  • 12. CQRS
  • 14. Leverage Caching ▪ Caching layer - Reads - Writes where possible ▪ NoSql open source solutions - Low risk with circuit breakers anyway - Cassandra could well be the cache for rdbms solutions - In memory options - Redis ▪ Distributed Lock handling
  • 15. Open discussion - experiences…
  • 21. Closing - examples, questions, concerns…
  • 22. Reference ▪ http://paulhammant.com/images/strangulation.jpg ▪ http://www.reactivemanifesto.org/ ▪ https://www.martinfowler.com/bliki/StranglerApplication.html ▪ http://peoplesofttutorial.com/difference-between-synchronous-and-asynchronous-messaging/ ▪ https://martinfowler.com/bliki/DeploymentPipeline.html ▪ https://www.linkedin.com/pulse/automating-build-deployment-oracle-bpm-soa-projects-matt-wright ▪ https://gist.github.com/staltz/868e7e9bc2a7b8c1f754 ▪ http://microservices.io/patterns/data/cqrs.html ▪ https://www.linkedin.com/pulse/one-way-devops-continues-delivery-max-b%C3%B6reb%C3%A4ck ▪ https://www.confluent.io/blog/event-sourcing-cqrs-stream-processing-apache-kafka-whats- connection/

Editor's Notes

  • #3: Aqueducts (ACK-wa-ducts) got their name from the Latin word for water, aqua, and the Latin word for channel, ductus. They built the first Roman aqueduct in 312 BC. by the time of the Empire, three hundred years later, most Roman towns had at least one aqueduct to bring in fresh water, and big cities like Rome had ten or more. 2000 years later, many of these are still amazing to see, but also still function —- pretty sure the questionable plumbing in my hotel this week isn’t going to last quite that long…
  • #4: Wondering if we should just stay on the previous slide…and talk to these points We have a number of years experience working on large enterprise software development projects In these environments, there is often a combination of customer apps, and large packaged software offerings Often there is limited test coverage, and minimal automation As a quick aside – this isn’t a criticism of enterprise software or packaged software -- legacy software gets a bad name...one definition is “scary to make changes to” or ”lacking test coverage” --- but another very valid definition is “software that makes money”....for it to have lasted long to be legacy, must have done something right... In this type of environment – what is the best way to move forward We’ll walk you through a number of techniques that we’ve had success with (or that sounded cool...), and talk about how you’d get started with them
  • #7: Hari
  • #10: Responsive: The system responds in a timely manner if at all possible. - notice issues quickly, and resolve efficiently. Priority on consistent behavior Resilient: Continuing functioning, even when there are issues with dependencies replication, containment, isolation, delegation -> don't push your failures to your clients ensuring that parts of the system can fail and recover without compromising the system as a whole Elastic: responsive under changing demand. elasticity in a cost-effective way on commodity hardware and software platforms. Message Driven: Reactive Systems rely on asynchronous message-passing to establish a boundary between components that ensures loose coupling, isolation and location transparency. This boundary also provides the means to delegate failures as messages. Employing explicit message-passing enables load management, elasticity, and flow control by shaping and monitoring the message queues in the system and applying back-pressure when necessary. Location transparent messaging as a means of communication makes it possible for the management of failure to work with the same constructs and semantics across a cluster or within a single host. Non-blocking communication allows recipients to only consume resources while active, leading to less system overhead. Let's think about how to accomplish this: • We can become modular if our system is event-driven. We can divide the system into multiple micro-services/components/modules that are going to c ommunicate with each other using notifications. This way, we are going to react to the data flow of the system, represented by notifications. • To be scalable means to react to the ever-growing data, to react to load without falling apart. • Reacting to failures/errors will make the system more fault-tolerant. • To be responsive means reacting to user activity in a timely manner. Reactive programming—focusing on computation through ephemeral dataflow chains—tend to be event-driven, while reactive systems—focusing on resilience and elasticity through the communication, and coordination, of distributed systems—is message-driven Messages have a clear (single) destination, while events are facts for others to observe. In a reactive system, especially one which uses reactive programming, both events and messages will be present—as one is a great tool for communication (messages), and another is a great way of representing facts (events). Reactive programming is programming (same name, slightly different concept) with asynchronous data streams. asynchronous event stream, on which you can observe and do some side effects. anything can be a stream: variables, user inputs, properties, caches, data structures, etc. For example, imagine your Twitter feed would be a data stream in the same fashion that click events are. You can listen to that stream and react accordingly. On top of that, you are given an amazing toolbox of functions to combine, create and filter any of those streams. That's where the "functional" magic kicks in. A stream can be used as an input to another one. Even multiple streams can be used as inputs to another stream. You can merge two streams. You can filter a stream to get another one that has only those events you are interested in. You can map data values from one stream to another new one.
  • #13: Command Query Responsibility Segregation forcing the same conceptual model for commands and queries, makes the model much more complex — and forces trade-offs CQRS allows you to separate the load from reads and writes allowing you to scale each independently. 
  • #14: One area where we’ve seen great success with implementing a version of this is with product availability. By splitting out the commands that require updates to the inventory management system, from those that are reads….we’re able to dramatically improve response time of lookups, scale to meet the inventory system needs more specifics on this example….. very similar
  • #19: Proxy Pattern Provide a surrogate or placeholder for another object to control access to it. Use an extra level of indirection to support distributed, controlled, or intelligent access. Add a wrapper and delegation to protect the real component from undue complexity.
  • #20: This is becoming an expectation, rather than an aspiration — but it’s worth pointing out again Much of the pain associated with monoliths, isn’t the actual code, but instead the processes around it get rid of the snowflake servers — all configuration and setup needs to be version controlled tests need to provide confidence that you have a working system, and then need to run quickly if a portion of your path to production is painful — make it part of the daily routine….repetition will force the issue, and help to motivate resolution (don’t mean that quite as evilly as it sounds) consider phoenix environments — should be able to rebuild a new env quickly There is a huge amount of hidden costs associated with not doing this if you can’t run the monolith locally (or in an isolated per dev env) — you will have conflicts, and delays impacting multiple people fear of change creates tech debt — you don’t refactor because you don’t know if you’ve broken something new dev on boarding shouldn’t involve ritual sacrifice of farm animals — should be scripted (or containerized) and included in an easy to follow readme — make people excited to work on the code, not a punishment… keep implementations small, make rollback fast and predictable You have to start somewhere — make a test with the change you implement today, your future self will appreciate Automate test flows for high value flows —> customer can always checkout…etc
  • #21: A number of options….blue/green or canary? In some cases, platforms can make this very easy for MS...but what about monoliths? You have options — need to think about tradeoffs ….feature toggles ….read/write separation