Resource Manager Doubt!!

Dear Friends,
I have a small query regarding Resource Manager. I know I am a
newbie, and that why my question might sound stupid to many, but any
feedback will be helpful to me. I want to communicate between two resource
managers, in my case I have a standard network resource manager, and one I
am going to write; which will be a pseudo-modbus resource manager. I want to
know can I use socket between these two resource manager, because as far as
I know to access the network resource manager I have to open a socket. I am
not sure about it. More over I am in doubt whether it can be possible,
because sockets are the user level interface (but resource manager is also
‘user level’ process).
Kindly let me know if it is possible, comments and suggestions are
heartily welcome.

With Regards
Rahul Chowdhury

Rahul <rchowdhury@nordson.com> wrote:
R > Dear Friends,
R > I have a small query regarding Resource Manager. I know I am a
R > newbie, and that why my question might sound stupid to many, but any
R > feedback will be helpful to me. I want to communicate between two resource
R > managers, in my case I have a standard network resource manager, and one I
R > am going to write; which will be a pseudo-modbus resource manager. I want to
R > know can I use socket between these two resource manager, because as far as
R > I know to access the network resource manager I have to open a socket. I am
R > not sure about it. More over I am in doubt whether it can be possible,
R > because sockets are the user level interface (but resource manager is also
R > ‘user level’ process).
R > Kindly let me know if it is possible, comments and suggestions are
R > heartily welcome.

R > With Regards
R > Rahul Chowdhury

Yes, resourse managers can talk to resource managers. The catch is
make sure one is at a higher level than the other. I.E. A can send to
B but B will never send to A. B can only reply to A. Otherwise you
have a potential for a deadly embrace where A is waiting on B and B is
waiting on A.

BTW, why do you want to use sockets instead of native QNET networking?


Bill Caroselli – Q-TPS Consulting
1-(708) 308-4956 <== Note: New Number
qtps@earthlink.net

Mario Charest postmaster@127.0.0.1 wrote:

MC > “Bill Caroselli” <qtps@earthlink.net> wrote in message

Yes, resourse managers can talk to resource managers. The catch is
make sure one is at a higher level than the other. I.E. A can send to
B but B will never send to A. B can only reply to A. Otherwise you
have a potential for a deadly embrace where A is waiting on B and B is
waiting on A.

MC > Which you can avoid if resource managers are using threads.

True.

“Bill Caroselli” <qtps@earthlink.net> wrote in message
news:bs6trl$5k9$1@inn.qnx.com

Rahul <> rchowdhury@nordson.com> > wrote:
R > Dear Friends,
R > I have a small query regarding Resource Manager. I know I am a
R > newbie, and that why my question might sound stupid to many, but any
R > feedback will be helpful to me. I want to communicate between two
resource
R > managers, in my case I have a standard network resource manager, and
one I
R > am going to write; which will be a pseudo-modbus resource manager. I
want to
R > know can I use socket between these two resource manager, because as
far as
R > I know to access the network resource manager I have to open a socket.
I am
R > not sure about it. More over I am in doubt whether it can be possible,
R > because sockets are the user level interface (but resource manager is
also
R > ‘user level’ process).
R > Kindly let me know if it is possible, comments and suggestions
are
R > heartily welcome.

R > With Regards
R > Rahul Chowdhury

Yes, resourse managers can talk to resource managers. The catch is
make sure one is at a higher level than the other. I.E. A can send to
B but B will never send to A. B can only reply to A. Otherwise you
have a potential for a deadly embrace where A is waiting on B and B is
waiting on A.

Which you can avoid if resource managers are using threads.

BTW, why do you want to use sockets instead of native QNET networking?


Bill Caroselli – Q-TPS Consulting
1-(708) 308-4956 <== Note: New Number
qtps@earthlink.net

“Bill Caroselli” <qtps@earthlink.net> wrote in message
news:bs6trl$5k9$1@inn.qnx.com

Rahul <> rchowdhury@nordson.com> > wrote:
R > Dear Friends,
R > I have a small query regarding Resource Manager. I know I am a
R > newbie, and that why my question might sound stupid to many, but any
R > feedback will be helpful to me. I want to communicate between two
resource
R > managers, in my case I have a standard network resource manager, and
one I
R > am going to write; which will be a pseudo-modbus resource manager. I
want to
R > know can I use socket between these two resource manager, because as
far as
R > I know to access the network resource manager I have to open a socket.
I am
R > not sure about it. More over I am in doubt whether it can be possible,
R > because sockets are the user level interface (but resource manager is
also
R > ‘user level’ process).
R > Kindly let me know if it is possible, comments and suggestions
are
R > heartily welcome.

R > With Regards
R > Rahul Chowdhury

Yes, resourse managers can talk to resource managers. The catch is
make sure one is at a higher level than the other. I.E. A can send to
B but B will never send to A. B can only reply to A. Otherwise you
have a potential for a deadly embrace where A is waiting on B and B is
waiting on A.

BTW, why do you want to use sockets instead of native QNET networking?


Bill Caroselli – Q-TPS Consulting
1-(708) 308-4956 <== Note: New Number
qtps@earthlink.net

Thanks for the feedback. Sockets were just an option, I have not worked with
QNET networking, so didn’t thought about it. But thanks for the pointer… I
will look into it.

Merry Christmas and Happy New Year to All.
Let the Grace of our Lord be with you now and forever…

Rahul

Rahul <rchowdhury@nordson.com> wrote:

Dear Friends,
I have a small query regarding Resource Manager. I know I am a
newbie, and that why my question might sound stupid to many, but any
feedback will be helpful to me. I want to communicate between two resource
managers, in my case I have a standard network resource manager, and one I
am going to write; which will be a pseudo-modbus resource manager. I want to
know can I use socket between these two resource manager, because as far as
I know to access the network resource manager I have to open a socket. I am
not sure about it. More over I am in doubt whether it can be possible,
because sockets are the user level interface (but resource manager is also
‘user level’ process).

If using sockets, you would probably want to make sure you are using
the dispatch_block() and dispatch_handler() functions for your main
loop, and look at using select_attach() to handle the sockets.

But, you may actually find it more useful to use MsgSend(), dispatch_block(),
and MsgReply() between the resource managers, along with either
message_attach() or the use of an io_msg callback in the dispatch_block()
resource manager. Especially if the two resource managers are local
(same node), QNX messaging will be more efficient.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.