Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - name_open("myname",NAME_ATTACH_FLAG_GLOBAL) q: (2 Items)
   
name_open("myname",NAME_ATTACH_FLAG_GLOBAL) q  
QNX6.32 

Suppose a qnet network of n boxes.

On all of this single boxes a services is installed attaching 
"myname" under /dev/name/global/ .

This myname-server runs on this n number of qnet connected boxes.

Now a client comes and does:
name_open("myname",NAME_ATTACH_FLAG_GLOBAL) ;
 
Which server of this n servers will handel this request ?

Any, only the first or  no one ?

THX,
Jeevan
Re: name_open("myname",NAME_ATTACH_FLAG_GLOBAL) q  
> QNX6.32 
> 
> Suppose a qnet network of n boxes.
> 
> On all of this single boxes a services is installed attaching 
> "myname" under /dev/name/global/ .
> 
> This myname-server runs on this n number of qnet connected boxes.
> 
> Now a client comes and does:
> name_open("myname",NAME_ATTACH_FLAG_GLOBAL) ;
>  
> Which server of this n servers will handel this request ?
> 
> Any, only the first or  no one ?
> 
> THX,
> Jeevan


Ok the gns docs make this clear,

http://www.qnx.com/developers/docs/6.3.2/neutrino/utilities/g/gns.html
:

Connection rules for GNS
Applications that wish to connect to a global name service can use the name_open() API. If the same service is 
registered by multiple hosts, the rules that determine which specific instance of the service you connect to are: 

If a service provider exists in the same machine as the application that requested the service, the gns manager tries to
 connect to the local service provider first. If the connection succeeds, the application communicates with its service 
provider locally, to gain better performance. 
If there's no local service provider, or, for some reason, the local service provider refuses to provide the service, 
the gns manager tries to connect to other providers. If there are multiple remote service providers, the order of trying
 them (i.e. who gets the connection first) isn't defined. 

Jeevan