silence是什么意思| 乾隆叫什么| 绝对是什么意思| 植物油是什么| 小仓鼠吃什么| 牛排骨炖什么好吃| 肚子疼一般是什么原因| 有核红细胞是什么意思| 送父亲什么礼物好| 输液葡萄糖有什么作用| 喝酒伤什么器官| 肌肉的作用是什么| SEX是什么| 碘酒是什么| 脱发用什么药最好| 阴历九月是什么星座| 绅士什么意思| 梦见旅游是什么意思| 舌苔厚白用什么泡水喝| 红玛瑙适合什么人戴| 婧是什么意思| 小孩拉肚子吃什么药效果好| 打喷嚏流鼻涕吃什么药好| 111是什么意思| 弱智是什么意思| 什么是高热量食物有哪些| 东北小咬是什么虫子| 黑色素缺失吃什么补充最快| 四月二十八什么星座| 三月生日是什么星座| 为什么不爱我| 呼吸性碱中毒吃什么药| 胎儿头围偏大什么原因| 四十不惑是什么意思| 阻滞是什么意思| 胃属什么五行| 帽子丢了有什么预兆| 骨髓穿刺是检查什么病| 鼻子出血什么原因| 动脉抽血为什么这么疼| 蔡明是什么民族| 怀孕十天左右有什么反应| 粒字五行属什么| 鼻翼两侧发红是什么原因| 15点是什么时辰| 蒙脱石散什么时候吃| 美女指什么生肖| 霾是什么意思| 男性性功能障碍吃什么药| 压力是什么| 四是什么生肖| 太平猴魁属于什么茶| 肺阴不足的症状是什么| 粉刺是什么东西| 7月8号是什么星座| 指甲容易断裂是什么原因| 后人是什么意思| 馒头逼是什么| 什么水果清热去火| 女子与小人难养也什么意思| 羽立念什么| ova什么意思| 女人小便带血是什么原因引起的| 鸡的五行属什么| 关东八大碗都有什么| 吃什么好| 渣渣辉什么意思| 体力不支是什么意思| 兔子吃什么| dpm值是什么意思| rd是什么| 梦见妯娌是什么意思| 什么是锆石| 人间仙境是什么意思| 猪古代叫什么| 检查耳朵挂什么科| AD是什么意思啊| 回笼觉是什么意思| 多发性脂肪瘤是什么原因造成的| 你什么都可以| 龙的本命佛是什么佛| 路引是什么| 成年人改名字需要什么手续| 现在买什么股票好| 洗牙后要注意什么| 高考什么时候恢复| 血糖血脂挂什么科| 药剂师是干什么的| 甘草长什么样子图片| 头发粗硬是什么原因| 四级警长是什么级别| 什么不见| ipada1474是什么型号| 圆舞曲是什么意思| 什么意思啊| 胸闷想吐是什么原因| 查性激素六项挂什么科| 五指毛桃什么人不能吃| 沉疴是什么意思| 尬是什么意思| 什么是硬下疳| 清明节与什么生肖有关| 屙是什么意思| 游离甲状腺素是什么| 无痛人流后吃什么对身体恢复比较好| 对偶是什么意思| 吃饭吧唧嘴有什么说法| 高钾血症是什么原因引起的| 雷峰塔为什么叫雷峰塔| 马华念什么| dxm是什么药| 保护声带喝什么| 盆腔肿物是什么意思| 头疼吃什么好| 东北易帜是什么意思| 不疼不痒的红疹是什么| 什么时候减肥效果最快最好| 人中长痘痘是什么原因| 狗男和什么属相最配| 手心脚心热是什么原因| 片是什么| 头皮发麻是什么原因| 恭候是什么意思| 骨质增生吃什么药效果好| 拾到什么意思| 野生葛根粉有什么功效| 下巴痘痘反复长是什么原因| 有什么组词| 经常流鼻血是什么原因| 人造石是什么材料做的| 呼吸重是什么原因| t是什么火车| 伤寒是什么病| 为什么会脑梗| 为什么叫老鸨| 舌头麻木吃什么药| 精神科主要看什么病| 拔牙有什么危害| 上呼吸道感染用什么药| 来姨妈喝什么汤好| 灶王爷叫什么名字| 心功能三级是什么意思| 今天会开什么生肖| 小狗起什么名字好听| 科学是什么| 左眼上眼皮跳是什么预兆| 少女怀春是什么意思| 美乃滋是什么| 孤寡是什么意思| 梅毒螺旋体抗体阴性是什么意思| wc的完整形式是什么| 佛系是什么意思啊| 字母圈是什么| 冰雹是什么季节下的| 谷丙转氨酶高是什么原因| 嘴唇为什么会变黑| 约炮是什么意思| 唾液分泌过多是什么原因| 孔雀蓝配什么颜色好看| 腐败什么意思| 头皮屑多是什么原因| 说话不清楚去医院挂什么科| 不孕不育有什么症状| 巴士是什么意思| 胃酸吃什么能马上缓解| 马达是什么| swi是什么检查| 什么叫重本大学| 淋巴细胞比率低是什么意思| 宫腔镜手术是什么原因才要做| 缺维生素d吃什么| 随遇而安是什么生肖| 优雅从容的意思是什么| 肉燕是什么做的| 潘多拉是什么意思| 昭和是什么意思| 头秃了一块是什么原因| 风湿和类风湿有什么区别| 备孕检查什么项目| 不全纵隔子宫是什么意思| 混油皮是什么特征| 结肠炎吃什么药治疗效果好| 胃结石有什么症状表现| 毛拉是什么意思| 什么叫上升星座| 囊肿是什么原因引起的| dpm值是什么意思| 三角梅什么时候换盆| 一个大一个多念什么| 饱和度是什么意思| 孕妇拉肚子可以吃什么药| 皮肤痒用什么药| 莫名心慌是什么原因| 为什么牛肝便宜没人吃| 血常规一般查什么病| 疱疹吃什么药好| 手和脚发麻是什么原因| 天池为什么没有鱼| 岁寒三友是指什么| 肩膀痛应该挂什么科| 挂急诊和门诊有什么区别| 什么是穿刺手术| 糖尿病是什么原因引起的| 梦见吃苹果是什么意思| 知了在树上干什么| 属蛇适合佩戴什么饰品| 千古一帝指什么生肖| 68年属猴的是什么命| 边缘视力是什么意思| 鸽子公主是什么意思| 一级军士长是什么级别| 皮肤发黄是什么原因| 决裂是什么意思| 水痘长什么样子的图片| 手麻脚麻是什么病| 毅力是什么意思| 软文什么意思| 奶酪是什么做的| 阴道是什么味道| 小号避孕套是什么尺寸| 麻痹是什么意思| 日和立念什么| 陆家嘴为什么叫陆家嘴| 人为什么会脱发| 8月23日是什么星座| 什么是呼吸性碱中毒| 带状疱疹不能吃什么| 老花眼有什么症状| 一直不射精是什么原因| 富二代是什么意思| 兰芝属于什么档次| 半身不遂是什么原因引起的| 三文鱼长什么样| 玉和翡翠有什么区别| wdf是什么意思| 小狗可以吃什么| 什么叫环比| 乳腺发炎吃什么消炎药| yy是什么| 肾积水吃什么药最好| 物竞天择什么意思| 肚脐眼左边疼是什么原因| 医保卡有什么用| 介入手术是什么意思| 茉字五行属什么| 梦见买馒头是什么意思| 降钙素原检测是什么| 下眼睑跳动是什么原因| 吃毛蛋有什么好处| 讳疾忌医什么意思| 就请你给我多一点点时间是什么歌| 绕梁三日是什么意思| 锴字五行属什么| 苹果和生姜煮水喝有什么功效| 精尽人亡什么意思| 贴脸是什么意思| 摩拳擦掌是什么生肖| 什么什么深长| 立秋什么意思| 去离子水是什么水| 舒化奶适合什么人喝| 玻璃用什么材料做的| 爱出汗挂什么科| 眼皮浮肿是什么原因引起的| 百度Jump to content

