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
2 answers
144 views

Where should objects be built from view-models in a layered architecture?

Having the following classes: Person.cs namespace Project.Domain { public class Person { public int Id { get; set; } public string Name { get; set; } public decimal ...
1 vote
2 answers
178 views

Looking for clarification on pub/sub systems and how an API gateway comes into play

I'm new to micro service architecture and I'm looking to understand how services should/can interact with each other. The acceptance for my current story requires me to: Email a document Backup the ...
3 votes
1 answer
507 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 ...
  • 139
1 vote
1 answer
492 views

Saga vs. Unit of work

What's the relationship between the two? Both are for atomic operations. Both results need to be either success, or failure with rollback to original state.
  • 245
0 votes
0 answers
253 views

What could be a good scalable alternative to polling data and then looping over a list of objects for triggering some action on those?

So I have some naive implementation for the following problem: We have a list of objects with action methods that have to be trigger at some value of interest. This value is polled (or is streamed) ...
  • 101
4 votes
3 answers
3k views

Is there an architecture pattern for "microservice as a plugin"?

Long story short - I would like to make a web application, solely for self-education purposes, that should allow user to add additional functionalities via plugins - just like Jenkins - https://...
  • 43
0 votes
2 answers
165 views

Is peer-to-peer a variation of client-server architectural pattern?

According to Software Engineering: Theory and Practice book by Pfleeger and Atlee, Peer-to-peer architectural style is different than Client-Server architectural pattern. But in Mocrsoft's Microsoft ...
  • 11
10 votes
5 answers
8k views

Cyclic dependencies in microservices

Just wanted to know if cyclic dependency is something that one should avoid in microservice design. For example, let's say we have a simple web store that sells fruit. It could have: Account Service -...
1 vote
1 answer
246 views

What can I do to make adding new concrete classes (of abstract/interface classes) easier across the code base?

A real (but simplified) example from the program that I'm currently working on. We have an abstract Request class and two classes that extend it: FooRequest and BarRequest. They both have dao's used ...
  • 81
3 votes
2 answers
615 views

How to make cross-service transactions in a microservice architecture? [duplicate]

One question im struggling with is how to make linear, cross-service operations/transactions in a distributed system. For example, I have two services: Orders and Payments. How would the Orders ...
  • 139
0 votes
1 answer
96 views

Designing a system of loadable resources with dependencies

Context: For a video game, I need to load an arbitrary amount of resources which when combined would form a complete level of the game. These resources would be 3D models, textures, sound, etc. Some ...
  • 727
0 votes
1 answer
351 views

Adding authentication and filtering in the service layer

I am currently developing a simple web-based application that consists of various layers: Model Layer Performs simple CRUD operations and provides access to the databes. Implements functions such as ...
0 votes
1 answer
133 views

Who is responsible for GUI timeouts: the GUI or the app?

I have an application written in C#. This app uses a GUI for message display and user input, and the GUI is connected to the app via an interface class: public interface IEndUserInterface { void ...
  • 121
1 vote
2 answers
246 views

Microservice Decomposition and Inter-service communication

I read theory but I need practical architectural advice on the actual implementation in java language for microservices. In the context of the attached screenshot. Here is my setup. Order Project ...
1 vote
2 answers
139 views

How to scale complex node.js application

Imagine a large node.js app with a multi-purpose api for mobile and frontend with a serving static files, with a websocket server, lot of cron jobs and workers. Basically I can horizontally or ...
  • 127
0 votes
1 answer
211 views

Should repositories always return Rx Single or Observable?

Let' assume we have an IFiltersRepository repository that provides data about a list of "filters" that are used on the search screen of an app (filter by color, by price etc). The repository has the ...
  • 195
3 votes
1 answer
262 views

Implementing Business Logic in Architecture

I am currently making architecture for one application in which we have different types of user and every user has different types of functionalities to perform. I am confuse in one point if i try to ...
  • 139
3 votes
5 answers
1k views

Microservices - Are retries enough?

I have been asked to look at moving our current architecture to microservices. I am aware of the warning to always assume a request could fail. So I am aware we should always be prepared to retry ...
-1 votes
1 answer
2k views

Update Entity for Repository Pattern and UOW Pattern C#

In one mock solution, I have created 3 mock projects to implement layered architecture design mainly the - Presentation Layer (Web) - Domain Model Layer - Infrastructure Layer. I haven't yet to add ...
  • 299
2 votes
0 answers
407 views

Extensible / Plugin Architecture in Python - overwriting methods deep in the inheritance tree?

Current situation I'm developing a test-framework in python for end-to-end tests for a large ERP application. The AUT (application under test = ERP system) is structured in modules and provides a lot ...
  • 121
2 votes
1 answer
200 views

How can I allow interaction between user-only modules & admin-only modules without polluting with privilege checks?

Important note: This is PHP (5.3+). PHP is stateless and everything you do dies when the request is over unless saved to a persistent storage, but if the answer provided gives me pseudo-code, I'd also ...
  • 641
5 votes
3 answers
3k views

Why using ViewModel when using also Repository?

I read this guide about recommended app architecture for Android. Here is a graphical summery: The role of ViewModel is clear, but I don't understand why we need it if we use Repository. The purpose ...
  • 51
0 votes
1 answer
150 views

Replacing a shared library with a shared microservice

I understand that generally shared libraries are a microservice antipattern, and the disadvantages of shared libraries in a microservice world are well documented. However, I have not been able to ...
5 votes
2 answers
1k views

JAMstack vs Serverless architecture: what's the difference?

So I've been reading a lot about this new front-end architecture called the JAMstack, which is basically the modern way of building static web applications. Any dynamic pages are pre-built at build ...
0 votes
2 answers
239 views

Creating a "pass-through" dynamic model

We have a layer that exists in our architecture that, for lack of a better term, bears the responsibility of defining the common models. In other words, when systems need to communicate, rather than ...
  • 117
2 votes
3 answers
467 views

How do you decide if data should be stored persistently or calculated at runtime?

I'm designing a service that contains different plans and features. I want to freely assign and remove features from plans. The service needs to tell the client both an ID's plan and the features it ...
4 votes
2 answers
7k views

Domain driven design project structure [closed]

I have recently started reading about domain driven design and most of the places it's explained or discussed more in conceptual terms. Being a design philosophy it helps to understand the concepts ...
  • 149
0 votes
3 answers
2k views

How to handle views and logic in a Winform C# app? [closed]

I come from a webdev background so I'm used to MVC to handle the separation between the views and the logic (and the data/models). I'm starting to develop using Winforms in C# and I want to know what'...
  • 101
1 vote
1 answer
599 views

Where do JavaFX FXML controllers belong in an ECB architictural design pattern?

I am wondering where does the fxml controller belong in the Entity-Control-Boundary model? When designing a JavaFX application with the help of Scene Builder, Scene Builder generates an fxml file ...
0 votes
0 answers
46 views

What layer should resolve pre-existing Hibernate entities?

Imagine an application that consumes an external data stream and creates objects of this type: @Entity public class Event { @OneToOne(cascade = CascadeType.ALL) private EventInfo info; @...
  • 109
1 vote
1 answer
44 views

Review: Technique for building a timeline to trigger events at points on that timeline

I am thinking through some techniques where by I have an application with a timeline. The timeline plays in real time and at points on that timeline I would like to trigger some actions. There are no ...
0 votes
3 answers
4k views

Design pattern for wrapping multiple apis into single api

I have 3 different libraries that provide depth data as well as gesture information. I need to wrap these libraries into a single simpler to use for user api. The apis I am trying to wrap provide a ...
-1 votes
1 answer
329 views

Custom service layer logic vs Custom DB query

I am trying to confirm best practice around architecture I am working with. Frontend <-> API gateway <-> Service layer (Rest API) <-> DB I have an incoming request which is asking for huge ...
  • 107
3 votes
1 answer
2k views

SOA vs Client-Server-Dispatcher vs Broker

I have a few questions regarding the three architecture patterns mentioned in the title. I'm having a little trouble trying to understand the advantages any one of them has over the others, especially ...
  • 141
1 vote
1 answer
102 views

Share models between several monoliths

I want to build an app that will have have several monoliths. My question (similar to this one) is, how do I centralize User model between these apps, i.e. how to deal with user management/...
  • 113
2 votes
1 answer
149 views

Event sourcing access by reference

In an event sourcing architecture, what is the typical pattern for passing information about related objects (aggregates)? For example, in a order processing system, should OrderCreated event (...
  • 149
-1 votes
1 answer
41 views

where to put business constraints

We have a 3-tier architecture: Web, Business, Models using the MVC pattern. Models are Code-First using EF6. Currently we access the dbContext directly in our Controllers to query and save changes. We ...
  • 196
2 votes
4 answers
359 views

Passing Information to a method using primitives vs and object instance

I have trouble understanding if I should pass an argument to a method as a primitive value or as an already-obtained object. Consider this simple example interface Channel{ String getId(); ...
3 votes
0 answers
49 views

Correct event managment architecture in web application

My team and I are working on a large web application, and I've noticed that we're working in a way which I believe is an incorrect usage of flux (probably from lack of understanding). We're using ...
1 vote
1 answer
60 views

Should libraries be packaged together based on similar traits?

I just started a new job and one of my first tasks is to create local nuget packages from the existing libraries, to help with versioning, maintenance, etc. This task had already been started by ...
  • 1,224
0 votes
2 answers
1k views

DDD enforcing business rules

New to DDD I have a simple case a I would like to model using DDD approach 2 entities Student and Course Relevant property for Student are StudentId and Budget Relevant property for Course are ...
2 votes
3 answers
3k views

Are there any well known alternatives to the SOLID principles for OO programming? [closed]

I´m looking for some kind of better compilation of principles which takes the old basic concepts (DRY, KISS, etc...) and applies them to OOP related concepts like abstract clasess, interfaces etc... ...
  • 153
2 votes
2 answers
2k views

Multiple processes in single microservice

We have a microservices architecture very similar to the architecture described here Obviously, it's a simplified diagram of a real system. In our case, we have a requirement to perform background ...
  • 149
3 votes
2 answers
602 views

Architecting a distributed file processing system with leadership election

I'm in the planning phases of trying to build a distributed file processing system in Java and I'm looking for feedback and advice: Problem : There are a large number of files continuously posted on ...
1 vote
0 answers
36 views

What should be the code architecture to download and cache offline data (Images/Videos/3d Models)?

I'm developing an application which has a 3D room. Each room is a 3d model and can contain media boards. each media board contains image(s) as slides or video. I have created following Data Models : ...
0 votes
1 answer
791 views

When should I use Reactive web framework

When building a standard web Apis in Java world there is two ways I could do nowadays Use SpringMVC (Not Reactive) Use SpringWebFlux (Reactive) There are few benefits of using Reactive that I can ...
  • 109
-1 votes
2 answers
44 views

Logic to create/update values while maintaining their uniqueness (in a multi-threaded environment)

Assume I have a dumb repository which stores numbers (for sake of this example). It is dumb because it may only create new record, update specified record and list all the existing records - no other ...
  • 165
1 vote
2 answers
498 views

Loose project coupling causes problems in .NET Core solution

we started a new project in which back end consists of several layers (each in different project). For simplifaction I'll define a few: Project.Data -data layer with access to db Project.Repository -...
  • 312
0 votes
1 answer
1k views

What architecture design is used to create a virtual queue?

What architecture design is used to create a virtual queue? A virtual queue, virtual waiting room, or virtual line can be described as: An online queue system that redirects excess end-users to a ...
  • 117
2 votes
1 answer
66 views

Is there some solutions that enable to perfrom sub transactions on business model?

My question is in the header. I would like to know is there architectural solution that enables to perform nested transactions on the business model. Let me to explain - the standard flow for web ...

1 2 3
4
5
8