Issues.00274 - lordmundi/wikidoctest GitHub Wiki

00274: allow remote commanding server to generically advertise services

« 00273 | Issues | 00275 »

Summary: allow remote commanding server to generically advertise services

Created: 2010–08–31 18:24

Status: Released

Category: Request

From: frankie

Version: 2.1

Released_In: 2.2

Description:

The discovery mechanism for the RCS discussed in Issue [Issues.00262] allows for the discovery of the RCS itself, but if other services are available (such as a dcomm server, a multicast listener, a web server, etc.) then it would be nice if there was a generic mechanism so that when the RCS announced an instance of EDGE running an RCS it would also disclose all the services available and port numbers. A tcl call so that other plugins and scripts could register their services would be required.


Comments

frankie August 31, 2010, at 06:38 PM: This is done. Plugins or scripts running a server can now call "register_local_service" to register the availability of their service and also share the port number and any other information applicable. The syntax and fields are meant to be the same as the zeroconf service announcements. The syntax is:

register_local_service <service name> <type> <port> { list of txt fields }

where:

service name : simply the name for your service. Can contain spaces if enclosed in quotes, but may make things easier to use no whitespace

service type : the same syntax as DNS SRV records, as used in DNS-SD (ending with "_tcp" or "_udp"). More documentation here

port : the port for the service

list of txt fields : a tcl list with key/value pairs using the " " character to separate them.

For example, the registration in tcl of a web server running inside EDGE might look like:

register_local_service "EDGE_Web_Server" _http._tcp 80 [list protovers 1.0 foo blah ssl no]

inside tcl scripts, the current list of available local services will be stored in the global variable "rcs_stat(local_service_list)"

UPDATE: Now that a dnssd capability is being added in, if it is available, this function will also try to register the service via dnssd.


« 00273 | Issues | 00275 »

Associated Commits

| commit | 3eaf963ad96ed7d4afb44d6fe3b425855c3edb60 [link] | || | Author: | Mark Paterson | | Date: | Thu Mar 10 13:53:09 2011 -0600 | | Message: | [@Issue 00290: Issue 00274: Add service discovery on OSX @] |

Affected Files:

lib_Darwin/libbonjour1.1.so                    | Bin 0 -> 19144 bytes
 lib_Linux_FC3/libbonjour1.1.so                 | Bin 0 -> 13565 bytes
 tcltk_unix/tcl8.5/tcl_bonjour/libbonjour1.1.so | Bin 13565 -> 0 bytes
 tcltk_unix/tcl8.5/tcl_bonjour/pkgIndex.tcl     |   2 &plusmn;
 4 files changed, 1 insertion(+), 1 deletion(-)

| commit | 708693ab524343ec08175c496df26ffa192df0ff [link] | || | Author: | Frank Graffagnino | | Date: | Thu Mar 10 05:07:10 2011 -0600 | | Message: | [@Issue 00290 and 00274: Updated tcl_bonjour to 1.1 @] |

Affected Files:

gui/dnssd.tcl                                    |   2 &plusmn;
 gui/remote_commanding_server.tcl                 |   2 &plusmn;
 tcltk_unix/tcl8.5/tcl_bonjour/Makefile.in        |   2 &plusmn;
 tcltk_unix/tcl8.5/tcl_bonjour/README.textile     |   7 &plusmn;
 tcltk_unix/tcl8.5/tcl_bonjour/configure          | 295 ++++++++++++&plusmn;---------
 tcltk_unix/tcl8.5/tcl_bonjour/configure.in       |   9 &plusmn;
 tcltk_unix/tcl8.5/tcl_bonjour/doc/bonjour.man.in |   5 &plusmn;
 tcltk_unix/tcl8.5/tcl_bonjour/example/client.tcl |   1 +
 tcltk_unix/tcl8.5/tcl_bonjour/example/server.tcl |   3 +
 tcltk_unix/tcl8.5/tcl_bonjour/example/test.tcl   |  26 ++
 tcltk_unix/tcl8.5/tcl_bonjour/generic/register.c |  47 ++&plusmn;
 tcltk_unix/tcl8.5/tcl_bonjour/libbonjour1.0.so   | Bin 14116 -> 0 bytes
 tcltk_unix/tcl8.5/tcl_bonjour/libbonjour1.1.so   | Bin 0 -> 13565 bytes
 tcltk_unix/tcl8.5/tcl_bonjour/pkgIndex.tcl       |   5 +
 14 files changed, 256 insertions(+), 148 deletions(-)

