random technical thoughts from the Nominet technical team

Lotus Notes on Linux

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 4 out of 5)
Loading ... Loading ...
Posted by matt on Jul 28th, 2006

My first impressions of Notes on Linux are not good. I have been trying out Notes on SuSe 10.0 since its release.

All of the important content panes appear hidden by default (at least under KDE, it seems they are visible under Gnome) which took me quite a while to work out. The answer is to position the mouse near the right hand side of the main Notes window — the pointer will change to a vertical bar with arrows either side, allowing you to pull the hidden window’s edge and expose the content.

I am unable to open attached files. Using the Open or Open With… menus results in a silent failure of Notes to perform either of those actions. On a related subject, that context menu doesn’t work properly as a menu either — the items disappear and reappear as you move the mouse over them.

Lastly, and perhaps worst of all, I discovered today that the JVM I thought I was using — the one that I had taken care to make sure was available on my command line — is no longer the version it was. It seems that during the installation of the Notes client, Lotus saw fit to alter my .profile - changing my PATH, LD_LIBRARY_PATH and CLASSPATH variables inserting its requirements at the beginning of those variables — as it is clearly the most important application on my machine. So, after I found that a tool wouldn’t work (as I was suddenly using Notes’ Java 1.4.2 instead of my JDK 1.5) I commented out the junk in my .profile only to find that my environment still was not as I had previously left it. Well, it turns out that the Notes installer hadn’t missed a trick and took the liberty of creating a brand new .bash_profile in my home directory. Lovely.

My work around for this was to first delete the new .bash_profile file, then to cut the Installshield block from my .profile and put this in a new file: $HOME/bin/lotus_notes. I then added the command line beginning /opt/IBM/Workplace that can be found in the startup shortcut found on your desktop. The application can now be started simply by typing lotus_notes on the command line, or by changing the startup shortcut’s command line to be /home/<user>/bin/lotus_notes.

This is the final lotus_notes file:

#!/bin/bash  # var 1 : CLASSPATH="/home/matt/notes":`echo $CLASSPATH` if [ -z "`echo $CLASSPATH`" ] then CLASSPATH="/home/matt/notes" else CLASSPATH="/home/matt/notes":`echo $CLASSPATH` fi export CLASSPATH  # var 1 : PATH="/home/matt/notes/jvm/bin":"/home/matt/notes":`echo $PATH` if [ -z "`echo $PATH`" ] then PATH="/home/matt/notes/jvm/bin":"/home/matt/notes" else PATH="/home/matt/notes/jvm/bin":"/home/matt/notes":`echo $PATH` fi export PATH  # var 0 NOTESDATA="/home/matt/notes/data" NOTESDATA="/home/matt/notes/data" export NOTESDATA  # var 0 NOTESBIN="/home/matt/notes" NOTESBIN="/home/matt/notes" export NOTESBIN  # var 1 : LD_LIBRARY_PATH="/home/matt/notes/jvm/bin/classic":"/home/matt/notes/jvm/bin":"/home/matt/notes":`echo $LD_LIBRARY_PATH` if [ -z "`echo $LD_LIBRARY_PATH`" ] then LD_LIBRARY_PATH="/home/matt/notes/jvm/bin/classic":"/home/matt/notes/jvm/bin":"/home/matt/notes" else LD_LIBRARY_PATH="/home/matt/notes/jvm/bin/classic":"/home/matt/notes/jvm/bin":"/home/matt/notes":`echo $LD_LIBRARY_PATH` fi export LD_LIBRARY_PATH  # Command line to run notes... /opt/IBM/Workplace Managed Client/rcp/richclient -personality com.ibm.workplace.noteswc.standalone.linux.personality

I don’t think I’ll be using Notes on Linux for a little while yet.

No Oracle Client for Intel Mac

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
Posted by chris on Jul 26th, 2006

For the last couple of years it has seemed like Oracle on Mac was on the up-and-up. Oracle’s new TOAD-like tool SQL Developer supports Mac OS X, you can deploy the detabase itself on Mac Servers (although not 10.2 as yet), etc etc. However, now I find that there is no ‘full’ client install which works on Intel Macs. Not only that but there are apparently no plans for it either. Take a look at this forum thread for a rather odd response from Oracle.

NAPTR Records

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 3 out of 5)
Loading ... Loading ...
Posted by ian on Jul 14th, 2006

NAPTR stands for Naming Authority Pointer. This is a form of DNS record which allows for one or more services to be associated with a unique string, and for the string to be re-written using regular expressions. The main usage of NAPTR records is within ENUM, the application which maps phone numbers onto other, IP-based services in VoIP. However, NAPTR is part of a more abstract system: DDDS, the Dynamic Delegation Discovery System. The DDDS is discussed below with reference to ENUM as an example DDDS application.

