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
1 vote
1 answer
69 views

Architecture review for desktop application with distributed components

We are planning on building a desktop application with a few web components. I want to know how resilient is this architecture. Essentially the design looks like Mixing web components with desktop ...
1 vote
1 answer
59 views

Microservices Pattern - Downstream Services Registering Themselves with an Upstream Orchestrator?

I'm looking for some guidance on a design proposition I have to accomplish the following use case: We have several small microservices that each generate a unique set of "analytics" or ...
3 votes
1 answer
116 views

Design for the future or make it tightly coupled to the implementation

My question is regarding how would the developer know when you add interfaces/protocols to their code and inject them as dependency. Consider an example of BudgetService. protocol ...
  • 133
1 vote
2 answers
97 views

Implement message queue in API Gateway

Recently we have this client who asks for a API Gateway solution, in this case it’s Kong. Currently, they have 10 services (200 APIs) that are running on really legacy stuff (built with C++ and ...
  • 119
0 votes
1 answer
130 views

Server-side Long Running Tasks

I am trying to decide on which approach to follow for long running tasks. Web Client (user) story Web client connects to the server (REST API + WebSocket for real-time notifications) Web client POSTs ...
  • 9
0 votes
1 answer
200 views

Three layer architecture and using DTOs to transfer data between layers

I have a 3 layer architecture application with presentation layer, business layer and data access layer. UI -> BLL -> DAL UI Layer has reference to only BLL and BLL refer only to DAL. My BLL has ...
2 votes
0 answers
43 views

How to have only one consumer handle a long running task at a given point?

I need to design an application which makes requests to an external API. External API has a hierarchy of entities: User which contains ListOfItemss which contain Items. I need to get data on all Items ...
  • 165
0 votes
0 answers
58 views

Microservice Architecture For Blog Posts With Media Content

I was reading the guide about microservices from https://microservices.io/ (still very new to this architecture) and had a question about a design approach. Let's say i have a blog applications with ...
1 vote
2 answers
142 views

DDD rich domain model - dynamic dependencies - EAA

class Product... public static Product newWordProcessor(String name) { return new Product(name, new CompleteRecognitionStrategy()); } Martin Fowler presents this code in his book "Patterns of ...
-1 votes
1 answer
89 views

How to automatically calculate the norm for users in our time registration application?

I'm creating a time registration application for employees where they can register their hours. I want to show the users their "norm" (not sure if this is an actual word or just made up by ...
  • 99
0 votes
1 answer
69 views

Applying Domain Driven Design to applications with both reading and writing heavy logics

We are planning a complete rewrite of a very complex project (10+ years, ~15 different application modules) and we would like to adhere to DDD and CQRS as much as possible but we are struggling to fit ...
  • 1
1 vote
3 answers
77 views

Separating network logic from business logic

I am creating a simple P2P file sharing system, where one peer can send some Objects (e.g., String, custom objects, etc...) to another peer. The peer, that receives the Object, can then manipulate it, ...
0 votes
4 answers
242 views

Avoiding Synchronous Communication Between Microservices

Something that annoys me when reading about decoupling microservices is that the problem is often stated, with either poorly explained, bad, or no solutions provided, which seems to especially be the ...
1 vote
0 answers
41 views

Design pattern for scheduling method calls (open-loop control) [duplicate]

I have an ERP-style system that needs to allow users to orchestrate an Entity.action() on a variety of objects that implement the Entity interface, at different datetimes. Calling action() would ...
  • 195
-2 votes
1 answer
107 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
42 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
87 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
130 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
47 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 ...
  • 217
0 votes
2 answers
146 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
132 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
83 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
2 votes
3 answers
1k 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 ...
  • 149
1 vote
5 answers
713 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 ...
  • 363
0 votes
2 answers
90 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
114 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
157 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
98 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
94 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
202 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
1 vote
1 answer
27 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 ...
  • 310
0 votes
1 answer
130 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
373 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
125 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
407 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 ...
  • 159
0 votes
1 answer
86 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
372 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
193 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
139 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
173 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 ...
-1 votes
1 answer
526 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
0 votes
1 answer
295 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.8k
0 votes
1 answer
153 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
192 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
280 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 ...
  • 232
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
89 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
78 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 ...
  • 155
0 votes
1 answer
258 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
350 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

1
2 3 4 5
8