Click here to get back home

update framework

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
update framework hendedav 07-20-2007
Posted by hendedav on July 20, 2007, 9:20 am
Please log in for more thread options


Gang,

I am working on a project and would like to incorporate an (auto)
update feature. Does anyone know of an update framework that
currently exists for perl? If not, would anyone have any suggestions
on how to accomplish this? My thoughts are to send a request to an
http server like:

http://url.com/update.cgi?appname=&version=

and then parse the results. Any ideas would greatly be appreciated.

Thanks,

Dave Henderson


Posted by Tim Southerwood on July 20, 2007, 9:35 am
Please log in for more thread options


hendedav@gmail.com wrote:

> Gang,
>
> I am working on a project and would like to incorporate an (auto)
> update feature.

Could you elaborate more please on what you are updating.

Cheers

Tim

Posted by hendedav on July 20, 2007, 4:57 pm
Please log in for more thread options


> hende...@gmail.com wrote:
> > Gang,
>
> > I am working on a project and would like to incorporate an (auto)
> > update feature.
>
> Could you elaborate more please on what you are updating.
>
> Cheers
>
> Tim


Thanks for the reply Tim. I am building my own application and am
trying to incorporate an update feature for it. Thats why I was
wondering if anyone has built a generic "update framework". If nobody
has, then I will need to build my own, in which case I was going to
see if anyone here knew of a perl module that would be able to send
and receive http requests (combined with wget could make an update
framework). Hope this clears it up.

Dave


Posted by Tim Southerwood on July 21, 2007, 4:21 am
Please log in for more thread options


hendedav@gmail.com coughed up some electrons that declared:

>> hende...@gmail.com wrote:
>> > Gang,
>>
>> > I am working on a project and would like to incorporate an (auto)
>> > update feature.
>>
>> Could you elaborate more please on what you are updating.
>>
>> Cheers
>>
>> Tim
>
>
> Thanks for the reply Tim. I am building my own application and am
> trying to incorporate an update feature for it. Thats why I was
> wondering if anyone has built a generic "update framework". If nobody
> has, then I will need to build my own, in which case I was going to
> see if anyone here knew of a perl module that would be able to send
> and receive http requests (combined with wget could make an update
> framework). Hope this clears it up.
>
> Dave

Not come across one - but that does not mean there isn't.

So I guess you want to query a website for:

a) Some data indicating current version of your app and urls of the various
bits needed to transition between two versions (deltas) - or url of the new
complete version.

b) Fetch various binary blobs (zip or tar files maybe), then install them
locally to update either data or the app itself.

It wouldn't be daft to drive wget via system or IPC::Run(3). Certainly
simple.

Also the data in a) needn't be HTML - it could be any parseable text at your
convenience. If XML, then the XML::Simple module is really easy to use.

If you want to talk to web servers directly, this is a reasonable and mature
module:

http://search.cpan.org/~gaas/libwww-perl-5.806/lib/LWP.pm

and there's this one too:

http://search.cpan.org/~gaas/libwww-perl-5.806/lib/Net/HTTP.pm

Sorry - I can't give any help with how to do the update as I don't know what
your app looks like. File::Copy may be of use.

But I would say - if you are updating core app binaries or critical data,
try to have a way where you can install an updated version in parallel to
the running version. Then if anything goes wrong, the user has a fall back
to a version that still works. This is particularly true of updates that
have so many parameters outside of you control (your webserver might crash,
the internet falls over betwixt you and your user, their machine crashes
(or gets turned off!) mid update.

Cheers

Tim

Posted by hendedav on July 21, 2007, 3:04 pm
Please log in for more thread options


> hende...@gmail.com coughed up some electrons that declared:
>
>
>
> >> hende...@gmail.com wrote:
> >> > Gang,
>
> >> > I am working on a project and would like to incorporate an (auto)
> >> > update feature.
>
> >> Could you elaborate more please on what you are updating.
>
> >> Cheers
>
> >> Tim
>
> > Thanks for the reply Tim. I am building my own application and am
> > trying to incorporate an update feature for it. Thats why I was
> > wondering if anyone has built a generic "update framework". If nobody
> > has, then I will need to build my own, in which case I was going to
> > see if anyone here knew of a perl module that would be able to send
> > and receive http requests (combined with wget could make an update
> > framework). Hope this clears it up.
>
> > Dave
>
> Not come across one - but that does not mean there isn't.
>
> So I guess you want to query a website for:
>
> a) Some data indicating current version of your app and urls of the various
> bits needed to transition between two versions (deltas) - or url of the new
> complete version.
>
> b) Fetch various binary blobs (zip or tar files maybe), then install them
> locally to update either data or the app itself.
>
> It wouldn't be daft to drive wget via system or IPC::Run(3). Certainly
> simple.
>
> Also the data in a) needn't be HTML - it could be any parseable text at your
> convenience. If XML, then the XML::Simple module is really easy to use.
>
> If you want to talk to web servers directly, this is a reasonable and mature
> module:
>
> http://search.cpan.org/~gaas/libwww-perl-5.806/lib/LWP.pm
>
> and there's this one too:
>
> http://search.cpan.org/~gaas/libwww-perl-5.806/lib/Net/HTTP.pm
>
> Sorry - I can't give any help with how to do the update as I don't know what
> your app looks like. File::Copy may be of use.
>
> But I would say - if you are updating core app binaries or critical data,
> try to have a way where you can install an updated version in parallel to
> the running version. Then if anything goes wrong, the user has a fall back
> to a version that still works. This is particularly true of updates that
> have so many parameters outside of you control (your webserver might crash,
> the internet falls over betwixt you and your user, their machine crashes
> (or gets turned off!) mid update.
>
> Cheers
>
> Tim


Tim you have provided some good information and I will take a look
into the modules you spoke of. Regarding the updating in parrallel,
what about doing the following:

1) download the entire update archive in /tmp dir (in tar.gz format)
- this would eliminate any problems from failed webserver or
update not completely downloading

2) untar contents and run tar.sh/tar.pl script to tar all the matching
files that will be installed over
- this would preserve the users original files and give him/her
the ability to roll back if neccessary

3) run install.sh/install.pl to perform the acutal installation of the
update

Do these steps seem reasonable and seem to eliminate most of the
problems associated with updating an app?

Thanks,
Dave


Similar ThreadsPosted
Tk::MusicSheet... update August 3, 2006, 7:09 am
web page automatic update August 15, 2004, 2:32 am
new framework, namespace help please! September 12, 2005, 7:15 am
Announce: WebDyne (Yet Another Web Framework) May 31, 2006, 3:11 am
Modules for AJAX framework April 2, 2007, 11:15 pm
ANNOUNCEMENT: POE 0.32, an event driven component framework August 6, 2005, 4:29 pm
[ANNOUNCE] Config::Model - Framework for semantic validation of config data March 20, 2006, 10:07 am
ANNOUNCE: Initial release of WSF/Perl (Perl bindings for a WS-* framework) October 4, 2007, 1:37 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap