-
Notifications
You must be signed in to change notification settings - Fork 486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for json based files which contains configurations. #563
Comments
@agarwalsanchit1 how would you handle json object arrays? {"people": [
{"firstName": "Anthony", "lastName": "Clink"},
{"firstName": "Tony", "lastName": "Blink"}
]}
would you want people[0].firstName
would you want people[1].lastName?
How would you represent this?
Remember that json is an object graph not a flat key value store. |
@AnthonyClink It's achievable. In the case, I would consider each attribute of the index location as a single attribute. I would share the implementation within a week. |
@gorzell Thanks for suggesting it. I worked on your approach and it did not suit our requirements. Our project is based on the JSON-based configuration management system. We require a functionality to reload all the configurations if any changes have been made. There are lots of configurations files and all of them are onto S3 to support externalization. |
I am not sure if you are using a 1.x or 2.x version of Archaius. But I would also encourage you to keep the parsing and loading logic separate. A 1.x example of loading configuration from S3 can be found in: https://github.com/Netflix/archaius/blob/master/archaius-jclouds/src/main/java/com/netflix/config/sources/BlobStoreConfigurationSource.java and the related interface is https://github.com/Netflix/archaius/blob/master/archaius-core/src/main/java/com/netflix/config/PolledConfigurationSource.java. I believe https://github.com/Netflix/archaius/blob/2.x/archaius2-core/src/main/java/com/netflix/archaius/readers/URLConfigReader.java is the relevant example in 2.x. |
@gorzell We are using 2.0 version of Archaius. All the configuration files are placed inside the jar file and some of them are placed individually onto S3 and within the project itself. Following are the features to be implemented within the Netflix Archaius to support our project requirements:-
I will share the code within a week for reviewing purpose. Is it Okay :) |
I will fork 2.0 version of the Archaius branch and will commit the added code over there. |
I am looking for a feature within the netflix archius which would enable to load json based configuration file instantly once the changes have been made to the same.
The text was updated successfully, but these errors were encountered: