Skip to content
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

Use some commonly used configuration method #73

Open
marekcuchy opened this issue Jul 16, 2019 · 3 comments
Open

Use some commonly used configuration method #73

marekcuchy opened this issue Jul 16, 2019 · 3 comments

Comments

@marekcuchy
Copy link
Collaborator

The custom configuration used in agentpolis is really bad idea. I've already spent about 1 week in total by solving config related bugs.

It does not have any usable documentation (at least I'm not aware of it) and even if it has it, I seriously doubt that any of the standard configuration methods (YAML, or HJSON looks ok) would not be a better option.

@mcapino
Copy link
Member

mcapino commented Jul 16, 2019

Last time I tried to work with Agentpolis, my experience was similar. The bugs related to configuration system are very convoluted and very hard to fix without Davis's help. @F-I-D-O what is the experience of your students? Are they able to run Agentpolis stack without your help?

@F-I-D-O
Copy link
Member

F-I-D-O commented Jul 16, 2019

I know about the problems, but right now, the custom config has more PROS than CONS (for our group, of course).

At this time, only one student works with the config and he has not encountered any problem. Usually, there is no problem, unless you need to introduce new variables into config.

At the initial stage, I considered standard config formats like YAML, json, XML or ini. But none of them supports the custom config features that speed up the development (at least for me) and prevents some bugs that would be otherwise hard to trace.

Config Features:

  • Support for Java and Python
  • Integrity: undefined config property usage leads to a compilation error
  • Coding Effectivity: config properties accessed as java/python properties -> you don't need to know the exact name of the property
  • Variable Support: very useful for path concatenation
  • Structure: Config properties can be structured into object/arrays, even nested
  • Dependency Support: A client project config file can change the config of the dependency, without any explicit code
  • Safe Runtime Change of the config properties: undeclared property or wrong data type leads to a compilation error
  • Packaging Support: master files are integrated into a project as java/python resources

@marekcuchy
Copy link
Collaborator Author

Maybe I don't understand exactly the features you mentioned, but I don't see any of the features that JSON or YAML in combination with java Jackson library would not be supported too. Regarding python, I'm not sure but I still seriously doubt that there is not a python library capable of doing that.

I'm writing again, because I needed to do something with configuration and I again I'm stuck because of the non-standard configuration.

At least, please, write some documentation (one paragraph would be enough) how to use it, because 'Loads configuration using config file, client config file and local config file.' javadoc is not really helpful (I'm using older version so maybe you added it in some newer version?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants