I'm the designer, but I'm just trying to get a good feel for some best
practices with POE before I make my final decision on the direction.
I haven't completed my design because I'm not sure what the best route is
yet. Hence all my poe mail-list questions of late :)
My app will have the following:
1)Apache will serve an Extjs(extjs.com) front end
2)The front end will send ajax requests
a)Either to an IKC client lite cgi ( mod_perl or fastcgi) which would
process the params and then call the appropriate IKC event
.....or.......
b)Directly to a POE based web server. The server would process the
params and then call the appropriate IKC event.
*The client lite cgi or the server would respond with JSON for the
ext front end.
3)The IKC server will talk to different IKC Client workers to perform
automated testing tasks. Eg start a network test, stop a test, etc.......
I think part of the problem is my lack of knowledge on POE, but I am also
just trying to get a community feel for what people have usually done and
what works well........in these kinds of scenarios.
On Mon, Apr 27, 2009 at 6:01 PM, Rocco Caputo <[email protected]> wrote:
> No, it can be fine to combine services---even disparate ones---into one
> program, if that's the best solution to your problem. Obviously the
> applicability is up to you or your systems designer.
>
> For example, Bot::Pastebot (CPAN) is an IRC client and a pastebin web
> server in one program.
>
> --
> Rocco Caputo - [email protected]
>
>
>
> On Apr 27, 2009, at 20:45, Josh803316 wrote:
>
> I read the combined service example in the POE cookbook (
>> http://poe.perl.org/?POE_Cookbook/Combined_Services).
>>
>> It gave me an idea to have multiple services handled from a single kernel
>> run call. This way, I could handle an ajax request, a separate
>> web_services
>> request (json-rpc) as well as ikc client requests (ikc client lite....or
>> ikc
>> standard clients).
>>
>> Would it be foolish to try and do all 3 of these inside one kernel run?
>> Could an IKC server handle these types of requests without having to
>> include
>> the other 2......with wheels and filters? I'm still very much learning
>> the
>> ins and outs of POE so please excuse my naivete.
>>
>> POE::Component::IKC::Server->spawn(
>> port => 5667,
>> name => 'automation',
>> verbose => 'true',
>> );
>>
>> POE::Component::Server::HTTP->new
>> ( Port => 5668,
>> ContentHandler => { "/" => \&web_handler },
>> Headers => { Server => 'Sample',
>> },
>> );
>>
>> POE::Component::Server::JSONRPC->new(
>> Port => 5669,
>> Handler => {
>> 'json_handler' => 'json_handler'
>> },
>> );
>>
>
>