Month: May 2013

  • Z-Node: a cluster for sys-ops based on doozer & zookeeper

    I’m happy to announce the system operations cluster: Z-Node here.

    https://github.com/mikespook/z-node

    Intro

    Z-Node is a cluster for helping system operations. It works with Doozer and ZooKeeper cluster.

    Every Z-Node watches at least two files:

    • /z-node/node/$HOST/$PID – for one-node tasks;
    • /z-node/$REGION/wire – for cluster tasks (Every Z-Node instance can watch multi-regions).

    Z-Node will register itself as file /z-node/info/$HOST/$PID with running informations. It watches the file /z-node/node/$HOST/$PID for one-node tasks. When the file was changed, Z-Node will be notified.

    All of Z-Nodes watch the file /z-node/$REGION/wire for cluster tasks. When the file is changed, all of Z-Nodes will be notified.

    Special Thanks

    The skynet project enlightened me on the developing with Z-Node. Also, I’m a user with skynet. 🙂

    So, express my thanks to the skynet’s founder – Brian Ketelsen.

    Thank you for your great job!

  • [翻译]绝妙的 channel

    在编写 golang 程序的过程中,channel 会经常使用。本文对 channel 的使用的确很特别,同时也非常实用。

    原文在此:http://dave.cheney.net/2013/04/30/curious-channels

    ————翻译分隔线————

    绝妙的 channel

    Go 编程语言中,channel 是一个闪耀的特性。它提供了一种强大的、在不使用锁或临界区的情况下,从某个 goroutine 向其他 goroutine 发送数据流的方法。

    今天我想讨论关于 channel 的两个重要的特性,这些特性不但使其在控制数据流方面极为有用,而且用在流程控制方面也十分有效。

    (more…)