[MDSAL-50] Make MD-SAL Searchable Created: 03/Nov/14 Updated: 13/Jan/22 |
|
| Status: | Confirmed |
| Project: | mdsal |
| Component/s: | Binding API, Binding runtime, DOM API, DOM runtime |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Epic | Priority: | Highest |
| Reporter: | Devin Avery | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| Issue Links: |
|
||||||||
| Epic Name: | Searchable MD-SAL | ||||||||
| Description |
|
We would like to add to MD-SAL the ability to make it searchable so that users of the MD-SAL don't have to always read everything and manually search for the content they want. Use cases: Find me an instance of X, which has give me the source termination point of link 'foo' While not specifically raised, I could see requests coming in for the ability to search data provided on data listeners as well. With that said, I think that is OUTSIDE the scope of this milestone (and a new milestone should be added for that). Pagination / sorting of responses came up - I believe that should be handled outside of this MILESTONE as there are benefits of that without searching. ===== 1) We should strongly consider using a subset of functionality of XPATH as XPath is a query language for DOM (Tree) data stores - no sense in reinventing the wheel here. It sounds like in general we can probably always return a node, vs returning individual values, but that is something we will have to experiment with as we move forward. 2) There is a suggest raised that we allow searching to happen in the datastores them selves so that we don't have to return all matching data to then search it (i.e. allow data stores to optimize the searches) 3) Even though the data store may optimize the search, some data stores may not add that capability. We should consider adding a default (initial implementation) that doesn't require data stores to search. That way we get immediate functionality compatible with all data stores. Then data stores can optimize in the future. 4) We can consider an optimization (helper) functions that allow a user to specify a root of the data tree to help filter down the initial request - in stead of starting at the true root, we could start 3 levels down a branch which could significantly impact search times. |
| Comments |
| Comment by Tony Tkacik [ 07/Jul/15 ] |
|
OVSDB Usecase: The idea is to be able to search for something using a field in the model that is not a key. For instance, the ovsdb.yang imports the network-topology and adds a Node to the datastore. The model augments the node to include ip-addresses. We would like the ability to issue a restconf query to return the node with that ip-address. Today to do this we would implement an RPC to terminate in our backend code. Then retrieve all the Nodes in the datastore, loop over them and look for the specific matching data. We figure this is a common block of code that might be able to be implemented in the mdsal itself. |
| Comment by Robert Varga [ 26/Oct/20 ] |
|
The primary use case is addressed by |