zero_to_production_in_rust_preface

Zero To Production In Rust Preface

Return to Zero To Production In Rust, Rust Bibliography, Rust Courses, Rust, Rust, Rust DevOps - Rust SRE - Rust CI/CD, Cloud Native Rust - Rust Microservices - Serverless Rust, Rust Security - Rust DevSecOps, Functional Rust, Rust Concurrency, Async Rust, Rust Data Science - Rust and Databases, Rust Machine Learning, Rust Glossary, Awesome Rust, Rust GitHub, Rust Topics

Fair Use Source: Rst0tPrd 2022

Preface

What Is This Book About

“The world of backend development is vast.” (Rst0tPrd 2022)

“The context you operate into has a huge impact on the optimal tools and practices to tackle the problem you are working on.” (Rst0tPrd 2022)

“For example, trunk-based development works extremely well to write software that is continuously deployed in a Cloud environment.” (Rst0tPrd 2022)

“The very same approach might fit poorly the business model and the challenges faced by a team that sells software that is hosted and run on-premise by their customers - they are more likely to benefit from a Gitflow approach.” (Rst0tPrd 2022)

“If you are working alone, you can just push straight to main.” (Rst0tPrd 2022)

“There are few absolutes in the field of software development and I feel it’s beneficial to clarify your point of view when evaluating the pros and cons of any technique or approach.” (Rst0tPrd 2022)

“Zero To Production will focus on the challenges of writing Cloud-native applications in a team of four or five engineers with different levels of experience and proficiency.” (Rst0tPrd 2022)

Cloud-native applications

“Defining what Cloud-native application means is, by itself, a topic for a whole new book1. Instead of prescribing what Cloud-native applications should look like, we can lay down what we expect them to do.” (Rst0tPrd 2022)

“Paraphrasing Cornelia Davis, we expect Cloud-native applications:

To achieve high-availability while running in fault-prone environments;

To allow us to continuously release new versions with zero downtime;

To handle dynamic workloads (e.g. request volumes).” (Rst0tPrd 2022)

“These requirements have a deep impact on the viable solution space for the architecture of our software.” (Rst0tPrd 2022)

“High availability implies that our application should be able to serve requests with no downtime even if one or more of our machines suddenly starts failing (a common occurrence in a Cloud environment2). This forces our application to be distributed - there should be multiple instances of it running on multiple machines.” (Rst0tPrd 2022)

“The same is true if we want to be able to handle dynamic workloads - we should be able to measure if our system is under load and throw more compute at the problem by spinning up new instances of the application. This also requires our infrastructure to be elastic to avoid overprovisioning and its associated costs.” (Rst0tPrd 2022)

“Running a replicated application influences our approach to data persistence - we will avoid using the local filesystem as our primary storage solution, relying instead on databases for our persistence needs.” (Rst0tPrd 2022)

“Zero To Production will thus extensively cover topics that might seem tangential to pure backend application development. But Cloud-native software is all about rainbows and DevOps, therefore we will be spending plenty of time on topics traditionally associated with the craft of operating systems.” (Rst0tPrd 2022)

We will cover how to instrument your Rust application to collect logs, traces and metrics to be able to observe our system.

We will cover how to set up and evolve your database schema via migrations.

We will cover all the material required to use Rust to tackle both day one and day two concerns of a Cloud-native API.“ (Rst0tPrd 2022)

Working in a team

“The impact of those three requirements goes beyond the technical characteristics of our system: it influences how we build our software.” (Rst0tPrd 2022)

“To be able to quickly release a new version of our application to our users we need to be sure that our application works.” (Rst0tPrd 2022)

“If you are working on a solo project you can rely on your thorough understanding of the whole system: you wrote it, it might be small enough to fit entirely in your head at any point in time. 3” (Rst0tPrd 2022)

“If you are working in a team on a commercial project, you will be very often working on code that was neither written or reviewed by you. The original authors might not be around anymore.” (Rst0tPrd 2022)

“You will end up being paralyzed by fear every time you are about to introduce changes if you are relying on your comprehensive understanding of what the code does to prevent it from breaking.” (Rst0tPrd 2022)

“You want automated tests. Running on every commit. On every branch. Keeping main healthy.” (Rst0tPrd 2022)

“You want to leverage the type system to make undesirable states difficult or impossible to represent.” (Rst0tPrd 2022)

“You want to use every tool at your disposal to empower each member of the team to evolve that piece of software. To contribute fully to the development process even if they might not be as experienced as you or equally familiar with the codebase or the technologies you are using.” (Rst0tPrd 2022)

“Zero To Production will therefore put a strong emphasis on test-driven development and continuous integration from the get-go - we will have a CI pipeline set up before we even have a web server up and running!” (Rst0tPrd 2022)

“We will be covering techniques such as black-box testing for APIs and HTTP mocking - not wildly popular or well documented in the Rust community yet extremely powerful.” (Rst0tPrd 2022)

“We will also borrow terminology and techniques from the Domain Driven Design world, combining them with type-driven design to ensure the correctness of our systems.” (Rst0tPrd 2022)

“Our main focus is enterprise software: correct code which is expressive enough to model the domain and supple enough to support its evolution over time.” (Rst0tPrd 2022)

“We will thus have a bias for boring and correct solutions, even if they incur a performance overhead that could be optimized away with a more careful and chiseled approach.” (Rst0tPrd 2022)

“Get it to run first, optimize it later (if needed).” (Rst0tPrd 2022)

Who Is This Book For

“The Rust ecosystem has had a remarkable focus on smashing adoption barriers with amazing material geared towards beginners and newcomers, a relentless effort that goes from documentation to the continuous polishing of the compiler diagnostics.” (Rst0tPrd 2022)

“There is value in serving the largest possible audience.” (Rst0tPrd 2022)

“At the same time, trying to always speak to everybody can have harmful side-effects: material that would be relevant to intermediate and advanced users but definitely too much too soon for beginners ends up being neglected.” (Rst0tPrd 2022)

I struggled with it first-hand when I started to play around with Rust async/await.

“There was a significant gap between the knowledge I needed to be productive and the knowledge I had built reading The Rust Book or working in the Rust numerical ecosystem.” (Rst0tPrd 2022)

“I wanted to get an answer to a straight-forward question: Can Rust be a productive language for API development?” (Rst0tPrd 2022)

“Yes. But it can take some time to figure out how. That’s why I am writing this book.” (Rst0tPrd 2022)

“I am writing this book for the seasoned backend developers who have read The Rust Book and are now trying to port over a couple of simple systems.” (Rst0tPrd 2022)

“I am writing this book for the new engineers on my team, a trail to help them make sense of the codebases they will contribute to over the coming weeks and months.” (Rst0tPrd 2022)

“I am writing this book for a niche whose needs I believe are currently underserved by the articles and resources available in the Rust ecosystem.” (Rst0tPrd 2022)

“I am writing this book for myself a year ago.” (Rst0tPrd 2022)

“To socialize the knowledge gained during the journey: what does your toolbox look like if you are using Rust for backend development in 2022? What are the design patterns? Where are the pitfalls?” (Rst0tPrd 2022)

“If you do not fit this description but you are working towards it I will do my best to help you on the journey: while we won’t be covering a lot of material directly (e.g. most Rust language features) I will try to provide references and links where needed to help you pick up/brush off those concepts along the way. Let’s get started.” (Rst0tPrd 2022)


Like the excellent Cloud-Native Patterns by Cornelia Davis!

“For example, many companies run their software on AWS Spot Instances to reduce their infrastructure bills. The price of Spot instances is the result of a continuous auction and it can be substantially cheaper than the corresponding full price for On Demand instances (up to 90% cheaper!).” (Rst0tPrd 2022)

“There is one gotcha: AWS can decommission your Spot instances at any point in time. Your software must be fault-tolerant to leverage this opportunity.” (Rst0tPrd 2022)

Assuming you wrote it recently.

“Your past self from one year ago counts as a stranger for all intents and purposes in the world of software development. Pray that your past self wrote comments for your present self if you are about to pick up again an old project of yours.” (Rst0tPrd 2022)

Fair Use Sources

Rust: Rust Fundamentals, Rust Inventor: Rust Language Designer: Graydon Hoare on July 7, 2010; Rust RFCs, Rust Scripting, Rust Keywords, Rust Built-In Data Types, Rust Data Structures - Rust Algorithms, Rust Syntax, Rust OOP - Rust Design Patterns, Rust Package Manager (cargo-crates.io - Rust Crates - Rust Cargo), Rust Virtualization, Rust Interpreter, Rust REPL, Rust IDEs (JetBrains RustRover, IntelliJ - CLion with JetBrains Rust Plugins, Visual Studio Code), Rust Development Tools, Rust Linter, Rustaceans-Rust User, Rust Uses, List of Rust Software, Rust Popularity, Rust Compiler (rustc), Rust Transpiler, Rust DevOps - Rust SRE, Rust Data Science - Rust DataOps, Rust Machine Learning, Rust Deep Learning, Functional Rust, Rust Concurrency - Rust Parallel Programming - Async Rust, Rust Standard Library, Rust Testing, Rust Libraries, Rust Frameworks, Rust History, Rust Bibliography, Manning Rust Series, Rust Glossary - Rust Official Glossary, Rust Topics, Rust Courses, Rust Research, Rust GitHub, Written in Rust, Rust Awesome List. (navbar_rust)


© 1994 - 2024 Cloud Monk Losang Jinpa or Fair Use. Disclaimers

SYI LU SENG E MU CHYWE YE. NAN. WEI LA YE. WEI LA YE. SA WA HE.


zero_to_production_in_rust_preface.txt · Last modified: 2024/04/28 03:42 by 127.0.0.1