RFC 1914

How to Interact with a Whois++ Mesh

๐Ÿ“… published February 1996, from ietf

RFC 1914: How to Interact with a Whois++ Mesh ๐ŸŽ€

  • Network Working Group ๐ŸŒท
  • Request for Comments: 1914 ๐Ÿ’–
  • Title: How to Interact with a Whois++ Mesh
  • Authors: P. Faltstrom (Bunyip Information Systems, Inc.), R. Schoultz (KTHNOC), C. Weider (Bunyip Information Systems, Inc.) ๐Ÿ‘ฏโ€โ™€๏ธ
  • Category: Standards Track ๐Ÿ‘‘
  • Date: February 1996 ๐Ÿ“
  • Obsoletes / Updates: the header doesn't list any RFCs as obsoleted or updated ๐Ÿ™ˆ

Status of this Memo ๐Ÿ“œ

Okay so this doc specifies an Internet standards track protocol for the Internet community, and it's asking for discussion and suggestions for improvements ๐Ÿซถ. For the standardization state and status of this protocol, check the current edition of the "Internet Official Protocol Standards" (STD 1) โœจ. Distribution of this memo is unlimited ๐ŸŒˆ.


1. Overview โœจ

In the Whois++ architecture [Deutsch94],[Weider94], mesh traversal is done by the client ๐Ÿ’…, since each server "refers" the client on to the next appropriate server(s) ๐Ÿงš. The protocol is honestly simple: the client opens a connection to a server, sends a query, gets a reply, closes the connection, and after parsing the response, it decides which server to contact next (if needed) ๐Ÿฆ‹.

So the client needs an algorithm to follow whenever it talks to the Whois++ mesh ๐Ÿ”ฅ. That way, referral loops can be detected, cost is minimised, and the right servers get contacted rapidly and effectively ๐Ÿ’œ.

2. Basic functionality ๐ŸŒธ

Each Whois++ client SHOULD be configured to automatically send queries to a specific Whois++ server ๐ŸŽ€. The default server can vary depending on which template you want and where the client sits relative to the WHOIS++ index mesh, but as a rule, the server SHOULD be as local as possible ๐Ÿก.

                        A
                       / \
                      B   C
                     / \   \
           Z -----> D   E   F
                   / \
                  G   H

Fig 1: The client Z is configured to first query server D ๐Ÿ“

After getting responses from a server, the client can act in several ways ๐Ÿค”. If the number of hits is greater than zero, the response is just presented to the user โœจ. If the client gets one or many servers-to-ask answers, the client SHOULD be able to automatically resolve these pointers, i.e. query these servers in turn ๐Ÿ”.

                        A
                       / \
                      B   C
                     / \   \
           Z <----- D   E   F
             \     / \
              --> G   H

Fig 2: The client Z gets a "servers-to-ask G" response from D and therefore MAY automatically query server G ๐Ÿซง.


3. How to navigate in the mesh ๐Ÿ—บ๏ธ

A client can use several different strategies when traversing or navigating around the mesh ๐Ÿงญ. The automatic way is to just "expand the search" (described in 3.1) ๐Ÿ”, and a second method is to use the "Directory of Servers" (described in 3.2) ๐Ÿ“–.

3.1. Expansion of searches ๐Ÿ”

If the number of hits is zero, or if the user in some way wants to expand the search, it is RECOMMENDED for the client to issue a 'polled-by' and 'polled-for' query to the server ๐Ÿ™Œ. The client can then repeat the original query to the new servers indicated ๐Ÿ’ซ.

                        A
                       / \
              /-----> B   C
             /       / \   \
           Z <----- D   E   F
                   / \
                  G   H

Fig 3: The client Z gets a "polled-by B" response from D and therefore queries server B ๐Ÿฆ‹

The client MUST always keep track of which servers it has queried ๐Ÿ“, because it MUST itself detect loops in the mesh by not querying the same server more than once ๐Ÿ”„. No double-dipping, bestie ๐Ÿ™…โ€โ™€๏ธ.

                        A
                       / \
                   /- B   C
                  /  / \   \
           Z <---/  D   E   F
                   / \
                  G   H

Fig 4: The client Z gets a "servers-to-ask D" response from B, but Z does not query D because the server D has already been queried ๐Ÿ™ƒ.

So, the default expansion of a query by a client causes increasingly more comprehensive index servers to be queried ๐ŸŒŠ. The forward knowledge contained in the index server mesh allows rapid pruning of these larger trees ๐ŸŒณ, which is honestly so smart ๐Ÿง โœจ.

All loop detection and elimination is done in the client, rather than in the server mesh ๐Ÿ’โ€โ™€๏ธ. This decision was made because loop detection and elimination are quite difficult to build into the mesh, if we are to continue allowing each server to participate in multiple hierarchies within the mesh ๐Ÿ•ธ๏ธ.

