KenaiNotifications

Contents

Motivation

Kenai.com Instant (Server Side) Notifications allow NetBeans IDE to inform the user immediately about any changes and provide true live views (e.g. on issues, projects, CI builds, etc). The user would become really online, without the need to do manual refresh, re-run queries, watch mails (or the IDE ask the server repeatedly) - always seeing the latest state. Opens possibilities for more features in the future.

Examples of notifications: an issue was added/changed/closed, remotes sources added/changed, new repository created, Hudson build failed etc.

This feature would also align nicely with the chat & presence enhancements - e.g. the user is notified about a commit into codebase and can immediately ask the committer about it.

Notification Types

Kenai.com MUST provide following notigications:

SCM Notifications

Notifications from source code management system. Notification is send on:

  • add
  • change
  • delete

Mercurial

Subversion

BT Notifications

Notifications from bug tracking systems. Notification is send on:

  • add
  • modification
  • delete.

Bugzilla

Jira

Hudson Notifications

Notifications from hudson. Notification is send on

  • job add
  • job changed
  • job deleted

Project Notifications

Project was updated on kenai.com server. Notification is send on:

  • Project metadata change
  • Feature metadat change

Architecture

IDE keeps live XMPP connection to kenai.com to be connected to project chat room. We can use this connection to send instant notification from kenai.com server to the NetBeans IDE. XMPP stands for "Extensible Messaging and Presence Protocol", so the proposal is to write "Notification Extension" for Message stanza of XMPP protocol, and send those extended messages directly to dedicated hidden, members only chat room, which will be created automatically for each project. These messages will not be recognized by chat room clients (because they will be unknown), but will be processed and handled by NetBeans IDE or any client, which will implement proposed extension. See Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence

Extension could be described by following schema (draft):

<?xml version="1.0" encoding="UTF-8"?>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://kenai.com/schema/XMPPNotification"
    xmlns:tns="http://kenai.com/schema/XMPPNotification"
    elementFormDefault="qualified">
    <xsd:element name="notification">
        <xsd:complexType>
            <xsd:attribute name="service" type="xsd:string" use="required"/>
            <xsd:attribute name="service_type" type="xsd:string" use="required"/>
            <xsd:attribute name="uri" type="xsd:anyURI" use="required"/>
            <xsd:attribute name="project" type="xsd:string" use="required"/>
            <xsd:attribute name="stamp" type="xsd:time" use="required"/>
            <xsd:sequence>
                <xsd:element name="modification">
                    <xsd:complexType>
                        <xsd:attribute name="resource" type="xsd:string" use="required"/>
                        <xsd:attribute name="type" use="required">
                            <xsd:simpleType>
                                <xsd:restriction base="xsd:string">
                                    <xsd:enumeration value="new"/>
                                    <xsd:enumeration value="change"/>
                                    <xsd:enumeration value="delete"/>
                                </xsd:restriction>
                            </xsd:simpleType>
                        </xsd:attribute>
                        <xsd:attribute name="id" type="xsd:string"/>
                    </xsd:complexType>
                </xsd:element>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>
</xsd:schema>

Examples

Mercurial Notification

changeset #2dhfaacdf2 pushed to project "testproject". File.java is new, Bar.java modified, Provider.java deleted. Server will send message to chat room "testproject-notifications" with following extension:

<notification service="mercurial" type="scm" uri="https://kenai.com/hg/testprojectmercurial" stamp="2009-05-14T15:57:52UTC+00:00">
  <modification resource="foo/src/org/company/File.java" type="new" id="2dhfaacdf2"/>
  <modification resource="foo/src/org/company/Bar.java" type="change" id="2dhfaacdf2"/>
  <modification resource="foo/src/org/company/Provider.java" type="delete" id="2dhfaacdf2"/>
</notification>

Note: Body can be empty (no message in regular IM clients), or human readable message saying that files were modifed on server (Message shown in regular IM clients).

Bugzilla Notification

Bug #251 modified on project "testproject". Server will send message to chat room "testproject-notifications" with following extension:

<notification service="bugzilla" type="issues" uri="https://kenai.com/bugzilla/buglist.cgi?product=testproject" stamp="2009-05-14T15:57:52UTC+00:00">
  <modification resource="https://kenai.com/bugzilla/show_bug.cgi?id=251" type="change" id="251"/>
</notification>

Note: Body can be empty (no message in regular IM clients), or human readable message saying that bug was modifed on server (Message shown in regular IM clients).

Hudson Notification

Hudson job #859 failed for project "testproject". Server will send message to chat room "testproject-notifications" with following extension:

<notification service="hudson" type="ci" uri="https://kenai.com/hudson/job/testproject/" stamp="2009-05-14T15:57:52UTC+00:00">
  <modification resource="https://kenai.com/hudson/job/project/859/" type="change" id="859"/>
</notification>

Note: Body can be empty (no message in regular IM clients), or human readable message saying that build failed (Message shown in regular IM clients).

Kenai Notification

New mercurial repository created for project "testproject". Server will send message to chat room "testproject-notifications" with following extension:

<notification service="kenai" type="project" uri="https://kenai.com/projects/testproject" stamp="2009-05-14T15:57:52UTC+00:00">
  <modification resource="https://kenai.com/hg/testprojectmercurial2" type="new" id="testprojectmercurial2"/>
</notification>

Note: Body can be empty (no message in regular IM clients), or human readable message saying that new repository was created for project test project (Message shown in regular IM clients).

NetBeans API

Kenai Framework API module will handle XMPP notifications and transform them into regular PropertyChangeEvents on KenaiProject and KenaiFeature. NetBeans API clients will just register PropertyChangeListeners and handle those Events.

NetBeans UI (NetBeans 7.0)

Server activity (remote changes, new/modified bugs) will be shown in IDE status line

-------------------------------------------------------
|                                         [c][b]      |
-------------------------------------------------------

[c] ... remote changes in vcs

----------------------------------
| remote changes in Anagram Game |
|                         (show) |
----------------------------------
                               [c]

(show) will open vcs diolog showing remote changes


[b] ... new/changed bugs in bugtracking

----------------------------------
| new bugs in Anagram Game       |
|                         (show) |
| bugs commented in Test Project |
|                         (show) |
---------------------------------
                              [b]

(show) will show results of all issues query

Notes

Realtime Collaboration NB module (xmpp and chat implementation) will probably disappear. XMPP functionality will be moved to Kenai Framework API module and UI will be moved to Kenai UI module.

Dependencies

Kenai-772: Implement XMPP Notifications

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo