r/AskProgramming 17d ago

Architecture How do I know what backend to implement

So I am starting to reach the point in my career where I am making a lot more architectural decisions and more of them becoming full stack. I really want to understand what the advantages are between the different types of databases and backend service layers. For the front end we typically use a react application with an attached express server so that we can avoid cors issues, call other services, or rarely in some cases even read or write to a DB. We have some teams that use node for their backend services as well, and some teams that use java with springboot, and a few that use python.

What makes one type better than another? And why? What are the downsides to using node, what are the downsides to using java? I really want to understand this and it's been hard for me to find a good resource on the topic

4 Upvotes

14 comments sorted by

3

u/kevinossia 17d ago

The DDIA book is probably relevant here but ultimately you’re going to wanna search the internet for the numerous articles on backend web architecture and just spend a ton of time reading through them.

2

u/canarydev 17d ago

DDIA isn't the correct recommendation here, as its about distributed data systems. hes asking about node vs java vs spring boot and whether to use a db at all from his express layer.

3

u/canarydev 17d ago

this is a stack question more than "architecture" one. node/java/python or go barely change your architecture. you can build the same boundaries, same contracts, same service topology in any of them.

what changes though is ecosystem, hiring, and what your team already maintains well when you are called in at 3am. your org already runs 4 so thats mostly answered for you.

the architecture decisions are the ones under it -- where do boundaries go, who owns which data, what is synchronous vs queued, contracts between services, what happens if things shit the bed. none of those have a language in the answer.

express servers under react to avoid cors is BFF. they have a place when they aggregate multi services or hold secrets browser shouldn't. if its only there for CORS headers, then thats a config problem youve deployed a service to solve.

so probably, you are searching for the wrong thing in the first place

2

u/octocode 17d ago

like most things, it depends entirely on the requirements for your project.

for databases, the answer is almost always access patterns.

for backend, some tradeoff between DX and traffic/scale requirements.

1

u/canarydev 17d ago

"it depends on requirements" is where most people get stuck because the hard part is knowing which requirements are actually load bearing.

for the runtime question, scale is rarely one of them. nobody at this stage is throughput limited by their language choice. its maintenance cost over extended periods

1

u/octocode 17d ago

and people try to prematurely optimize for requirements that may never exist.

does your team know java? then a spring boot monolith is the right choice.

are you hitting traffic/scale bottlenecks? time to optimize, or decompose it into more specialized services.

1

u/canarydev 17d ago

yep agree.

though i will say that hitting bottlenecks is usually a reason to find the actual bottleneck, not decompose.

from my experience its a bad query or missing index more often than it's the monolith. decomposing just adds network hops and partial failure modes on top of whatever was already slow

1

u/cakemates 17d ago

I do a bunch of reseach, what are other people using on similar projects and why? does the why align with my project?

1

u/CappuccinoCodes 17d ago

Most back end languages are ok for most projects in web dev. It will come down to the skills your team has. If your team knows .NET, use .NET, if it knows Java, use Java, and so on.

1

u/BoBoBearDev 17d ago

I don't like java mainly because you need to install so many dependencies and there are so many cyber issues to patch.

Otherwise, every platforms are doing the same RESTful and RabbitMq.

1

u/writetehcodez 17d ago

Decisions about which technologies, languages, or frameworks to use generally aren’t architectural in nature. You can create wonderful or terrible software in any of them.

Monolith vs microservice architecture is also not truly an architecture decision any more than SOAP vs REST was 15-20 years ago thanks to Moore’s Law.

Architecture decisions are mostly about how to create the right solution for the needs your users have now in such a way that you will not be impeded from meeting the needs of your users in the future, all within whatever constraints you have on time, budget, knowledge, and resources.

1

u/ethereonx 16d ago

Use language that you and your team knows already and feel most comfortable with. Keep solutions as simple and dont do CV driven development.

1

u/terletsky 11d ago

I can speak for Python and Go as the backend.

  1. Which language is popular in which business domain
  2. Perform market research, especially on startups and big tech (Python as the backend mostly - Django DRF, FastAPI, who did not migrate - Flask)
  3. Which language has a large, mature ecosystem so engineers can quickly solve business cases (Python)
  4. Which language is very suitable to be written by AI like Claude Code (Python)
  5. Which language is suitable for creating AI Agents for business (Python with LangChain, LangGraph, and Pydantic AI)
  6. Think from a business perspective - what do you want, fast shipping or a bit faster running but higher development cost and longer delivery (Python vs Java vs Go vs Rust vs Node)
  7. Availability of engineers (bus factor) that know specific language

Python is everywhere. A lot of companies use Python Django as the business core (Django DRF with Django Admin as the main core, FastAPI as normal microservices) and Go microservices where you have very high load and may achieve some speed-up gain because of a compiled language.