3.1.1. Optimising the mesh ๐Ÿง 

If organization A tends to use organization B's WHOIS++ server frequently (say A is cooperating with B on a project), A MAY wish to make B's server locally available ๐Ÿค. A can do this by creating a local index server which retrieves the centroid for both organizations ๐Ÿ“ฆ. When A's client then expands a query looking for someone at B, the client can resolve the query much more rapidly, since it doesn't have to find the top level servers for the tree that A and B both belong to ๐Ÿš€.

                        A
                       / \
                      B   C
                     / \   \
           Z        D   --> F
                   / \
                  G   H

Fig 5: The server B gets a centroid from server F ๐Ÿซถ

                        A
                       / \
                      B   C
                     / \   \
           Z <----> D   --- F
                   / \
                  G   H

Fig 6: The client queries server D, gets zero hits back, expands the search, and gets a "polled-by B" response back ๐Ÿฅน.

                        A
                       / \
                 /--> B   C
                /    / \   \
           Z <-/    D   --- F
                   / \
                  G   H

Fig 7: The client Z queries server B and gets a "servers-to-ask F" response back ๐Ÿ’Œ.

                        A
                       / \
                      B   C
                     / \   \
                    D   --- F <-----> Z
                   / \
                  G   H

Fig 8: The client Z queries server F and gets the answer ๐ŸŽ‰.

The example in Fig 5-8 shows that the algorithm works even though the Whois++ mesh is not a tree ๐ŸŒฟ. There are many reasons why a given index server mesh might be 'short-circuited' ๐Ÿ˜Œ. For example, in a multinational company, the Swedish branch of Acme Inc. is polled both by the national server in Sweden and by the headquarters server in the USA ๐ŸŒ. Querying the Swedish server finds all persons working at the Swedish branch of Acme Inc. ๐Ÿ‡ธ๐Ÿ‡ช. But querying the Acme Inc. server in the USA finds all employees in the company, including those in Sweden ๐Ÿ’ผ.

Note that the location of a server does not implicitly narrow the search ๐Ÿ“. In other words, you have to specify all information when sending a query to a server ๐Ÿงพ. In the example above, if you just query a server for companies in the USA, you won't implicitly only get hits from records in the states, because the Acme Inc. server in the states has polled a server in Sweden ๐Ÿ™ˆ. So in this case, you have to explicitly include country=USA in the query if you are only interested in those records ๐Ÿ‡บ๐Ÿ‡ธโœจ.

Blindly expanding the query can incur an exponentially growing cost in resources ๐Ÿ’ธ. Charging for responses is implemented in parts of the WHOIS++ index service mesh, so growing cost is a real thing, and automatic expansion is NOT RECOMMENDED ๐Ÿšซ. The WHOIS++ index service is designed to make searches at any location in the index mesh quite effective and efficient, but still ๐Ÿ˜ฌ.

More sophisticated clients SHOULD also be configurable to "cut off" some servers from a search, meaning a blacklist of servers ๐Ÿ›‘. This might be needed when searching for records, and one server might have a very high cost (in dollars), so you might want to explicitly forbid the client from sending queries to that server ๐Ÿ’…๐Ÿ’ฐ.

3.1.2. The algorithm used by the client ๐Ÿงฎ

By following this algorithm, a client finds all records in a mesh that the first Whois++ server queried belongs to ๐ŸŽฏ.

The algorithm for the client follows ๐Ÿ‘‡:

      Query := data to search for;
      QueriedServers := {};
      AnswerList := {};
      OriginalServers := { known servers to this client };
      while OriginalServers is not empty do:
            ServerList = OriginalServers;
            while ServerList is not empty do:
                  Server := ServerList[1];
                  if Server is not in QueriedServers then do:
                        send Query to Server;
                        Answer := answer from Server;
                        append ServersToAsk to ServerList;
                        remove Server from ServerList;
                        append Answers to AnswerList;
                  end;
            done;
            if query should be expanded then do:

                  ServerList := OriginalServers;
                  OriginalServers := {};
                  while ServerList is not empty do:
                        Server := ServerList[1];
                        send Polled-For-Query to Server;
                        Answer := answer from Server;
                        append Answer to OriginalServers;
                        remove Server from ServerList;
                  end;
            done;
      done;
      display AnswerList to user;

3.2.3. Example ๐ŸŒธ

