Whats the difference between a command request and a message on the QUEUE 
service?

I'm not really sure what you mean.  A STAF service request (aka command) 
is any request submitted to a STAF service.  For example:

   STAF local QUEUE QUEUE MESSAGE "Hi"
   STAF local QUEUE GET WAIT 5000
   STAF local DELAY DELAY 5s
   STAF local PING PING

MESSAGE is an option on a QUEUE request submitted to the QUEUE service. 
For example:

   STAF local QUEUE QUEUE MESSAGE "Hi"

Are commands requests put on the QUEUE automatically?

  No.  I don't think you understand the QUEUE service.  For more 
information on the QUEUE service, see the STAF User's Guide.

Is it up to the service to process its own queue?

A STAF service does not have to do anything with its service handle's 
queue.  Note that every STAF handle has a queue associated with it as 
discussed in section "2.1 Handles" and section "2.6 Queues" in the STAF 
User's Guide at http://staf.sourceforge.net/current/STAFUG.htm#HDRHNDLCON. 
 It defines a queue as "a priority queue used for interprocess 
communication between other processes/machines using STAF."

Note, to get help on a STAF service's request syntax, you can submit a 
HELP request to the STAF service.  For example, to get help on the syntax 
for QUEUE service requests:

C:\>STAF local QUEUE HELP
Response
--------
QUEUE Service Help

QUEUE  MESSAGE <Message>
       [HANDLE <Handle>] | [NAME <Name>] [PRIORITY <Priority>] [TYPE 
<Type>]

GET    [PRIORITY <Priority>]... [MACHINE <Endpoint>]... [NAME <Name>]...
       [HANDLE <Handle>]... [USER <User>]... [TYPE <Type>]...
       [CONTAINS <String>]... [ICONTAINS <String>]...
       [FIRST <Number> | ALL]
       [WAIT [<Number>[s|m|h|d|w]]]

PEEK   [PRIORITY <Priority>]... [MACHINE <Endpoint>]... [NAME <Name>]...
       [HANDLE <Handle>]... [USER <User>]... [TYPE <Type>]...
       [CONTAINS <String>]... [ICONTAINS <String>]...
       [FIRST <Number> | ALL]
       [WAIT [<Number>[s|m|h|d|w]]]

DELETE [PRIORITY <Priority>]... [MACHINE <Endpoint>]... [NAME <Name>]...
       [HANDLE <Handle>]... [USER <User>]... [TYPE <Type>]...
       [CONTAINS <String>]... [ICONTAINS <String>]...

LIST   [HANDLE <Handle>]

HELP

--------------------------------------------------------------
Sharon Lucas
IBM Austin,   luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313




clayton neal <clayton_n...@yahoo.co.uk> 
06/30/2009 04:03 PM

To
Sharon Lucas/Austin/i...@ibmus, Lu Yu <l...@vmware.com>
cc
staf-users@lists.sourceforge.net
Subject
Re: [staf-users] How to share memory between different services






Hiya

Ive a question...
Whats the difference between a command request and a message on the QUEUE 
service?
Are commands requests put on the QUEUE automatically?
Is it up to the service to process its own queue?



From: Sharon Lucas <luc...@us.ibm.com>
To: Lu Yu <l...@vmware.com>
Cc: staf-users@lists.sourceforge.net
Sent: Tuesday, 30 June, 2009 19:45:45
Subject: Re: [staf-users] How to share memory between different services


No, I don't think so.

--------------------------------------------------------------
Sharon Lucas
IBM Austin,   luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313



Lu Yu <l...@vmware.com> 
06/30/2009 01:11 PM 


To
Sharon Lucas/Austin/i...@ibmus 
cc

Subject
RE: [staf-users] How to share memory between different services








That is what I want. Is there any sub service/ parent service that STAF 
framework can provide? 
  
Lu 
  
From: Sharon Lucas [mailto:luc...@us.ibm.com] 
Sent: Tuesday, June 30, 2009 11:03 AM
To: Lu Yu
Subject: RE: [staf-users] How to share memory between different services 
  

