<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:34:12 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[OPNFLWPLUG-1102] Refactor OpenFlow protocol serializers/deserializers</title>
                <link>https://jira.opendaylight.org/browse/OPNFLWPLUG-1102</link>
                <project id="10155" key="OPNFLWPLUG">OpenFlowPlugin</project>
                    <description>&lt;p&gt;Examination of the use of this class shows we can reduce code duplication by sharing simple action case serialize. Furthermore we can reuse objects across deserializeHeader() invocations. Similar is true for others, hence audit and refactor them from performance.&lt;/p&gt;</description>
                <environment></environment>
        <key id="33208">OPNFLWPLUG-1102</key>
            <summary>Refactor OpenFlow protocol serializers/deserializers</summary>
                <type id="10100" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10310&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.opendaylight.org/images/icons/priorities/major.svg">Medium</priority>
                        <status id="10003" iconUrl="https://jira.opendaylight.org/images/icons/status_generic.gif" description="">Confirmed</status>
                    <statusCategory id="2" key="new" colorName="blue-gray"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="rovarga">Robert Varga</reporter>
                        <labels>
                    </labels>
                <created>Wed, 2 Sep 2020 14:58:42 +0000</created>
                <updated>Tue, 2 May 2023 19:04:49 +0000</updated>
                                                                            <component>openflowjava-impl</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="68923" author="rovarga" created="Wed, 6 Jan 2021 12:58:30 +0000"  >&lt;p&gt;A first pass has been made.&lt;/p&gt;

&lt;p&gt;We still need to deal with registries, which are quite inefficient. All of the lookups go through generalized MessageCodeKey and similar constructs, forcing callers to create these. Rather than exposing keys in this way, we should provide specialized lookup registries, where all required parameters will be supplied to the lookup method, hence instead of this:&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
 &#160;&#160;&#160;&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; void writeExperimenterRelatedTableProperty(&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; ByteBuf output,
 &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; TableFeatureProperties property) {
 &#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;span class=&quot;code-object&quot;&gt;long&lt;/span&gt; expId = property.augmentation(ExperimenterIdTableFeatureProperty.class).getExperimenter().getValue()
 &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;.toJava();
 &#160;&#160;&#160;&#160;&#160;&#160;&#160;OFSerializer&amp;lt;TableFeatureProperties&amp;gt; serializer = registry.getSerializer(
 &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;ExperimenterSerializerKeyFactory.createMultipartRequestTFSerializerKey(
 &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;EncodeConstants.OF13_VERSION_ID, expId));
 &#160;&#160;&#160;&#160;&#160;&#160;&#160;serializer.serialize(property, output);
 &#160;&#160;&#160;}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;we would do something like:&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
 &#160;&#160;&#160;&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; void writeExperimenterRelatedTableProperty(&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; ByteBuf output,
 &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; TableFeatureProperties property) {
 &#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;span class=&quot;code-object&quot;&gt;long&lt;/span&gt; expId = property.augmentation(ExperimenterIdTableFeatureProperty.class).getExperimenter().getValue()
 &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;.toJava();
 &#160;&#160;&#160;&#160;&#160;&#160;&#160;OFSerializer&amp;lt;TableFeatureProperties&amp;gt; serializer = registry.getSerializer(
                EncodeConstants.OF13_VERSION_ID, expId, TableFeatureProperties.class);
 &#160;&#160;&#160;&#160;&#160;&#160;&#160;serializer.serialize(property, output);
 &#160;&#160;&#160;}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;With this, we can perform a number of internal optimizations to speed up lookup:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;have an internal array of per-OF-version registries, i.e. deal with version through a trivial array lookup or through a switch(version) statement&lt;/li&gt;
	&lt;li&gt;deal with the other two parts in whatever way makes sense &#8211; either as a fused key-based registry, or two nested registries&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Structuring things this way will also allow us to propagate invariants, such as:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;peeling the OF versions lookup out of the picture&lt;/li&gt;
	&lt;li&gt;specializing serializer classes, i.e. to have OFSerializer&amp;lt;TableFeatureProperties&amp;gt; have as &apos;TableFeaturePropertiesSerializer&apos;, allowing JIT to perform CHA on potential targets&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i03upb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>