[sheepdog] [PATCH v3 1/2] move node_to_str() and str_to_node() from sheep/cluster.h to include/internal_proto.h

Hitoshi Mitake h.mitake at gmail.com
Wed Nov 14 13:52:51 CET 2012


On Wed, Nov 14, 2012 at 6:47 PM, Liu Yuan <namei.unix at gmail.com> wrote:
> On 11/14/2012 05:34 PM, Hitoshi Mitake wrote:
>>
>> On my environment, I couldn't reproduce the problem of patch applying.
>> Is your HEAD this:
>> https://github.com/collie/sheepdog/commit/beea6156c9b730c8f3d81ee898273f2df7837cc8
>> ?
>>
>> I'll post the next version after determining the problem, sorry.
>>
>
> Yes, I try to 'git am' it against beea6156c, but failed.

Okay, I'll seek the source of the problem.

>
>>>
>>> To quote from internal_proto.h
>>>
>>> "/*
>>>   * This file specified the sheepdog-internal protocol, which is
>>> spoken between
>>>   * sheepdog daemons, as well as between collie and sheepdog daemon
>>> for internal
>>>   * operations.
>>>   */
>>> "
>>>
>>> It seems that sheepkeeper shouldn't reference this header.
>>>
>>> By skipping through the code, it seems that sheepkeeper is deeply
>>> coupled with sheep internal
>>> data structure such as 'struct sd_node'.
>>>
>>> I initially thought sheepkeeper as a standalone cluster driver,
>>> re-implement a simplified
>>> zookeeper or Accord in C. But looks that the code is aware of 'sheep'
>>> (have a sheep struct).
>>>
>>> Would you please shed some lights on the sheepkeeper internals?
>>> Documenting your idea in a high level
>>> view would certainly help people review your code and testify the
>>> fundamental idea at the very early
>>> stage.
>>>
>>> So basic question I want to ask is, should sheekeeper be aware of
>>> 'sheep'?
>>>
>>
>> The answer is yes. I'm planning to implement sheepkeeper as a very
>> simplifid cluster manager _only_ for sheepdog.
>>
>> For simplicity, I'm trying to merge the source code into the repository
>> of sheepdog. So sheepkeeper can utilize
>> the internal knowledge from the header files of sheepdog.
>>
>
> I am okay with this approach. It would be nice of you to document the
> key functions in the source file as well as a high level introduction of
> the ideas of sheepkeeper (how it works, pros and cons, usage, etc...).
>

Yes, I'll write a design note of sheepkeeper. I'll notify the progress
in this list.

Thanks,
Hitoshi



More information about the sheepdog mailing list