Re: Rendezvous/Bonjour broken in 8.1 beta

Lists: pgsql-hackers
From: <pmagnoli(at)systemevolution(dot)it>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Rendezvous/Bonjour broken in 8.1 beta
Date: 2005-09-08 13:12:28
Message-ID: imi20s.p5sh0i@mail.systemevolution.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi Andrew, you wrote:

> I don't recall ever hearing that this has been done.

bonjour is the new name of Apple's rendezvous technology, an old email
(http://archives.postgresql.org/pgsql-hackers/2005-05/msg00739.php) stated
that rendezvous support was working at least on macosx and windows, so I
tried.

>We should not be renaming other people's files - if necessary we >should
>adjust our configure tests and #include directives. But I guess you >did
>that just to make some progress.

Yes, also keep in mind that I'm a programming illiterate and I was doing some
"do it yourself" tests

>What's on lines 52 .. 55 of that file?

Lines 51 and 52 are:
#ifndef _MSL_STDINT_H
typedef UINT8 uint8_t;

Thanks and best regards

paolo


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pmagnoli(at)systemevolution(dot)it
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Rendezvous/Bonjour broken in 8.1 beta
Date: 2005-09-08 17:08:56
Message-ID: 10605.1126199336@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

<pmagnoli(at)systemevolution(dot)it> writes:
>> I don't recall ever hearing that this has been done.

> bonjour is the new name of Apple's rendezvous technology, an old email
> (http://archives.postgresql.org/pgsql-hackers/2005-05/msg00739.php) stated
> that rendezvous support was working at least on macosx and windows, so I
> tried.

I'm not sure I believe that old message. Certainly we've never had code
to accommodate different names for the rendezvous/bonjour header files.

One possibility is that bonjour-for-windows *does* have the original
file name (DNSServiceDiscovery.h) if you install it on a filesystem
supporting long names, but you dropped it on an 8+3 filesystem instead?

regards, tom lane


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pmagnoli(at)systemevolution(dot)it, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Rendezvous/Bonjour broken in 8.1 beta
Date: 2005-09-08 19:37:19
Message-ID: 432092EF.8070209@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Tom Lane wrote:

><pmagnoli(at)systemevolution(dot)it> writes:
>
>
>>>I don't recall ever hearing that this has been done.
>>>
>>>
>
>
>
>>bonjour is the new name of Apple's rendezvous technology, an old email
>>(http://archives.postgresql.org/pgsql-hackers/2005-05/msg00739.php) stated
>>that rendezvous support was working at least on macosx and windows, so I
>>tried.
>>
>>
>
>I'm not sure I believe that old message. Certainly we've never had code
>to accommodate different names for the rendezvous/bonjour header files.
>
>One possibility is that bonjour-for-windows *does* have the original
>file name (DNSServiceDiscovery.h) if you install it on a filesystem
>supporting long names, but you dropped it on an 8+3 filesystem instead?
>
>
>
>

No, that is indeed the name from the Bonjour Windows SDK. *sigh*

cheers

andrew


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pmagnoli(at)systemevolution(dot)it, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Rendezvous/Bonjour broken in 8.1 beta
Date: 2005-09-08 20:38:50
Message-ID: 25560.1126211930@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> Tom Lane wrote:
>> One possibility is that bonjour-for-windows *does* have the original
>> file name (DNSServiceDiscovery.h) if you install it on a filesystem
>> supporting long names, but you dropped it on an 8+3 filesystem instead?

> No, that is indeed the name from the Bonjour Windows SDK. *sigh*

Grumble. Are you going to send in a patch? I can test that the OS X
side still works, but I can't test Windows.

regards, tom lane


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pmagnoli(at)systemevolution(dot)it, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Rendezvous/Bonjour broken in 8.1 beta
Date: 2005-09-08 23:46:08
Message-ID: 4320CD40.2060805@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Andrew Dunstan wrote:

> Tom Lane wrote:
>
>>
>> Grumble. Are you going to send in a patch? I can test that the OS X
>> side still works, but I can't test Windows.
>>
>
> I can make a patch and see that it configures and compiles. But I
> can't test it.
>
> I guess that will be an advance, though.
>
>

It gets a lot worse. The Windows SDK does not export the same API. None
of the DNSfoo things we refer to in postmaster.c are defined in the
supplied header file (not to mention other idiocies I was able to
negotiate past). Apparently Apple have never heard of code portability.

I have no idea what I'm looking for in here, so I don't intend to take
anything further - someone who actually cares about this might like to
try ;-)

Below are shown diffs to configure.in and postmaster.c that I made to
get as far as I did.

cheers

andrew

Index: configure.in
===================================================================
RCS file: /cvsroot/pgsql/configure.in,v
retrieving revision 1.425
diff -c -r1.425 configure.in
*** configure.in 25 Aug 2005 02:28:03 -0000 1.425
--- configure.in 8 Sep 2005 23:43:14 -0000
***************
*** 755,761 ****
fi

if test "$with_bonjour" = yes ; then
! AC_CHECK_HEADER(DNSServiceDiscovery/DNSServiceDiscovery.h, [],
[AC_MSG_ERROR([header file <DNSServiceDiscovery/DNSServiceDiscovery.h>
is required for Bonjour])])
fi


--- 755,765 ----
fi

if test "$with_bonjour" = yes ; then
! if test "$PORTNAME" = "win32"; then
! AC_CHECK_HEADER(dns_sd.h, [], [AC_MSG_ERROR([header file
<dns_sd.h> is required for Bonjour])])
! else
!
AC_CHECK_HEADER(DNSServiceDiscovery/DNSServiceDiscovery.h, [],
[AC_MSG_ERROR([header file <DNSServiceDiscovery/DNSServiceDiscovery.h>
is required for Bonjour])])
! fi
fi

Index: src/backend/postmaster/postmaster.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/backend/postmaster/postmaster.c,v
retrieving revision 1.467
diff -c -r1.467 postmaster.c
*** src/backend/postmaster/postmaster.c 20 Aug 2005 23:26:17 -0000
1.467
--- src/backend/postmaster/postmaster.c 8 Sep 2005 23:39:50 -0000
***************
*** 89,96 ****
--- 89,104 ----
#endif

#ifdef USE_BONJOUR
+ #ifdef WIN32
+ #include <stdint.h>
+ #define _MSL_STDINT_H
+ #include <dns_sd.h>
+ #undef _MSL_STDINT_H
+ typedef int DNSServiceRegistrationReplyErrorType;
+ #else
#include <DNSServiceDiscovery/DNSServiceDiscovery.h>
#endif
+ #endif

#include "access/xlog.h"
#include "bootstrap/bootstrap.h"


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pmagnoli(at)systemevolution(dot)it, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Rendezvous/Bonjour broken in 8.1 beta
Date: 2005-09-08 23:57:22
Message-ID: 26849.1126223842@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> It gets a lot worse. The Windows SDK does not export the same API. None
> of the DNSfoo things we refer to in postmaster.c are defined in the
> supplied header file (not to mention other idiocies I was able to
> negotiate past). Apparently Apple have never heard of code portability.

Great :-(. Well, until there's actually some value in supporting
bonjour on non-Apple platforms, let's just leave the code as it is.
I can't see plastering the code with a ton of #ifdefs to support
something that no Windows users will care about.

regards, tom lane


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pmagnoli(at)systemevolution(dot)it, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Rendezvous/Bonjour broken in 8.1 beta
Date: 2005-09-09 00:07:50
Message-ID: 4320D256.8000804@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Tom Lane wrote:

>Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>
>
>>It gets a lot worse. The Windows SDK does not export the same API. None
>>of the DNSfoo things we refer to in postmaster.c are defined in the
>>supplied header file (not to mention other idiocies I was able to
>>negotiate past). Apparently Apple have never heard of code portability.
>>
>>
>
>Great :-(. Well, until there's actually some value in supporting
>bonjour on non-Apple platforms, let's just leave the code as it is.
>I can't see plastering the code with a ton of #ifdefs to support
>something that no Windows users will care about.
>
>
>
>

Agreed.

cheers

andrew


From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pmagnoli(at)systemevolution(dot)it, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Rendezvous/Bonjour broken in 8.1 beta
Date: 2005-09-09 00:18:05
Message-ID: 4320D4BD.7000806@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


>>
>> Great :-(. Well, until there's actually some value in supporting
>> bonjour on non-Apple platforms, let's just leave the code as it is.
>> I can't see plastering the code with a ton of #ifdefs to support
>> something that no Windows users will care about.
>>
Lets at least document the fact that it is borked on everything but
apple....
maybe even a note in the postgresql.conf file?

>>
>>
>>
>
> Agreed.
>
> cheers
>
> andrew
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster

--
Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240
PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, pmagnoli(at)systemevolution(dot)it, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Rendezvous/Bonjour broken in 8.1 beta
Date: 2005-09-09 00:22:21
Message-ID: 27056.1126225341@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

"Joshua D. Drake" <jd(at)commandprompt(dot)com> writes:
> Lets at least document the fact that it is borked on everything but
> apple....

"borked on windows" is not necessarily the same thing as "borked on
everything but apple".

BTW, wasn't it you that sent in that old note that said it did work
on windows? What did you test exactly?

regards, tom lane


From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, pmagnoli(at)systemevolution(dot)it, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Rendezvous/Bonjour broken in 8.1 beta
Date: 2005-09-09 00:26:20
Message-ID: 4320D6AC.8000506@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


>"borked on windows" is not necessarily the same thing as "borked on
>everything but apple".
>
>BTW, wasn't it you that sent in that old note that said it did work
>on windows? What did you test exactly?
>
>
Not I. The only thing I have ever noted with Rendezvous/Bonjour
was the whole trademark issue with the name.

Sincerely,

Joshua D. Drake

> regards, tom lane
>
>

--
Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240
PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/


From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pmagnoli(at)systemevolution(dot)it, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Rendezvous/Bonjour broken in 8.1 beta
Date: 2005-09-09 00:49:15
Message-ID: 4320DC0B.9090609@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


>>
> Not I. The only thing I have ever noted with Rendezvous/Bonjour
> was the whole trademark issue with the name.
>
> Sincerely,
>
> Joshua D. Drake

I retract the above statement. As Andrew kindly pointed it out I did mention
that it works on Windows. Unfortunately I was taking that from
literature not
in practice knowledge.

I apologize. I should know better.

Sincerely,

Joshua D. Drake

>
>
>
>> regards, tom lane
>>
>>
>
>

--
Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240
PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/


From: "Paolo Magnoli" <pmagnoli(at)systemevolution(dot)it>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: "Andrew Dunstan" <andrew(at)dunslane(dot)net>, <pgsql-hackers(at)postgresql(dot)org>
Subject: R: Rendezvous/Bonjour broken in 8.1 beta
Date: 2005-09-09 07:17:32
Message-ID: ILEALHCEJHFMKFCLMCFGOEDKCAAA.pmagnoli@systemevolution.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi, wouldn't it be better to implement rendezvous with a
free/open/cross-platform implementation like Howl
(http://www.porchdogsoft.com/products/howl/) which should help avoiding
apple's "tricks"?
Best regards

paolo

-----Messaggio originale-----
Da: pgsql-hackers-owner(at)postgresql(dot)org
[mailto:pgsql-hackers-owner(at)postgresql(dot)org]Per conto di Tom Lane
Inviato: venerdì 9 settembre 2005 2.22
A: Joshua D. Drake
Cc: Andrew Dunstan; pmagnoli(at)systemevolution(dot)it;
pgsql-hackers(at)postgresql(dot)org
Oggetto: Re: [HACKERS] Rendezvous/Bonjour broken in 8.1 beta

"Joshua D. Drake" <jd(at)commandprompt(dot)com> writes:
> Lets at least document the fact that it is borked on everything but
> apple....

"borked on windows" is not necessarily the same thing as "borked on
everything but apple".

BTW, wasn't it you that sent in that old note that said it did work
on windows? What did you test exactly?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Paolo Magnoli" <pmagnoli(at)systemevolution(dot)it>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, "Andrew Dunstan" <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: R: Rendezvous/Bonjour broken in 8.1 beta
Date: 2005-09-09 13:46:52
Message-ID: 10103.1126273612@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

"Paolo Magnoli" <pmagnoli(at)systemevolution(dot)it> writes:
> Hi, wouldn't it be better to implement rendezvous with a
> free/open/cross-platform implementation like Howl
> (http://www.porchdogsoft.com/products/howl/) which should help avoiding
> apple's "tricks"?

Why bother? AFAIK, no one cares at all about bonjour unless they are
running OS X --- and if they are on OS X, switching to howl would just
mean there's an additional bit of software they have to get.

If this were central to Postgres' purpose, we might feel like doing
extra work on it; but it's so peripheral that we've already wasted
more time on it than it's worth. IMHO anyway.

regards, tom lane


From: AgentM <agentm(at)themactionfaction(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: R: Rendezvous/Bonjour broken in 8.1 beta
Date: 2005-09-09 15:47:10
Message-ID: B0376DA6-45D5-4047-9AFD-E50F886E81B3@themactionfaction.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Just to counter this statement- I am using postgresql mDNSReponder
discovery on Linux.

In my case, I have several "satellite" machines that need to send
events to the database. Zeroconf makes the discovery trivial and I
don't have to worry about network settings.

I would like to see postgresql support this feature natively so that
I could just add a line to postgresql.conf and have it work. I am
currently using howl to do this- howl wraps the Apple libs in Darwin
and hooks into the standard mDNSResponder on other OSs.

Since obviously no one else is working on this, I can work on a patch.

On Sep 9, 2005, at 8:46 AM, Tom Lane wrote:

> "Paolo Magnoli" <pmagnoli(at)systemevolution(dot)it> writes:
>
>> Hi, wouldn't it be better to implement rendezvous with a
>> free/open/cross-platform implementation like Howl
>> (http://www.porchdogsoft.com/products/howl/) which should help
>> avoiding
>> apple's "tricks"?
>>
>
> Why bother? AFAIK, no one cares at all about bonjour unless they are
> running OS X --- and if they are on OS X, switching to howl would just
> mean there's an additional bit of software they have to get.
>
> If this were central to Postgres' purpose, we might feel like doing
> extra work on it; but it's so peripheral that we've already wasted
> more time on it than it's worth. IMHO anyway.
>
> regards, tom lane

|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-
AgentM
agentm(at)themactionfaction(dot)com
|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-


From: Sandy McArthur <sandymac(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Rendezvous/Bonjour broken in 8.1 beta
Date: 2005-09-11 06:51:28
Message-ID: 6bde122b050910235123e9f693@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

FYI: The DNSServiceDiscovery.h is Mac OS X specific and only kept
around for Mac OS X 10.2 and older compatiability. Apple has moved to
a cross platform impelentation with the dns_sd.h API available for OS
X, Win32, and most any posix type system.

Any reference to DNSServiceDiscovery.h in pgsql should go away (unless
you want to keep support for pre-10.3 Mac OS X) and be replaced with
the newer dns_sd.h interfaces.

On 9/8/05, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
> It gets a lot worse. The Windows SDK does not export the same API. None
> of the DNSfoo things we refer to in postmaster.c are defined in the
> supplied header file (not to mention other idiocies I was able to
> negotiate past). Apparently Apple have never heard of code portability.

--
Sandy McArthur


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Sandy(at)McArthur(dot)org
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Rendezvous/Bonjour broken in 8.1 beta
Date: 2005-09-16 17:37:10
Message-ID: 200509161737.j8GHbAM28741@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


Added to TODO:

* Update Bonjour to work with newer cross-platform SDK

---------------------------------------------------------------------------

Sandy McArthur wrote:
> FYI: The DNSServiceDiscovery.h is Mac OS X specific and only kept
> around for Mac OS X 10.2 and older compatiability. Apple has moved to
> a cross platform impelentation with the dns_sd.h API available for OS
> X, Win32, and most any posix type system.
>
> Any reference to DNSServiceDiscovery.h in pgsql should go away (unless
> you want to keep support for pre-10.3 Mac OS X) and be replaced with
> the newer dns_sd.h interfaces.
>
> On 9/8/05, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
> > It gets a lot worse. The Windows SDK does not export the same API. None
> > of the DNSfoo things we refer to in postmaster.c are defined in the
> > supplied header file (not to mention other idiocies I was able to
> > negotiate past). Apparently Apple have never heard of code portability.
>
> --
> Sandy McArthur
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073