[bind10-dev] Plan to change Auth serve code

JINMEI Tatuya / 神明達哉 jinmei at isc.org
Wed Mar 17 00:11:29 UTC 2010


Hi, Likun,

At Tue, 16 Mar 2010 13:15:51 +0800,
"zhanglikun" <zlkzhy at gmail.com> wrote:

> I plan to change the function TCPClient::requestRead to support XFR query in
> TCP, there are two solutions:

For year1 deliverable, I think any workable approach is okay.  The
current design is very tentative, and I'm sure we'll substantially
revisit the class/API design in year2 anyway.  So, please go ahead
with whatever works best for you.

BTW, I have a question about the sample code you attached in a
separate message:

            if (messageIsXfrQuery) 
            { 
                std::string path = "/tmp/auth_xfrout_conn"; 
                XfroutClient xfr_client(path); 
                xfr_client.connect(); 
                xfr_client.sendXfroutRequestInfo(socket_.native(), (uint8_t *)data_, bytes_transferred); 
                xfr_client.disconnect();
                delete this; 
            } 

What happens when we create XfroutClient, and do
sendXfroutRequestInfo()?  Fork a process with a UNIX domain(?) socket,
and pass the (value of) file descriptor and xfr request data via the
UNIX domain socket?  Did it work if we 'delete this'?  What if any of
the XfroutClient operations throws an exception?  Also, what if
connect() or sendXfroutRequestInfo() blocks?

I guess these questions are common regardless of which solution you
adopt.

---
JINMEI, Tatuya
Internet Systems Consortium, Inc.

> 
> Solution 1: When get one message ,check if it’s XFR query(check the
> query-id bits in message), then send the tcp socket and query message to
> Xfrout process.
> 
> Solution 2: change the return value of AuthSrv::processMessage(). 
> 
> See the code in the attachment.
> 
> If doing as solution1, it’s simple but seems the efficiency is slow, since
> every query message should be checked. If doing like solution 2, anywhere
> AuthSrv::processMessage() is called should be changed.
> 
> Can you give some better suggestion?


More information about the bind10-dev mailing list