Skip to content

Commit

Permalink
Update documentation after commit 2731bbe
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 15, 2023
1 parent 2731bbe commit 08250f4
Show file tree
Hide file tree
Showing 11 changed files with 1,869 additions and 261 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ <h1 id="MASES_EntityFrameworkCore_KNet_Serialization_Avro_Storage" data-uid="MAS
<div class="markdown level0 remarks"></div>
<h3 id="classes">Classes
</h3>
<h4><a class="xref" href="MASES.EntityFrameworkCore.KNet.Serialization.Avro.Storage.AvroKeyContainer.html">AvroKeyContainer</a></h4>
<section><p>Represents the storage container type to be used from KEFCore for keys</p>
</section>
<h4><a class="xref" href="MASES.EntityFrameworkCore.KNet.Serialization.Avro.Storage.AvroValueContainer.html">AvroValueContainer</a></h4>
<section><p>Represents the storage container type to be used from KEFCore</p>
</section>
Expand Down
14 changes: 10 additions & 4 deletions docs/api/MASES.EntityFrameworkCore.KNet.Serialization.Avro.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,17 @@ <h1 id="MASES_EntityFrameworkCore_KNet_Serialization_Avro" data-uid="MASES.Entit
<div class="markdown level0 remarks"></div>
<h3 id="classes">Classes
</h3>
<h4><a class="xref" href="MASES.EntityFrameworkCore.KNet.Serialization.Avro.KEFCoreSerDesAvroBinary-1.html">KEFCoreSerDesAvroBinary&lt;T&gt;</a></h4>
<section><p>Avro Binary encoder extension of <span class="xref">MASES.KNet.Serialization.KNetSerDes&lt;T&gt;</span>, for example <a href="https://masesgroup.github.io/KNet/articles/usageSerDes.html">https://masesgroup.github.io/KNet/articles/usageSerDes.html</a></p>
<h4><a class="xref" href="MASES.EntityFrameworkCore.KNet.Serialization.Avro.KEFCoreSerDesKeyAvroBinary-1.html">KEFCoreSerDesKeyAvroBinary&lt;T&gt;</a></h4>
<section><p>Avro Key Binary encoder extension of <span class="xref">MASES.KNet.Serialization.KNetSerDes&lt;T&gt;</span>, for example <a href="https://masesgroup.github.io/KNet/articles/usageSerDes.html">https://masesgroup.github.io/KNet/articles/usageSerDes.html</a></p>
</section>
<h4><a class="xref" href="MASES.EntityFrameworkCore.KNet.Serialization.Avro.KEFCoreSerDesAvroJson-1.html">KEFCoreSerDesAvroJson&lt;T&gt;</a></h4>
<section><p>Avro Json encoder extension of <span class="xref">MASES.KNet.Serialization.KNetSerDes&lt;T&gt;</span>, for example <a href="https://masesgroup.github.io/KNet/articles/usageSerDes.html">https://masesgroup.github.io/KNet/articles/usageSerDes.html</a></p>
<h4><a class="xref" href="MASES.EntityFrameworkCore.KNet.Serialization.Avro.KEFCoreSerDesKeyAvroJson-1.html">KEFCoreSerDesKeyAvroJson&lt;T&gt;</a></h4>
<section><p>Avro Key Json encoder extension of <span class="xref">MASES.KNet.Serialization.KNetSerDes&lt;T&gt;</span>, for example <a href="https://masesgroup.github.io/KNet/articles/usageSerDes.html">https://masesgroup.github.io/KNet/articles/usageSerDes.html</a></p>
</section>
<h4><a class="xref" href="MASES.EntityFrameworkCore.KNet.Serialization.Avro.KEFCoreSerDesValueContainerAvroBinary-1.html">KEFCoreSerDesValueContainerAvroBinary&lt;T&gt;</a></h4>
<section><p>Avro ValueContainer Binary encoder extension of <span class="xref">MASES.KNet.Serialization.KNetSerDes&lt;T&gt;</span>, for example <a href="https://masesgroup.github.io/KNet/articles/usageSerDes.html">https://masesgroup.github.io/KNet/articles/usageSerDes.html</a></p>
</section>
<h4><a class="xref" href="MASES.EntityFrameworkCore.KNet.Serialization.Avro.KEFCoreSerDesValueContainerAvroJson-1.html">KEFCoreSerDesValueContainerAvroJson&lt;T&gt;</a></h4>
<section><p>Avro ValueContainer Json encoder extension of <span class="xref">MASES.KNet.Serialization.KNetSerDes&lt;T&gt;</span>, for example <a href="https://masesgroup.github.io/KNet/articles/usageSerDes.html">https://masesgroup.github.io/KNet/articles/usageSerDes.html</a></p>
</section>
</article>
</div>
Expand Down
13 changes: 11 additions & 2 deletions docs/api/toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,16 @@

