         put_in(acc, [Access.key(:services), k], v)
       end)
 
-      # @TODO update hints
-      update_hints(effective, context, options)
-
       state = state
               |> put_in([Access.key(:entity), :effective], effective)
+              |> put_in([Access.key(:entity), :effective, Access.key(:status)], :online)
               |> put_in([Access.key(:entity), :status], :online)
+
+      %Noizu.SimplePool.Database.MonitoringFramework.NodeTable{
+        identifier: state.entity.effective.identifier,
+        status: state.entity.effective.status,
+        directive: state.entity.effective.directive,
+        health_index: state.entity.effective.health_index,
+        entity: state.entity.effective
+      } |> Noizu.SimplePool.Database.MonitoringFramework.NodeTable.write!()
+
+      update_hints(effective, context, options)
 
       {:noreply, state}
     end

        end)


        # 1. add a minimum of 3 nodes, plus any good nodes
        IO.puts "length 1 - #{inspect candidates}











        "
        candidate_pool_size = length(candidates)
        min_bar = candidate_pool_size / 3
        hint = Enum.reduce(candidates, [], fn(x,acc3) ->

        if master == node() do
          effective = Noizu.SimplePool.Database.MonitoringFramework.NodeTable.read!(node()) || initial
          effective = put_in(effective, [Access.key(:master_node)], master)

          %Noizu.SimplePool.Database.MonitoringFramework.NodeTable{
                identifier: effective.identifier,
                status: effective.status,
                directive: effective.directive,
                health_index: effective.health_index,
                entity: effective
          } |> Noizu.SimplePool.Database.MonitoringFramework.NodeTable.write!()

          state = state
                  |> put_in([Access.key(:entity), :effective], effective)
                  |> put_in([Access.key(:entity), :default], initial)
