All Questions
Tagged with java architecture
205 questions
6
votes
3
answers
660
views
Hexagonal Architecture + Domain Driven Design. How to perform a correct implementation?
Currently, I am trying to implement these two architectures together with Java and Spring (although technology shouldn't matter I think).
But I'm encountering problems getting them to work together.
I ...
1
vote
4
answers
413
views
Preventing payment to be processed twice
I have app with paymemt/subscription service, pretty much how the payment works is:
Initial payment
User initiate payment on the web ( click on "subscribe")
Back-End send init request to ...
1
vote
1
answer
149
views
Background thread processing vs queue based processing for relatively short tasks (max 30-40 seconds)
I need suggestion / recommendation on the design approaches mentioned below.
UseCase: I have a usecase where a client uses my system to generate some recommendations. Now, these recommendations are ...
0
votes
2
answers
221
views
Where perform mapping in strict Domain-Driven Design?
I want to create an example application where we use a strict domain-driven design and layering (controller, service, repository). Most notably, we have a clear distinction between the domain and the ...
11
votes
7
answers
5k
views
How to maintain dependencies shared among microservices?
There is a dependency jar containing tons of service classes mostly used to retrieve data from database, and this jar is used among several different micro services in one cluster.
There is a big ...
0
votes
0
answers
117
views
Spring data exchange between components?
Please advise me what pattern to use in following case:
I have a Java/Spring Boot application. There is a component with @KafkaListener method which receives Kafka Messages on CRUD of various subject ...
-1
votes
1
answer
459
views
Using a shared enum across 15 nanoservices [closed]
Originally posted here, moved to code review, redirected from code review back here as there is no code to review. I think the question is enough abstract to be asked here.
I have a mono repo with ...
1
vote
1
answer
566
views
The recommended Spring Boot project structure leads to repetitive code
When implementing projects in Spring Boot (especially CRUD applications), I often find myself writing a lot of repetitive code that just calls functions and services from lower layers. For example, ...
0
votes
1
answer
240
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
354
views
Extract common code into own module
I'm finding myself in a situation where I need to define common behaviour and implement it depending on the environment (minecraft server or javafx runtime). The simple graph below describes my idea.
...
0
votes
2
answers
953
views
Is MVC a sensible design choice for a CLI application?
I am working on a CLI chess game that only involves 2 human players, I decided to make it follow the MVC architecture to ensure separation of concern and to make the possibility of a GUI/web ...
0
votes
2
answers
745
views
Microservices - create post for logged in user
I am working on a small project with microservices architecture in Spring Boot. As to not make unnecessary calls to users-microservice, I have duplicated some necessary User data (id, name, summary, ...
-2
votes
1
answer
618
views
Best way of handling concurrent requests
I am working on an Authentication system (java based) that will authenticate users and create a session for them. This session is valid for 5 hours. I do not want the same user to have multiple ...
0
votes
1
answer
69
views
Design a non replayable endpoint for a service
I am trying something out in Springboot and stuck with a weird issue where I want to send some data from my frontend (react app) to backend (SpringBoot) and make that request non replay able by users (...
6
votes
3
answers
3k
views
In vertical slice architecture, how can I deal with entities/repositories that are used in multiple slices?
I'm trying to group the components of my system by funtionality. This is the analysis class diagram of my system model.
A service class that involves a Post entity might necessarily interact ...