okay so here's a full example of how talking to the Directory of Servers actually goes ๐Ÿ‘€ the < and > tell you who's talking: < is the client (that's you, bestie ๐Ÿ’–) and > is the responding server answering back.

> % 220-This is services.bunyip.com running Bunyip-Whois++: DIGGER 1.0.5
> % 220 Ready to go!
< template=serverhandle and bunyip
> % 200 Search is executing
> # FULL SERVERHANDLE BUNYIPCOM01 BUNYIPCOM01
>  SERVER-HANDLE: BUNYIPCOM01
>  HOST-NAME: services.bunyip.com
>  HOST-PORT: 63
>  ADMIN-NAME: Patrik Faltstrom
>  ADMIN-EMAIL: paf@bunyip.com
>  ORGANIZATION-NAME: Bunyip Information Systems Inc.
>  DESCRIPTION: USER information
>  DESCRIPTION: Directory of Servers
>  DESCRIPTION: Toplevel Index server in the world
>  MENU-ITEM: World (Bunyip Information Systems inc)
>  CITY: Montreal
>  COUNTRY: Canada
> # END
>
> # FULL SERVERHANDLE BUNYIPCOM01 BUNYIPCOM02
>  SERVER-HANDLE: BUNYIPCOM02
>  HOST-NAME: services.bunyip.com
>  HOST-PORT: 7778
>  ADMIN-NAME: Patrik Faltstrom
>  ADMIN-EMAIL: paf@bunyip.com
>  ORGANIZATION-NAME: Bunyip Information Systems Inc.
>  DESCRIPTION: USER information
>  MENU-ITEM: Bunyip Information Systems
>  CITY: Montreal
>  COUNTRY: Canada
> # END
>
> % 226 Transaction complete
> % 203 Bye, bye

4. Caching ๐Ÿ’พ

A client can cache all information it gets from a server for some time. For example records, IP-addresses of Whois++ servers, the Directory of Services server etc. โœจ

A client can itself choose for how long it should cache the information. you're the boss of your own cache, bestie ๐Ÿ‘‘

The IP-address of the Directory of Services server might not change for a day or two, and neither might any other information.

4.1. Caching a Whois++ servers hostname

An example of cached information that might change is the hostname, IP-address and portnumber which a client gets back in a servers-to-ask response. That information is cached in the server since the last poll, which might have occurred several weeks ago ๐Ÿ˜ญ So when such a connection fails, the client should fall back to using the serverhandle instead. That means it contacts the Directory of Services server and queries for a server with that serverhandle. Doing this way, the client should always get the last known hostname. it's giving backup plan, and it's iconic ๐Ÿฆ‹

An algorithm for this might be:

  response := servers-to-ask response from server A
  IP-address := find ip-address for response.hostname in DNS
  connect to ip-address at port response.portnumber
  if connection fails {
     connect to Directory of Services server
     query for host with serverhandle response.serverhandle
     response := response from Directory of Services server
     IP-address := find ip-address for response.hostname in DNS
     connect to ip-address at port response.portnumber
     if connection fails {
         exit with error message
     }
   }
   Query this new server

5. Security Considerations ๐Ÿ”

Security considerations when using the Whois++ protocol are described in [Deutsch94]. this part is serious, bestie, so read it twice ๐Ÿ’€

A client should be able to have a "blacklist" of servers it should not query, because it might happen that fake Whois++ servers get put up on the net. When such a fake Whois++ server is found, a user should be able to configure its client to never query this server. no fake servers allowed in the main character's feed ๐Ÿšซ

Note that a client should be careful when expanding a query by either using normal expansion or using the directory of servers. A query might take a long time, so a user should be able to quit in the middle of such a transaction. This is though more a question of user interaction than a plain security issue. ngl that's still a vibe check for the UI team ๐Ÿ™ˆ

6. References ๐Ÿ“š

  • [Deutsch94] Deutsch P., Schoultz R., Faltstrom P., and C. Weider, "Architecture of the Whois++ service", RFC 1835, August 1995.
  • [Weider94] Weider C., Fullton J., and S. Spero, "Architecture of the WHOIS++ Index Service", RFC 1913, February 1996.

7. Authors' Addresses ๐Ÿฆ‹

   Patrik Faltstrom
   BUNYIP INFORMATION SYSTEMS, inc
   310 St Catherine St West, Suite 300
   Montreal, Quebec
   CANADA H2X 2A1

   EMail: paf@bunyip.com


   Rickard Schoultz
   KTHNOC, SUNET/NORDUnet/Ebone Operations Centre
   S-100 44  STOCKHOLM
   SWEDEN

   EMail: schoultz@sunet.se


   Chris Weider
   BUNYIP INFORMATION SYSTEMS, inc
   310 St Catherine St West, Suite 300
   Montreal, Quebec
   CANADA H2X 2A1

   EMail: clw@bunyip.com

and that's the whole thing, bestie ๐ŸŒˆ๐Ÿ’…โœจ

๐Ÿ“ฆ where this page comes from