Information Technology Reference
In-Depth Information
Click here to view code image
$ export SP_ALGORITHM_V2=yes
$ export SP_MORPHOLOGICAL=off
$ spellcheck-server
Thisbecomescumbersomeasthenumberofflagsincreases.Aservicemayhavedozens
or hundreds of flags at any given time. Therefore flag systems can read flags from files in-
stead:
Click here to view code image
$ cat spell.txt
sp-algorithm-v2=on
morphological=off
$ spellcheck-server --flagfile=spell.txt
All of these approaches suffer from the fact that to change any flag, the process must be
restarted. This interrupts service. Other techniques permit flags to be updated at will. Sys-
tems like Google's Chubby and the Apache Zookeeper project can be used to store flags
and efficiently notify thousands of servers when they change. With this approach, only one
flag is needed—the one specifying the zookeeper namespace—to find the configuration:
Click here to view code image
$ spellcheck-server --zkflags=/zookeeper/config/spell
Flag flips are used for many reasons:
Rapid Development: To enable rapid development, features are built up by a
series of small changes to a main source branch. Large features take a long time to
develop. The longer one waits to merge code changes into the main line source, the
more difficult and risky the merge becomes. Sometimes the source code may have
been changed by other developers, which creates a merge conflict. Merging small
amounts of code is less error prone. (See Section 8.2.4 for more details.) Given this
fact, incomplete features are hidden by flags that are disabled until the feature is
ready. The flags may be enabled earlier in some environments than in others. For
example, previewing a feature to product management might be done by enabling
that flag in the demo environment.
Gradual Introduction of New Features: Often some features are introduced to
some users but not others. Beta users, for example, may receive earlier access to
new features. When users are logged in, whether they have access to the beta fea-
tures is dynamically controlled by adjusting the flags. Prior to the invention of this
Search WWH ::




Custom Search