racc / typesafeconfig-guice

Allows Guice Injection of configuration values from Typesafe Config
Apache License 2.0
72 stars 18 forks source link

Possibility to take advantange of dynamic config #3

Closed costimuraru closed 8 years ago

costimuraru commented 8 years ago

First of I want to say thanks for your great work here @racc!

We're considering using the typesafeconfig-guice library in our projects. One thing that we're interested in though is the ability to update the typesafe conf file and reload it on runtime in the app (without having to restart it). I'm curious to know what's your take on this.

Something like: https://github.com/Netflix/archaius/tree/master/archaius-typesafe/src

racc commented 8 years ago

Hey @costimuraru, thanks for the feedback! I guess this wasn't really a use-case I considered, because Guice is typically used to bootstrap an application once on load.

It looks like Netflix's Governator project might do what you want anyway: https://github.com/Netflix/governator/wiki/Configuration-Mapping

See in particular section on Dynamic Configuration: https://github.com/Netflix/governator/wiki/Configuration-Mapping#dynamic-configuration

Hope this helps, Jason

costimuraru commented 8 years ago

Thanks, Jason! This was a good tip :-). Although I'm liking your implementation best, I'm currently looking into archaius2. The limiting factor for not supporting dynamic configs here seems to be Guice though (unable to re-bind to the new config values).