Questions tagged [design]

Questions about problem solving and planning for a solution through software design.

Filter by
Sorted by
Tagged with
1 vote
0 answers
44 views

How to structure your Python code with asynchronous and synchronous parts

I have a Python FastAPI server application which naturally guides you towards the asynchronous paradigm. For legacy reasons, I have to support two backends, one which is purely synchronous and one ...
user3058865's user avatar
0 votes
2 answers
150 views

Source Control Design for Proprietary Logic which includes Obfuscation

Problem: There are proprietary algorithms that developers who are actively working on a project will need to call but they should not see the underlying logic. They need to be stored in an area of ...
Rudazzle's user avatar
-3 votes
0 answers
15 views

Am I the only one who thinks it's ridiculous that you have to gain separate reputation across each and every stack exchange site? [migrated]

I mean seriously. How much do I have to work to be "qualified" to contribute in this "separate domain" of coding? Oh, I guess I'll just answer a question to gain those poin -- oh. ...
Joel's user avatar
  • 1
0 votes
1 answer
93 views

Implementing Real-Time Signal Failure Handling (Django)

I'm developing a trading platform using Django, where users can publish trading signals with specific stop losses. I'm facing a challenge in implementing a real-time feature to automatically mark ...
scaryhamid's user avatar
-3 votes
1 answer
115 views

Better way to type casting an object from one custom class to another [closed]

I have one object, its class inherits all property from GUI class, that takes and some values and one function during instantiation, that handles click and upon receiving the click it calls the ...
novice's user avatar
  • 95
-3 votes
1 answer
131 views

How should I architect a cricket scoring app?

Cricket scoring is complex and I want to build an app in part to practice good design principles/patterns and develop a clean solution. A few high level classes I have in mind are: Match | Innings | ...
zadane's user avatar
  • 387
0 votes
0 answers
40 views

Setting Dependency Design

Hello I'm currently designing an GUI application who's main job is to update and display settings and some other data. For context, I'm using QT framework. I'm starting to refactor the settings ...
mcmatt90's user avatar
0 votes
0 answers
72 views

How can I better design systems and components in ECS?

I'm working on a game from scratch in C++ which is based on an Entity Component System and I've ran into a bit of a problem with the way I've been designing my systems and components. I find myself ...
Konjointed's user avatar
22 votes
7 answers
6k views

Sufficient conditions for refactoring

I've found that many codebases in large companies degrade over time, only adding new features and never improving the design of the codebase. Gradually, these codebases degrade to what is considered &...
Divan's user avatar
  • 339
0 votes
2 answers
118 views

What if the kafka leader crashes before committing the offset to zookeeper?

I'm not encountering any issue in prod or anything, I'm just reading about Kafka and I'm curious about this case. As I understand, A producer sends messages to the leader. The replicas copy the ...
Thomas's user avatar
  • 129
1 vote
1 answer
123 views

Best Approach for Implementing User Watch Time Tracking

I am currently developing a feature for my web application that tracks the amount of time a user spends on a specific page. Our backend is built with Django, and the frontend is using React and ...
scaryhamid's user avatar
0 votes
1 answer
131 views

Possible violation of LSP when adhering to ISP?

Recently I read about ISP and wanted to implement it into my project. While implementing my design I think I found a flaw which violates LSP but I'm not sure. Given I have a game project, in which ...
Boudebouz1's user avatar
-2 votes
1 answer
126 views

Success Metrics of system that is time-based

We have a internal system (lets call it system B) that responds "No" as a response to a request from external-facing system (lets call system A) based on elapse of 48 hours from earlier ...
learningMyWayThru's user avatar
0 votes
1 answer
42 views

Data file ingestion with minio and kafka

I want to collect a lot of files (file data + metadata) from local servers to a central server. Files are important, need to ensure that no files are lost Local servers: implement a collector to ...
kietheros's user avatar
  • 109
0 votes
0 answers
23 views

Sharing data through multiple environments (dev/test/stage/prod) for one usecase

I am looking for a concept that handles the needs of some data to be distributed in several environments (lets say we have dev, test, stage and prod). Example: We are setting up planned outages of ...
libik's user avatar
  • 302
16 votes
11 answers
15k views

Is it possible to build a system to generate UUIDs where every UUID is guaranteed unique?

Is it possible to design a distributed system to generate unique ids where there is a requirement that every generated id is guaranteed to be unique with no possibility of collision? I didn't think ...
Daniel's user avatar
  • 507
3 votes
4 answers
1k views

Representing vectors as arrays of points vs. as data structures

