首页 > 代码库 > 《Distributed Programming With Ruby》读书笔记五 RingyDingy (Part2 chapter3)
《Distributed Programming With Ruby》读书笔记五 RingyDingy (Part2 chapter3)
Part II Third-Party Frameworks and Libraries
The first part of this book takes a deep dive into two main libraries: DRb and Rinda
- Chapter3: RingyDingy
-
- Including 6 parts:
-
- Installation
- Getting Started with RingyDingy
- "Hello World" the RingDingy Way
- Building a Distributed Logger with RingyDingy
- Letting RingyDingy Shine
- Conclusion
- Installation
-
- command: gem install RingyDingy
- show: Successfully installed RingyDingy-1.6
- Getting Started with RingyDingy
-
- a quick look at what options are available on ring_server
- start our RingyDingy RingServer with command
- ring_server --v
- we get:
- "Hello World" the RingyDingy Way
-
- Our server code for the Rinda “Hello World” application remains largely unchanged to use with RingyDingy
- server:
- we will see output similar to the following for our RingyDingy RingServer:
- client:
- output:
- Binding a Distributed Logger with RingyDingy
-
- RingyDingy allows us to DRY up our server code a bit. We no longer have to remember a whole lot of messy Rinda API calls. Instead, we can wrap it up with a line or two of RingyDingy code. Let’s look at our “Distributed Logger” application to see how we can make it more DRY.
- server
- client
- ring_server output
- server output
- client output
- Letting RingyDingy Shine
-
- One of the better features that the RingyDingy ring_server binary gives you for free is the ability to list available services.
- We can also gain access to this same information programmatically.An example: page85
- Conclusion
《Distributed Programming With Ruby》读书笔记五 RingyDingy (Part2 chapter3)
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。