Designing APIs
Build production-ready APIs with REST, gRPC, and async messaging
Having an API ready for production should mean more than just deploying functionality. There are certain architectural aspects that often get overlooked, only considering them too late in the process, if at all.
In this workshop, we will design an API with respect to the non-functional requirements that are paramount to any serious application running in production.
We will cover the design process of several API types, including REST, and then we transition towards messaging, always with an eye on the Cloud.
This is a hands-on workshop, so be prepared to write code!
We will start by designing an API that has all the features to be production-ready. Then we introduce different requirements and expand the feature set, so that in the end we have an overview of the steps we have to take to have robust APIs, reliable and able to handle load.
By the end of the workshop, you will know how you can evolve your architecture from simple to complex, from RESTful to messaging-based.
Workshop Structure & Contents 🔗
- Why API design matters
- How we address the NFRs
- What makes a good API
Introduction to API Design 🔗
We will cover:
- Guiding principles for API design
- Modular design approaches
Designing REST-based APIs 🔗
In this section we delve into intricacies of REST-based APIs, the client/server nature of it and we explore the decision-making process behind choosing REST, by offering a detailed guide to the API design process, documenting and the most common usage scenarios.
- HTTP methods
- HTTP status codes
- HTTP headers
- Endpoint naming
- Media-type selection, design & custom media types
Designing gRPC APIs 🔗
This section covers gRPC and outlines the RPC API design process. We start by exposing and defining operations, particularities of consuming these APIs and documenting them.
Messaging-based APIs 🔗
In this section we take our previously designed API, and we start doing the necessary changes to make use of asynchronous messaging.
We deep dive into a new world that covers queues, topics, message brokers, different abstractions and patterns and we will see what changes are needed to adapt our previous architecture.
In this section we will see how we can introduce patterns like:
- Outbox
- Competing consumers
- Sagas
- Routing Slips
Addressing Non-functional Requirements 🔗
- Versioning strategies for backwards and forward compatibility
- Observability
- Reliability & Error Handling
- Fault tolerance & Resilience tactics
- Documenting the API
- Performance, Optimization and Scalability
- Throttling & Rate limiting
- Caching & Conditional caching
Who Should Attend? 🔗
The workshop targets .NET Software developers that want to have a more architecture-focused approach, and C# developers that want to understand what are the communication patterns and best practices for APIs in distributed architectures.
What You'll Learn 🔗
By the end of this workshop you will be able to:
- Understand which APIs are best suited for which scenarios
- Understand what non-functional requirements are needed for production-ready APIs
- Evolve a 'traditional' architecture to a more complex one that uses asynchronous messaging
- Understand what asynchronous messaging brings to the table and where it can benefit distributed systems