New answers tagged

0

This is not an xor issue: You can have your cake and eat it. E.g. you can use swagger/openapi to define a REST API that any non-java service can call; this should be your API definition that holds the ultimate truth how the service works. On top of that you can auto-generate a java client from the spec that gives you all the benefits of the jar-client (...


1

Sounds like a ThreadPool is exactly what you want: The System.Threading.ThreadPool class provides your application with a pool of worker threads that are managed by the system, allowing you to concentrate on application tasks rather than thread management. Source: https://docs.microsoft.com/en-us/dotnet/standard/threading/the-managed-thread-pool The whole ...


4

One thread per subscriber may not be ideal if there are many subscribers. Each thread has some memory overhead, and if each needs to check something they will also use some CPU time. If you are concerned about exceptions a simple try/catch should be sufficient. There are uncatchable exceptions, but if you get one, your process will probably be killed anyway. ...


1

Generally speaking, the relation between event streaming and APIs is still a controversial topic and I don't think there is one right answer for such a question. However, for each specific use case, we should be able to find a suitable architect based on many factors like performance, cost, security ...etc. Before answering your questions, let me clarify ...


0

Order in the database doesn't matter. If an order is important it should be a column value. Even Kafka doesn't guarantee order beyond a single partition/key, so you really want an actual order column in those messages as well if order is important.


1

It's a great idea to publish client libraries for each of your systems. The only thing I would change is to make two. One for system A's request and response schema and another for System B's. That way you increment the version when there's been a change to the schema and clients can only use the one they need. I keep the client library in source control ...


1

Without reading the two papers mentioned (I could only find one freely available, anyway), the conception that a system built with a SOA-based architectural model is a monolith is incorrect. A service-oriented architecture is centered on thinking about the service or services that a system provides to external clients in a manner that allows the clients to ...


5

Yes and No, You should have a client and model library published as part of the API project. Consumers of the api can use this library. So they will be deserialising to the same dtos or entities that you serialised If no library is available in the required language then the consumer will need to make one, and will hence need to make classes to deserialise ...


0

An Event Processor is a technical component. A service or a microservice is a unit of the functionality provided by the system, don't take it too literally, but you could call it a business function to distinguish it from the technical components.


0

I'm a little confused by your description of the code base. You say its a microservice architecture with duplicated code across the services. That is by definition not a service. It also violates the definition of a facade as a facade should not have any hard coded requesting within it. The implementation of the interfaces function calls should be decoupled ...


4

It's not surprising that you're struggling. Organizing teams around services is a form of having component teams. Just because your organization considers each "microservice" to be a product doesn't mean that your customers see them that way. Your customers see the thing that they pay for and use as the product, and discuss changes (feature ...


2

Generally having a single "source of truth" or "authoritative source" is the best solution. If you have a microservice architecture then holding the personId and calling the person Api to get that persons data is how the design is supposed to work. Your reasons for rejecting this seem thin. The services are too coupled. There is the same ...


0

A microservice is a "what". A cloud function is a "how". It's possible for a cloud function to be a microservice. It's also possible for a cloud function to not be a microservice. It depends what the function actually does. Wikipedia has a loose definition of a microservice. I'll go through the bullet points: "often processes that ...


2

Why does this service need to know whether a book exists? Would that change anything in its behavior (except rejecting requests for invalid book ids)? If you define that service as just storing some status out of a finite list for arbitrary IDs (which may or may not be book ids) it could serve its purpose without introducing unnecessary coupling. For example,...


5

There is no "ideal" here - it all depends on what you need. While focused on more modern technology, the core of your question is no different from ASP.Net's classic impersionation feature as opposed to using a service account. The same considerations that applied then also apply here now. If the data accessed in B is sensitive to who's asking (i.e....


Top 50 recent answers are included