resgateio/resgate

Delete event

Closed this issue · 1 comments

Story

The services need a way to tell Resgate that a resource has been deleted, and that it should no longer be served from the cache.

Solution

Expand the RES protocol to include support for a delete event. Since the protocol already states that delete is a reserved event name, this change will not break backwards compatibility.

Any subsequent client request for the resource should be handled the same way as for any other resource.

Notes

  • delete events are valid for all resource types
  • when Resgate receives a delete event, it should delete the resource from the cache.
  • if the resource is not a query resource, or if there are no more query subscriptions, the resource should eventually be unsubscribe to NATS.
  • the event should be propagated further on to the client.
  • the client should not do anything. The resource will remain in the client's cache until unsubscribed.

Resolved in #133