Re: [Smartfrog-developer] How to communicate between two differentsmartfrog daemons?

Ambika Awanty <ambika_awanty1-/[email protected]> Tue, 19 Dec 2006 09:48:20 +0000 (GMT)
Newsgroups gmane.comp.java.smartfrog.user
Message-ID <[email protected]>

Hi Julio,
     I need to work in the following  way.
  
     I need to execute some commands in other nodes  in the network and send back the output to the sfDaemon through which I have  deployed the component which will execute the commands. So how I can achieve  this? 
     Through the RunShellScripts I am able to run the  commands, but I am not getting how to send back the output. 
  
 Regards,
 Ambika
  

  
---------------------------------
 From: Guijarro, Julio 
Sent: Monday,  December 18, 2006 7:04 PM
To: Ambika Awanty;  smartfrog-support-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: RE:  [Smartfrog-developer] How to communicate between two differentsmartfrog  daemons?


 
  What do you need to do  exactly? There are many different ways of doing that. In general, any daemon can  locate the other daemons and components and then you can remotely invoke any  remote method on any component.
  
 One way could be using  the EventSend component, for example:
  
 #include  "org/smartfrog/components.sf"
 #include  "org/smartfrog/sfcore/workflow/components.sf"
  
 #include  "org/smartfrog/examples/dynamicwebserver/gui/progresspanel/components.sf"
  
 //----------------------------------
 // Simulate the entire  workflow, generating the correct events 
 // then delaying termination  to hold the display up for a while 
 //----------------------------------
  
 myDelay extends DoNothing  {
   time 2000; //delay in  msecs
 }
  
 SimulatedApacheInstallScript  extends Sequence {
     name  "apache";
  
          e1 extends EventSend {
              sendTo:top  LAZY PARENT;
              event       (name ++ ":1:4: Step  1");
          }
  
          -- extends myDelay;
  
          e2 extends EventSend {
              sendTo:top  LAZY PARENT;
              event       (name ++ ":2:4: Step  2");
          }
  
          -- extends myDelay;
  
          e3 extends EventSend {
              sendTo:top  LAZY PARENT;
              event       (name ++ ":3:4: Step  3");
          }
  
          -- extends myDelay;
  
          e4 extends EventSend {
              sendTo:top  LAZY PARENT;
              event       (name ++ ":4:4: Step4.  Final.");
          }
  
          -- extends myDelay;
  
          e5 extends EventSend {
              sendTo:top  LAZY PARENT;
              event       (name ++ ":5:4: Apache  installed");
          }
  
          delayTermination extends DoNothing {
              time 2000;
          }
 }
  
 sfConfig extends Compound  {
     //Special  Events Printer 
      eventPrinter extends DisplayProgress {
          terminationType "none";
          nameDisplay "apache installation progress";
          heightDisplay  200;
          widthDisplay   520;
      }
     //Install  process...
     workflow  extends SimulatedApacheInstallScript {
              sendTo:printer LAZY eventPrinter;
      }
 }
  
  
 There are also  components for using Jabber for example. 
  
 Julio
  
  
    
---------------------------------
 
 From:  smartfrog-developer-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org  [mailto:smartfrog-developer-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org]  On Behalf Of Ambika  Awanty
Sent: 18 December 2006  07:23
To:  smartfrog-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org;  [email protected]
Subject: [Smartfrog-developer] How to  communicate between two differentsmartfrog  daemons?

  
 Hi All,

    I need to  create a application in which i need to send messages between two daemons which  are runiing in different nodes of HUPX. So is there any direct way to  communicate?

Thanks and Regards,
Ambika
  Send  free SMS to your Friends on Mobile from your Yahoo! Messenger. Download  Now!  http://messenger.yahoo.com/download.php




 Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Smartfrog-support mailing list
Smartfrog-support-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/smartfrog-support