Project

General

Profile

Feature #4082

Updated by Nicholas Gordon almost 7 years ago

Currently, NLSR is coupled directly to ChronoSync. This means that NLSR and ChronoSync must grow and change together, which is not desirable; it would be better if NLSR could grow and evolve while being only minimally concerned with dependencies. This is not fully possible, but NLSR can minimize its dependency by doing something similar to the following: 
 1. Design an internal interface that NLSR modules need any sync protocol to provide. 
 2. Design a framework that allows for dissimilar sync protocol interfaces to adapt to the NLSR-internal interface. 
 3. Whenever necessary, implement the necessary adapter subclass to provide functionality from a new sync protocol. 

 The impetus is given in the document attached. 

 * NLSR would only change adapter unit tests when some sync protocol's API changes. 
 * NLSR developers would consider all sync interactions a black box. 
 * NLSR would be able to cheaply test the Sync interface, without worrying about implementation details of a sync protocol. 
 * Developers of new sync protocols would be able to author adapters themselves, without deep knowledge of NLSR.

Back