右肩膀和胳膊疼痛是什么原因

From Wikipedia, the free encyclopedia
百度 在南宁市2016年县(区)集中换届提拔的处级领导干部中,来自县乡基层一线的干部超过80%,2017年超过60%。

In computer science, message queues and mailboxes are software-engineering components typically used for inter-process communication (IPC), or for inter-thread communication within the same process. They use a queue for messaging – the passing of control or of content. Group communication systems provide similar kinds of functionality.

The message queue paradigm is a sibling of the publisher/subscriber pattern, and is typically one part of a larger message-oriented middleware system. Most messaging systems support both the publisher/subscriber and message queue models in their API, e.g. Java Message Service (JMS).

Competing Consumers pattern enables multiple concurrent consumers to process messages on the same message queue. [1]

Remit and ownership

[edit]

Message queues implement an asynchronous communication pattern between two or more processes/threads whereby the sending and receiving party do not need to interact with the message queue at the same time. Messages placed onto the queue are stored until the recipient retrieves them. Message queues have implicit or explicit limits on the size of data that may be transmitted in a single message and the number of messages that may remain outstanding on the queue.[2]

Remit

[edit]

Many implementations of message queues function internally within an operating system or within an application. Such queues exist for the purposes of that system only.[3][4][5]

Other implementations allow the passing of messages between different computer systems, potentially connecting multiple applications and multiple operating systems.[6] These message queuing systems typically provide resilience functionality to ensure that messages do not get "lost" in the event of a system failure. Examples of commercial implementations of this kind of message queuing software (also known as message-oriented middleware) include IBM MQ (formerly MQ Series) and Oracle Advanced Queuing (AQ). There is a Java standard called Java Message Service, which has several proprietary and free software implementations.

Real-time operating systems (RTOSes) such as VxWorks and QNX encourage the use of message queuing as the primary inter-process or inter-thread communication mechanism. This can result in integration between message passing and CPU scheduling. Early examples of commercial RTOSes that encouraged a message-queue basis to inter-thread communication also include VRTX and pSOS+, both of which date to the early 1980s. The Erlang programming language uses processes to provide concurrency; these processes communicate asynchronously using message queuing.

Ownership

[edit]

The message queue software can be either proprietary, open source or a mix of both. It is then run either on premise in private servers or on external cloud servers (message queuing service).

Examples on hardware-based messaging middleware vendors are Solace, Apigee, and IBM MQ.

Usage

[edit]

In a typical message-queueing implementation, a system administrator installs and configures message-queueing software (a queue manager or broker), and defines a named message queue. Or they register with a message queuing service.

An application then registers a software routine that "listens" for messages placed onto the queue.

Second and subsequent applications may connect to the queue and transfer a message onto it.

The queue-manager software stores the messages until a receiving application connects and then calls the registered software routine. The receiving application then processes the message in an appropriate manner.

There are often numerous options as to the exact semantics of message passing, including:

  • Durability – messages may be kept in memory, written to disk, or even committed to a DBMS if the need for reliability indicates a more resource-intensive solution.
  • Security policies – which applications should have access to these messages?
  • Message purging policies – queues or messages may have a "time to live".
  • Message filtering – some systems support filtering data so that a subscriber may only see messages matching some pre-specified criteria of interest.
  • Delivery policies – do we need to guarantee that a message is delivered at least once, or no more than once?
  • Routing policies – in a system with many queue servers, what servers should receive a message or a queue's messages?
  • Batching policies – should messages be delivered immediately? Or should the system wait a bit and try to deliver many messages at once?
  • Queuing criteria – when should a message be considered "enqueued"? When one queue has it? Or when it has been forwarded to at least one remote queue? Or to all queues?
  • Receipt notification – A publisher may need to know when some or all subscribers have received a message.

