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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
93 views

Architecture for storing generic data

(I am facing this issue with code written in Swift, but would appreciate any high-level pseudocode solution, just so that I may wrap my head around the architecture) I need to find an architecture ...
0 votes
0 answers
23 views

Client or API Gateway to perform authentication on backend?

An system called X wants to consume APIs from the backend called Y. There's a definition from the Systems Architecture Team that states that every request from the X to Y must go through the corporate'...
-1 votes
1 answer
316 views

Azure Service Fabric - Designing a Calculation Engine

Suppose I have the following devices: Device A Device B Device C (...) Also, for each device, I have the following measurements: Measurement 1 Measurement 2 (...) Each measurement event includes a ...
1 vote
3 answers
120 views

Is layered architecture style inherently monolithic?

Overall cost and simplicity are the primary strengths of the layered architecture style. Being monolithic in nature, layered architectures don’t have the complexities associated with distributed ...
2 votes
2 answers
424 views

Microservices: Is the Saga Pattern correctly applied here?

I'm trying to understand and learn how to build microservice messages the best and came up with this task for myself: Services given: Accounts Service Token Service Email Service When a user ...
0 votes
1 answer
64 views

Is it safe to make training data and labels as global variables in C?

I'm trying to make this function called walk in C. The idea is that the function takes as parameters a point in space (represented by an array), a function (pointer), and a step size / learning rate ...
0 votes
0 answers
78 views

How to scale WhatsApp clone to +1 billion users using Kafka? [closed]

I am studying system design and currently thinking through the details of a Kafka-based system that supports instant messaging like WhatsApp. Consider the following design: Each user is connected to ...
0 votes
1 answer
100 views

How can I restore an entity from the database while keeping my entities database-independent?

Background I'm currently working on a project using domain-driven design and Dapper as my ORM. The entities are naturally slightly different than the tables in which they are stored (e.g. _id is ...
0 votes
1 answer
42 views

How to improve a monthly usage quota system for an API with growing number of users?

Couple of years ago, I designed an API service which has a limit on the number of requests per month per user. To track the monthly usage of each user, I used a table called monthly_usage. The table ...
2 votes
2 answers
410 views

Design of a modular application

I'm developing an application (Java) in a modular architecture. I have two approaches in mind and I'm not sure which one will be "better code" in case of maintenance and conventions. I have ...
-1 votes
0 answers
27 views

Creating a big Vue 3 project with Vite and Typescript [closed]

I'm creating a vue projet with vite and typescript. I'm expecting to create some library of component and some others with only reusable utils and functions. I would like to know what are the best way ...
0 votes
3 answers
106 views

How to handle dependencies between microservices all called within one large service

We are working on a suite of Python 'services' each of which is basically an application that does some calculations based on a domain (data) model and returns the results. These services are designed ...
4 votes
1 answer
226 views

ReactJS with Elasticsearch App Architecture

I want some advice regarding my architecture and hosting options. I'm attempting to build an e-commerce site for e-books. It will use nestJS for the backend and ReactJS+Typescript for the frontend. ...
0 votes
0 answers
36 views

System Design for filter and notify user

I'm currently trying to design a notification system to notify users about data that match with they interests. Today we have a similar system running in production, but doesn't have a good ...
0 votes
2 answers
72 views

Is ASP.NET's default recommendation of registering dependencies in the Web project bad practice?

Something that's bugged me for years now about ASP.NET (Core) is that it's standard practice to set up dependency injection in the Web project, whether through the Startup class's ConfigureServices ...
1 vote
1 answer
199 views

"Protect" published events using auth, Event driven architecture

I have a system that publishes events to a message broker, lets call that system A. I also have system B and system C that subscribes to the "events"/messages. My payload/message looks like ...
4 votes
1 answer
344 views

Dynamic Object Abilities When Saving State

I have n classes that extends from a State class, the purpose of the State class is to manage the state of the extended classes. For each class we need to save it in the database, remove it and select ...
0 votes
2 answers
56 views