<ul class="nav level2">
<li>
<a href="MASES.EntityFrameworkCore.KNet.Serialization.Avro.KEFCoreSerDesAvroBinary-1.html" name="" title="KEFCoreSerDesAvroBinary&lt;T&gt;">KEFCoreSerDesAvroBinary&lt;T&gt;</a>
<a href="MASES.EntityFrameworkCore.KNet.Serialization.Avro.KEFCoreSerDesKeyAvroBinary-1.html" name="" title="KEFCoreSerDesKeyAvroBinary&lt;T&gt;">KEFCoreSerDesKeyAvroBinary&lt;T&gt;</a>
</li>
<li>
<a href="MASES.EntityFrameworkCore.KNet.Serialization.Avro.KEFCoreSerDesAvroJson-1.html" name="" title="KEFCoreSerDesAvroJson&lt;T&gt;">KEFCoreSerDesAvroJson&lt;T&gt;</a>
<a href="MASES.EntityFrameworkCore.KNet.Serialization.Avro.KEFCoreSerDesKeyAvroJson-1.html" name="" title="KEFCoreSerDesKeyAvroJson&lt;T&gt;">KEFCoreSerDesKeyAvroJson&lt;T&gt;</a>
</li>
<li>
<a href="MASES.EntityFrameworkCore.KNet.Serialization.Avro.KEFCoreSerDesValueContainerAvroBinary-1.html" name="" title="KEFCoreSerDesValueContainerAvroBinary&lt;T&gt;">KEFCoreSerDesValueContainerAvroBinary&lt;T&gt;</a>
</li>
<li>
<a href="MASES.EntityFrameworkCore.KNet.Serialization.Avro.KEFCoreSerDesValueContainerAvroJson-1.html" name="" title="KEFCoreSerDesValueContainerAvroJson&lt;T&gt;">KEFCoreSerDesValueContainerAvroJson&lt;T&gt;</a>
</li>
</ul>
</li>
Expand All @@ -218,6 +224,9 @@
<a href="MASES.EntityFrameworkCore.KNet.Serialization.Avro.Storage.html" name="" title="MASES.EntityFrameworkCore.KNet.Serialization.Avro.Storage">MASES.EntityFrameworkCore.KNet.Serialization.Avro.Storage</a>

