4

It is pretty common for one microservice to need data from another microservice to service their consumers (in the form of API responses). Fetching data synchronously couples the two microservices tightly. Leaving it to the consumer to fetch data from another Microservice can lead to chatty APIs and slow response time. A few conventions to confirm your ...


4

Feature flags can't fully replace a hotfix process. You probably won't be putting every single change behind a feature flag. That would greatly increase the complexity of the code as well as the management of the state of all of those flags. In addition, some changes can't easily be put behind feature flags, such as dependency updates and infrastructure ...


3

The pattern or system would be a programming language (either a general purpose language or a domain specific language) which could be implemented either by an interpreter or a compiler. There are many unknowns in your question, so recommending a specific solution doesn't make sense. Here are just some points that should be considered to find a solution that ...


3

It seems that you have two different datasets here - the first one is your operational database with the private information, and the second is the anonymized dataset that isn't actually used by your app, but is just a secondary product you want to put out there so people can use, but don't really want to support, right? Before we go into how to share the ...


2

I think the answer would depend on the specific country and wording of their laws and which exactly information and how to you need to process. Basically, it would get into one the following categories: The government is fine with copying the PII abroad, only needs to have it accessible to own law enforcement (or, whatever kind of enforcement they have), or ...


2

A Default value is a piece of Business Logic. Kevin takes an order to photocopy a sheet of paper Kevin goes to the printer Kevin sees that the piece of paper is A4 The customer did not specify the size of the photocopy Kevin deduces from this lack of information, and the original being sized at A4 that the copy should be A4 Kevin selects the A4 Copy option ...


2

Domain Driven Design has Bounded Contexts. Areas within a system that share the same Ubiquitous Language. Words within the context have a specific meaning, which might be (slightly) different outside the context. Within a Bounded Context, one or more Aggregates exist. Graphs of related objects (Entities and Value Objects) which encapsulate the business rules....


2

For context, I'm working in a similar architecture to yours, and recently I spent a few days investigating how to implement reusable logic that gets reused across commands - so I think we're looking at the exact same issue here. My intuitive approach was to daisy-chain Mediatr requests, but I was advised to not do so. The reasons for not doing so aren't 100% ...


1

NOTE This answer is not relevant to the question due to confusion about the use case. I am leaving it for now in case it's helpful to anyone else. I don't know if it's the most common but this is a perfect use case for using client-certificates. This is also referred to as mutual authentication (mTLS) Part of what makes this appealing in this kind of ...


1

The simplest way is to beef up the service layer. So instead of the controller puzzling out the reason, you can have the result and errors/messages returned from the service layer. var entity = _dataService.Get(id); if (entity == null) { return null; } var entityMeta = _dataService.GetMeta(id); if (entityMeta == null) { return null; } return new ...


1

A few things to consider whether to directly import the backbone or use the API layer. How many components are dependent on backbone.py? How will the change in the backbone affect your component? If you can directly access to backbone.py, what is the need for backbone-api.py? If this is acting as a layer of abstraction to decouple different-angle from the ...


1

Should default settings be considered as business rules [...] There are many posts explaning what business rules are exactly, but in the simplest definition I'd say business rules are the reason the application exists. Without business rules, there wouldn't be a need to create a program. Business rules can have defaults, meaning if the user interface allows ...


1

In a multi-tenant architecture where each tenant has its own database, what would be the best way for each of the microservices to obtain information about the tenant (such as which database to connect to)? Agnosticism and a lot of parametrization. Make the MS agnostic to the concept "tenancy". How to do so? Parametrizing the data source. By ...


1

Knowing nothing about the context of your concrete application I can only answer in general. Keeping that in mind: Prefer Code 1. I see two guidelines at work here: Aim to design your APIs in a way that makes using them incorrectly impossible. The best programming error is the one that cannot happen. Only if such a design is not feasible detect and report ...


1

since instead of a lot of users should wait a bit for the user asking for the backend to do the syncrhonous task to be performed then the user asking for it would potentially wait a long time No one said the work on the queue was being done synchronously. Many such implementations will have a thread pool performing several pieces of work in parallel. Other ...


1

Option 3: Go RESTful You already have a product microservice. Make the microservice return the HTML. I.e. make it capable of displaying products. This would be a huge win, because you no longer need to return "data" and have everybody understand what individual pieces mean, how to display them correctly, etc, you can just link to different products,...


1

Rather than focusing on what you need to achieve, I'd suggest in focusing on what you can afford to relax on. Do you need to have low latency at all times on all regions? Can you afford a higher latency on the first login when someone accessed the data from a different country for the first time? Individuals generally don't move countries very frequently, so ...


1

Criteria 1. Does it work? No I am not being flippant. But if you are consulting a flow chart for how something should happen, that's the very first thing that should happen. It should work. 2. Is it contained? Again not being flippant. If you think your solution is hacky, put a decent strong interface around it such that you could take anyone of your other ...


Only top voted, non community-wiki answers of a minimum length are eligible