Where to check preconditions in multi functions

In a library, there could exist three types of functions. The first are those which are visible to the user i.e. their declarations are installed in the library's include directory. The third are ...
4 votes
4 answers
6k views

Designing a Feed and Notification system in MongoDB

I'm developing a NodeJS API that will be consumed, for now, by an Android app. I need 2 important things here: a News Feed and a Notification system. And I need it to be scalable. I'm using ...
0 votes
1 answer
73 views

How to deal with overlapping domains?

I'm a Java developer and I'm try to separate my code to packages (modules, services, whatever the chosen unit of functionality is). Let's say I'm creating a system that tracks employees and the ...
1 vote
2 answers
509 views

Application Horizontal and Vertical Scaling

I'm hoping the experienced Java developers here can share some insight about this problem we have been trying to solve for so many months. We're currently building a Java web application that uses ...
1 vote
1 answer
63 views

Capture a time-ordered sequence of item-level modifications via events when using Amazon Aurora

I'm designing a small platform based on a series of event-based micro-services. The persistence storage I'm targeting is (the managed) Amazon PostgreSQL (Amazon RDS for PostgreSQL) — although I can go ...
3 votes
1 answer
510 views

Where should I implement Ports with Hexagonal Architecture?

I have been doing some research on the Hexagonal/Ports & Adapters architecture. For the most part, it makes a lot of sense. My initial understanding was that "Driver Ports" were to be implemented ...
2 votes
2 answers
979 views

Clean Architecture Dependencies

I'm thinking about adopting the clean architecture. The main thing in this architecture, as I understand it, is the dependency flow from top to bottom. So the first thing that I asked myself is: what ...
0 votes
1 answer
1k views

Clean Architecture and MVC controllers + entities

In Uncle Bob's clean architecture, why can't MVC controllers call entities directly? It seems like since the controller depends on the inner layer, they should be able to call entities when needed. If ...
0 votes
2 answers
64 views

How can I track the status of multiple messages in asynchronous processes?