I'm writing a program in Java where I need to represent the position, scale, and other 3-dimensional properties of objects in a world using vectors. I can use either of these two approaches: ...
AcinonX's user avatar
  • 467
0 votes
4 answers
323 views

Code quality: expressiveness vs. conciseness

I've been wondering about code expressiveness vs. conciseness lately. What I mean by that is that a lot of modern programming languages offer features to express statements in a very short manner, ...
Sir Falk's user avatar
0 votes
2 answers
291 views

Explain 90th-percentile response time of 2 seconds when handling 200 concurrent connections per second

From Ch 12 (Resiliency) of the book "Building Microservices" In the context of how much resiliency is too much resiliency How long should various operations take? It can be useful to ...
wenn32's user avatar
  • 129
0 votes
1 answer
111 views

Functional interfaces or decorator-like implementations [closed]

Consider Chess as an example. Say, we have a lot of domain objects that are alike, in this case chess pieces. I have two proposes to implementing the behaviour of chess pieces. Both uses the following ...
Daniel Birn's user avatar
1 vote
2 answers
130 views

Orchestrator (like Camunda) between frontend and backend?

I have the following use case. We have both a frontend application and a backend application. Earlier, events on the frontend application directly call the backend application. Now we want to ...
Gopikrishna K S's user avatar
-2 votes
1 answer
219 views

Making objects aware of their (consistent) IDs

Abstracted problem I would like to be able to quickly refer to some (most likely non-hashable) objects. At the same time, I would like them to be aware of their own identity. The 2-way search should ...
Etua's user avatar
  • 7
-1 votes
1 answer
146 views

How to make a hierarchical permission architecture work performantly?

I was going through this blog - https://www.notion.so/blog/data-model-behind-notion Which talks about how each page can inherit permission from parent page. we use an “upward pointer” — the parent ...
Shyamal Parikh's user avatar
0 votes
4 answers
176 views

Best practice for using read-write lock

Given a system where users can access different services through the API for conducting business transactions, I am currently working on integrating a read-write lock into the system. One approach I ...
YiLuo's user avatar
  • 9
24 votes
11 answers
8k views

Is it logical to not use inheritance because the function is critical?

Our codebase has a typical base-class with a ton of sub-classes. The base-class already has many default functions for the sub-classes. However, one particular function has the same verbatim ...
Zack Light's user avatar
0 votes
0 answers
30 views

Passing JWTs securely back to the mobile app frontend after signing in with Google OAuth2

I have a server(API) written in Flask and a client(mobile app) written in React Native. The application allows for logging in with either email/password OR with Google. The Google authentication flow ...
Cristian Gira's user avatar
0 votes
2 answers
242 views

Should I split backend into legacy and modern app to make the rewrite feasible?

My vanilla PHP backend app needs to be rewritten due to very poor design and lot of unstructured code. The legacy app is very large and the team small, so doing full rewrite in limited time is quite ...
user14967413's user avatar
0 votes
2 answers
124 views

Push and Pull Communication in object oriented: why Push style is not flexible?

I'm trying to learn Observer Design Pattern and I started to watch the series which belongs to codewithmosh called "The Ultimate Design Pattern Series". in the lesson which was about ...
Mehdi's user avatar
  • 29
0 votes
1 answer
73 views

Function parameters using IDs vs full data objects

This is a design problem that has plagued me from web apps to embedded systems. It seems that my fellow developers don't really care at all, so I've never seen an established pattern. In short: how ...
allthewayaround's user avatar
0 votes
0 answers
52 views

How to structure my DB setup?

I have made a small project to try and learn to implement SQLite-DBs into my projects. For the DB part, I use sqlmodel and followed their tutorial. For the creation of the engine however, they use a ...
Jan's user avatar
  • 203
1 vote
2 answers
227 views

What is the difference between "Separation of concerns" and "Modularity"?

I'm studying for an exam and one of the questions, is about the concepts Separation of concerns and Modularity. But I struggle to see the difference between the two concepts, since both of them seem ...
vadema_'s user avatar
  • 19
0 votes
1 answer
68 views

Design a sequential processing of records

About 10 to 15 records are processed per day with the time interval of 5 minutes between each record. System A inserts a record in DB and sends id of that record to active mq. System B Listener ...
sunleo's user avatar
  • 119
2 votes
3 answers
432 views

Should my methods return concrete classes or interfaces?

I'm building a ASP.NET Core Web API and the application consists of 3 main modules. Data module: Contains the entities and DbContext Web API: Contains the controllers Service module: Contains all the ...
Yashoja Lakmith's user avatar
1 vote
1 answer
97 views

