Questions tagged [architectural-patterns]

An architectural pattern is a general reusable solution related to the high level structure of software systems. For reusable solutions having a more specific scope (e.g. individual classes/components and their interactions), prefer the tag 'design-patterns'.

Filter by
Sorted by
Tagged with
-2 votes
1 answer
64 views

Is it OK to use a Command Sourcing instead of Event Sourcing? Replay events in Commands-Repositories

I have a system that uses a graph database without any ORM, mapper or tool that tracks entity changes, like EntityFramework. I'm not using domain entities, instead I have an Event that calls changes ...
0 votes
1 answer
35 views

Intraservice Communication Using Kafka

recently i came across an architectural diagram in my organization, where a backend service sends messages to itself using Kafka, so basically it queues the messages and reads from the queue and ...
-3 votes
2 answers
78 views

Coding style for a micro-service across organisation [closed]

Background/Context: A big organisation has several departments, those departments have several business units and those business units are divided into domain teams. Assuming domain teams are atomic ...
-1 votes
2 answers
110 views

Appropriate design pattern for coupled Objects

I code an Object-Oriented simulation where you can have a Unit move on a Terrain. The cost of such move depends both on both Unit capabilities and Terrain features: a boat can move on water, a plane ...
  • 131
0 votes
0 answers
45 views

How big should database adapters/gateways be?

Outline When you build an Adapter that connects your application and the database, How big should you make this adapter? Should it contain all possible queries that could be made to the DB? Do you ...
  • 109
0 votes
2 answers
124 views

Microservices that needs to change row in shared DB

