Hi, The second option sounds best to me.
alex On Mon, Aug 15, 2016 at 3:00 PM, Francesco Mari <[email protected]> wrote: > Hi all, > > The cold standby functionality originally implemented for oak-segment > is currently unusable with oak-segment-tar. The cold standby requires > access to the SegmentStore API and its lower level functionalities, > but this API has been changed in oak-segment-tar in an incompatible > way. > > I would like to restore the possibility of running the cold standby on > top of oak-segment-tar, but I can only see two ways of achieving this. > > 1. Assume that the cold standby functionality is intimately coupled > with oak-segment, duplicate its code in oak-segment-tar and make the > appropriate adjustments to make it work. No change will be done in > oak-segment or oak-tarmk-standby. > > 2. Define an API (or, more appropriately, an SPI) sitting in between > oak-tarmk-standby and the segment stores. This API will have two > implementations in oak-segment and oak-segment-tar and will isolate > oak-tarmk-standby from the differences of the two modules. > > I would be in favour for the second option for the obvious benefits of > code reuse. What do you guys think about this problem? Is there any > other option I'm missing? >
