Article From:

Of course, not just the electricity supplier.
I’ve been learning about message middleware lately, but I’m still not sure what message middleware is all about and what it’s used to do in a system, like redis, a memory database, where I can cache data, relieve DB stress, act as a queue for asynchronous processing in an order system, just takeFor example, redis is not compared with kafka. Many people on the Internet only talk about the producer-consumer model, asynchronous, for informing and so on. After reading it, it is even more confusing. If you can give some examples in actual projects or work, the scene can be more intuitive.I have an understanding of message middleware. Thank you.

Answer 0:

Message middleware is a tool to solve the problem of communication between different systems in distributed systems.
A very common example is:
AThe system is distributed modular.
It contains a subsystems, such as user modules, including B subsystems such as asset modules.
Now you’ve got a requirement that you give points to a user when he successfully registers with the system.
Then the process is:

User Registration -- "A Subsystem New User --" A Subsystem New User Success Notification B Subsystem Add Corresponding Integral -- "B Subsystem Receives Notification --" B Subsystem Increases User Integral

The above notification and reception is the concept of publish and subscribe in message oriented middleware.

Of course, you may ask why not register users and add user points in the same thing.

The answer is: Yes, it is possible, so that the system can not achieve the purpose of decoupling between modules.

So message middleware can also be used to solve the coupling effect of various modules in distributed system.

Answer 1:

Message middleware is a temporary memory.
1.For the temporary storage of massive data flood peak, such as snap-up seconds kill, the back-end program can not handle so many snap-up requests at once, then the message middleware to store snap-up requests, the back-end program slowly take out the message processing choke
2.Message passing between multiple systems

Answer 2:

In fact, I think your title can be changed to: what common middleware are there in an e-commerce system?

Several great gods have been solved.

Middleware to see where the specific use.

For example, database middleware, there are many scenarios, such as:
1、Separation of reading and writing
2、Load balancing of database from library
3、Distributed transaction
4、Support multiple databases (Mysql, PG, Oracle, etc.)

Popularly speaking, it is more like an intermediary.

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *