tremor-runtime icon indicating copy to clipboard operation
tremor-runtime copied to clipboard

Delay operator

Open darach opened this issue 4 years ago • 4 comments

Describe the problem you are trying to solve

As a developer/operator of a complex system or service undergoing transformation or migration to a service oriented architecture, a facility to inject delays into streams would be a useful migration/debugging aid for complex system and service migrations.

Describe the solution you'd like

Provide delay operator that can be configured with a configurable default delay in nanoseconds, or a per event delay via metadata ( also in nanoseconds ). Events are delayed either by the default delay, or the per-event delay provided in metadata.

define qos::delay operator mimic_xdc_latency
with
  delay = 30000000 # 30 millis
end;

create operator mimic_xdc_latency;

select event from in into mimic_xdc_latency;
select event from mimic_xdc_latency into out;

Notes

A more advanced implementation would offer variance of the delayed time to a distribution ( eg: pareto ) by some mechanism, but even the basic design highlighted would be super useful for migration/capacity planning and impact analysis for existing systems/services where tremor is in production.

darach avatar Feb 17 '21 12:02 darach

Nice idea. And a metadata value that controls the actual delay would also be nice.

mfelsche avatar Feb 17 '21 12:02 mfelsche

I clarified the metadata variant in the description - the description wasn't clear enough on per event delay being metadata driven. Thanks @mfelsche !

darach avatar Feb 17 '21 12:02 darach

Does this problem still need to be solved? I'd like to try it out if I can.

tobehardest avatar Mar 30 '23 17:03 tobehardest

Due to the lack of communication on the other issue you asked to be assigned we're holding off on assigning this for now.

Licenser avatar Apr 06 '23 08:04 Licenser