Questions tagged [architecture]
The high-level design and description of a software system. Architectural design distills away details of implementations, algorithms, and data representation to concentrate on the interaction of "black box" components.
3,562
questions
0
votes
1
answer
31
views
Resource path handling between REST Layer and Service Layer
What is a good way to handle "top-level" IDs in a Resource-oriented API path?
Consider a call to
GET /resourceA/12/resourceB/23
where A to B is a Parent-Child relationship and B has ...
2
votes
4
answers
493
views
How much better is using quad trees than simple relational database for storing location data?
I want to store and find back driver location data in the standard design uber/lyft problem.
I was researching about possible system design. Several videos and tutorials usually describe storing ...
0
votes
1
answer
66
views
Separation of concerns between business layer, data layer and presentation layer without losing information
I'm developing an api in Fast API using sqlalchemy to manage my ORM classes and operations with the database.
I'm dealing with some design decisions to have my classes as little coupled as possible ...
1
vote
2
answers
198
views
Preventing payment to be processed twice
I have app with paymemt/subscription service, pretty much how the payment works is:
Initial payment
User initiate payment on the web ( click on "subscribe")
Back-End send init request to ...
-4
votes
1
answer
69
views
Feedback on custom "Orchestration" architecture
I've been doing some deep thinking on how to structure code and found myself coming up with a (for me) new pattern. The pattern is based on a highly modular approach with a large focus on indirection, ...
-3
votes
2
answers
148
views
How to properly choose between two equivalent implementations, and how to prove you picked the correct one? [closed]
Thinking about non functional requirements (the -ities) and other concerns, which approach would you choose and why? consider the two snippets
Direct Supabase Connection
import { useState, useEffect } ...
0
votes
1
answer
118
views
Why is it called Data-Oriented Design?
I find the name data-oriented design very confusing - it sounds like data-driven development (letting hard data determine decisions in development) or data-driven programming (control flow determined ...
-3
votes
0
answers
69
views
How to use ElysiaJS in a Clean Architecture approach
I'm working on a server application and trying to make it as clean as possible, considering the patterns and principles of Clean Architecture. However, I'm not sure how to proceed with the controllers....
1
vote
1
answer
113
views
Background thread processing vs queue based processing for relatively short tasks (max 30-40 seconds)
I need suggestion / recommendation on the design approaches mentioned below.
UseCase: I have a usecase where a client uses my system to generate some recommendations. Now, these recommendations are ...
0
votes
3
answers
180
views
Modeling “Limits”
Let’s say a person can set a limit to play a game for N minutes a day. The player may increase their limit, but the increase doesn’t take effect until the next day.
Example, person sets a limit of 10 ...
1
vote
2
answers
259
views
OOP Design of a Mathematical Group
A Group is formally defined as a set of Element's,
over which a single operator mul is defined.
There are different kinds of Groups,
and each kind requires a different set of parameters.
Operator mul ...
0
votes
0
answers
51
views
Optimizing Azure architecture for real-time data streaming with historical data access
I'm currently working on a project hosted in Azure and would appreciate some advice on improving the existing architecture. Below, I've outlined the current setup and the challenges I'm facing, ...
3
votes
3
answers
177
views
Handling rate limits / delays in consumers without affecting performance of other operations
I have a producer that generates a batch job that consists of multiple operations (approx. 100 - 10000). These operations can be processed in any order, ideally as fast as possible.
The processing of ...
0
votes
0
answers
108
views
Best practice to break-down requirements & architecture
This is kind of related to my previous post, but I believe it is rather a separate problem/question. I am seeking to improve the process of project development & system design at work. The way I ...
0
votes
2
answers
97
views
Where perform mapping in strict Domain-Driven Design?
I want to create an example application where we use a strict domain-driven design and layering (controller, service, repository). Most notably, we have a clear distinction between the domain and the ...
0
votes
1
answer
65
views
How to split database entities or access responsibilities of services to these entities
I have two services, auth-sync and twitter-indexer.
We use Privy for auth (incl. SSO with 3rd parties). We sync our userbase from Privy to our own DB for certain analytics purposes. And the auth-sync ...
0
votes
0
answers
32
views
Is it a good idea to have multiple derivations of Presenter (MVP) / View Model (MVVM) of a certain view and supply them externally?
So, I've an iOS project that needed to be revamped and added with a routing / navigation logic between views. We have 3 ways as the entry point of the routing: manually, push notification, and ...
1
vote
2
answers
278
views
Is it worth it to use a NoSQL database only for high availability and fast reading, while already using Postgres?
We have several Postgres databases on one AWS RDS cluster (for budget reasons apparently), sharing the same resources, and my team wants to use a NoSQL database alongside it, and store data there from ...
0
votes
0
answers
33
views
How to describe a deployment node in more detail than the model describes in Structurizr/C4?
In my software model, part of the system is of course a database. I could view it as a separate softwareSystem or perhaps just a container. Let's say it's:
db = softwareSystem "Database"
...
2
votes
4
answers
411
views
How to deal with high level requirements that contain implementation details?
My question actually applies to a physical device development, but I guess it is equivalent to a software development workflow, so perhaps someone here can enlighten me.
Sometimes we've got ...
0
votes
1
answer
68
views
Describing Different Deployment Environments Using C4Model
How would you recommend describing a different deployment environments in Structurizr?
For example:
An Acceptance environment may contain less nodes than a Production one
Different environments may ...
27
votes
8
answers
5k
views
How to Respond to Directive: "Move Our Entire Website to a CMS Service"
We have a large ASP.NET/C# e-commerce website (over 250k products) that's been around for over 15 years. We have lots of highly customized functionality, including a private subscription area, user-...
0
votes
1
answer
64
views
if an entity depends on two other entities(that have a relationship between them) should I make the enitity depend on the relationship instead?
If I have three entities (end-user, country, tier) in my system that has relationships as follows:
Where each country has its own tiers with specified points per year, and each end-user has a country ...
1
vote
1
answer
108
views
Need help on Clean Architecture with Service/Manager/Controller
I am developing an Android application trying to comply with Uncle Bob's clean architecture.
User interface has a text and a button. Button triggers a usecase (TextToSpeechUseCase) from viewmodel.
...
2
votes
3
answers
214
views
How to tackle synchronizing large amounts of data across services in an efficient way?
I am working at a retailer with a deep catalog of products and we are taking stock of our architecture.
Currently, we use microservices, but all product information goes to a service that is getting ...
0
votes
3
answers
213
views
Adding a CLI to a Windows service
I have a Windows service that I would like to extend and add a CLI to it similar to docker or Elastic Agent, so I have a question about what kind of approach I should use for the *.exe to communicate ...
1
vote
1
answer
157
views
REST API with swappable backends
What would be the best way to have a single REST API but with multiple "backends" (Not sure if this is the correct terminology)? Currently we have a basket/cart API that handles product ...
11
votes
7
answers
5k
views
How to maintain dependencies shared among microservices?
There is a dependency jar containing tons of service classes mostly used to retrieve data from database, and this jar is used among several different micro services in one cluster.
There is a big ...
1
vote
2
answers
581
views
How to Handle Large File Uploads in Angular and Hibernate Without Exceeding HTTP Request Size Limit?
Description
I am working on an application using Angular (front-end) and Hibernate (back-end). My use case involves uploading multiple images, which I convert to base64 format and send as JSON with ...
1
vote
1
answer
95
views
Is providing a method of a domain entity with a data/ service provider object a bad design?
I have an entity called User, and it has a method to change the user's email address. I'm using a strongly typed object for representing the email address.
public class User: BaseEntity
{
// Some ...
-4
votes
1
answer
137
views
Architecture of a scientific software [closed]
First things first, I was not sure it was the right place to seek advice and feedback about software architecture, but this post on meta.stackexchange conviced me to do so. I hope my question finds an ...
0
votes
2
answers
158
views
Is it a good idea to have a fork of a library's public repo in my solution?
My company's project uses an open source library, of which I have made a fork for some customizations. My idea is to clone this fork into my solution and to keep pushing my changes into it, as well as ...
3
votes
2
answers
150
views
Simplifying model interface while using diff undo-redo?
Introduction & context
I am working (hobby) on a CAD/CAM (mostly CAM) solution. It is a desktop application in C++, Qt, OpenGL, JavaScript and CMake.
General Undo/Redo strategies
Most desktop ...
-2
votes
1
answer
129
views
What are the CPU architectures for the most common general purpose devices (i.e., Android, Windows/Linux PC, RaspberryPi etc.)? [closed]
Wikipedia lists over 45 different Instruction Set Architectures.
I would bet that most of those are listed for legacy purposes, but I barely have any knowledge on the subject (I'm not even sure if ...
-2
votes
2
answers
179
views
When should I think about two databases (the first for reads, the second for writes) in CQRS?
I am not asking what are advantages of two databases - the first for reads and the second for writes. I am asking WHEN I should have two databases for reads and writes? Probably there is no simple ...
1
vote
4
answers
240
views
How to decide between keeping data within the code or in a database
As an example, we have an entity called Invoice which has bills of purchased services.
public class Invoice
{
private readonly List<Bill> _serviceBills;
public string InvoiceId { get; }
...
3
votes
4
answers
390
views
Encryption of PII data in database logic in store procedures and desktop application [closed]
I have an old desktop application (Delphi) with logic in stored procedures (Oracle). The application is storing some personal data including salaries. I want to encrypt data so someone with db access ...
0
votes
1
answer
130
views
How to model two bounded contexts with tight coupling between them
Context
Hello, at my company we have been working with DDD for some time now. We have a monolith and some services. The bounded contexts in the monolith use HTTP calls to communicate between them or ...
0
votes
3
answers
447
views
Backend to client communication: WebSocket or Message Queue?
I have a hobby project, for simplicity imagine a poker game, consisting of a backend (Spring) and a client application (Flutter) where the client can join rooms in which he can take a seat. The client ...
1
vote
1
answer
130
views
Do you re-include system headers in the implementation files?
Here's a scenario:
suppose you have #include <unordered_map> in the header
and you don't declare it anywhere in the implementation file
but you use it, maybe
mp[whatever] = some;
should you re-...
-3
votes
1
answer
139
views
Is it a bad idea to use NodeJS + Python for back end development?
I'm working on a platform that consumes and transforms data to make reports and visualize those reports in a client app.
The team has experience with NodeJS and NestJS, and some of us have experience ...
0
votes
0
answers
77
views
How handle foreign keys in bounded contexts inside a monolith?
in my company we have a Django monolithic application. To be clear, we are not looking into moving to micro-services. For the past few months, I have reading and implementing a DDD architecture inside ...
0
votes
1
answer
85
views
Referencing objects created during seeding by ID
I'm building a software that allows users to extract analytics from a data source. A subset of data periodically is extracted from the data source and stored in a separate database for ease of access (...
1
vote
1
answer
282
views
How small is too small for a library or package?
Background
I came across this question about whether few big libraries, or many small libraries is better.
I tend to agree with the accepted answer, that many small libraries is better.
However, since ...
0
votes
2
answers
230
views
Advice for database design and approach
I ask this to learn from experienced DB designers/architects. I need a high-level overview, I'm not interested in the specific tools for now. Rather, I'd like opinions on how you would approach this ...
0
votes
2
answers
132
views
What is a good architecture / design pattern for giving multiple shared attributes in different combinations?
I have a need for many different objects to have various combinations of attributes. For a demonstrative example, a flaming dog would have a dog attribute, a flame attribute, and a tail attribute, ...
-2
votes
2
answers
250
views
Avoiding `.env` in revision control while still being able to open source on a whim
From the 12-factors, III Config:
A litmus test for whether an app has all config correctly factored out
of the code is whether the codebase could be made open source at any
moment, without ...
0
votes
1
answer
149
views
Is it good practice for object APIs to be required to be called in sequence to gather information?
I had this discussion with someone and it ended ambiguously.
Suppose you have a class that needs to Parse a file to gather some information. It can expose this information to you after the fact.
...
10
votes
8
answers
6k
views
What is the advantage of log file rotation based on file size?
I understand that log file rotation is changing the log file you used when (1) one gets big enough or (2) at EOD, but I'm not sure I understand the reason for (1). I have never had any issues with ...
4
votes
4
answers
2k
views
Does the signature of a method create a dependency between the implementation of that method, and the code that invokes it?
I am reading Ousterhout's A Philosophy of Software Design. In Section 2.3, Outserhout writes:
The signature of a method creates a dependency between the implementation of that method and the code ...