ice icon indicating copy to clipboard operation
ice copied to clipboard

Simplify dispatch interceptors

Open bernardnormier opened this issue 1 year ago • 0 comments

Dispatch interceptors (https://doc.zeroc.com/ice/3.7/server-side-features/dispatch-interceptors) correspond very roughly to middleware in IceRPC, except they also provide "replay support": Ice automatically resets the InputStream and OutputStream to allow the dispatch interceptor to retry a dispatch.

This "replay support" was added for the Freeze evictor, to allow Freeze to automatically retry a dispatch upon a deadlock exception. This is no longer a concern for Ice 3.8 since there is no Freeze.

This replay support is quite complicated because it supports multiple concurrent dispatch "sharing" the same Incoming object.

I propose to greatly simplify Dispatch interceptors by removing this "replay support". With this proposal, a dispatch interceptor can log the request and perform other processing (very limited in Ice since the request is opaque), but cannot dispatch the request more than once.

bernardnormier avatar Feb 11 '24 17:02 bernardnormier