-
Notifications
You must be signed in to change notification settings - Fork 18
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
How to make yang-js work with Mongo? #69
Comments
@quantang - this is an excellent question... I've explored this possibility but it's a bit complicated. The problem is that Yang is primarily designed for schema validation for handling XML documents. This means that in order to process the XPATH filter rules over the underlying data model, you need to actually have the data at hand to perform the match logic (for leafref, must, etc.) conditionals. For example, let's say you want to fetch a specific 'network' from a list of networks that contains a specific property value. Even if we fetch the network collection from the database, we would need to fetch all of them before we can filter out for only the matching networks. Otherwise, we would need to be able to offload the filter operation as part of the database transaction such that the results were already filtered according to the Yang conditionals before we load the result into the schema. This ultimately means that we need the interface between Ultimately, I believe this is achievable but it won't be quick & easy. I personally don't have the bandwidth to tackle this on my free time but open to consider taking it on if there's commercial licensing interest. Otherwise, I'd be glad to help review and support your development contributions on it. :-) Peter |
Another possibility is to provide support for |
Hello,
I am trying to make Yang model work with my network topology data. As the network could be a big amount of data, I am not sure whether it is efficient or possible to load all of the data in memory. If I want to use Mongo as a store of Yang, how should I make them work together?
The yang-js supports events, I guess I can use them to write the data back to the database, such as on create/update/delete. However, we don't have something like a customized get function, which can load the data from the database when a property is required.
Do you have any idea or suggestion for this scenario?
Cheers,
Quan
The text was updated successfully, but these errors were encountered: