anchor.diff:  include::{basedir}/gremlin-server/scripts/generate-modern.groovy[]
   ----
   
  -This script loads the "modern" graph into the empty TinkerGraph instance, preparing it for use and then creates a `TraversalSource` variable `g` from `graph`. This variable `g` will be made available on future remote script executions. Note that `Graph` and `TraversalSource` objects that are created or modified in the initialization script will become globally bound to the server. It is not possible to bind variables of other types. With Gremlin Server running it is now possible to issue some scripts to it for processing.  Start Gremlin Console as follows:
  +There are two important aspects to the above script.  First, it defines a `LifeCycleHook` for Gremlin Server.  The "hook" provides a way to tie script code into the Gremlin Server startup and shutdown sequences.  The `LifeCycleHook` has two methods that can be implemented `onStartUp` and `onShutDown`.  These events are called once at Gremlin Server start and once at Gremlin Server stop.  Code outside of the "hook" is executed for each `ScriptEngine` creation (multiple may be created when "sessions" are enabled). In this case, the startup hook loads the "modern" graph into the empty TinkerGraph instance, preparing it for use.  Outside of the "hook", the script then creates a `TraversalSource` variable `g` from `graph`. This variable `g` will be made available on future remote script executions. Note that `Graph` and `TraversalSource` objects that are created or modified in the initialization script will become globally bound to the server. It is not possible to bind variables of other types. Any functions that are defined will be cached for future use.
  +
  +With Gremlin Server running it is now possible to issue some scripts to it for processing.  Start Gremlin Console as follows:
   
   [source,text]
   ----
  
positive.code: [INFO] ScriptEngines - Loaded gremlin-groovy ScriptEngine
  [INFO] GremlinExecutor - Initialized gremlin-groovy ScriptEngine with scripts/generate-modern.groovy
  [INFO] GremlinServer - Initialized GremlinExecutor and configured ScriptEngines.
  [INFO] GremlinServer - A GraphTraversalSource is now bound to [g] with graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
  [INFO] AbstractChannelizer - Configured application/vnd.gremlin-v1.0+gryo with org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0
  [INFO] AbstractChannelizer - Configured application/vnd.gremlin-v1.0+gryo-stringd with org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0
  [INFO] GremlinServer$1 - Gremlin Server configured with worker thread pool of 1, gremlin pool of 8 and boss thread pool of 1.
  
negative.code: ----
  
  image:gremlin-java.png[width=175,float=left] TinkerPop3 comes equipped with a reference client for Java-based applications.  It is referred to as Gremlin Driver, which enables applications to send requests to Gremlin Server and get back results.
  
  Gremlin code is sent to the server from a `Client` instance.  A `Client` is created as follows:
  
  