REBOL3 tracker
  0.9.12 beta
Ticket #0001827 User: anonymous

Project:



rss
TypeBug Statustested Date16-Jan-2011 19:34
Versionalpha 110 CategoryPorts Submitted byabolka
PlatformAll Severityminor Prioritynormal

Summary Forward and reverse lookups using the DNS scheme don't work
Description Previously, we could use dns:// to make forward and reverse lookups. The DNS scheme implementation currently available in R3 (A110) doesn't seem to provide any useful functionality at all. QUERY doesn't work on DNS ports (see #1826), READ just returns a port! object, and the scheme's AWAKE handler is never called.

As the hostkit side seems mostly implemented, it probably is a matter of the (native) actor implementation.

If this is only a matter of me using dns:// incorrectly, please change this bug to a documentation issue.

One workaround for forward lookups is to use a tcp:// port and QUERY the port's remote-ip.
Example code
>> type? read dns://rebol.com
== port!

>> type? read dns://205.134.252.23 
== port!

Assigned ton/a Fixed inalpha 111 Last Update13-Dec-2012 02:15


Comments
(0003061)
Carl
30-Jan-2011 23:20

By default on Win, the port was both low-level and async. So, READ was starting the DNS lookup, but returned immediately. If followed by a WAIT and a FIRST, the correct value was returned.

However, it is reasonable to assume that READ of an unopened DNS scheme should imply a WAIT and return the result, so that's now being done in A111.

However, I think there are a few problems lurking:
1. A time out period needs to be provided. Right now it is hardcoded to 20 sec.
2. A DNS signal event may be getting queued, but may not be processed properly for this case.
(0003092)
DideC
11-Feb-2011 10:54

Timeout period was globally defined in R2 (system/schemes/default/timeout) and could be set in the port! object.

So for direct (sync) read, we could continue to use a global settings (everybody was fine with this I guess).

If we want to use a specific timeout value for each read, then :
1) we have to go the longest way : set the port! object values then make the read on it.
2) we need a refinment to specify the timeout value (ie: read/timeout or read/wait).

Making 2) is a bit "specific" for network, or we use a kind of "read/options" with a block of options values that will be set in the port object like [timeout: 10]. It could be usefull for other options that could be protocol specific.
(0003130)
abolka
26-Feb-2011 20:39

Contrary to Carl's comment above, this behaviour did not generally change in A111. It was changed on Windows. But at least on Linux (and possibly OSX) we still get:

>> type? read dns://rebol.com
== port!

#1860 tracks this new cross-platform inconsistency.
(0003258)
abolka
13-Dec-2012 02:15

Fixed in the 101.0 (08eb7e84cd) open source release.

Date User Field Action Change
13-Dec-2012 02:15 abolka Status Modified built => tested
13-Dec-2012 02:15 abolka Comment : 0003258 Added -
26-Feb-2011 20:50 abolka Comment : 0003130 Modified -
26-Feb-2011 20:50 abolka Comment : 0003130 Modified -
26-Feb-2011 20:43 abolka Comment : 0003130 Modified -
26-Feb-2011 20:43 abolka Status Modified submitted => built
26-Feb-2011 20:43 abolka Fixedin Modified => alpha 111
26-Feb-2011 20:42 abolka Comment : 0003130 Modified -
26-Feb-2011 20:39 abolka Fixedin Modified alpha 111 => none
26-Feb-2011 20:39 abolka Status Modified built => submitted
26-Feb-2011 20:39 abolka Comment : 0003130 Added -
11-Feb-2011 10:54 DideC Comment : 0003092 Added -
30-Jan-2011 23:20 carl Comment : 0003061 Added -
30-Jan-2011 23:15 carl Status Modified reviewed => built
30-Jan-2011 23:15 carl Fixedin Modified => alpha 111
17-Jan-2011 23:28 BrianH Category Modified Unspecified => Ports
17-Jan-2011 04:15 carl Status Modified submitted => reviewed
16-Jan-2011 19:38 abolka Code Modified -
16-Jan-2011 19:38 abolka Description Modified -
16-Jan-2011 19:34 abolka Ticket Added -