DDDS

The DDDS “is used to implement lazy binding of strings to data, in order to support dynamically configured delegation systems” [RFC 3401]. In DDDS, a unique string is mapped by an application onto a set of services using a rule database, which consists of a set of rewrite rules, applied recursively until a terminal condition is reached. The terminal condition must make sense to the application, whilst the intermediate output of rewrite rules must be keys into the rule database.

In ENUM, there is only ever one rewrite rule applied, the NAPTR record. The output of this rule is terminal, and is a URI pointing to a VoIP service.

DDDS Applications are specified in terms of:

  • The Application Unique String (AUS). This is the thing that the rules act on. In ENUM this is a phone number with no spaces and no punctuation, save for a ‘+’ in front of the country code. The AUS for Nominet’s phone number is therefore +441865332211.
  • The First Well Known Rule. This rule says where the process starts. In ENUM the database is DNS, specifically the e164.arpa tree. This is organised in the exactly the same way as the E164 numberspace. The transformation is therefore the identity function. No transformation occurs.
  • A list of valid databases, in this case DNS. To allow for DNS lookups the resolver called by the application must translate from a phone number into a leaf in the e164.arpa tree. Nominet’s number translates into 1.1.2.2.3.3.5.6.8.1.4.4.e164.arpa.
  • The final expected output. ENUM is an application which turns phone numbers into VoIP services, such as email, so the expected output is a valid URI pointing to a service such as SIP or email.
  • The algorithm used in DDDS, and the specific requirements for applications and databases are defined in RFC 3402.

Format of NAPTR records

The NAPTR record is defined in RFC 3403. It was designed specifically to represent rewrite rules in DNS, so allowing DNS to be a valid DDDS database.

NAPTR records have six fields. The first two, order and preference are used to distinguish between several possible rewrite rules through defined priority. They are specifically NOT for load balancing. The important difference between the two fields is that, once a matching record is found, “the client MUST NOT consider records with a different Order but they MAY process records with the same Order but different Preferences”. The preference field is a way of expressing the hierarchy of quality of services that are available

Another way of looking at this is that the order specifies how the holder of the delegation wishes the rules to be processed, whereas the preference is may be over-ridden by the client depending on which service it wishes to use. Interpreting it in this way, the order
field is analogous to the MX preference value.

The third field is a flag. In the DDDS algorithm this flag is intended to signal where in the process the rewrite rules have reached. In ENUM NAPTR records it is always “u” to indicate that the output is terminal and results in a URI. That is, processing finishes with this rule.

The fourth field is service. This is a character string that is defined in the application specification. For ENUM this always start “E2U+”, though case is insignificant. This is immediately followed by the type of service. SIP is represented as “e2u+sip”, therefore. Some service types may include further subtypes, such as “e2u+sms:tel”, for text messaging and “e2u+sms:mailto”, for SMS delivery over SMTP. A full list of ENUM services can be found at http://www.iana.org/assignments/enum-services.

Next comes regular expression. This is a Perl-like regex which rewrites all or part of the AUS. Note, it is not the key that is being rewritten. In ENUM terms this means that the phone number is being translated, not the e164.arpa domain name.

Finally comes the replacement field. This is a FQDN which is the next step in the DDDS chain, ie. the next key to look up. As NUM NAPTR records are always terminal this is always a single dot.

ENUM Example

An example NAPTR record set may clarify things. This is lifted from RFC 3761. As it states there, the services listed do not necessarily tally with real enumservices, but the example is valid.

$ORIGIN 3.8.0.0.6.9.2.3.6.1.4.4.e164.arpa.        NAPTR 10 100 "u" "E2U+sip" "!^.*$!sip:info@example.com!" .
                                                  NAPTR 10 101 "u" "E2U+h323" "!^.*$!h323:info@example.com!" .
                                                  NAPTR 10 102 "u" "E2U+msg" "!^.*$!mailto:info@example.com!" .

This record set maps the phone number +441632960083 onto three possible identically ordered URIs, with a preference for SIP, then H323, and finally email. In each case, the regular expression matches the full AUS (^.$), and replaces it with a URI (e.g., sip:info@example.com). As this is a terminal record, this URI is returned to the client.Though most NAPTR records replace the full AUS, it is possible for the regular expression to back-reference part of the AUS, to grab an extension number, say:

$ORIGIN 0.6.9.2.3.6.1.4.4.e164.arpa. *   NAPTR 10 100 "u" "E2U+sip""!^+441632960(.*)$!sip:1@example.com!" .

