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
17 votes
4 answers
6k views

I can't really tell the difference between Hexagonal and Layered Architecture

So, in the hexagonal architecture layer, the application layer has incoming ports (usecases) that's called from incoming adapters, implemented by services, that uses outcoming ports that is ...
0 votes
1 answer
74 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 ...
2 votes
2 answers
94 views

Replacing service implementation based on environment variables

I have previously asked a question on this forum linked here. In short, I wanted to not call 3rd party APIs when developing locally. Based on the wonderful answers received I have opted for the ...
  • 161
1 vote
1 answer
221 views

Circular references with generic classes

I'm trying to create an interaction system for a game I'm developing with Unity and C# and I've been struggling with it for a while now. It consists of interactors and interactables. The idea is that ...
0 votes
2 answers
541 views

When updating a model on a RESTful API, should there be an update endpoint per field? or one endpoint for the model?

For a RESTful API, consider a model schema as follows: MyCoolObject { field_a field_b field_c } Is it better to create one update endpoint to update one or many fields on the model? Or create ...
1 vote
0 answers
38 views

How to handle storing of arbitrary data in an application enablement platform

I'm working on an AEP in the IoT space, where we've created a few domain-specific entities to allow users to model their data. Each entity has both a type and instances of that entity. These are: ...
  • 259
6 votes
5 answers
373 views

Instability metric vs Dependency Injection

Below is an excerpt of Fundamentals of Software Architecture, page 65, which I am reading: The instability metric determines the volatility of a code base. A code base that exhibits high degrees of ...
  • 303
0 votes
3 answers
1k views

Mapping to and from domain entities

I am in the process of implementing onion / clean architecture, and would like to understand better how and when to map to my domain entities. So if we take a specific example where we have a Post and ...
  • 161
2 votes
1 answer
93 views

Modelling multi-device manufacture machinery software

We are building a multi-device (different vendors, different types) manufacture machinery where these device work together orchestrated by our software and operated by a human being to create various ...
0 votes
2 answers
104 views

How to solve an issue when a decorator needs variables from the base class?

I have a service class that does some magic. I want to introduce a new type of functionality - raise an event. I am absolutely sure that decorator pattern is great for this scenario. The problem is ...
  • 451
-3 votes
1 answer
50 views

Is it possible to add a unique identifier to the shared Data via bittorrent (P2P)?

I know that P2P sharing is copying the exact content between the peers. Everyone has the same data. Let's assume the content is very important and I don't want anyone to distribute outside the group. ...
  • 1
1 vote
1 answer
118 views

Streaming Market Data Over The Public Internet

I'm currently working on a design for a system that can service market data to external clients over the internet. The current solution involves consuming market data from a feed (Feed Handler), this ...
  • 119
1 vote
1 answer
301 views

MVC-like architecture: Model-Controller communication of results/status

I'm struggling on designing a solid architecture for my project. In particular, I don't know how to handle the communication between the models and the controllers. My goals are: Following the ...
2 votes
4 answers
190 views

How to refactor a lot of Functions that can be run in two different modes