Let's say I've a sendMessage endpoint. This endpoint looks at configured message destinations and then puts 1..N messages into a queue (e.g. {userId: 3, type: SMS, trackingID: X} and {userId: 3, type: ...
-1 votes
0 answers
47 views

Model variations depending on requirements - naming and placement

Let's say there is an Item model. Depending on requirements in a given ViewModel (WPF with MVVM) I will need different things. For example in some cases I would need model to have 3 properties: Number,...
0 votes
1 answer
139 views

Confusion in UML 2 state chart design for a CAN bus data logging sensor

I have the following requirement to design behavior of a software component for logging sensor, which writes data to SD card a: Datalogging sensor can write data to a FAT16-formatted SD card that is ...
0 votes
1 answer
245 views

How to avoid side effects in complex code

Our team is working on software that does a lot of calculations, inputs are quite immense structures and outputs are calculated data for the GUI (around 10 tables, warnings, and other messages ...
2 votes
4 answers
176 views

Multiplayer FPS Architecture

I'm creating a multiplayer game and have been having some trouble creating a good architecture for the server side. So far on the server we store a list of player which are the actively connected ...
23 votes
6 answers
6k views

How important is it to clearly understand requirements and architecture before starting to code? [closed]

Whenever possible I have been requiring an understanding of the requirements and architecture for the next scope of work before starting to code. Sometimes due to schedule pressure on larger projects ...
10 votes
3 answers
10k views

Implementing paging with multiple data sources

I have multiple data sources that I need to search across and return back to the client (web app). For example the sources are: an elastic search index a sql database Is there an efficient way to ...
0 votes
1 answer
102 views

Are there any guidelines for calculating hardware requirements in a containerized environment?

At an architectural section of an interview I was asked to produce hardware requirements for a certain system I designed. It was a microservice-based system which runs in Kubernetes, Openshift or any ...
0 votes
1 answer
247 views

Clean Architecture : Application State

Given the following design from clean architecture in which layer would you put overall application state? In each state a subset of use cases are allowed to be invoked. For example if application is ...
0 votes
0 answers
64 views

"Select All" in Table is now sending too much data to Server via API - Alternative Ways to Send to Server?

Outline of the current architecture of our web app outlining the issue I'm seeing Client-side app is React, talking to a server running the Play! framework via an API. On the page is a table that ...
1 vote
3 answers
112 views

Selecting a large set of information from a database

So this is a topic I have never really tackled, so bare with me as I try to describe my issue and the scenario. I have an API endpoint in my service that sends emails to a bunch of users. The set of ...
0 votes
0 answers
26 views

In a layered backend architecture is the repository/manager part still relevant? [duplicate]

We all know that in a layered backend architecture we have the Controller (or view) > Service > Repository (or Manager) The Repository part is the part that retrieves and updates the DB. But now ...
9 votes
4 answers
5k views

When to create a nuget package vs creating a web api

As our devs are writing internal applications, often times we need to share code. There are various ways to do this, but it usually comes down to creating a nuget package on a shared server or hosting ...
5 votes
1 answer
699 views

Is it correct to use Lombok in a domain object?

I'm starting the refactoring of a legacy app in favor of having a more organized structure, I chose to go with hexagonal architecture since I have lots of well-defined ports and adapters, my use cases ...
0 votes
1 answer
124 views

Microservices: Non-query calls from an API Gateway in the API Composition fashion

In a microservice architecture, it is common for an API Gateway to perform API Composition (providing CQRS is not used) for queries to multiple services to combine data to make it ready for a front ...
4 votes
4 answers
576 views

Pattern for endpoint that routes requests?

I am building a service that will push notifications to many other services. It has a couple of different notification types that each consumer may care about, but likely will not care about all of ...
0 votes
0 answers
63 views

REST API design - Categorised response objects - All, Sub, Dub movies paged response

I am having trouble deciding what is the best way to implement a REST API which does the following: When page gets loaded, it displays a list of Movies and above is a category selector tab (ALL, SUB, ...
1 vote
1 answer
533 views

How to use external validation libraries for entities in a "clean" architecture?

I would like to make use of a external library to parse the core domain entities. Doing this in a naive way it would look like the following: import { z } from 'zod'; const Audience = z.object({ ...
0 votes
1 answer
91 views

Designing a scheduled based system using Node.js

Just for the example: I have a system which needs to fetch social media timeline on a specific time interval based on user preferences. Let's say we have user A, B, C, and so on. Let's say again we ...
0 votes
1 answer
160 views

Is it secured to accept and execute user provided CURL commands

Assume you have to figure out a dynamic way where the user can provide an API call to hit in the backend for example, user to provide a webhook to call on his end server So, An idea for users to ...
1 vote
1 answer
165 views

Component based architectures in JS / PHP: what indicators suggest that a UI element ought to be written as an importable component?

N.B. Several months after initially asking this question (and not coming up with any satisfactory answers) I am now learning to use HTML Custom Elements / WebComponents. It seems the same question ...
157 votes
8 answers
65k views

Criticism and disadvantages of dependency injection

Dependency injection (DI) is a well known and fashionable pattern. Most of engineers know its advantages, like: Making isolation in unit testing possible/easy Explicitly defining dependencies of a ...
0 votes
0 answers
105 views

Howto design a Rest-Client in c# the right way?

apologies, if my question is to trivial. But i after doing some research i couldn't find an appropriate answer to this seemingly simple question. As a developer with some experience, i know that i ...
-1 votes
3 answers
184 views

How can i handle really long-term running tasks?

Im not dealing with a x minute task that can use an message queue and some workers to be done. Lets say that i have an cctv camera that capture 24/7, but can be stopped or started again via Web API ...
0 votes
1 answer
132 views

Where to create repository instances?

I've several repositories. To make them testable, I add the ORM session in the constructor. class Repository: def __init__(session): self.session = session def save(object): self.session()...

1
2 3 4 5
69