Many to many REST design for users and teams

I am designing REST API for users and teams of users. One user can belong to multiple teams . One of the requirements is to be able to sort the users belonging to team in alphabetical order. Teams can ...
Marcin Majewski's user avatar
3 votes
3 answers
230 views

How do you handle instantiating a large number of interconnected component objects?

I'm currently refactoring our instance startup code, which is currently a 2,000 line mud method. The issue is that that method needs to create a large number (>50) of components/service objects, ...
thecoop's user avatar
  • 529
-1 votes
1 answer
58 views

Sending Notification pattern

I am new to backend development and I was building a feature for my project where I can send notifications to various channels (for example slack). I have a written notification class, which loads the ...
AlwaysBlue's user avatar
0 votes
1 answer
139 views

Separation of concerns: persisting complex types

I have the following module structure: core persistence extension In my core module, I have an interface: Handler. This interface has multiple implementations in the core module as well as extension ...
alturkovic's user avatar
2 votes
2 answers
232 views

How to design fault-tolerant distributed "all-or-nothing" system?

I have a system where Client(C) sends request to Server(S0). S0 then sends the response back to Client that "request received" and closes the connection. C can regularly poll S0 to check on ...
sam's user avatar
  • 33
1 vote
0 answers
45 views

Endpoint design for single and bulk requests

I'm working on a project in Python and want to get it hosted for others to use, the internal recommendation has been to host it on AzureML (it is a non-machine learning model, but follows the same ...
evaless's user avatar
  • 11
0 votes
1 answer
158 views

Am I overengineering my application? [duplicate]

At present moment, my desktop application operates purely on file names. That is, it parses file names and then reasons about the data contained therein. However, in the future, I see that there is a ...
the_endian's user avatar
  • 1,152
0 votes
1 answer
101 views

AWS and cron job: improve logging, monitoring and concurrence

In my company, we use a separate cron server to run mission-critical background jobs that run on a single ec2 instance: the whole platform is then vulnerable to anything going wrong on this instance. ...
dev-chicco's user avatar
0 votes
1 answer
65 views

Load Testing for Large-Scale Architecture Involving Cloud Servers and Switches

We currently have an architectural setup as described below. Our plan is to conduct a load test, but we face a challenge due to the high cost of real switches. We have two options: either build the ...
Yiffany's user avatar
  • 101
0 votes
0 answers
90 views

Designing message handler

I am writing an application that receives different kinds of messages from an external device. The messages are of different types and they are received from the device in the form of a string. For ...
Codisattva's user avatar
4 votes
2 answers
194 views

How do replicas of an app instance assure the task was done only once when the main instance fails?

Let's assume i app have with basic flow: Client send request to server Server do some business logic Server puts message into some message queue Server returns success to the client microservice A ...
Johnyb's user avatar
  • 407
12 votes
4 answers
5k views

Is there a clean way to model methods that only make sense depending on the current state of the object?

Let's say that I have a class called Mission. This class is intended to represent a mission requested by a professor working in a faculty. Mission has a private enum field representing whether the ...
Mehdi Charife's user avatar
0 votes
1 answer
93 views

Cart Implementation - is it ok to do a server call on each CRUD operation?

I am watching a tutorial about ECommerce Website with .Net Core - and the project is of type Web Assembly Blazor and I checked the .NET CORE Hosted, so the project spited to Client, Server and Sheared....
Ahmed Abdien's user avatar
1 vote
1 answer
51 views

Should I combine use cases related to viewing?

When I did a small project in school about writing a document for Online Auction System in OOAD (Object-oriented analysis and design) courses, I had trouble with multiple Auction viewing use cases ...
Đặng Quang Huy's user avatar
1 vote
3 answers
198 views

How to design an entity that has different fields depending on a type?

I have a specific domain entity that has a given type and some attributes. Based on the type, it can have another set of type-depending attributes. Normally, I would create a class for each type and ...
Fischer Ludrian's user avatar
3 votes
2 answers
147 views

Conceptual Software Design: Managing Large Number of LEDs with Raspberry Pi

Question Summary I am writing a program that will run on a Raspberry Pi 4b+ designed to manage hundreds of LEDs, as well as a few other devices (such as small motors). This is for a project I am a ...
Raspberry Intern's user avatar
0 votes
1 answer
48 views

Create a reporting service with no fixed pre defined reports

I have to create a service/app which allows creation of custom report templates & schedules using those templates(like create the report daily) that will generate the report in a the specified ...
humbleCoder's user avatar

1
2 3 4 5
104