I have some code and in it there are functions which can be run in one of two modes (in my case server mode and local mode). For example, most functions look something like this: def path_join(...
-1 votes
1 answer
100 views

How to reconcile CD with major architectural changes?

(This question is inspired by the SO blog entry Fulfilling the promise of CI/CD and this old question of mine: Why is it wrong to comment out code and then gradually remove it to keep track of what I'...
  • 3,357
3 votes
2 answers
408 views

Sharing an enum between a C++ and C# solution

We have 2 applications that are part of our product, one is written in native C++ and lives in its own solution, and the other is a C# application in its own solution. Both solutions are in the same ...
0 votes
2 answers
296 views

Sharing logic / services across modules in "clean" architecture [closed]

I am trying to implement a layered architecture consisting of; Controller, Service, Repository, Entity. Each module has at least some of the above layers. I am often finding that modules need to share ...
  • 161
-1 votes
1 answer
278 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({ ...
  • 161
0 votes
0 answers
46 views

SOA: How to fan-in with unknown number of processes

In my event-driven architecture I have a situation where once an event is raised validation needs to occur and I'm wondering how to proceed to the next step in the process if I don't know how many ...
0 votes
1 answer
115 views

Refactoring business logic out to private methods and testing

I am currently working on a project where there is a class ContactMonitoringJob a Quartz IJob class​ which in brief keeps pulling from a database and checks if any new changes have been introduced ...
  • 59
-1 votes
3 answers
82 views

Improving APIs that call 3rd party APIs [closed]

So I'm designing the backend of a platform that often calls other 3rd party APIs. The issues I've noticed were latency issues (sometimes the calls were fast, others a bit slow >15s) and I'm ...
  • 109
0 votes
0 answers
27 views

Reducing batch service memory usage through database pass-through

I have a batch service that is designed to pull in client information from an API and write this information to our database. We have daily writes of piecemeal data and a monthly write of (mostly) the ...
  • 109
0 votes
1 answer
43 views

Design approach where to persist autocompletion suggestions

I am currently planning a movie recommendation application. Within this context, the user can fill out a form including different information (e.g. title, description, etc.). The new entry gets then ...
-1 votes
1 answer
102 views

Should micro services follow HTTP verbs precisely?

I'm concerned with the practices on my team regarding following REST and HTTP verbs precisely. For example, when we hit a get endpoint for a resource/resources that doesn't exist, we return a 404. ...
  • 11
0 votes
1 answer
201 views

Application settings in relational database

There is an application of ours which has some experimental features. We want to enable it when user wants to enable. So they will change it in the UI and we are saving those to DB. So we added those ...
2 votes
0 answers
112 views

Cohesion and coupling possible combination in software

I know what we mean by cohesion and coupling in software. And generally the best practice is to achieve high cohesion with low coupling. It seems to me though that they are inter-related. I.e. you ...
  • 297
2 votes
0 answers
44 views

Software design for an Angular highlight&comment tool

We're building a new feature for an online editor that the user will not edit the document, but will be able to highlight & propose edits on the document. Very similar to google documents' ...
  • 133
3 votes
1 answer
194 views

API Design for Error Handling

I'm working on a semi-complex web API, the high level design so far looks like this: |--------| |------------| |------------| | |--| | | | | core | | | | ...
  • 131
3 votes
1 answer
135 views

Command pattern and object model integration

In a document editor application, is it better to implement the command pattern as a layer on top of the object model, or to deeply integrate it into the object model? If commands are a layer on top, ...
  • 141
0 votes
2 answers
70 views

Integration pattern: API vs events

I need to design the architecture of a CRM "platform" that integrates 5-6 legacy CRMs. One important feature is to show customer records stored in other CRMs in one single dashboard. The ...
  • 223
0 votes
2 answers
1k views

What is the difference between business capability and subdomain Decomposition in microservices?

I want to understand the difference between business capability and subdomain Decomposition for mircorservices. subdomain The subdomain decomposition corresponds to Domain-Driven Design (DDD) ...
  • 222
0 votes
1 answer
127 views

SQL Foreign Key Relationships and External Data

I work for a company that wants an external system built outside of their core system. I can't share an SQL database, and can't store data in their database. So I am forced to maintain my own SQL ...
-1 votes
2 answers
155 views

Multiplayer game architecture, should clients also maintain a Players list locally?

I am creating a multiplayer game and was wondering if only the server knows about the actual players in the game, or is this list sent to the clients too? So for example the server knows about each ...
0 votes
1 answer
534 views

RESTful web APIs using MVVM architecture

As the title implies, I would like to know if it is possible to create RESTful web APIs using MVVM architecture? Or we can use just MVC pattern to create web APIs?
  • 103
-2 votes
2 answers
142 views

How widespread is the use of hexagonal architecture (ports and adapters architecture)? [closed]

We are discussing the adoption of hexagonal architecture (ports and adapters architecture) in our team. Sometimes I use the rate of adoption as one rough metric about how beneficial a certain practice ...
2 votes
3 answers
198 views

What methods are available to implement feature flags or "loadouts" for C++ projects?

I'm looking for a system to be able to configure my C++ project to compile some sections of codes and not others depending on what target hardware I'm compiling for. The area of development is ...
  • 31
1 vote
2 answers
177 views

Minimizing queries on a database

I am working with a large dataset (~5GB) stored in a Google BigQuery database. My goal is to create a web app which works a little bit like an Excel spreadsheet where users start off by seeing the ...
2 votes
0 answers
257 views

System Design: Chat application in a distributed system context

I am currently working on a side project so I can learn new technologies and understand how the components fit together. For this project, I decided that I wanted to work on Chat Applications in the ...
1 vote
1 answer
750 views

Managing multiple state machines interacting with each others in ES5 Javascript

I have multiple state machines (7) managed by a "main" function. Because of system constraint this will be run on an old qtweb browser with ES5/IE11-like behaviour. So no promises etc. I'm ...
0 votes
3 answers
119 views

What should be the optimal management of end user messages in N-tier architecture?

I'm curious about your thoughts on this subject that we have discussed with the people around me. Especially at the architectural stage, in which layer is the most optimal and efficient way to use the ...
  • 13
0 votes
0 answers
27 views

Best practise for healchecks in Kubernetes parallel to service execution

Sorry for maybe a stupid question, but I am new to all that and I am trying to sketch an architecture for my microservice. I am developing a service that will be consuming Pub/Sub messages from GCP ...
  • 103
2 votes
1 answer
142 views

How do we maintain consistent-read promise to clients + handling ID collision when using a fallback queue?

In my company, we are using Event Sourcing pattern to implement a storage for all changes to the price of a booking. Across the company, different services might try to append events to a booking ...
  • 245
0 votes
1 answer
108 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
112 views

Best way to design an API that will allow for the remote controlling of a robot arm [closed]

I am currently a university student working on an extracurricular project where we built a 3D printed SCARA robot that will be remotely controlled. On one end, you have the user that is moving their ...
  • 3
8 votes
10 answers
600 views

Boneheaded exceptions should not be caught. Then how to provide fault tolerance and reliability?

I've always been taught that fatal exceptions (indicating problems that cannot be solved programmaticaly) and boneheaded exceptions (resulting from bugs in my code) should not be caught, should not be ...
  • 3,357
-1 votes
1 answer
93 views

Subclasses with same behaviour but different attributes for different inputs

Say I have two object types of the same interface MyObj (I am using python in this project so I will use the same for the explanation) class Foo(MyObj): a = [5, 10] class Bar(MyObj): a = [[1, ...
1 vote
1 answer
217 views

Doesn't Apollo Federation for GraphQL services encourage bad software design?

Background In the scenario GraphQL Federation was designed for, you have numerous GraphQL microservices in the backend, each with their own Schema Definition Language (SDL). Theoretically, these ...
  • 203
-2 votes
2 answers
72 views

Creating new methods for every read query in Data Acess Layer

Lets say we have a table 'A' with 4 referenced tables : Table B,C,D,E In our Data Acces Layer we could write a method that returns Table A containg every entity of B,C,D,E by joining in order to reuse ...
2 votes
4 answers
678 views

Multi tenant architecture, single database?

Based on this explanation of multi-tenant architectures here: A multi-tenant architecture is one where a single software instance and database serves multiple customers I cannot fathom how it is ...
-3 votes
1 answer
120 views

Whats the purpose of use-case and data-sources?

I have a question about where should I get the info required for making an api call. Let's say I have this : Presenter --> Use Case --> DataSource --> Api Ok now to do my api call, I need a ...
  • 103

1 2
3
4 5
67