<div>Hi all,</div><div><br></div><div>First and foremost, I would like to thanks all for the tips and suggestions.</div><div><br></div><div>On 17 October 2011 17:37, Stefan Kögl <span dir="ltr"><<a href="mailto:stefan@skoegl.net" target="_blank">stefan@skoegl.net</a>></span> wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<div><br>
On 10/17/2011 11:08 AM, Stefan Derkits wrote:<br>
> So our problem is: We need to make sure that the last Request to<br>
> upload an Episode Action was received by <a href="http://gpodder.net" target="_blank">gpodder.net</a>. Anyone has an<br>
> Idea how to do this, can we do this in Amarok or do I need to<br>
> implement Support for that in the Library.<br>
<br>
</div>I can't judge if this will work for Amarok but I'll briefly describe how<br>
gPodder handles this.<br>
<br>
All actions are cached before sending them to the webservice in a batch.<br>
Accumulated actions are sent if no new actions appear for a certain time<br>
(1 minute) or right before gPodder terminates.<br>
<br>
This caching reduces load on the service (by sending in batches) and<br>
ensures that no actions are lost (eg when there is some maintenance on<br>
the site). If some actions can't be sent during shutdown, gPodder tries<br>
again at startup and keeps them in the cache until they have been<br> successfully uploaded.</blockquote><div><br></div><div>Actually, we cache new actions for 30 seconds.</div><div>So we send their or just ignore, if the cache is empty.</div>
<div>Then the cache is erased when <a href="http://gpodder.net">gpodder.net</a> confirms that it has received the actions.</div><div>Otherwise, we will try to send them in the next timeou(more 30 seconds).</div><div><br></div>
<div>The only difference from your suggestion is that I don't make actions data persistent, since they are sent frequently(30 seconds interval) to the server.</div><div>However, I'll save them in a file(amarokrc) before the user closes amarok, so we can load that data in the next start ;}.</div>
<div><br></div><div>Regards, Lucas Lira Gomes.</div>