"diff" Functionality in the RIPE Database

Denis Walker — Jul 11, 2013 02:00 PM
Filed under:
Users often like to see the difference between two versions of an object. Some objects can be long and complex. It is not easy to look at two text versions and see what changed. We are proposing to implement a 'diff' function for the RIPE Database.

Introduction

The legacy RIPE Database software used to include a diff functionality. This could be selected by adding a keyword diff to an email subject line. It was not available through Syncupdates or via the API. A new diff function will be available in the next RIPE Database release.

Database updates

When an object gets modified in the RIPE Database, there will be two different versions of the object: the old and the new one. The acknowledgement message only confirms that the update was successful (or not). The notification messages on the other hand show the recipients what has changed by displaying the full text of the old and the new object. However, many objects, aut-num in particular, can be be very long and complex, which makes it difficult, if at all possible, for a human to recognise what changed. Many users had to resort to cut/paste the object texts into separate files and running comparison scripts on the two files.

Writing these two long object texts into the notification message was apparently not very helpful. So we propose to change the output of the notification message. The proposed output will first show a diff and then show the full text of the new object. In most cases the old version can be seen by using the recently introduced history query options --list-versions and --show-version #n. This works for all object types except person and role. The notification message for a modified object will look like this:

---
OBJECT BELOW MODIFIED:

@@ -8,4 +8,5 @@
mnt-by:         RIPE-NCC-HM-MNT
-mnt-by:        LIR-MNT
+mnt-by:        lir-MNT
changed:        unread@ripe.net 20020101
+remarks:       just added
source:         RIPE

THIS IS THE NEW VERSION OF THE OBJECT:

inetnum:      192.168.200.0 - 192.168.200.255
netname:      RIPE-NET1
descr:        /24 assigned
country:      NL
admin-c:      TP1-TEST
tech-c:       TP1-TEST
status:       ASSIGNED PI
mnt-by:       RIPE-NCC-HM-MNT
mnt-by:       lir-MNT
changed:      unread@ripe.net 20020101
remarks:      just added
source:       RIPE

The old object can be seen in the history using the query options --list-versions and --show-version 1 192.168.200.0 - 192.168.200.255

This will be the default output for a notification when an object is modified. For creation and deletion of objects there will be no change to the current notification message.

Database history queries

Users can now also query for the history of objects. We propose to add a diff functionality to compare any two versions of an object with a new history query option --diff-versions #a:#b. The diff output will be in the same format as for update notifications.

$ whois --diff-versions 2:3 192.168.0.0 - 192.169.255.255

----

% This is the RIPE Database query service.
% The objects are in RPSL format.
%
% The RIPE Database is subject to Terms and Conditions.
% See http://www.ripe.net/db/support/db-terms-conditions.pdf

% Difference between version 2 and 3 of object "192.168.0.0 - 192.169.255.255"

@@ -10,3 +10,3 @@
mnt-lower:      LIR-MNT
-remarks:        version 2
+remarks:        version 3
source:         TEST # Filtered

% This query was served by the RIPE Database Query Service version 0.1-ENDTOEND (UNDEFINED)

Note that this is the standard Unix diff functionality. If you ask for --diff-versions 2:3 you will get the differences for a change from version 2 to version 3. If you ask for --diff-versions 3:2 you will get the differences for a change from version 3 to version 2. This is the reverse change so '+' and '-' will be reversed:

@@ -10,3 +10,3 @@
mnt-lower:      LIR-MNT
-remarks:        version 3
+remarks:        version 2
source:         TEST # Filtered

 

Conclusion

We propose to re-introduce a diff functionality in the RIPE Database which will make it easier to compare two versions of an object. This functionality will be implemented in the next software release.

1 Comment

Job Snijders
Job Snijders says:
Jul 10, 2013 08:34 PM
excellent feature! I am looking forward to it.
Add comment

You can add a comment by filling out the form below. Only plain text is possible. Web and email addresses will be transformed into clickable links. Comments are moderated so they won't appear immediately.

Related Items
A New RIPE Database Prototype

The RIPE NCC is improving the RIPE Database functionality and usability by introducing a trial of ...

New and Improved RIPE Registry Global Resource Service

We have redesigned and improved the way we mirror other databases. We now have a method of ...

Abuse Handling in the RIPE Database

This article describes a technical design for the introduction of abuse contact details in the RIPE ...

Updated Heuristics for the Abuse Finder Service

This article outlines some of the refinements made to the Abuse Finder tool based on community ...

Updates to the RIPE Database Query API and Search Clients

Since the first announcement of the RIPE Database Query API, some changes and additions have been ...

more ...