On Tue, Sep 23, 2014 at 1:14 AM, Benjamin Hindman <b...@eecs.berkeley.edu> wrote:
> > > > - create abstract classes to define interfaces to objects that should be > > modular > > > > We're all in agreement here! > > - build modules as static libraries that can be assembled at link time to > > create custom Mesos builds > > > > Okay, but unless I'm missing something here we'll still need a level of > indirection to wire everything together. What would that look like? > I think I may be missing something too, then, because I don't see why you'd need any more indirection. call site: allocator = new Allocator(); depending on the linked symbols, Allocator might be from mesos core, or from some other replacement library. > > Also, why ask an operator to go through the extra step of relinking Mesos? > Asking the operator to relink means they'll need a Mesos build environment, > while most folks will likely just have Mesos installed via an RPM (or > similar). I'm not convinced that getting a link error will be a better user > experience then getting a runtime error that cleanly prints out something > along the lines of "Version mismatch: the XXYYZZ module is not compatible > with this version of Mesos". > This may be where my assertion is differing from expectation: I'm expecting the use case to be packaged delivery of custom Mesos builds. Ie, if you want Mesos with AllocatorX, there's a package that you can request that has those pieces in there. I can see that this could get complicated if you want modules from different vendors, and then you'd need to link. I think, in almost all cases, getting an error at link time is going to be better than runtime. At least at link time there's something you can fix; at runtime it's too late. You need to go back to the vendors to figure out what went wrong, and maybe get them to rebuild to the new API, etc. At least at link time you are in control of which versions you're putting together. I concede that expecting end users to have a build environment is difficult, but maybe there's something we can put together as a service to mix and match modules and provide a custom package. I'm concerned about the overhead (complexity, mostly) involved in having this done dynamically. -- Dominic Hamon | @mrdo | Twitter *There are no bad ideas; only good ideas that go horribly wrong.*