5

Considering that a comment_vote_counter and a blog_vote_counter are both a specialisation of a more general vote_coutner, makes this a common ORM design issue. In fact you have the choice: The first option is called single table inheritance, because you squeeze several different kind of counters in the same table that provides for all the needed attributes....


4

Two Tables A table of things, and a table of connections. Things := (Component ID | usefull stuff to know about the thing itself | etc) Connections := (Connection Type | From Component | From Port | To Component | To Port) Throw A Connection ID as a PK on the Connections table if you aren't happy with a full table key. You can go one further, and have a ...


4

A repository pulls All the data from Sql Server database. One thing I don't understand with Repository is, it may get extra includes extra items when certain APIs do not require them. I've concluded some things from your problem: Your repository always includes additional data You only sometimes need additional data to be returned You do not want ...


3

Patterns are like tools in a toolbox: you pick the right tool for the job and often you'll need more than one. Event-driven architecture simply means that at a high level, your application responds to incoming events (and possibly produces its own), but it certainly doesn't mean that everything has to be an event. There is nothing wrong with an API call if ...


3

Tooling You are going to need to get the developers on board with providing you with tools to help aggregate and make a picture out of the data, along with the ability to replay events (or generate new messages to get the system repaired). You are also going to need to push back on the business to get the funds/bandwidth to get these tools and keep them ...


3

Option 1. Always Option 1. Why? Because the only way to directly upload something to S3 is via the AWS APIs and to use the AWS APIs you need an AWS key - and you should never distribute your AWS keys to your end users.


2

One way (whether this fits your environment is up to you) is decoupling the BillingService by giving it its own data storage: Set up a system where the various reservation services propagate the data which is necessary for the billing service Set the billing service as a receiver for these data updates Store the data in the billing service itself Pros The ...


2

To answer your question, "can microservices contain multiple apps", I think it would be better to explain some concepts here. First, there really is no agreement on how "micro" a microservice is, or even on the best way to break down an app into separate domains that work well together. Also what is often glossed over is the complexity ...


2

What you describe in your question looks very similar to an emulator for a CPU. Even if you are not exactly writing that, you can use the information on CPU emulators as inspiration for solving problems you encounter. If you are actually writing an emulator, keep in mind that nearly all processors cheat in that they use some non-memory storage for ...


2

Have n + 1 implementations of IGenericRepository for every type, where n is the number of datasources. n because you will implement every datasource separatly. + 1 because you need a mediator between the various sources. Keep responsabilities separate. Separate responsability chaining and data access.


2

You haven't achieved anything with your redesign, the Investigation module is still transitively dependent on CheckImplementations module. To properly achieve the decoupling of your Investigation and CheckImplementation modules, it would be necessary to create ICheckFactory interface, so that dependency between Investigation and CheckFactory is inverted, eg. ...


2

There are a lot. At one end, you have the monolith, a single deployable entity that represents your entire system. At the far opposite extreme, you have microservices, small, well-bound, loosely-coupled, independently deployable pieces that form the system. Between those, you have many different architectures. I would consider the "majestic monolith&...


1

Auditors Love them or hate them, they will get there hands into any system of account. Presuming that this is such an accounting system, which is easier to explain? Here is the exact value as displayed on the customers invoice. It may be incorrect, but that was what was displayed, and as such our contractual obligation. Here is a bunch of code, and this is ...


1

The answer depends on the endienness of the machine. You would have to look in the specification as to whether byte 0 is the lowest bits of a word or the highest bits of a word. For the most part, it doesn't matter which data lanes are used, unless you plan to play music by modulating them. Where endinness really comes into play is when you write a series ...


1

Modelling What are you modelling if not some form of User Interface? The very fact that you are trying to model a UI will make the model look like a UI. The same as Dolphins look like Ichthyosaurs and Fish. The problem is the same. The rule of thumb is trying to make it so that you solve the problem, not the framework. The goal of pulling back from the ...


1

I don't specifically know what Micrisoft intented but here is a reasonable guess of mine. The goal of a microservices is not to be as small as technically possible. It is to be cut down a classic monolitic architecture in smaller set or microservices. If possible one functionnality = one microservices. This make the maintenance and upgrade of the said ...


1

Well, obviously option 3 is not event driven, but as casablanca already told you, there's no need to be dogmatic "just because". However, there's indeed a drawback which leads to tighter coupling, which is downtimes: If your user calls service A which calls service B via an API or other synchronous means, and service B happens to be down, service A ...


1

From what I get, you are torn between 2 possible ways to implement the same idea. Separated classes for const and mutable wrappers over the same interface. Reader/Writer approach where you separate the ability to write on fields with different interface classes. From a performance perspective I expect similar results so the choice is purely aesthetical. ...


1

I would prefer the second option. It is similar to iterator and const_iterator types provided by containers. Your wariness about constness of the wrapper is equally applicable to iterators and pointers. You can have mutable_record_wrapper inherit const_record_wrapper, which removes some of the boilerplate. class const_record_wrapper : public ...


1

Domain logic Your TLDR question isn't related to the problem you then elaborate on. I'm going to do my best to address both points. checking it's not a name that's already been added etc, business rules. Business logic is domain logic. So if your initial data comes from the database, you perform some business logic, and your end result gets written to the ...


1

The first thought I have here is that you might be able to solve your problem with better error handling. An approach I have used recently for a similar problem was that I use the get(key, default) method on dict for optional parameters. For required parameters, you could simply use the dict[key] syntax and put a helpful error message in the except KeyError ...


1

This has surprisingly little to do with ECS and everything with how orders from an order book are fulfilled. In a real market, you have buy orders and sell orders, which are both put into the order book. When a buy order matches a sell order, a sale happens. How matches are made differs a bit from exchange to exchange, but usually this happens on a first-...


1

Per the question, the operation has two parts: Determining if a record for a value exists. Returning the record if the value exists. Part 1: Existence Per the question: There are 100 billion possible values 1 billion of those values actually exist. Since these are integers and computers typically come in 32 bit and 64 bit flavors, they must be 64 bit ...


1

I'll start off by saying I think the RDBMS can do this as well if not better than a custom solution but here are some ways you can do this. Bloom Filter The problem that a Bloom filter is designed to help solve is exactly the one you are working on: determining whether a number is part of a set. A bloom filter doesn't tell you for sure that a number is part ...


1

Scan through both lists in lockstep Given two sorted lists, you can find their intersection by scanning through the lists, increasing the index of the lesser item. It looks something like this: var i = 0, j = 0; var intersection = []; while (i < a.length && j < b.length) { if (a[i] == b[j]) { intersection.push(a[i]); i += ...


1

You should start with writing down the problems you want to fix, and the goals you want to achieve. Then look at the possible solutions, and check if they help achieve your goals and solve the problems. I really like the Micro service architecture, but it has got a bad reputation because of cargo culting.


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