Is the aggregator pattern with multiple clients valid in the microservices architecture?

Let's say two microservices provide information for a product, one provides general information (A), the other for product images (B). Similar to the architecture described in the gateway aggregation pattern, I would like to create an aggregation gateway between these services A and B.

Now if multiple apps access that aggregation gateway like in the image below, would it conflict with the microservices architecture?

Multi-Client Aggregator Gateway

architecture: best practice for writing Python web application

I want to have a web page that asks questions, user input, then the page asks different questions based on user input. To determine what questions to ask, call a Python server. It will probably also send and receive from a Java web server.

So what is the best way to do this?

Should I use react and / or Django? Are there any design architecture templates I can see? I have no idea where to start.

architectural patterns: a question about layered architecture

Consider the following general form of a layered architecture:

enter the image description here

I need to check my understanding of the second layer from above. More specifically, I need to verify my understanding of the meaning of "User Interface Management". As I understand it, UI management is the code that underlies the UI, for example it's the code for every button and every element of the UI. So, for example, consider that the user needs to generate a report of a system that uses this layered pattern as its architecture. So what happens is the user presses the generate report button, then the code behind this button knows that they need to run the reporting system functionality code (which exists in the third layer). After that the code from the build report (let's say it is implemented as a class) will refer to the database to get the information required to generate this report and then the information will "propagate up" until it reaches the user interface again to be seen by the user. So is this correct? In other words, what is the meaning of user interface management? and do I understand the mechanism of this architecture?

computer architecture – really confused about latency with pipelining

I finished watching a video about channeling https://www.youtube.com/watch?v=eVRdfl4zxfI
Which I thought made sense.
Latency is the amount of time it takes to complete each instruction. Even with the pipeline, the time it takes to complete an instruction is still the sum of the time each stage takes, in this case it's 20ns.

But then I studied a bit more and discovered that latency is supposed to be the time for the longest stage to finish executing + the "cost" of the pipeline, rather than the sum of time it takes to execute all stages.
http://web.cs.iastate.edu/~prabhu/Tutorial/PIPELINE/perform.html

Is something escaping me?

computer architecture – CPI calculation from CacheGrind output

I am working on cachegrind for the first time as part of my university lab work. We have to calculate the IPC and the IPC for the matrix multiplication program.

This is my cachegrind output enter the image description here

Now to calculate the CPI, my first approach was:

CPI = Exec.Time / IC * time clock, but then I realized by looking at the cachegrind output that we cannot use this formula because they are clearly cache errors. The formula I'm using gives the ideal CPI if I'm not mistaken.

Then, to include the cache failure rate in my calculation, I thought of calculating the instruction failure cycles for the instruction cache and data cache and then adding them to the ideal CPI to get the effective CPI. But, to do this, we need the Miss penalty that was not given in the question. I am really surprised by this.

Can anyone guide me on how to achieve this CPI calculation? Thanks in advance.

architecture: to structure large and expandable projects

TLDR with bald

I want to create a library (I think this is the correct term) for my own reinforcement learning environments (env for short). Most envs would be based on self-implemented games created in pure Python or C ++ with Python bindings. What would be the best way to structure this project in a way that is easy to expand, maintain, and makes the most sense? I want to be able to reuse code, like using a general board class for all my board game implementations (eg chess, go, gomoku). I plan to do it cross-platform with the help of CMake and I might even venture to package it as a Conda package.

Through my initial search, I found out that this design (and its variants) is popular and decided to trust that.

My initial plan was to structure my library into projects, create a repository for each project and include one project in another as a git submodule. To create the environment for the game
2048 the structure would be the following (CMakeLists were omitted):

(vector env is based on env-2048, which is based on game-2048 using the general-board class)

general-board
├── external
│   └── Catch2/
├── include
│   └── general-board
│       └── file.h
├── src
│   └── file.cpp
└── tests
    └── tests.cpp

game-2048
├── app
│   └── manual_game.cpp
├── external
│   ├── Catch2
│   └── general-board
├── include
│   └── game-2048
│       └── file.h
├── src
│   └── file.cpp
└── tests
    └── tests.cpp

env-2048
├── external
│   ├── Catch2/
│   └── game-2048/
├── include
│   └── env-2048
│       └── file.h
├── src
│   └── file.cpp
└── tests
    └── tests.cpp 

env-vector <---- this would be on the top, bundling the envs together
├── external
│   ├── Catch2/
│   ├── env-2048/ 
│   ├── env-chess/ <---- another board game
│   └── env-go/ <---- another board game
├── include
│   └── env-vector
│       └── file.h
├── python
│   └── pybind11_magic_here
├── src
│   └── file.cpp
└── tests
    └── tests.cpp

After some implementation, I was concerned if the number of submodules and redundancy were too high. With this structure, the project at the top would contain the draft general meeting north times (where north is the number of games that depend on a board), and catch2 would be included even more. It looks suspicious and error prone.

My second idea was to create a great project and include everything in it in a & # 39; flat & # 39; and not & # 39; nested & # 39; like before. It would look like this:

(line ending with '/' depicts a folder)
environments_all_in_one
│
├── external
│   └── Catch2/
├── include
│   └── environments_all_in_one
│       └── **not_even_sure_what_to_put_here**      
├── python
│   └── pybind11_magic_here
├── src
│   ├── env_vector
│   ├── envs
│   │   ├── env-2048/
│   │   ├── env-chess/
│   │   └── env-go/
│   ├── games
│   │   ├── game-2048/
│   │   ├── game-chess/
│   │   └── game-go/
│   └── general-board
│       ├── board_abc/
│       ├── board_array/
│       └── board_vector/
└── tests
    └── tests.cpp

In this way, the code would not be present multiple times and definitely aids transparency. However, as I have no experience, I should ask:

Is there a better way to do it?

design: event driven job scheduler architecture

I have a cron based job scheduler that triggers time based jobs. This was simple to think about and design because the event in this case is well defined (the event is time).

Now I want to create a generic event-based job scheduler that can trigger a job when any event occurs. Example of events: file tap, directory creation, Jira request creation, other job failure, etc. Basically the event could be anything.

I'm not sure how I go about designing this system, especially from the user's perspective. How will my users define the event, how will my system react to these events to start Job, etc.?

oop – Plugin architecture question: how to avoid the use of transients

I am creating an internal plugin that will offer a filtering mechanism using AJAX for any type of post depending on the settings, which I have stored in a JSON.

When the plugin loads I need to configure the callback for the AJAX call, and I configured it right away (I'm left with OOP):

$gfb = FilterBuilder::get_instance();
$action_filter_reg_instance = new ActionFilterRegistration();
$action_filter_reg_instance->add_action( 'wp_ajax_process_filters', $gfb, 'process_filters_callback' );

That sets the callback and it works fine … but that instance of $ gbf is lost when the page displaying posts is loaded and I need to set more properties when the template loads.

For example, when the page displaying the posts loads, I create a new FilterBuilder object and pass it the query arguments which are then stored in the instance as a property of the class.

When the callback is invoked, it is its own instance of a FilterBuilder, so everything I defined in the template does not exist in this class instance.

This makes me a little tricky because I would like to have access to the query arguments that were defined when that particular instance was created.

For the moment, I have resorted to using transients so that I can have a common place to access the query arguments that the template instance defined from the callback function, but this just feels bad. Also, I think the transients have a maximum length and therefore this could explode if that limit is reached.

What other options are there? Maybe serialize the template class instance into a JSON and load it from the callback? That also sounds … a little meh.

I don't want to use global variables … interested in what you think would be a fancy approach to get around this problem.

Thanks for taking the time to read this! 👍🏽

Computer Architecture: Should a Solid State Hard Drive Make Crisp Working Noises?

I use heavy software. 3d, mostly. I am used to the comforting sound of a hard drive that sounds like a popcorn.

But I just got my first Lenovo, with a solid state hard drive. Model KXG6AZNV512G TOSHIBA
to be exact.

It is making high-frequency noises … even in sequence with every key press (Firefox browser, memory usage 1104).

Wow.

When I use zbrush I hear hums with each rotation of the model.

This is normal?

Dynamic data delivery using JSDelivr Architecture / Design Questions

I have a JavaScript application that retrieves and processes data on a map. Due to CORS restrictions, I decided to put the data in a .js file on GitHub and fetch it from JSDelivr using