No, all STAF service request options are strings and all STAF service 
results are strings (e.g. no Java objects are passed -- though, you can 
create a marshalled data string that can consist of Strings, Lists, and 
Maps). 

Perhaps what you're really asking is a Java question, not a STAF question. 
 How would you pass data from one Java application to another (without 
STAF involved)? 

--------------------------------------------------------------
Sharon Lucas
IBM Austin,   luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313


Lu Yu <l...@vmware.com> 
06/30/2009 12:58 PM 


To
Sharon Lucas/Austin/i...@ibmus 
cc

Subject
RE: [staf-users] How to share memory between different services

  









Sharon 
Connection anchor is just an example, it is a class object in the internal 
API..Never mind. 
So you mean that I can use STAF Queue service to pass any object from one 
service to another service? 
 
Thanks again! 
 
Lu 
 
From: Sharon Lucas [mailto:luc...@us.ibm.com] 
Sent: Tuesday, June 30, 2009 10:45 AM
To: Lu Yu
Cc: staf-users@lists.sourceforge.net
Subject: RE: [staf-users] How to share memory between different services 
 

If you wanted to use STAF to send a message (containing whatever data you 
want from one STAF Java service/application to another), you could use the 
STAF QUEUE service and submit a QUEUE request to the QUEUE service to send 
a message to another STAF handle's queue.  Then that STAF handle can 
submit a GET WAIT request to the QUEUE service on the local machine to get 
messages off its queue.   

I don't know what you mean by "create anchor". 

--------------------------------------------------------------
Sharon Lucas
IBM Austin,   luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313 

Lu Yu <l...@vmware.com> 
06/30/2009 12:35 PM 
  


To
Sharon Lucas/Austin/i...@ibmus 
cc
"staf-users@lists.sourceforge.net" <staf-users@lists.sourceforge.net> 
Subject
RE: [staf-users] How to share memory between different services


  
  









Sharon 
Thanks for your reply. Here is what I want: We have 3 services implemented 
in STAF by Java: VM, Host, Setup. All these services have some common info 
such as connection anchor. But currently, when we use VM service, we have 
to create anchor for VM, using Host service, we need to create another 
anchor for Host. Ideally, these two anchors are same, but since VM and 
Host service are in different memory, we can not re-use VM anchor for Host 
service. We are now thinking of way to build a main (common) service which 
handles all the common information such as anchor across all services. 
When needed for other services, we will load them.  But all the loaded 
services can share the same information in main service. 

Can you please let me know what is the best way to do it 

Thanks 

Lu   
From: Sharon Lucas [mailto:luc...@us.ibm.com] 
Sent: Tuesday, June 30, 2009 8:30 AM
To: Lu Yu
Cc: staf-users@lists.sourceforge.net
Subject: Re: [staf-users] How to share memory between different services 


Are these STAF Java services you have written?  Are you asking how to run 
them in the same JVM?  If so, just make sure when the Java service is 
registered that they are all registered using the same JVMName option 
(which defaults to STAFJVM1 if OPTION JVMNAME=<JVMName> is not specified 
when registering a STAF Java service). 

If this isn't what you're asking, please provide more information on what 
you are trying to do. 

--------------------------------------------------------------
Sharon Lucas
IBM Austin,   luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313 

Lu Yu <l...@vmware.com> 
06/30/2009 02:19 AM 
 
  


To
"staf-users@lists.sourceforge.net" <staf-users@lists.sourceforge.net> 
cc

Subject
[staf-users] How to share memory between different services


  
 
  









Hi 
I am running STAF Framework in VMware. I have a question regarding sharing 
memory between different services. The problem I have is that we have 
maintained 4 different staf services (vmware internally developed 
service). In order to reduce the file size and memory usuage, we want to 
have a main service which has all shared information, when needed loading 
other services, the service loaded later can re-use the shared information 
in the main service. 

Can anyone shed a light on me of how to implement it? 

Thanks! 

Lu
------------------------------------------------------------------------------
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users 

------------------------------------------------------------------------------
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to