Challenges when designing a new application
Tags: software, database, architecture
Published: 2022-04-20 23:11:03

---
title: Challenges when designing a new application
published: true
description: I’ve been thinking about the multiple challenges we face when designing a greenfield project. There’re many things we have to analyze and define.
tags: software, database, architecture
cover_image: https://miro.medium.com/max/1400/0*go03-avDEa3iK4k5
---
>You have to choose the move that feels right sometimes; that’s what intuition is.
>— Magnus Carlsen, Chess World Champion

I’ve been thinking about the multiple challenges we face when designing a greenfield project. There’re many things we have to analyze and define. In the end, we’ll need the correct combination of architecture, language programming, database, infrastructure, and so on. This is really difficult because several options exist, and a new one appears all the time with promising benefits and unclear drawbacks. Additionally, the combination depends on the business context and the team. In any case, we don’t need the perfect setup because it could be too time-consuming and too complicated. As we all know, a low time to market is essential when starting a project. Instead, we must have a good enough combination that allows us to maintain a healthy balance.

Almost everyone knows about chess and has played it for some time. The rules are quite simple, although the possibilities are enormous. After both players move, 400 possible board setups exist. After the second pair of turns, there are 197,742 possible games, and after three moves, 121 million. What makes it even more challenging is that sometimes a simple change in a position could transform a winning move into a completely losing one. So it’s impossible for a human to calculate all the variations. That’s why strong chess players have to develop good intuition and pattern recognition to make a good move in a decent amount of time. As in system design, a good enough decision is fine and desirable.


>The limits of my language mean the limits of my world.
>— Ludwig Wittgenstein, Tractatus Logico-Philosophicus (1922)

When Martin Klepmann reviewed the different data models in his fascinating [book](https://www.oreilly.com/library/view/designing-data-intensive-applications/9781491903063/), he cited this very interesting quote. I think it’s a great analogy to show us that any decision involves trade-offs. There’s no such a thing as a silver bullet. For instance, the data model limits how we can read, write and update the data, but it allows us to organize and query it in a particular way that might be useful. Deciding on the correct kind of model for an application is crucial to avoid future problems in terms of performance and complexity of implementation. The same applies to each technical decision we make.

There’re a lot of possibilities for every aspect of our system. You don’t have to be an expert on each of them, but it’s important to know the main categories. We can mention the relational and non-relational models for databases or microservices and monoliths for architectures. These categories could be further divided, depending on the detail we need. Ultimately, these are all tools to have in our bag when the time to design a new system comes. Last but not least, keep in mind that these decisions are not immutable. We must revisit them along the way.

[This was originally posted by me in medium](https://lozaeric.medium.com/when-good-enough-is-best-8214ecd7d487)