state memroy service sample