Re: IKC server with multiple clients....can clients communicate directly after subscribtion

2009-05-13 Thread Josh803316
An ikc server is indeed required in the setup, but after looking through the
examples and the ikc-architecture.txt doc I think that would be the only
way.. to have a multiple hub-spoke type setup. It is probably a bit of
overkill in my application but it is something I might look into. I'll post
the solution to this attempt later if I follow through.

On Wed, May 13, 2009 at 1:29 AM, Brandon M. Andrews <
[email protected]> wrote:

> Josh803316 wrote:
>
>>  To Whom may want to Help,
>>
>> I have two IKC clients that publish their states to a IKC server (each one
>> is a separate process).
>> I want to be able to use IKC to make both clients talk with each other
>> once
>> they have published their states.
>>
>> I tried to subscribe from one client to the other  client, but I get this
>> error...
>>  1365: Unknown kernel 'ClientImTryingToConnectTo'
>>
>>
> I'm going to work under the assumption that the middleman server is
> required by your network configuration.
>
>  I'm monitoring my connection process and I see that all of the foreign
>> kernels are connected...but I have to post back to the server who has
>> to
>> post to the other clients.
>> Is there a way to have direct IKC client communication between multiple
>> clients after the publishing/subscription portion is complete?
>>
>>
> I do not believe that this is possible, looking through the IKC
> documentation (and briefly skimming through the code), however I do not
> pretend to be an expert, so if I'm wrong, someone should correct me! :P
>
> From what I know, you would have to spawn another IKC server (on one of
> your original clients) in order to achieve what you want to do. You could
> spawn the server dynamically using information that the clients pass to each
> other through the server, which wouldn't be particularly difficult to
> implement from what I can tell.
>
> I would write example code, but I'm falling asleep at my keyboard. Sorry!
>
> -Brandon
>


Re: IKC server with multiple clients....can clients communicate directly after subscribtion

2009-05-13 Thread Brandon M. Andrews

Josh803316 wrote:

 To Whom may want to Help,

I have two IKC clients that publish their states to a IKC server (each one
is a separate process).
I want to be able to use IKC to make both clients talk with each other once
they have published their states.

I tried to subscribe from one client to the other  client, but I get this
error...
 1365: Unknown kernel 'ClientImTryingToConnectTo'
  
I'm going to work under the assumption that the middleman server is 
required by your network configuration.



I'm monitoring my connection process and I see that all of the foreign
kernels are connected...but I have to post back to the server who has to
post to the other clients.
Is there a way to have direct IKC client communication between multiple
clients after the publishing/subscription portion is complete?
  
I do not believe that this is possible, looking through the IKC 
documentation (and briefly skimming through the code), however I do not 
pretend to be an expert, so if I'm wrong, someone should correct me! :P


From what I know, you would have to spawn another IKC server (on one of 
your original clients) in order to achieve what you want to do. You 
could spawn the server dynamically using information that the clients 
pass to each other through the server, which wouldn't be particularly 
difficult to implement from what I can tell.


I would write example code, but I'm falling asleep at my keyboard. Sorry!

-Brandon


Re: IKC server with multiple clients....can clients communicate directly after subscribtion

2009-05-12 Thread Josh803316
Here is what the _start looks like for the ikc clients that connect to the
server. I read the docs and client examples posted with the
distribution...but still trying to work through it.

sub _start {
  my ( $kernel, $session, $heap, $class, $arg1 ) = @_[ KERNEL, SESSION,
HEAP, ARG0, ARG1 ];

  my $states;
  my $alias = $class->ALIAS;
   POE::Component::IKC::Responder->spawn();
   # name this session
   if($class){

$kernel->alias_set($alias);
$kernel->post(IKC=>'monitor', '*'=>{
subscribe   =>'sub_event',
unsubscribe => 'unsub_event',
register=> 'reg_event',
unregister  => 'unreg_event'
});

$kernel->post( 'IKC', 'publish', $alias, [$class->SUBSCRIBE_METHODS]
);

$class->__startup($kernel,$session,$heap);
   }

}

On Tue, May 12, 2009 at 3:27 PM, Josh803316  wrote:

> To Whom may want to Help,
>
> I have two IKC clients that publish their states to a IKC server (each one
> is a separate process).
> I want to be able to use IKC to make both clients talk with each other once
> they have published their states.
>
> I tried to subscribe from one client to the other  client, but I get this
> error...
>  1365: Unknown kernel 'ClientImTryingToConnectTo'
>
> I'm monitoring my connection process and I see that all of the foreign
> kernels are connected...but I have to post back to the server who has to
> post to the other clients.
> Is there a way to have direct IKC client communication between multiple
> clients after the publishing/subscription portion is complete?
>