Skip to content

¿Qué son los ADRs?

Published: at 03:57 PMSuggest Changes

Registro de decisiones arquitectónicas (ADRs)

Un proceso para documentar las decisiones que toma el equipo sobre un aspecto importante de la arquitectura de software que planea crear.


ADRs (Architectural Decision Records)

Los ADRs son descripciones de texto breve que documentan decisiones importantes de arquitectura durante el ciclo de vida del desarrollo de software. Los ADRs incluyen un contexto para cada decisión, las opciones consideradas, las ventajas y desventajas de las opciones y finalmente la decisión tomada por el equipo.


Beneficios de los ADRs


Estructura de un ADR

Un ADR puede ser personalizado incluyendo toda la información que necesites, pero existen plantillas como la siguiente:


Ejemplo real de ADR

# GraphQL Framework

- **Status**: accepted
- **Deciders**: Obi-Wan Kenobi, Qui-Gon Jinn, Anakin Skywalker
- **Date**: 01/06/2015

## Context and Problem Statement

Currently there is a REST API that groups all the company's data about cities, countries, provincies, in a MongoDB Database, every entity has its endpoint.

When a client needs to merge informations from more than one entity it should make several requests to several endpoints, also the client has the responsibility of handeling the request errors from the several endpoints.

Additionally, the client doesn't have the capability to define the response fields, so this scenario can lead to underfetching/overfetching data.

## Decision Drivers

- We need a component responsible for making several requests to the several endpoints, merge the data, so the client can make only one request.
- We need a component that can allow to the client to define the data or fields of the response that it needs to avoid underfetching/overfetching.
- We need a library/framework base on Spring Boot.

## Considered Options

- [GraphQL Java](https://www.graphql-java.com/)
- [GraphQL Java Kickstart](https://www.graphql-java-kickstart.com/)
- [DGS](https://netflix.github.io/dgs/getting-started/)

## Decision Outcome

Chosen option: DGS, because the framework has really good documentation and good samples on its GitHub repo, and it is supported by a well known company, Netflix.

### Positive Consequences

- Good documentation
- Supported by a well known company
- Project with several contributors

### Negative Consequences

## Pros and Cons of the Options

### GraphQL Java

- Good, because the Spring team engineering collaborates to support this library: https://spring.io/projects/spring-graphql
- Good, because it has a good documentation and a repo with samples: https://github.com/spring-projects/spring-graphql/tree/main/samples
- Good, because the implementation is mostly base on an annotation-based programming model, so you can run a simple GraphQL server quickly.
- Bad, because too many lines of code are written for custom exceptions handling.
- Bad, because too many lines of code are written for advanced implementations (context, tracing, metrics and logging)

### GraphQL Java Kickstart

- Good, because it has a video course that shows how to use the library and best practices for GraphQL servers.
- Good, because it has a easy implementation to handle exceptions, base on Spring @ExceptionHandler annotation.
- Bad, because too many lines of code are written for advnced implementations.
- Bad, because it doesn't have a good documentation and is not updated.
- Bad, because there isn't a well knowns company behind the project.
- Bad, because the project is maintain by a small team and they ask for people to join them.
- Bad, beacuase the library doesn't have a annotation-based programming model entirely.
- Bad, because too many lines of code are written for advanced implementations (context, tracing, metrics and logging)

### DGS

- Good, because it has a really good documentation and a repo with samples in Kotlin: https://github.com/Netflix/dgs-examples-kotlin
- Good, is a framwork supported by Netflix and the project has several contributors.
- Good, because the implementation is mostly base on an annotation-based programming model, so you can run a simple GraphQL server quickly.
- Good, because it makes simpler advanced implementations (context, tracing, metrics and logging)
- Bad, because too many lines of code are written for custom exceptions handling.

Herramientas para administrar ADRs


Fuentes


Previous Post
¿Qué son los OKRs y cómo utilizarlos para el desarrollo de tu carrera en Ingeniería de Software?