Scopes

The scope of a vertex is the data on the vertex, the data on all adjacent edges as well as data on all adjacent vertices. An update function executed on a vertex has the ability to read and write to all data within the scope of the vertex.

The ability for an update function to read or write a piece of data does not mean that it can do so in a consistent fashion. For instance, without adequate protection, it is conceivable that update functions executed on neighboring vertices could modify the same piece of data at the same time.

GraphLab therefore provides the concept of a consistency class which expresses both the level of protection provided, as well as the amount of parallelism available. The consistency type can be selected through the graphlab::iengine::set_default_scope() function in the graphlab::iengine, or the ref graphlab::core::set_scope_type() function in the graphlab::core .

There are three basic types of scopes (as well a number of undocumented ones which you probably should not use). The scopes are currently implemented through the use of a read-write lock on each vertex. Different types of scopes then make use of different locking schemes.