I have an application that can be reduced/simplify to this flow: user sends request to app A app A inserts info about the request and user into DB ( marked as "B in progress" and "C in ...
  • 231
0 votes
2 answers
129 views

In an "Always On" architecture, how are duplicate concurrent transactions handled?

Imagine a scenario where a gift card has been purchased with cash, the gift card is duplicated, and each card is used to purchase an iPad at a self-service counter at exactly the same time. What are ...
  • 19
0 votes
1 answer
73 views

Are Microservices Architecture and a Single Customer View able to co-exist?

Given the microservices pattern is the decomposition of software by business capability with ownership of state, and a single customer view is an aggregated, central, "single" data store of ...
  • 109
1 vote
3 answers
767 views

Synchronous vs Asynchronous Event Driven Architecture

I have been searching extensively about the difference between synchronous and asynchronous patterns and how this relates to event driven architecture. On its face it is quite obvious, I simply ...
  • 129
1 vote
5 answers
339 views

How do Singletons differ from Static variables?

Although I do find some (apparently old) posts on the topic on the web, I could not find one here at SE. Thought of raising this here to see if what I read is accurate/is all there is to it. So ...
  • 303
0 votes
2 answers
88 views

How to handle functional differences in an app in different locales?

I'm working on an app that needs to be localised for two different countries, let's call them Atlantis and Buranda. As well as translating the site into the relevant languages and displaying dates, ...
0 votes
0 answers
82 views

How to model an event-driven system for replays

Let's say I have a system to which I can upload documents via an API. There are three services: the UploadService - responsible for providing a HTTP endpoint the StorageService - responsible for ...
0 votes
2 answers
121 views

Accessing Hardware-based resources from multiple worker threads

I have a technical application that interacts with different hardware components: measurement devices, sensors, custom hardware. These use dedicated interfaces like USB, serial ports, TCP/IP ...
  • 119
0 votes
1 answer
95 views

Designing a model for a small business which provides multiple services which generate documents [closed]

I am designing a system for a company which provides multiple services to users, all of which generate a document. The documents all have a validity period. Some of the services can be grouped, and ...
0 votes
3 answers
89 views

Should we test private data (static objects in this case) to make sure it maintains its structure?

I had a discussion at work about whether to unit test a private static object we're using as data for a public component. const data = { 45: { name: 'John' }, 2: { name: 'Patricia' }, 27: { name: '...
2 votes
1 answer
145 views

Wrapping a legacy C++ codebase with a C API

I have inherited a large C++ codebase implementing various Windows desktop applications, services and libraries using Windows MFC. There are no automated tests. We need to decouple the UI and retain a ...
  • 91
0 votes
1 answer
26 views

Modularized authentication providers for Spring application

At our company, we have multiple products which share authentication settings. In particular, we use Spring LDAP, but since our use case and configuration is more complex, we would like to use ...
  • 300
0 votes
1 answer
97 views

How to show only most recent items in most efficient way?

Consider application where users rates products (e.g. 1-5 stars). Through passage of time, there might be millions of records. One can create desired indexes and/or keep sum and count of all ratings ...
5 votes
3 answers
258 views

Better to store references to an object, or to store its ID and retrieve it with a hashMap

Given the classes: public class SocialNetwork { private final Map<String, User> users; ... } public class User { private final String user; private final LinkedList<String>...
  • 61
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
3 votes
0 answers
262 views

MVC vs Layered vs Client-Server

On this book (Software Architecture, 10th Edition by Ian Sommerville, ISBN: 9781292096131), the following architectural patterns are presented (Chapter 6, 6.3, p175): MVC Layered Client-server ...
  • 149
0 votes
1 answer
81 views

How should you structure the front-end/client to interact with a web app microservice?

I've been grappling with this for a while and figured I would post here to get input. I am a full stack engineer. I work on both front end and back end apps, where sometimes I have to create new ...
  • 329
0 votes
1 answer
197 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 ...
0 votes
2 answers
119 views

DDD and bounded contexts: can a context be mapped in multiple microservices?

Let's suppose that I have two bounded contexts: A and B. In books I'm reading authors will only write "Context A maps into Microservice A". Now I'm working on a project (university ...
  • 9
2 votes
1 answer
96 views

How to deal with master data in a microservice environment

Hey Software Engineers Currently we basically have a what I would call "modular monolith". A diagram would likely look something like this: What we want to do in the future is being able to ...
  • 329
-2 votes
2 answers
140 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 ...
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
-1 votes
1 answer
406 views

Modular monolith vs microservices for hybrid multi-tenancy

TLDR; I'm architecting an hybrid multi-tenant app that needs to handle customizations request from customers (tenants), I'm trying to decide between modular monolith and microservices pattern, Which ...
  • 117
-1 votes
1 answer
221 views

Source of "... against the interface, not the implementation"

For a paper I am writing, I need to find the origin of the following two phrases: Code against the interface, not the implementation and Test the interface, not the implementation (Note: the ...
  • 31.5k
0 votes
1 answer
115 views

Solution architecture for a Kafka streaming to website system

Not sure if this is the correct forum for this question - but I could really use some advice. I need to design a system (within certain constraints). The system must implement the following logic: A ...
0 votes
3 answers
177 views

When scaling from a single server to elastic computing (many concurrent servers) how do timed tasks scale up?

We have been in the process of scaling up my companies infrastructure, we have graduated from single servers and moved everything off to scalable AWS Ec2 servers that auto scale, there is one little ...
  • 279
0 votes
1 answer
192 views

What is the difference between Kruchten's Logical and Development view?

I want to understand the difference between Kruchten's Logical and Development view when using a microservice architecture. Krutchen describes the software architecture model 4+1 model with four ...
  • 222
0 votes
1 answer
145 views

Does the builder/factories pattern apply to this problem?

I have the following code and I am not sure if the builder factory is the best approach to solve this code duplication. createA(a, b, c, e: {e1, e2}){ return{ a b c e } } ...
  • 387
1 vote
0 answers
87 views

Retry long-running message processing in case of processing node failure

I have two types of microservices: Data Collector and Data Processor. They communicate with each other via Azure Service Bus Queue. Data Collector collects data from different sources and, once done, ...
  • 149
0 votes
0 answers
67 views

What is the best way to share data between two loosely coupled interfaces?

I have two interfaces: Camera and Computer. So far, each interfaces have multiple implementations in my codebase and they are loosely coupled (no implementations of Camera depends on any ...
  • 101
0 votes
1 answer
180 views

Architecture for alerts system based on API - would this be too slow a design?

(Hi I’m new here - I believe this question suits here from the guide saying “ architecture, and design” - however if there is a better place, just pop me a comment. As there’s no actual code it doesn’...
  • 101
3 votes
4 answers
337 views

Is the strategy pattern for 3 variants overuse?

I am curious about it because I talked with a friend about the strategy pattern, and we diverge about when we have to use it. Our scenario is that I have to build a view component with 3 variants. All ...
  • 139
2 votes
1 answer
142 views

Builder that creates a repository for a specific entity - is this an established pattern?

Suppose I have the following entities: class Employee { public string Id { get; set; } public ICollection<EmployeeBadge> Badges { get; set; } } class Badge { public string Id { get; ...
  • 23
0 votes
1 answer
57 views

API controllers modeling

I'm developing an API with ASP.NET, but I'm having some questions about the best way I should develop the controller layer for the products. I'm having these questions because each product will have ...
0 votes
1 answer
49 views

MVVM List<T> from Model to View

I am writing a control app for a 6-DOF robot. This app can send scripts to the robot, which in turn executes these and thus moves around. In the app a robotprogram can be created by adding 3D ...
3 votes
3 answers
511 views

Undo/Redo with Command Pattern and Object Destruction

I'm developing a Command Pattern with Undo/Redo support. The environment is Unity C# but should be mostly language-agnostic. My initial commands comprise of adding and removing objects to and from a ...
0 votes
1 answer
207 views

Where should email notification logic go?

My architecture looks like: Each block is an individual service. There may be more upstreams and downstreams added in the future. The upstreams need to send email notifications to users. Each email ...
  • 159
0 votes
0 answers
54 views

Realtime report generation and downloads

We host a dashboard where users can view different reports, each powered by a templated SQL query. The users have an option to "download" those reports as CSV. Currently the above use case ...
  • 101
0 votes
3 answers
219 views

Ingest data from our partener : API POST vs Event Driven Architecture

I am in the process of carrying out a software architecture for my client, in fact THE HISTORY OF THE REQUIREMENT : MY PARTNER SEND cvs files via MFT to MY CLIENT , many times a day . MY CLIENT has a ...
3 votes
2 answers
474 views

Where to store the results of a class internal computation?

Let's say I have a class with some suitable instance variables which are then used for some computation (via a method of the class). As the computation will generate lots of data which needs to be ...
  • 67
0 votes
2 answers
123 views

Method that is aware of interface underlying type without reflection

I'm struggling with the design of a method CallSystemX() that needs to accept a parameter of multiple Types. To get around it I created an interface called IRequest to be able to pass different types ...
  • 275
0 votes
2 answers
241 views

Is there alternative to applying events synchronously in command handler in CQRS?

I have workflow where I have complex command handlers encapsulated inside aggregate. These handlers emit some events, and then further logic based on result of these events can emit more events. ...
  • 101
0 votes
0 answers
65 views

API-based Architecture Pattern

After studying some basics about n-layer architecture, I face to a new proyect where my database is an ERP and the way to connect with it is via API calls. I can perform queries to obtain data but the ...
0 votes
0 answers
67 views

What is considered as best practice for defining common types in golang?

We have set of common types (mostly structs, scalars, string IDs) that are used across different packages in a project written in Golang. Currently we define them in a package named "models" ...
3 votes
3 answers
829 views

Is "Transactional outbox" an anti-pattern?

"Transactional outbox" is a pattern for distributed systems which makes use of a single db transaction to do both, persist changes to the domain model and send a domain event message to the ...
  • 523

1
2 3 4 5
8