anchor.diff:  code_change(_OldVsn, State, _Extra) ->
       {ok, State}.
   
  -
  --spec process_push_message(gs_protocol:push()) -> any().
  -process_push_message(#gs_push_nosub{gri = GRI}) ->
  +%%%===================================================================
  +%%% Internal functions
  +%%%===================================================================
  +
  +%% @private
  +-spec start_gs_connection() ->
  +    {ok, gs_client:client_ref(), gs_protocol:handshake_resp()} | errors:error().
  +start_gs_connection() ->
  +    try
  +        provider_logic:assert_zone_compatibility(),
  +
  +        Port = ?GS_CHANNEL_PORT,
  +        Address = str_utils:format("wss://~s:~b~s", [oneprovider:get_oz_domain(), Port, ?GS_CHANNEL_PATH]),
  +        CaCerts = oneprovider:trusted_ca_certs(),
  +        Opts = [{cacerts, CaCerts}],
  +        {ok, AccessToken} = provider_auth:get_access_token(),
  +        OpWorkerAccessToken = tokens:add_oneprovider_service_indication(?OP_WORKER, AccessToken),
  +
  +        gs_client:start_link(
  +            Address, {token, OpWorkerAccessToken}, [?GS_PROTOCOL_VERSION],
  +            fun process_push_message/1, Opts
  +        )
  +    catch
  +        throw:{error, _} = Error ->
  +            Error;
  +        Type:Reason ->
  +            ?error_stacktrace("Cannot start gs connection due to ~p:~p", [
  +                Type, Reason
  +            ]),
  +            {error, Reason}
  +    end.
  +
  +
  +%% @private
  +-spec process_push_message_async(gs_protocol:push()) -> ok.
  +process_push_message_async(#gs_push_nosub{gri = GRI}) ->
       ?debug("Subscription cancelled: ~s", [gri:serialize(GRI)]),
       invalidate_cache(GRI);
   
  -process_push_message(#gs_push_error{error = Error}) ->
  +process_push_message_async(#gs_push_error{error = Error}) ->
       ?error("Unexpected graph sync error: ~p", [Error]);
   
  -process_push_message(#gs_push_graph{gri = GRI, change_type = deleted}) ->
  +process_push_message_async(#gs_push_graph{gri = GRI, change_type = deleted}) ->
       ProviderId = oneprovider:get_id_or_undefined(),
       case GRI of
           #gri{type = od_provider, id = ProviderId, aspect = instance} ->
  
positive.code: %%--------------------------------------------------------------------
  -spec invalidate_cache(gs_protocol:entity_type(), gs_protocol:entity_id()) -> ok.
  invalidate_cache(Type, Id) ->
      Type:invalidate_cache(Id).
  
  
  %%%===================================================================
  %%% gen_server callbacks
  
negative.code:         _ ->
              ok
      end,
      invalidate_cache(GRI),
      ?debug("Entity deleted in OZ: ~s", [gri:serialize(GRI)]);
  
  process_push_message_async(#gs_push_graph{gri = GRI, data = Resource, change_type = updated}) ->
      Revision = maps:get(<<"revision">>, Resource),
      Doc = gs_client_translator:translate(GRI, Resource),
      coalesce_cache(get_connection_pid(), GRI, Doc, Revision),
      ok.
  
  
  %%--------------------------------------------------------------------
  