pcp
[Top] [All Lists]

Re: [pcp] Service Discovery for PCP Clients

To: pcp@xxxxxxxxxxx
Subject: Re: [pcp] Service Discovery for PCP Clients
From: Dave Brolley <brolley@xxxxxxxxxx>
Date: Mon, 09 Dec 2013 15:39:12 -0500
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <528BA2DD.9020408@xxxxxxxxxx>
References: <528BA2DD.9020408@xxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7
Hi All,

I've pushed the rework for this, based on the comments received to the brolley/dev branch in the pcpfans repository

Dave
-----------------------------------------

commit 6e20b3389846f3ab6fdc5600b266f5886622bcfe
Author: Dave Brolley <brolley@xxxxxxxxxx>
Date:   Mon Dec 9 15:12:07 2013 -0500

    Change pmfind/.gitignore to ignore pmfind, not pminfo.

commit b18dfe357333d31ec8f67a4a0619812e2d3ba1da
Author: Dave Brolley <brolley@xxxxxxxxxx>
Date:   Mon Dec 9 15:10:00 2013 -0500

    New client -- pmfind

    Skeletal implementation searches for PMCDs on the local
    network.

commit 10452856f33c9414989b5ca4d2f393c1c730ed97
Author: Dave Brolley <brolley@xxxxxxxxxx>
Date:   Mon Dec 9 15:08:01 2013 -0500

    Discovery for clients rework.

    - __pmDiscoverServices()
      - Renamed to pmDiscoverServices()
      - Moved from impl.h to pmapi.h
      - discovery_domain is now checked for validity.
        - currently accepted values are NULL and "avahi".
      - Now returns a single freeable buffer
        - Managed by __pmStringListAdd and __pmStringListFind
          - new in internal.h, util.c
      - Output parameter now last
      - Stub now returns -EOPNOTSUPP and ignores urls.

    - pmAvahiDiscoverServices()
      - Timeout after 0.5 seconds.
- This is different than a connection timeout. It's actually the length of time that the avahi-client will run before reporting. 0.5 seconds is a reasonable default. This can now be changed by setting AVAHI_DISCOVERY_TIMEOUT in the environment to the desired number of seconds. Fractions of seconds, down to the millisecond level are accepted.
          e.g. AVAHI_DISCOVERY_TIMEOUT=1.175
      - Output parameter now last
- avahi-client callbacks no longer issue messages. Error code is passed back in the
        context object.

    - __pmServiceInfoAlloc(), __pmServiceInfoFree(): removed

    - __pmServiceInfo, __pmAddDiscoveredService():
      - Moved from impl.h to internal.h
      - Now within HAVE_SERVICE_DISCOVERY block

    - __pmServerAdvertisePresence() and __pmServerUnadvertisePresence()
      - Moved to discovery.c from auxserver.c

    - temporary -p option removed from pminfo

<Prev in Thread] Current Thread [Next in Thread>