Designing Data-Intensive Applications – Multi-Object Transactions episode artwork

EPISODE · Feb 6, 2023 · 1H 26M

Designing Data-Intensive Applications – Multi-Object Transactions

from Coding Blocks · host Allen Underwood, Michael Outlaw, Joe Zack

It's time we learn about multi-object transactions as we continue our journey into Designing Data-Intensive Applications, while Allen didn't specifically have that thought, Joe took a marketing class, and Michael promised he wouldn't cry. The full show notes for this episode are available at https://www.codingblocks.net/episode203. News Thanks for the reviews! iTunes: Dom Bell 30, Tontonton2 Want some swag? We got swag! (/swag) Orlando Codecamp 2023 is coming up in March 25th 2023 (orlandocodecamp.com) Single Object and Multi-Object Operations Best book evarr! Multi-object transactions need to know which reads and writes are part of the same transaction. In an RDBMS, this is typically handled by a unique transaction identifier managed by a transaction manager. All statements between the BEGIN TRANSACTION and COMMIT TRANSACTION are part of that transaction. Many non-relational databases don't have a way of grouping those statements together. Single object transactions must also be atomic and isolated. Reading values while in the process of writing updated values would yield really weird results. It's for this reason that nearly all databases must support single object atomicity and isolation. Atomicity is achievable with a log for crash recovery. Isolation is achieved by locking the object to be written. Some databases use a more complex atomic setup, such as an incrementer, eliminating the need for a read, modify, write cycle. Another operation used is a compare and set. These types of operations are useful for ensuring good writes when multiple clients are attempting to write the same object concurrently. Transactions are more typically known for grouping multiple object writes into a single operational unit Need for multi object transactions Many distributed databases / datastores don't have transactions because they are difficult to implement across partitions. This can also cause problems for high performance or availability needs. But there is no technical reason distributed transactions are not possible. The author poses the question in the book: "Do we even need transactions?" The short answer is, yes sometimes, such as: Relational database systems where rows in tables link to rows in other tables, In non-relational systems when data is denormalized for "object" reasons, those records need to be updated in a single shot, or Indexes against tables in relational databases need to be updated at the same time as the underlying records in the tables. These can be handled without database transactions, but error handling on the application side becomes much more difficult. Lack of isolation can cause concurrency problems. Handling errors and aborts ACID transactions that fail are easily retry-able. Some systems with leaderless replication follow the "best effort" basis. The database will do what it can, and if something fails in the middle, it'll leave anything that was written, meaning it won't undo anything it already finished. This puts all the burden on the application to recover from an error or failure. The book calls out developers saying that we only like to think about the happy path and not worry about what happens when something goes wrong. The author also mentioned there are a number of ORM's that don't do transactions proud and rather than building in some retry functionality, if something goes wrong, it'll just bubble an error up the stack, specifically calling out Rails ActiveRecord and Django. Even ACID transactions aren't necessarily perfect. What if a transaction actually succeeded but the notification to the client got interrupted and now the application thinks it needs to try again, and MIGHT actually write a duplicate? If an error is due to "overload", basically a condition that will continue to error constantly, this could cause an unnecessary load of retries against the database. Retrying may be pointless if there are network errors occurring. Retrying something that will always yield an error is also pointless, such as a constraint violation. There may be situations where your transactions trigger other actions, such as emails, SMS messages, etc. and in those situations you wouldn't want to send new notifications every time you retry a transaction as it might generate a lot of noise. When dealing with multiple systems such as the previous example, you may want to use something called a two-phase commit. Tip of the Week Manything is an app that lets you use your old devices as security cameras. You install the app on your old phone or tablet, hit record, and configure motion detection. A much easier and cheaper option than ordering a camera! (apps.apple.com, play.google.com) The Linux Foundation offers training and certifications. Many great training courses, some free, some paid. There's a nice Introduction to Kubernetes course you can try, and any money you do spend is going to a good place! (training.linuxfoundation.org) Kubernetes has recommendations for common-labels. The labels are helpful and standardization makes it easier to write tooling and queries around them. (kubernetes.io) Markdown Presentation for Visual Studio Code, thanks for the tip Nathan V! Marp lets you create slideshows from markdown in Visual Studio Code and helps you separate your content from the format. It looks great and it's easy to version and re-use the data! (marketplace.visualstudio.com)

Episode metadata supplied by the publisher feed · Published Feb 6, 2023

NOW PLAYING

Designing Data-Intensive Applications – Multi-Object Transactions

0:00 1:26:37

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

API Intersection Stoplight Building a successful API requires more than just coding. It starts with collaborative design, focuses on creating a great developer experience, and ends with getting your company on board, maintaining consistency, and maximizing your API’s profitability.In the API Intersection, you’ll learn from experienced API practitioners who transformed their organizations, and get tangible advice to build quality APIs with collaborative API-first design.Jason Harmon brings over a decade of industry-recognized REST API experience to discuss topics around API design, governance, identity/auth versioning, and more.They’ll answer listener questions, and discuss best practices on API design (definition, modeling, grammar), Governance (multi-team design, reviewing new API’s), Platform Transformation (culture, internal education, versioning) and more.They’ll also chat with experienced API practitioners from a wide array of industries to draw out practical takeaways and insights you can use.H Unshamed & Unchained: Carving Space For Self-Healing & Habit Transformation Danny Poelman Welcome to "Unshamed & Unchained: Carving Space For Self-Healing & Habit Transformation", the podcast where we break the chains of shame and societal expectations to create a safe space for self-healing, habit transformation, and personal growth. Hosted by a seasoned life coach, Danny Poelman DDS, with years of hands-on experience, this podcast is your guide to reclaiming your voice, embracing your story, and living life on your terms.In each episode, we dive deep into the topics that matter most to you—whether it's:-breaking free from unwanted habits like pornography-excessive people-pleasing-healing from past trauma-recovering from narcissistic abuse or religious/relational trauma-anxiety/depression-money mindset blocks-overcoming limiting beliefsWe’re not afraid to talk about the things that are often considered taboo, because we believe that through honest, unfiltered conversations, real transformation happens.You’ll hear real Khanyisa Keke TV Khanyisa Keke On Khanyisa Keke TV, developers can learn and improve their Android for Kotlin Development skills. On this podcast, programmers can learn Android for Kotlin coding from scratch, improve their existing programming skills, get tips, be kept up to date with all the latest happenings and get access to free resources. Powered by Firstory Hosting The Triathlon Mental Performance Podcast Neil Edge This podcast is for you if you are a Triathlete that is interested in learning about tools and strategies to overcome challenges and to utilize the power of your mind to race faster.I'm an experienced Triathlon Mental Performance Coach working with both Age Groupers and Pros.Episodes will cover the following and more.How to improve your mental toughnessRemoving the possibility of panic attacks in open water Removing the fear of fast descents on your bike -Removing mental blocks to improve your race times Completely remove performance anxiety (you don't have to just cope with it)4 weeks to race day - Strategies to  arrive at your a-race feeling calm and confident, with race day mental strategiesI will also talk about specific tools that you can use to ensure that you race faster.<b

Frequently Asked Questions

How long is this episode of Coding Blocks?

This episode is 1 hour and 26 minutes long.

When was this Coding Blocks episode published?

This episode was published on February 6, 2023.

What is this episode about?

It's time we learn about multi-object transactions as we continue our journey into Designing Data-Intensive Applications, while Allen didn't specifically have that thought, Joe took a marketing class, and Michael promised he wouldn't cry. The full...

Can I download this Coding Blocks episode?

Yes, you can download this episode by clicking the download button on the episode player, or subscribe to the podcast in your preferred podcast app for automatic downloads.
URL copied to clipboard!