Saving application state

Celso Barriga <[email protected]> Thu, 13 Feb 2014 13:21:04 -0500
Newsgroups gmane.comp.lang.perl.poe
Message-ID <CAEijLJ=Aoy7X1A50n=UuNboc2qz-GF4p82mWYMHQVaBSC-u7oQ@mail.gmail.com>
--001a11c3896c9e6ae504f24dc0f3
Content-Type: text/plain; charset=ISO-8859-1

Hello, it's me again :)

I have a POE-based application that queries a web app for some data
filtered on some time range, say, "send me any changes from time x to now".

The application will be running 24/7, and will query for more changes since
the last time it asked for changes. I have a tick handler that keeps the
heartbeat going every second so I can do the query repeatedly.

I need to save the last time it made the query in some persistent fashion
so I can pass it in my next query. I can't just save it to my heap in case
the application quits, I need to be able to resume the query since the last
successful query.

What is the best way of doing this, the "POE way". Can I just save it to a
file and read it back every tick count, which is 1 sec, using a regular
file handle?

Thanks in advance!

Celso

--001a11c3896c9e6ae504f24dc0f3
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hello, it&#39;s me again :)<div><br></div><div>I have a PO=
E-based application that queries a web app for some data filtered on some t=
ime range, say, &quot;send me any changes from time x to now&quot;.</div><d=
iv>
<br></div><div>The application will be running 24/7, and will query for mor=
e changes since the last time it asked for changes. I have a tick handler t=
hat keeps the heartbeat going every second so I can do the query repeatedly=
.</div>
<div><br></div><div>I need to save the last time it made the query in some =
persistent fashion so I can pass it in my next query. I can&#39;t just save=
 it to my heap in case the application quits, I need to be able to resume t=
he query since the last successful query.</div>
<div><br></div><div>What is the best way of doing this, the &quot;POE way&q=
uot;. Can I just save it to a file and read it back every tick count, which=
 is 1 sec, using a regular file handle?</div><div><br></div><div>Thanks in =
advance!</div>
<div><br></div><div>Celso</div><div><br></div><div><br></div></div>

--001a11c3896c9e6ae504f24dc0f3--