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

New data model in Sysdb #20

Open
jonnysgomes opened this issue Nov 23, 2016 · 4 comments
Open

New data model in Sysdb #20

jonnysgomes opened this issue Nov 23, 2016 · 4 comments

Comments

@jonnysgomes
Copy link

It's possible to add a new data model in Sysdb? For example, I want a object "MyObject" stored in Sysdb and I want to monitor the change events on it.

@rmadsen
Copy link
Contributor

rmadsen commented Nov 23, 2016

Hi @jonnysgomes - no there is no way to do this right now. We have the ability to store custom key-value pairs using the agent_status APIs, but no way to store typed or complex objects. Is the flat-map of kv pairs in agent status sufficient? If not, would nested maps (i.e. the ability to have a map-of-maps; not yet offered as an API) help solve your use case?

Neither of these solutions offer strong typing (both keys and values end up being strings), so the agent would need to cast values to their appropriate type.

@jonnysgomes
Copy link
Author

Hi @rmadsen, thanks for your quick response. My idea was to create an Agent able to write a custom object on Sysdb. So another agent would be able to handle change events on that table. If it's not possible, is there any way to communicate two agents?

@rmadsen
Copy link
Contributor

rmadsen commented Nov 23, 2016

Interesting. This is actually something that has come up in other recent customer conversations as well. We plan on starting work on this feature in the next couple weeks, and can post provisional APIs here as we develop them.

Until those are ready, I'd recommend opening a unix domain socket between the two agents as a signaling mechanism.

Thanks for the feature request!

@tsuna
Copy link
Member

tsuna commented Nov 23, 2016

but no way to store typed or complex objects

You can always serialize (e.g. in JSON or protobuf) the complex data structure you want to store and then stick it in the key-value pair. JSON has the advantage of being human-readable from the CLI, which can be convenient for troubleshooting.

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