ZeroMQ

Pieter Hintjens

出版时间

2013-03-28

ISBN

9781449334062

评分

★★★★★
书籍介绍
这不是一本普通的API手册。它真正打动人的地方,在于作者Pieter Hintjens反复强调的
作者简介
Pieter Hintjens started his first business making video games 30 yearsago and has been building software products since then. Taking as hisprinciple, "the real physics of software is the physics of people", hefocuses now on building communities through "Social Architecture",writing, and helping others use ZeroMQ profitably. For two years he was president of the FFII, a large NGO fightingsoftware patents. He was CEO of Wikidot, founder of the EuropeanPatent Conference, and founder of the Digital Standards Organization. Pieter speaks English, French, Dutch, and bits and pieces of a dozenother languages. He plays with a West African drum group in Brusselsand is becoming a licensed NRA pistol instructor in Texas. Pieterlives with his beautiful wife and three lovely children in Brussels,Belgium and travels extensively.
AI导读
核心看点
  • 深入解析ZeroMQ核心API与消息模式
  • 掌握无状态并发编程与多线程最佳实践
  • 学习构建高可用、可扩展的消息架构
读者共识
  • 内容权威且深入,是理解ZeroMQ原理的必读之作
  • 行文略显啰嗦,部分读者认为篇幅可大幅精简
  • 虽为C语言示例,但对理解底层机制极具价值
精彩摘录
  • "There are three main open source development patterns. The first is the large firm dumping code to break the market for others. This is the Apache Foundation model. The second is tiny teams or small firms building their dreams. This is the most common open source model, which can be very successful "
  • "If there's one lesson we've learned from 30+ years of concurrent programming, it is: just don't share state. You should follow some rules to write happy multithreaded code with ZeroMQ: - Isolate data privately within its thread and never share data in multiple threads. The only exception to this are"
  • "ZeroMQ uses native OS threads rather than virtual "green" threads. The advantage is that you don't need to learn any new threading API, and that ZeroMQ threads map cleanly to your operating system. You can use standard tools like Intel's ThreadChecker to see what your application is doing."
  • "Processes, we believe, should be as vulnerable as possible to internal errors, and as robust as possible against external attacks and errors. To give an analogy, a living cell will self-destruct if it detects a single internal error, yet it will resist attack from the outside by all means possible."
  • "We said that ØMQ does I/O in a background thread. One I/O thread (for all sockets) is sufficient for all but the most extreme applications. When you create a new context, it starts with one I/O thread. The general rule of thumb is to allow one I/O thread per gigabyte of data in or out per second. To"
  • "ZeroMQ's error handling philosophy is a mix of fail-fast and resilience. Processes, we believe, should be as vulnerable as possible to internal errors, and as robust as possible against external attacks and errors. To give an analogy, a living cell will self-destruct if it detects a single internal "
  • "You should think about using zero-copy in the specific case where you are sending large blocks of memory (thousands of bytes), at a high frequency. For short messages, or for lower message rates, using zero-copy will make your code messier and more complex with no measurable benefit. Like all optimi"
  • "ZeroMQ uses the concept of HWM (high-water mark) to define the capacity of its internal pipes. Each connection out of a socket or into a socket has its own pipe, and HWM for sending, and/or receiving, depending on the socket type. Some sockets (PUB, PUSH) only have send buffers. Some (SUB, PULL, REQ"
用户评论
除了最后一章,其他的都看完了, 感觉ZeroMQ很强大。 本来打算在C++中用的,结果现在转做GO了, 现在没有迫切的使用需求了。
只读过一小部分,还是没吃透。效率足够高,工作中要用到
重读第二遍
这货真快
能砍一半
蛮厉害的
下载
收藏