设计了一种在UNIX环境下基于SYSTEM V IPC的消息中间件模型。模型引入了邮箱的概念并通过MyQ对进行消息传递的每个进程分配一个全局唯一的邮箱号,进程从自己的邮箱中接收消息以及发送消息到目标进程的邮箱。具体实现是MyQ通过共享内存传递消息内容,为每个进程创建一个消息队列用于接收通知消息,并由信号灯进行并发访问控制。这样可以提高消息传递效率以及有效解决大数据量传递情况下消息队列堵死的问题。
A SYSTEM V IPC messaging middleware model is presented in UNIX environment. This model introduces the concept of mailbox and through MyQ assigns a globally unique number for each mailbox messaging process. The process receives messages from its mailbox and sends e-mail messages to the target process. Specific implementation is that MyQ passes messages through shared memory contents and creates a message queue for each process to receive notification messages,and that concurrent access is controlled by lights. This can not only improve the message-passing efficiency but also solve the problem that message queue is blocked when large amounts of data are transferred.