July target socket, consistent hashing algorithm; MongoDB Shard; Distributed Message Queuing; Usage Scenarios for middleware

Source: Internet
Author: User
Tags message queue

Distributed basis: Consistency Hashilu by algorithm consistency hash

http://www.jiacheo.org/blog/174

Http://www.tuicool.com/articles/vQVbmai

Http://www.cnblogs.com/huangxincheng/p/3708316.html

The use of Redis and MongoDB, to be able to write their own helper helper classes, and more than one machine on the use of

Socket

Http://www.cnblogs.com/JimmyZhang/archive/2008/09/07/1286300.html

Sockets are typically used in a continuous environment such as the console, the form program (WinForm, WPF), and so on. ASP. NET can also be used (you can copy the socket code that you set up in the console to complete the same operation as in the ASPX code), but it is not suitable for the long-running socket server, it is suitable for a simple socket client program, to request the socket service.

Only the user within 1W! Do a Windows service will not be able to Baidu Windows services, as a service side, using UDP communication as long as the client login to the online list of the client, not the line of the tube! The client sends the heartbeat a certain amount of time if the server does not receive the heartbeat message and thinks the client is offline, kicking the client out of the online list!

Redis

Http://www.cnblogs.com/huangxincheng/archive/2013/04/10/3013407.html

Message Queuing

I'm going to talk about it. Large Web site Architecture series (4)--asynchronous communication in distributed

Definition of middleware:

A: The server before the communication that is different services direct data exchange for example, you have an authentication server (you can verify user permissions) and then you have a service to add data! Users to add data must use the appropriate permissions! So they'll communicate.

A: It doesn't matter what you do. Client Connection server same as Server connection server

Q: So, for example, I use a C # new class library to implement the so-called intermediate receive and send mechanism, this class library generated DLL I can call the middleware

A: Server is the service middleware is between the service and the customer thing! So name middleware

Q: Well, let me give you an example
The user logs on, requests the authentication on the server A, but the user data is on the B database, then a sends a message to the B database, verifies that the data is returned to a, and then returns to the user
This process, the process of communication between A and B, is called server communication
Between A and B, the code that sends the message and receives the message, called the middleware
Can you understand that?

For:

You can also add load balancer if you wish. But the middleware is more to do with the service-side logic operations.

The client does not know how many services there are on the server!

Q: In other words, if I have only one server, there is a webservice on the server for others to call, also can be called middleware?

A: The middleware will be based on the client's request to make a logical operation to request the service to make a return request! Many times the middleware calls multiple services to assemble the data and then returns it to the customer

Q: I understand.
Simply put, is responsible for working in the middle, not directly call the server, is the middleware
As for there is no distributed, there is no message queue what this is not directly related to the middleware
Only large projects, the general middleware is distributed, and with a message queue
I can understand that.

A: You just have to understand the 2 words in the middle of the line

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.