Hi WenZhao, v1 is definitely the recommended way to go if you are building a new scheduler today. v0 will be deprecated at some point. Since v0 API has been around much longer than v1, it is not surprising that most online tutorials/docs reference that.
Thanks, On Tue, Jun 13, 2017 at 11:25 AM, Wenzhao Zhang <[email protected]> wrote: > Hi, All: > I'm developing my own scheduler, but become confused about two different > approaches. > > In "*src/cli/execute.cpp*", it defines its own call-back functions, and > uses "*src/scheduler/scheduler.cpp*" to interact with the master. I > think > this can be named as "*v1*", given the names of the header file and > namespace. > > But in the online official document and many other tutorials, they all talk > about "*include/mesos/scheduler.hpp*", which is partially implemented in " > *src/sched/sched.cpp*". And I remember someone names this as old-version or > "*v0*" (please correct me if I'm wrong). > > I'm confused about the two different approaches. > "v1" only supports "Event", while "v0" supports both "Message" and "Event". > "v1" is officially used in the source-code. But almost all online > tutorials talk about "v0". > And it seems that the two approaches aren't compatible with each other, as > I get a lot compiling errors if I import/use both header filers in a single > file. > > So, is there some "best practice" suggestion? I suppose one approach will > gradually become obsolete? > Which approach should I adopt? > And I believe the answer can also explain the difference between > "src/executor" and "src/exec" ? > > Thanks very much for your time > Wenzhao >