Once the client has the URI it must be resolved using DNS, but this is no longer part of the DDDS algorithm..

Other Applications using NAPTR records

But then again, it could be. RFC 3404 describes “DDDS Based URI Resolution”.

It is a long stated goal to use persistent, location-independent Uniform Resource Names (URNs) in preference to more brittle URIs. This would allow publication of persistent pointers to resources that are not dependent on service configuration. The Knoxville framework, referenced in RFC 3404, adopts the approach of separating name assignment from resolution. DNS is an established and widely used resolution framework, but it is not suitable for URNs, for reasons of scale amongst other things. DDDS is recommended as a mechanism which can use DNS to locate URN “resolvers” through URI rewriting.

The URI and URN resolution applications are technically identical, but operate independently. Both use DNS as the valid database, and each has either the URI or URN as its AUS. The First Well Known Rule extracts the key from the AUS. In the URI case this is the URI scheme, for URNs it is the Namespace Identifier. To use DNS with these keys it is necessary to request NAPTR records in the ‘.uri.arpa.’ and ‘.urn.arpa.’ trees.The database contains NAPTR records of the format described above. Four flags are defined, of which three describe terminal conditions:

  • “S” means the out put of the rule is a domain-name for which SRV records exist.
  • “A” means the out put is a domain-name that can be used to find A and AAAA records.
  • “U”, as above, yields a URI.
  • “P” means that the rest of the process is application-specific, and is out of the scope of DDDS.
  • An empty flag indicates that a further DDDS loop is required.

The service field may contain protocol information. It will probably contain some service information allowing URIs to be resolved to one or more URIs, resources or descriptions of resources.

The RFC contains complex and detailed NAPTR examples for URN and URI resolution. These examples are very detailed, and repetition here would be mere plagiarism. What they do show is the versatility of DDDS and the NAPTR record for resource discovery.

A first look at ZFS

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
Posted by jad on Jul 3rd, 2006

Solaris 10 6/06 was released last week. This is the first release of Solaris 10 with ZFS support built in.

Creating a ZFS filesystem is easy

I had a disk partitioned like

Part      Tag    Flag     Cylinders         Size            Blocks
0       swap    wu       0 -  1927        2.00GB    (1928/0/0)    4195328
1       root    wm    1928 - 16384       15.00GB    (14457/0/0)  31458432
2     backup    wm       0 - 65532       68.00GB    (65533/0/0) 142599808
3 unassigned    wm   16385 - 65532       51.00GB    (49148/0/0) 106946048
4 unassigned    wm       0                0         (0/0/0)             0
5 unassigned    wm       0                0         (0/0/0)             0
6 unassigned    wm       0                0         (0/0/0)             0
7 unassigned    wm       0                0         (0/0/0)             0

To create a zfs filesystem and mount slice 3 as /test you run the following

bash-3.00# zpool create test c1t0d0s3
bash-3.00# df -k
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c1t0d0s1    15490539 3523947 11811687    23%    /
/devices                   0       0       0     0%    /devices
ctfs                       0       0       0     0%    /system/contract
proc                       0       0       0     0%    /proc
mnttab                     0       0       0     0%    /etc/mnttab
swap                 30414184     560 30413624     1%    /etc/svc/volatile
objfs                      0       0       0     0%    /system/object
/platform/SUNW,Sun-Fire-T200/lib/libc_psr/libc_psr_hwcap1.so.1
15490539 3523947 11811687    23%    /platform/sun4v/lib/libc_psr.so.1
/platform/SUNW,Sun-Fire-T200/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1
15490539 3523947 11811687    23%    /platform/sun4v/lib/sparcv9/libc_psr.so.1
fd                         0       0       0     0%    /dev/fd
swap                 30413624       0 30413624     0%    /tmp
swap                 30413664      40 30413624     1%    /var/run
test                 52125696       1 52125644     1%    /test

Done. (The zpool command took a few seconds to run)

However, performance is not what I expected. Running a simple test script to create lots of small files like this

#!/usr/local/bin/bash
i=0
while [ $i -lt 10000 ]
do
touch $i
let i=i+1
done

gave these results

UFS 102 seconds
ZFS 99 seconds

When creating a single large file like this

dd if=/dev/zero of=/myfile count=1000000 bs=1k

ZFS was a lot slower

UFS 29 seconds
ZFS 55 seconds

I appreciate that these are very simple tests, but I did expect ZFS to be at least as fast a UFS.

Recent Posts

Highest Rated

Categories

Archives

Meta: