top of page

Think about RIOTS


šŸ”„ RIOTS!!!šŸ”„Ā 


What do riots have to do with software engineering?


Nothing. šŸ˜‚Ā 


But it's a handy acronym for thinking about system design.


⬇ Retrieval

āž” Input

⬅ Output

šŸ”„ Transformation

⬆ Storage


The vast majority of software development involves those 5 actions and very little else. If you can break the problem down to those fundamentals, designing and building a solution becomes much easier.


In most apps, you'll be Retrieving⬇ information from a data store. That information becomes Inputsāž” into assorted functions which TransformšŸ”„ the data. The Output⬅ of those functions is the Inputāž” for further functions. Finally, the data is Output⬅ either to the screen, a file, or Storage⬆.


This pattern can apply at the class level as well as higher levels. If you follow Uncle Bob's examples of SOLID programming, you'll see how the Output of one function in a class becomes the Input for another (Dependency Injection) with each function applying a single Transformation (Single Responsibility).


A common microservice architecture pattern is just RIOTS.


A microservice stores data in its database⬆ (Storage).


Debezium watches for Storage events, takes that event as Input āž”, Transforms it based on your rulesšŸ”„, and Outputs⬅ it to a system like Kafka where another microservice can Retrieve ⬇ each entry in the Kafka topic and pass it as Inputāž” to a function that TransformsšŸ”„ the data and Stores⬆ it in its own database.


RIOTS in the Real World

Let's take a look at a solution from (way back) my history:


The problem: we need to be able to upload VERY large (>1GB) files to Azure Cloud Storage as fast as possible.


The solution:Ā 


Read the file. Break it into small chunks. Store the chunk in a queue to be processed. Inspect each chunk to see if has data or should be discarded. Upload the chunk to the appropriate place if has data.


Reading the file is Retrieval.


Breaking it into chunks takes the stream as Input, transforms part of the stream, and Outputs an object with the chunk of bytes and some metadata.


Storing the chunks in a queue is Storage.


Inspecting the chunks takes the Chunk object as Input and either adds it to the queue to be uploaded (Storage) or discards the chunk (Transformation).


Uploading the chunk is pure Storage and takes a Chunk object as Input.


Ultimately, the utility Output information about the process to the console.


(This predated the current UploadAsync functionality that Microsoft now ships.)

Ā 
Ā 
Ā 

Recent Posts

See All

Opmerkingen


Email the Coach

Thanks! We'll get back to you soon!

Ā© Sean Cooper 2025
bottom of page