Agent::Eval - the Eval sample agent.
my $agent = new Agent( Name => 'Eval', %args ); $agent->run;
The Eval agent relocates to a static agent and eval()'s some user-defined code there. Return values are packaged in plaintext and delivered back to the invoking program.
Host => TCP address of static agent Eval => code to be eval()'d Return => TCP address to return results to verbose => self evident
This algorithm may be largely inefficient if the code being evaluated is trivial. Eg. the Eval agent jumps to a remote host, severs the connection and does its thing, then establishes a new connection to deliver the results. There is alot of overhead creating connections here.
It is also powerful in that the program sending the Eval agents needn't block while waiting for a response. In addition to this, it is more dynamic that traditional RPC as the code to be evaluated is not predefined on the server.
The Static example agent, dcalc.pl.
Steve Purkis <firstname.lastname@example.org>
Copyright (c) 1997, 1998 Steve Purkis. All rights reserved. This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself.