def start_guide(self):
        sock = self.ctx.socket(zmq.REP)
        port = sock.bind_to_random_port('tcp://0.0.0.0')
        self.guide_addr = 'tcp://%s:%d' % (self.host, port)

        def run():
            logger.debug("guide start at %s", self.guide_addr)

            while self._started:
                if not sock.poll(1000, zmq.POLLIN):
                    continue

                type_, msg = sock.recv_pyobj()
                if type_ == GUIDE_STOP:
                    sock.send_pyobj(0)
                    break
                elif type_ == GUIDE_GET_SOURCES:
                    uuid = msg
                    sources = None
                    if uuid in self.guides:
                        sources = self.guides[uuid]
                    else:
                        logger.warning('uuid %s NOT REGISTERED in guide server', uuid)
                    sock.send_pyobj(sources)
                elif type_ == GUIDE_SET_SOURCES:
                    uuid, addr, bitmap = msg
                    if any(bitmap):
                        sources = None
                        if uuid in self.guides:
                            sources = self.guides[uuid]
                        if sources:
                            sources[addr] = bitmap
                        else:
                            self.guides[uuid] = {addr: bitmap}
                            self.register_addr[uuid] = addr
                    sock.send_pyobj(None)
                elif type_ == GUIDE_REPORT_BAD:
                    uuid, addr = msg
                    sources = self.guides[uuid]
                    if addr in sources:
                        if addr != self.register_addr[uuid]:
                            del sources[addr]
                        else:
                            logger.warning('The addr %s to delete is the register Quit!!!', addr)
                    sock.send_pyobj(None)
                else:
                    logger.error('Unknown guide message: %s %s', type_, msg)
                    sock.send_pyobj(None)

        return spawn(run)