Information Technology Reference
In-Depth Information
Toachievethisadistributedsystemuses abstraction tobuildalooselycoupledsystem.
Abstraction means that each component provides an interface that is defined in a way that
hides the implementation details. The system is loosely coupled if each component has
littleornoknowledgeoftheinternalsoftheothercomponents.Asaresultasubsystemcan
be replaced by one that provides the same abstract interface even if its implementation is
completely different.
Take, for example, a spell check service. A good level of abstraction would be to take
in text and return a description of which words are misspelled and a list of possible correc-
tions for each one. A bad level of abstraction would simply provide access to a lexicon of
words that the frontends could query for similar words. The reason the latter is not a good
abstraction is that if an entirely new way to check spelling was invented, every frontend
using the spell check service would need to be rewritten. Suppose this new version does
not rely on a lexicon but instead applies an artificial intelligence technique called machine
learning. With the good abstraction, no frontend would need to change; it would simply
send the same kind of request to the new server. Users of the bad abstraction would not be
so lucky.
For this and many other reasons, loosely coupled systems are easier to evolve and
change over time.
Continuing our example, in preparation for the launch of the new spell check service
both versions could be run in parallel. The load balancer that sits in front of the spell check
system could be programmed to send all requests to both the old and new systems. Results
from the old system would be sent to the users, but results from the new system would be
collected and compared for quality control. At first the new system might not produce res-
ultsthatwereasgood,butovertimeitwouldbeenhanceduntilitsresultswerequantifiably
better. At that point the new system would be put into production. To be cautious, perhaps
only1percentofallquerieswouldcomethroughthenewsystem—ifnouserscomplained,
thenewsystemwouldtakealargerfraction.Eventuallyallresponseswouldcomefromthe
new system and the old system could be decommissioned.
Other systems require more precision and accuracy than a spell check system. For ex-
ample, there may be requirements that the new system be bug-for-bug compatible with the
old system before it can offer new functionality. That is, the new system must reproduce
not only the features but also the bugs from the old system. In this case the ability to send
requeststobothsystemsandcompareresultsbecomescriticaltotheoperationaltaskofde-
ploying it.
Search WWH ::




Custom Search