These are all considerations that can have substantial effects on transaction semantics, system reliability, and system efficiency.

Standards and protocols

[edit]

Historically, message queuing has used proprietary, closed protocols, restricting the ability for different operating systems or programming languages to interact in a heterogeneous set of environments.

An early attempt to make message queuing more ubiquitous was Sun Microsystems' JMS specification, which provided a Java-only abstraction of a client API. This allowed Java developers to switch between providers of message queuing in a fashion similar to that of developers using SQL databases. In practice, given the diversity of message queuing techniques and scenarios, this wasn't always as practical as it could be.

Three standards have emerged which are used in open source message queue implementations:

  1. Advanced Message Queuing Protocol (AMQP) – feature-rich message queue protocol, approved as ISO/IEC 19464 since April 2014
  2. Streaming Text Oriented Messaging Protocol (STOMP) – simple, text-oriented message protocol
  3. MQTT (formerly MQ Telemetry Transport) – lightweight message queue protocol especially for embedded devices

These protocols are at different stages of standardization and adoption. The first two operate at the same level as HTTP, MQTT at the level of TCP/IP.

Some proprietary implementations also use HTTP to provide message queuing by some implementations, such as Amazon's SQS. This is because it is always possible to layer asynchronous behaviour (which is what is required for message queuing) over a synchronous protocol using request-response semantics. However, such implementations are constrained by the underlying protocol in this case and may not be able to offer the full fidelity or set of options required in message passing above.

Synchronous vs. asynchronous

[edit]

Many of the more widely known communications protocols in use operate synchronously. The HTTP protocol – used in the World Wide Web and in web services – offers an obvious example where a user sends a request for a web page and then waits for a reply.

However, scenarios exist in which synchronous behaviour is not appropriate. For example, AJAX (Asynchronous JavaScript and XML) can be used to asynchronously send text, JSON or XML messages to update part of a web page with more relevant information. Google uses this approach for their Google Suggest, a search feature which sends the user's partially typed queries to Google's servers and returns a list of possible full queries the user might be interested in the process of typing. This list is asynchronously updated as the user types.

Other asynchronous examples exist in event notification systems and publish/subscribe systems.

  • An application may need to notify another that an event has occurred, but does not need to wait for a response.
  • In publish/subscribe systems, an application "publishes" information for any number of clients to read.

In both of the above examples it would not make sense for the sender of the information to have to wait if, for example, one of the recipients had crashed.

Applications need not be exclusively synchronous or asynchronous. An interactive application may need to respond to certain parts of a request immediately (such as telling a customer that a sales request has been accepted, and handling the promise to draw on inventory), but may queue other parts (such as completing calculation of billing, forwarding data to the central accounting system, and calling on all sorts of other services) to be done some time later.

In all these sorts of situations, having a subsystem which performs message-queuing (or alternatively, a broadcast messaging system) can help improve the behavior of the overall system.

Implementation in UNIX

[edit]

There are two common message queue implementations in UNIX. One is part of the SYS V API, the other one is part of POSIX.

SYS V

[edit]

UNIX SYS V implements message passing by keeping an array of linked lists as message queues. Each message queue is identified by its index in the array, and has a unique descriptor. A given index can have multiple possible descriptors. UNIX gives standard functions to access the message passing feature.[7]

msgget()
This system call takes a key as an argument and returns a descriptor of the queue with the matching key if it exists. If it does not exist, and the IPC_CREAT flag is set, it makes a new message queue with the given key and returns its descriptor.
msgrcv()
Used to receive a message from a given queue descriptor. The caller process must have read permissions for the queue. It is of two types.[8]
  • Blocking receive puts the child to sleep if it cannot find a requested message type. It sleeps until another message is posted in the queue, and then wakes up to check again.
  • Non-blocking receive returns immediately to the caller, mentioning that it failed.
msgctl()
Used to change message queue parameters like the owner. Most importantly, it is used to delete the message queue by passing the IPC_RMID flag. A message queue can be deleted only by its creator, owner, or the superuser.

POSIX

[edit]

The POSIX.1-2001 message queue API is the later of the two UNIX message queue APIs. It is distinct from the SYS V API, but provides similar function. The unix man page mq_overview(7) provides an overview of POSIX message queues.

Graphical user interfaces

[edit]

Graphical user interfaces (GUIs) employ a message queue, also called an event queue or input queue, to pass graphical input actions, such as mouse clicks, keyboard events, or other user inputs, to the application program.[9] The windowing system places messages indicating user or other events, such as timer ticks or messages sent by other threads, into the message queue. The GUI application removes these events one at a time by calling a routine called getNextEvent() or similar in an event loop, and then calling the appropriate application routine to process that event.[10]

See also

[edit]

References

[edit]
  1. ^ Gorton, Ian. Foundations of Scalable Systems. O'Reilly Media. ISBN 9781098106034.
  2. ^ Dive Into Queue Module In Python. Overview of POSIX message queues
  3. ^ Win32 system message queues. "About Messages and Message Queues". Windows User Interface. Microsoft Developer Network. Archived from the original on March 17, 2012. Retrieved April 21, 2010.
  4. ^ Linux and POSIX message queues. Overview of POSIX message queues Archived 2025-08-05 at the Wayback Machine at linux.die.net
  5. ^ Using Linux Message Queues. Linux message queue functions Archived 2025-08-05 at the Wayback Machine at www.civilized.com
  6. ^ For example, the MSMQ product. "Message Queuing (MSMQ)". Network Communication. Microsoft Developer Network. Retrieved May 9, 2009.
  7. ^ Bach, M.J. (1986). The Design of the UNIX Operating System. Prentice-Hall. ISBN 9780132017992.
  8. ^ Abraham Silberschatz, Peter B. Galvin (1994). Operating Systems Concepts. Addison-Wesley. ISBN 9780201504804.
  9. ^ Cartwright, Corky. "GUI Programming". Rice University:Robert (Corky) Cartwright. Retrieved June 27, 2020.
  10. ^ Nystrom, Robert (2014). Game Programming Patterns. Genever Benning. ISBN 978-0990582908. Retrieved June 27, 2020.
五岳是什么意思 梦是什么 精忠报国是什么意思 囊壁钙化是什么意思 牙痛吃什么药好
脾胃虚弱吃什么水果 牙疳是什么意思 牙痛是什么原因引起的 亦字五行属什么 市斤是什么意思
o2o模式是什么意思 男士生育检查挂什么科 长痘是什么原因 菜花是什么病 2007年五行属什么
牙神经挑了为什么还疼 过敏性紫癜是什么症状 晚上11点是什么时辰 什么是基本养老金 药流之后需要注意什么
怀孕3天有什么症状hcv7jop5ns6r.cn 肛门坠胀是什么原因hcv9jop5ns3r.cn 莹五行属性是什么hcv8jop6ns0r.cn 兔属什么五行hcv8jop4ns7r.cn 上司是什么意思jinxinzhichuang.com
猪肝可以钓什么鱼hcv9jop3ns7r.cn 肝喜欢什么食物hcv8jop7ns1r.cn 路引是什么hcv8jop9ns9r.cn 放纵什么意思hcv9jop5ns0r.cn 教育的目的是什么liaochangning.com
白内障是什么原因引起的hcv9jop2ns7r.cn 产假从什么时候开始算hlguo.com 狗的本命佛是什么佛hcv9jop0ns1r.cn 白细胞低代表什么意思ff14chat.com 梦见手表是什么意思hcv7jop5ns1r.cn
梦到吃梨是什么意思tiangongnft.com 小候鸟是什么意思hcv9jop6ns4r.cn 蜱虫用什么药可以消灭hcv9jop0ns8r.cn 上善若水是什么意思hcv7jop9ns0r.cn 甲鱼和什么不能一起吃clwhiglsz.com
百度