<ul class="nav level2">
<li>
<a href="MASES.EntityFrameworkCore.KNet.Serialization.Avro.Storage.AvroKeyContainer.html" name="" title="AvroKeyContainer">AvroKeyContainer</a>
</li>
<li>
<a href="MASES.EntityFrameworkCore.KNet.Serialization.Avro.Storage.AvroValueContainer.html" name="" title="AvroValueContainer">AvroValueContainer</a>
</li>
Expand Down
141 changes: 86 additions & 55 deletions docs/articles/serialization.html
Original file line number Diff line number Diff line change
Expand Up @@ -232,67 +232,97 @@ <h2 id="avro-serialization"><strong>Avro</strong> serialization</h2>
</ul>
<h3 id="avro-schema">Avro schema</h3>
<p>The following schema is the default used from the engine and can be registered in Apache Schema registry so other applications can use it to extract the data stored in the topics:</p>
<ul>
<li><p>Complex Primary Key schema:</p>
<pre><code class="lang-json">{
&quot;namespace&quot;: &quot;MASES.EntityFrameworkCore.KNet.Serialization.Avro.Storage&quot;,
&quot;type&quot;: &quot;record&quot;,
&quot;name&quot;: &quot;AvroValueContainer&quot;,
&quot;doc&quot;: &quot;Represents the storage container type to be used from KEFCore&quot;,
&quot;fields&quot;: [
{
&quot;name&quot;: &quot;EntityName&quot;,
&quot;type&quot;: &quot;string&quot;
},
{
&quot;name&quot;: &quot;ClrType&quot;,
&quot;type&quot;: &quot;string&quot;
},
{
&quot;name&quot;: &quot;Data&quot;,
&quot;type&quot;: {
&quot;type&quot;: &quot;array&quot;,
&quot;items&quot;: {
&quot;namespace&quot;: &quot;MASES.EntityFrameworkCore.KNet.Serialization.Avro.Storage&quot;,
&quot;type&quot;: &quot;record&quot;,
&quot;name&quot;: &quot;PropertyDataRecord&quot;,
&quot;doc&quot;: &quot;Represents the single container for Entity properties stored in AvroValueContainer and used from KEFCore&quot;,
&quot;fields&quot;: [
{
&quot;name&quot;: &quot;PropertyIndex&quot;,
&quot;type&quot;: &quot;int&quot;
},
{
&quot;name&quot;: &quot;PropertyName&quot;,
&quot;type&quot;: &quot;string&quot;
},
{
&quot;name&quot;: &quot;ClrType&quot;,
&quot;type&quot;: &quot;string&quot;
},
{
&quot;name&quot;: &quot;Value&quot;,
&quot;type&quot;: [
&quot;null&quot;,
&quot;boolean&quot;,
&quot;int&quot;,
&quot;long&quot;,
&quot;float&quot;,
&quot;double&quot;,
&quot;string&quot;
]
}
]
}
}
}
]
&quot;namespace&quot;: &quot;MASES.EntityFrameworkCore.KNet.Serialization.Avro.Storage&quot;,
&quot;type&quot;: &quot;record&quot;,
&quot;name&quot;: &quot;AvroKeyContainer&quot;,
&quot;doc&quot;: &quot;Represents the storage container type to be used from KEFCore for keys&quot;,
&quot;fields&quot;: [
{
&quot;name&quot;: &quot;PrimaryKey&quot;,
&quot;type&quot;: {
&quot;type&quot;: &quot;array&quot;,
&quot;items&quot;: [
&quot;null&quot;,
&quot;boolean&quot;,
&quot;int&quot;,
&quot;long&quot;,
&quot;float&quot;,
&quot;double&quot;,
&quot;string&quot;
]
}
}
]
}
</code></pre>
</li>
<li><p>ValueContainer schema:</p>
<pre><code class="lang-json">{
&quot;namespace&quot;: &quot;MASES.EntityFrameworkCore.KNet.Serialization.Avro.Storage&quot;,
&quot;type&quot;: &quot;record&quot;,
&quot;name&quot;: &quot;AvroValueContainer&quot;,
&quot;doc&quot;: &quot;Represents the storage container type to be used from KEFCore&quot;,
&quot;fields&quot;: [
{
&quot;name&quot;: &quot;EntityName&quot;,
&quot;type&quot;: &quot;string&quot;
},
{
&quot;name&quot;: &quot;ClrType&quot;,
&quot;type&quot;: &quot;string&quot;
},
{
&quot;name&quot;: &quot;Data&quot;,
&quot;type&quot;: {
&quot;type&quot;: &quot;array&quot;,
&quot;items&quot;: {
&quot;namespace&quot;: &quot;MASES.EntityFrameworkCore.KNet.Serialization.Avro.Storage&quot;,
&quot;type&quot;: &quot;record&quot;,
&quot;name&quot;: &quot;PropertyDataRecord&quot;,
&quot;doc&quot;: &quot;Represents the single container for Entity properties stored in AvroValueContainer and used from KEFCore&quot;,
&quot;fields&quot;: [
{
&quot;name&quot;: &quot;PropertyIndex&quot;,
&quot;type&quot;: &quot;int&quot;
},
{
&quot;name&quot;: &quot;PropertyName&quot;,
&quot;type&quot;: &quot;string&quot;
},
{
&quot;name&quot;: &quot;ClrType&quot;,
&quot;type&quot;: &quot;string&quot;
},
{
&quot;name&quot;: &quot;Value&quot;,
&quot;type&quot;: [
&quot;null&quot;,
&quot;boolean&quot;,
&quot;int&quot;,
&quot;long&quot;,
&quot;float&quot;,
&quot;double&quot;,
&quot;string&quot;
]
}
]
}
}
}
]
}
</code></pre>
</li>
</ul>
<p>The extension converted this schema into code to speedup the exection of serialization/deserialization operations.</p>
<h3 id="how-to-use-avro">How to use Avro</h3>
<p><code>KafkaDbContext</code> contains three properties can be used to override the default types:</p>
<ul>
<li><strong>KeySerializationType</strong>: Leave this value untouched, till now the engine uses the default serializer</li>
<li><strong>ValueSerializationType</strong>: set this value to <code>KEFCoreSerDesAvroBinary&lt;&gt;</code> or <code>KEFCoreSerDesAvroJson&lt;&gt;</code></li>
<li><strong>KeySerializationType</strong>: set this value to <code>KEFCoreSerDesKeyAvroBinary&lt;&gt;</code> or <code>KEFCoreSerDesKeyAvroJson&lt;&gt;</code>, the type automatically fallback to default serializer for simple Primary Key</li>
<li><strong>ValueSerializationType</strong>: set this value to <code>KEFCoreSerDesValueContainerAvroBinary&lt;&gt;</code> or <code>KEFCoreSerDesValueContainerAvroJson&lt;&gt;</code></li>
<li><strong>ValueContainerType</strong>: set this value to <code>AvroValueContainer&lt;&gt;</code></li>
</ul>
<p>An example is:</p>
Expand All @@ -301,8 +331,9 @@ <h3 id="how-to-use-avro">How to use Avro</h3>
BootstrapServers = &quot;KAFKA-SERVER:9092&quot;,
ApplicationId = &quot;MyAppid&quot;,
DbName = &quot;MyDBName&quot;,
KeySerializationType = UseAvroBinary ? typeof(KEFCoreSerDesKeyAvroBinary&lt;&gt;) : typeof(KEFCoreSerDesKeyAvroJson&lt;&gt;),
ValueContainerType = typeof(AvroValueContainer&lt;&gt;),
ValueSerializationType = UseAvroBinary ? typeof(KEFCoreSerDesAvroBinary&lt;&gt;) : typeof(KEFCoreSerDesAvroJson&lt;&gt;),
ValueSerializationType = UseAvroBinary ? typeof(KEFCoreSerDesValueContainerAvroBinary&lt;&gt;) : typeof(KEFCoreSerDesValueContainerAvroJson&lt;&gt;),
})
{
// execute stuff here
Expand Down
58 changes: 47 additions & 11 deletions docs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -545,23 +545,59 @@
},
{
"type": "ManagedReference",
"source_relative_path": "api/MASES.EntityFrameworkCore.KNet.Serialization.Avro.KEFCoreSerDesAvroBinary-1.yml",
"source_relative_path": "api/MASES.EntityFrameworkCore.KNet.Serialization.Avro.KEFCoreSerDesKeyAvroBinary-1.yml",
"output": {
".html": {
"relative_path": "api/MASES.EntityFrameworkCore.KNet.Serialization.Avro.KEFCoreSerDesAvroBinary-1.html",
"hash": "rgIKeaMkllLkD3OplYG0HsuXPw4Iqes0NoXXjU6Pguk="
"relative_path": "api/MASES.EntityFrameworkCore.KNet.Serialization.Avro.KEFCoreSerDesKeyAvroBinary-1.html",
"hash": "NnMB7WC/V1db5Wl/o2+pJvjX+YNSVZBkg9gW7aURSyQ="
}
},
"is_incremental": false,
"version": ""
},
{
"type": "ManagedReference",
"source_relative_path": "api/MASES.EntityFrameworkCore.KNet.Serialization.Avro.KEFCoreSerDesAvroJson-1.yml",
"source_relative_path": "api/MASES.EntityFrameworkCore.KNet.Serialization.Avro.KEFCoreSerDesKeyAvroJson-1.yml",
"output": {
".html": {
"relative_path": "api/MASES.EntityFrameworkCore.KNet.Serialization.Avro.KEFCoreSerDesAvroJson-1.html",
"hash": "t8aQ3VPlZcw9m5rE/TePa/PmCO4Mw561WGGDCxdkpAo="
"relative_path": "api/MASES.EntityFrameworkCore.KNet.Serialization.Avro.KEFCoreSerDesKeyAvroJson-1.html",
"hash": "e4bMkPRyW2hfwS0XUzg4Jrv7S2jRzTavhx09SRqKdXM="
}
},
"is_incremental": false,
"version": ""
},
{
"type": "ManagedReference",
"source_relative_path": "api/MASES.EntityFrameworkCore.KNet.Serialization.Avro.KEFCoreSerDesValueContainerAvroBinary-1.yml",
"output": {
".html": {
"relative_path": "api/MASES.EntityFrameworkCore.KNet.Serialization.Avro.KEFCoreSerDesValueContainerAvroBinary-1.html",
"hash": "HqIHxf4Uz4VGtRQrAV0Et77GwioaVOfpxG8XUtSXj1c="
}
},
"is_incremental": false,
"version": ""
},
{
"type": "ManagedReference",
"source_relative_path": "api/MASES.EntityFrameworkCore.KNet.Serialization.Avro.KEFCoreSerDesValueContainerAvroJson-1.yml",
"output": {
".html": {
"relative_path": "api/MASES.EntityFrameworkCore.KNet.Serialization.Avro.KEFCoreSerDesValueContainerAvroJson-1.html",
"hash": "NYfE3cZ9eCa57NyH+UvaPlLl2/RLdssayFY/WD1fvp4="
}
},
"is_incremental": false,
"version": ""
},
{
"type": "ManagedReference",
"source_relative_path": "api/MASES.EntityFrameworkCore.KNet.Serialization.Avro.Storage.AvroKeyContainer.yml",
"output": {
".html": {
"relative_path": "api/MASES.EntityFrameworkCore.KNet.Serialization.Avro.Storage.AvroKeyContainer.html",
"hash": "RhMHeDz9lkPbrGNta3/+N+h1fo4sqjPnxyuC1Nxvwss="
}
},
"is_incremental": false,
Expand Down Expand Up @@ -609,7 +645,7 @@
"output": {
".html": {
"relative_path": "api/MASES.EntityFrameworkCore.KNet.Serialization.Avro.Storage.html",
"hash": "Bvu3mGiGQeXtDq3FFGrsd2FuzYuz+sz0kYHr8HHOXrY="
"hash": "RGL0pu1pQ9iHjl/LOfa04ZiphRtYKbPjHUUznDgwpgM="
}
},
"is_incremental": false,
Expand All @@ -621,7 +657,7 @@
"output": {
".html": {
"relative_path": "api/MASES.EntityFrameworkCore.KNet.Serialization.Avro.html",
"hash": "ZQiufkZqLCvjWpye9Z7JU2EW2pUZRxTKsBCrFpOsneI="
"hash": "qOZoK9RPd6jIq56exKdIAYwmPVz02Hv8HlgukTLprYc="
}
},
"is_incremental": false,
Expand Down Expand Up @@ -1125,7 +1161,7 @@
"output": {
".html": {
"relative_path": "api/toc.html",
"hash": "KOALY2QIhDtBfBCbOiobVMa+coxWUWFgIVn0qDXG654="
"hash": "8kt4x3BXn8NHQQ6AG3H4dCAh4ATubd6Ox8EVHBWr+Qw="
}
},
"is_incremental": false,
Expand Down Expand Up @@ -1200,7 +1236,7 @@
"output": {
".html": {
"relative_path": "articles/serialization.html",
"hash": "KmeiRbShfvrPQrpBEYw9DF4jQ9ITrGWZLXm5Pc2A1g8="
"hash": "ZAwpoq0IA6oqhjiLBFRzH61UIX59pwRz99fih0ck7qc="
}
},
"is_incremental": false,
Expand Down Expand Up @@ -1289,7 +1325,7 @@
"ManagedReferenceDocumentProcessor": {
"can_incremental": false,
"incrementalPhase": "build",
"total_file_count": 92,
"total_file_count": 95,
"skipped_file_count": 0
},
"ResourceDocumentProcessor": {
Expand Down
Loading

0 comments on commit 08250f4

Please sign in to comment.