| commit | 16e9a082470e3c90a39a3373ae0ecad65a00f5e9 [link] | || | Author: | Frank Graffagnino | | Date: | Tue Feb 15 11:47:21 2011 -0600 | | Message: | [@Issue 50201, 00322, 00290, 00274: Quite a few updates for RCS and DNSD

  • Updated the tcl udp package with a patch file that allows the reuse of udp

sockets. This allows multiple EDGE instances on the same machine to reuse the same multicast socket. I got the patch file from here: http://sourceforge.net/tracker/?func=detail&atid=543224&aid=1693037&group_id=75201

  • Updated the cev.cfg file to have a "TCL" block where we can place scripts that

do not rely on visual components from Tk (such as the RCS).

  • Updated the run_manager script to basically run the doug executable with the

"-notk" option. This means the run_manager script is almost identical to the other run scripts.

  • Updated the dsp_dnssd Makefile to be more like the simdata makefile after the

build system updates @] |

Affected Files:

cev.cfg                                           |   6 +&plusmn;
 gui/remote_commanding_server.tcl                  |   6 &plusmn;-
 lib_Linux_FC3/libudp1.0.8.so                      | Bin 15810 -> 16296 bytes
 plugin_Linux_FC3/dsp_dnssd.so                     | Bin 37945 -> 34427 bytes
 run_manager                                       |  36 +++++++++&plusmn;----
 src.dist/plugins/dsp_dnssd/Makefile               |  51 ++&plusmn;------------------
 src.dist/plugins/dsp_dnssd/dsp_dnssd.cpp          |   4 &plusmn;
 tcltk_unix/tcl8.5/tcludp-1.0.8/generic/udp_tcl.c  |  11 +++++
 tcltk_win32/tcl8.5/tcludp-1.0.8/generic/udp_tcl.c |  11 +++++
 9 files changed, 64 insertions(+), 61 deletions(-)

| commit | b8f454704382baa50a80022e48be492c336090e9 [link] | || | Author: | Frank Graffagnino | | Date: | Wed Dec 22 18:45:34 2010 -0600 | | Message: | [@Issue 00274: Updated so register_local_service returns dnssd id if available @] |

Affected Files:

gui/remote_commanding_server.tcl | 6 +++&plusmn;-
 1 file changed, 4 insertions(+), 2 deletions(-)

| commit | bf5ecc31274109ca9d1933bb44fc7375311249e3 [link] | || | Author: | Frank Graffagnino | | Date: | Wed Dec 22 18:18:00 2010 -0600 | | Message: | [@Issue 00274: Updated RCS to also advertise via DNSSD If the DNSSD plugin is available, then the RCS will advertise any services passed into the "register_local_service" function via dns service discovery, making them discoverable on the network using industry standards. @] |

Affected Files:

gui/remote_commanding_server.tcl | 14 +++++++++&plusmn;---
 1 file changed, 10 insertions(+), 4 deletions(-)

| commit | 0c0d11a36887686d60b58457a1760f4b1b6bcb1a [link] | || | Author: | Frank Graffagnino | | Date: | Tue Aug 31 18:44:00 2010 -0500 | | Message: | [@Issue 00274: Added local service registration and discovery to RCS Now along with discovery for the RCS, other services that have registered will also be discoverable. @] |

Affected Files:

gui/remote_commanding_server.tcl | 50 +++++++++++++++++++++++++++++++&plusmn;-------
 1 file changed, 41 insertions(+), 9 deletions(-)
⚠️ **GitHub.com Fallback** ⚠️