<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Persistence Manager 😕</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/ca43b6a244/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/ca43b6a244/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/ca43b6a244/</id><updated>2020-12-28T16:18:47.370000Z</updated><subtitle>Recent posts to Persistence Manager 😕</subtitle><entry><title>Persistence Manager 😕</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/ca43b6a244/?limit=25#b871" rel="alternate"/><published>2020-12-28T16:18:47.370000Z</published><updated>2020-12-28T16:18:47.370000Z</updated><author><name>Morberis</name><uri>https://forge.codesys.com/u/morberis/</uri></author><id>https://forge.codesys.com8430826bdc6dcbead33fa6a0fec56c37aab494f9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;If it helps &lt;a class="" href="https://help.codesys.com/webapp/idx-SegBufferMan-lib;product=SegBufferMan;version=3.5.16.0" rel="nofollow"&gt;here is a link&lt;/a&gt; to the documentation on the segmented buffer library. &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Persistence Manager 😕</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/ca43b6a244/?limit=100#34ea" rel="alternate"/><published>2020-12-26T17:58:22.821000Z</published><updated>2020-12-26T17:58:22.821000Z</updated><author><name>dFx</name><uri>https://forge.codesys.com/u/dfx/</uri></author><id>https://forge.codesys.comd2ddcf9bc29c820e9fe6ec8db4dbe461a3dd2791</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;So you are basically doing what mqtt broker does ?&lt;/p&gt;
&lt;p&gt;Persistent values are often stored in a file. File permissions are often locked for read only, explaining your troubles.&lt;/p&gt;
&lt;p&gt;To store values in a file that may be emptied by other thread, I would buffer some values in memory and write once the buffer is almost full.&lt;br/&gt;
Then, as the file is no longer used, you may empty it.&lt;br/&gt;
You can also empty your buffer on a trigger, in case of power loss for exemple.&lt;/p&gt;
&lt;p&gt;Third solution, a bit more complex, may be to reread the file stream every time you need to empty your buffer to it. This way, you can work both on emptying your buffer and the file, at the same time as writing in them. Be aware that the tasks should have same priorities, because if not, it may lead to duplicate data or data loss.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Persistence Manager 😕</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/ca43b6a244/?limit=25#5fd4" rel="alternate"/><published>2020-12-22T09:50:37.041000Z</published><updated>2020-12-22T09:50:37.041000Z</updated><author><name>andras-mozes</name><uri>https://forge.codesys.com/u/andras-mozes/</uri></author><id>https://forge.codesys.come58e266adc783b6e1f6677271e7b0ddd96a0090e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;strong&gt;Hello&lt;/strong&gt;,&lt;/p&gt;
&lt;p&gt;I am a bit confused.&lt;br/&gt;
I have set up successfully the &lt;code&gt;Persistence Manager&lt;/code&gt; and it works fine.&lt;/p&gt;
&lt;p&gt;But...&lt;/p&gt;
&lt;p&gt;I would like to have 2 separate task: a &lt;em&gt;producing&lt;/em&gt; one and a &lt;em&gt;consuming&lt;/em&gt; one.&lt;br/&gt;
The producing task is responsible for adding new values, while the consuming task would be responsible to read and delete this objects after sending it successfully to a MySQL server.&lt;/p&gt;
&lt;p&gt;I don't want to lose any of values read by producing task, this is the reason why I have set-up a persistence manager.&lt;/p&gt;
&lt;p&gt;Am I on the right path?&lt;/p&gt;
&lt;p&gt;Thanks for your help in advance.&lt;/p&gt;
&lt;p&gt;BR!&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>