[CONTROLLER-518] Limit the use of / remove run-time code generation Created: 28/May/14 Updated: 25/Jul/23 Resolved: 15/Jun/15 |
|
| Status: | Resolved |
| Project: | controller |
| Component/s: | mdsal |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | ||
| Reporter: | Devin Avery | Assignee: | Tony Tkacik |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: Mac OS |
||
| Description |
|
Run-time code generation makes the system more flexible, but it also opens the system up to an unpredictable state since we are generating code and runtime. We should limit or remove run-time generated code. [NOTE: There have been a few arguments for / against this - likely this bug will serve as a discussion location and may be closed with no changes] |
| Comments |
| Comment by Jan Medved [ 29/May/14 ] |
|
Hi Devin & All: We can not completely remove run-time code generation. It's required for dynamic ingestion of models from network devices and plugins. The primary use case for dynamic model ingestion is Netconf/Restconf. For plugins written in java, code can be generated at compile time in tools, but this will not generally be the case for models coming from network devices, other platforms and from plugins that will be written in different languages. The decision to use/not use run time code generation should be left to the integrator that puts together a particular controller distribution. |
| Comment by Tony Tkacik [ 03/Jun/14 ] |
|
Actually migrating from runtime-generated code to compile time will introduce another dependency - generated binding will start to be dependent on Binding-independent data representation (which is now separated). This will complicate deploying changes in serialization (performance improvements, bugfixes) since affected jars needs to be recreate, and decrease flexibility of system. So I would rather look into how to make this part easier to understand, rather then removing it in general. |
| Comment by Tony Tkacik [ 12/May/15 ] |
| Comment by Devin Avery [ 12/May/15 ] |
|
Reopening it as it is not related to the patch which was commented (or I am missing the relationship). |
| Comment by Tony Tkacik [ 15/Jun/15 ] |
|
Runtime code-generation was removed from md-sal and yangtools codecs, |