[Catalyst] Pushing data to Catalyst powered web page

Supra, Morne msupra at fnb.co.za
Thu Sep 18 12:34:04 BST 2008

Hi all

I did the following to get data to push to the web page:

An RFID tag is read and processed by an ALE server. The ALE server then
sends the data to my Catalyst URL:

The ale/notifier action then extracts the tag id from the variable and
then does a lookup in a database to get the data associated to the tag.
It then puts the tag data in a queue and the last action is to make a
socket connection, as a client, to a socket server running inside the
/assettracker/display_tagdata action. The following code is an extract
from the ale/notifier:

sub notify_tag_read {
	use IO::Socket::INET;
	my $MySocket=new
	my $msg = "";

When I access, via a browser, the url
it loads a socket server and waits for a connection from a client. The
following is a snippet of the /assettracker/display_tagdata action:

sub display_tagdata : Local {
	my ( $self, $c ) = @_;
	my $text;
	my @args;
	$c->stash->{template} = 'sockettest.tt2';
	use IO::Socket::INET;

	my $MySocket=new

	@args = [$text];	


This action will then forward to /assettracker/get_data to retrieve the
data from the queue and display it in the browser.

I know that the code is not great, but it works. Thank you for all the
assistance that I received.


-----Original Message-----
From: Bill Moseley [mailto:moseley at hank.org] 
Sent: 12 September 2008 09:46 PM
To: The elegant MVC web framework
Subject: Re: [Catalyst] Pushing data to Catalyst powered web page

On Fri, Sep 12, 2008 at 02:15:23PM +0200, Supra, Morne wrote:
> The problem that I have is that I have no idea how to push the data to
> web page instead of pulling.

Pull with an AJAX update, perhaps.

Bill Moseley
moseley at hank.org
Sent from my iMutt

List: Catalyst at lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive:
Dev site: http://dev.catalyst.perl.org/
To read FirstRand Bank's Disclaimer for this email click on the following address or copy into your Internet browser: 

If you are unable to access the Disclaimer, send a blank e-mail to
firstrandbankdisclaimer at fnb.co.za and we will send you a copy of the Disclaimer.

More information about the Catalyst mailing list