[YANGTOOLS-429] Make SchemaContext serializable Created: 20/Mar/15 Updated: 10/Apr/22 Resolved: 15/Mar/19 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | ||
| Reporter: | Robert Varga | Assignee: | Unassigned |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| Issue Links: |
|
||||||||
| Description |
|
In the context of the distributed data store, it would be great if the participating nodes could interchange their view of the datastore. It would mean that followers could actually use the schema context of the leader, preventing any potential inconsistencies. |
| Comments |
| Comment by Robert Varga [ 26/May/16 ] |
|
Making SchemaContext implement Serializable is not such a grand idea, as it is inherently tied to code. We need to define a document format which holds the effective schema context, such that we can generate such a document from any SchemaContext and reconstruct it. The reconstructed SchemaContext does not have to be an exact replica – it needs only the bits that are used for validation purposes. Define an XSD schema for the document. Implement a new component yang-model-codec-xml, which will emit XMLWriter events to construct such a document and consume XMLReader events to reconstruct the SchemaContext. |
| Comment by Robert Varga [ 19/Dec/16 ] |
|
preliminary patch: https://git.opendaylight.org/gerrit/48510 |
| Comment by Robert Varga [ 15/Mar/19 ] |
|
I don't think this is quite feasible – the best way would be to serialized EffectiveStatements, but that is probably an overkill. Just storing constituent models should be good enough. |