spillway icon indicating copy to clipboard operation
spillway copied to clipboard

Support dynamic configuration of limits.

Open GuiSim opened this issue 8 years ago • 7 comments

Users will want their limits to be easily modified. You don't want them to be hardcoded at all times!

Support for standard libraries such as Archaius and perhaps an API + Simple UI would be very helpful.

GuiSim avatar Apr 21 '16 18:04 GuiSim

I already added archaius in coveo project, if I have the time I will create a more general module for spillway.

Sytten avatar Nov 08 '16 16:11 Sytten

Yeah, but please don't add an hard reference to Archaius in the core project.

malaporte avatar Nov 08 '16 16:11 malaporte

I was thinking of another module for dynamic configurations using different backends.

Sytten avatar Nov 08 '16 16:11 Sytten

I think that would be a valuable thing to do in v2. I have this idea of a configuration provider that would be able to change the limits at runtime over time without recreating a new spillway like we currently do it in our filter. What do you think @pastjean

Sytten avatar Nov 23 '16 15:11 Sytten

Simply using a Supplier<> instead of a fixed value would probably be sufficient.

A simple adapter could then be used to map Supplier.get to ArchaiusProperty.getValue.

GuiSim avatar Dec 01 '16 21:12 GuiSim

hum, yes. Would you suggest to call the supplier each time we check a limit or do an async job and cache the result?

Sytten avatar Dec 02 '16 14:12 Sytten

Call the supplier each time you need the variable, once per method. Just like you probably do with a property.

On Fri, Dec 2, 2016 at 9:54 AM, Émile Fugulin [email protected] wrote:

hum, yes. Would you suggest to call the supplier each time we check a limit or do an async job and cache the result?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/coveo/spillway/issues/3#issuecomment-264471820, or mute the thread https://github.com/notifications/unsubscribe-auth/AB6GBlLEx6dgOGuRxeXEbLanrNTTehUTks5rEDEogaJpZM4IM9DR .

-- Guillaume S.

GuiSim avatar Dec 02 '16 15:12 GuiSim