OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

bdxr message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Metadata service URL discovery: browser, node, and javascript implementation.


Hi BDXR-ers

I will eventually post a compressed tar file to the BDXR document storage that should be extracted/ decompressed into a directory. The BDXR-NAPTR should then be the working directory for the project.

The compressed tarred directory is attached but may not make it through email sanitation processing.

 The project has been developed on a desktop,  ubuntu 12.5 linux os, and has been tested against the google-chrome and mozilla firefox browers, only recent versions as some html5 features are used.

Background installations.

>sudo apt-get install nodejs
>sudo apt-get install npm

npm https://npmjs.org/ is the install tool for nodejs http://nodejs.org/

Then the commands,

> npm install native-dns
> npm install express
> npm install util
> npm install url
> npm install events

will install the modules/libraries into a subdirectory called node_modules.

You should now be able to start the nodejs and start the AjaxDns server-side functionality.

> nodejs
> .load callbackAjaxDNSCoord.js
[much load chatter]

This version listens for connections on localhost:3003 and integrates Ajax transactions with DNS query services (specialized to NAPTR queries).

Start firefox or chrome and type localhost:3003 into the address bar.

Your browser then should show a web page with just an input field, and the cursor focus should be inside that input. If you click on the field a few values for testing should be visible and can be selected. Entering return should then start the actual query for DNS NAPTR information. For the first two items, you should be able to retrieve the information. The nameserver to query is configured in the node _javascript_ file at the top by saying var localhost = '127.0.1.1';  Check your /etc/resolv.conf and see if that value is present. If not you will need to restart the node server and reload an edited script with the value of a nameserver in your resolv.conf.

A second file for node is also included that uses a different integration pattern that involves emitting events and calling functions waiting on those events. That version seems a bit less robust. Neither version is elegant but instead belong to the quick-and-dirty, made from leftover scrap and snippets, tradition.

Again limited support is available. For ports to other environments, you may be entirely on your own, however.

Dale Moberg


Attachment: bdxr-naptr.tar.gz
Description: bdxr-naptr.tar.gz



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]