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

ckdb #2799

Open
markus2330 opened this issue Jun 19, 2019 · 6 comments

Comments

Projects
None yet
2 participants
@markus2330
Copy link
Contributor

commented Jun 19, 2019

@kodebach wrote:

A tool exclusively for LCDproc seems like a bad idea.

Sorry, I do not understand what you are saying here. You somehow suggest that the high-level API only works for LCDproc?

Also you would still need C++ for mounting, unless somebody rewrites the code for that.

This is no problem, as mounting will usually be done during installation, which happens at the host system.

@kodebach

This comment has been minimized.

Copy link
Contributor

commented Jun 19, 2019

You somehow suggest that the high-level API only works for LCDproc?

No of course not, but you said that a ckdb tool would work for LCDproc. Which implied to me that it would be okay, if the tool would only work with LCDproc. Such a tool would be a bad idea.

This is no problem, as mounting will usually be done during installation, which happens at the host system.

If you use a different system to mount (not sure how that would even work), then you might as well use that system again to change configuration.

@markus2330 markus2330 changed the title high-level API only for LCDproc? ckdb Jun 19, 2019

@markus2330

This comment has been minimized.

Copy link
Contributor Author

commented Jun 19, 2019

No of course not, but you said that a ckdb tool would work for LCDproc. Which implied to me that it would be okay, if the tool would only work with LCDproc. Such a tool would be a bad idea.

Of course. I am talking about a simple elektraOpen elektraGet elektraClose tool.

If you use a different system to mount (not sure how that would even work), then you might as well use that system again to change configuration.

If you use Elektra with the same plugins, this is perfectly well working and fully supported (with a different set of plugins it might happen that plugins are mounted that are not available on the target system). Simply export system/elektra/mountpoints and import it somewhere else.

@kodebach

This comment has been minimized.

Copy link
Contributor

commented Jun 20, 2019

I am talking about a simple elektraOpen elektraGet elektraClose tool.

I still don't see why we would use the high-level API for that? It is not designed for such a tool. The high-level API is designed for applications loading and using their own configuration.

Using kdbOpen, kdbGet/kdbSet, kdbClose is far more convenient for such a tool. If we'd use the high-level API we would convert the string keys to e.g. kdb_long_t and then convert them back to strings to print them to the screen.

You would also have to specify the parent key as a separate argument on the command line, so that we know how to call elektraOpen.

In short the tool would not be simple at all and in fact would just be needlessly complicated.

However, a tool written in C using the low-level API but including some type support would probably make sense.

Simply export system/elektra/mountpoints and import it somewhere else.

Import/Export also wouldn't work with the high-level API (or more accurately they would be hugely complicated because of all the conversion involved).

@markus2330

This comment has been minimized.

Copy link
Contributor Author

commented Jun 24, 2019

The main point for having this tool is to have an easy verification of what the application will see (also to see if it matches with the low-level API).

But you are right: implementing the whole tool suite is quite an endeavor.

@kodebach

This comment has been minimized.

Copy link
Contributor

commented Jun 24, 2019

The main point for having this tool is to have an easy verification of what the application will see

We could code-generate a function that prints the whole config. Although such a function could easily be written by hand too.

@markus2330

This comment has been minimized.

Copy link
Contributor Author

commented Jun 24, 2019

Yes, very nice idea. It would also be good for bug reports and similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.