<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns:dc="http://purl.org/dc/elements/1.1/"
 xmlns:admin="http://webns.net/mvcb/"
>
<channel>
<title>AJagucki.log</title>
<link>http://caustiq.esoteriq.org/nb</link>
<description>Armando Jagucki's Programming Weblog</description>
<dc:language>en-us</dc:language>
<dc:creator>AJagucki</dc:creator>
<dc:date>2008-05-17T17:05:33-07:00</dc:date>
<admin:generatorAgent rdf:resource="http://nanoblogger.sourceforge.net" />
<item>
<link>http://caustiq.esoteriq.org/nb/archives/2008/05/#e2008-05-17T16_50_27.txt</link>
<title>Personal Eventing in Multi-User Chat?</title>
<dc:date>2008-05-17T16:50:27-07:00</dc:date>
<dc:creator>AJagucki</dc:creator>
<dc:subject>Programming, Jabber</dc:subject>
<description><![CDATA[<p><a href="http://mbishop.esoteriq.org/">Martin Bishop</a> recently asked me why he couldn't see my <a href="http://www.xmpp.org/extensions/xep-0118.html">User Tune</a>
from the tooltip of my entry in the MUC room occupant list. Naturally, we
were both using Psi where PEP info is often displayed in the tooltips of
the Contact List entries. I explained to him that some MUC rooms can be
configured as anonymous where the JID of the occupants are not exposed.
Without the JID of course, you would be hard pressed to figure out a way
to determine whose PEP nodes to retrieve, not to mention determine
subscriptions and node access models. However, after answering his question
I had an interesting idea for an Openfire plugin...</p>

<p>Remember during the stone age when people used IRC? Neither do I, but stay
with me. There were many client side scripts that let you type a command
and have your currently playing song sent to the channel. In fact, when I
used Kopete there was a plugin that did the very same thing, even over
Jabber. So, the idea was to provide that same functionality, except
<em>server-side</em> instead of client-side and utilizing PEP.</p>

<p>Thus, last night my friends and I came up with an Openfire plugin called
<a href="http://code.google.com/p/pep-in-muc/">PEP in MUC</a>.</p>

<p><em>Sending one's tune to the room:</em></p>

<p><img src="/images/pep_in_muc1.png" alt="Tune-1" title="PEP in MUC" /></p>

<p><img src="/images/pep_in_muc2.png" alt="Tune-2" title="PEP in MUC" /></p>

<p>Currently you can also send your mood to the room in the same manner. There
are some caveats of course. This only works for local users to the server,
and by its nature the node access models are not being respected. But since
the user themselves are initiating the 'explicit pubsub notification' this
latter caveat does not seem like an issue to me.</p>

<p><a href="http://code.google.com/p/pep-in-muc/">Grab the plugin</a> for your Openfire server and ... revert back to the
stone age?</p>]]></description>
</item>
<item>
<link>http://caustiq.esoteriq.org/nb/archives/2007/09/#e2007-09-05T02_25_12.txt</link>
<title>Google Summer of Code 2007 Wrap Up</title>
<dc:date>2007-09-05T02:25:12-07:00</dc:date>
<dc:creator>AJagucki</dc:creator>
<dc:subject>Jabber</dc:subject>
<description><![CDATA[<p>With Google Summer of Code 2007 coming to an end, project repositories at
code.google.com are now setup for each organization and are becoming populated
with code samples from participating students. You can download my code sample
<a href="http://code.google.com/p/google-summer-of-code-2007-xmpp/downloads/detail?name=Armando_Diaz-Jagucki.tar.gz&amp;can=2&amp;q=">here</a>, from the <a href="http://code.google.com/p/google-summer-of-code-2007-xmpp">XSF project page</a>.</p>

<p>My <a href="http://caustiq.esoteriq.org/nb/archives/2007/08/#e2007-08-19T21_56_08.txt">previous post</a> announcing this project's completion already contained
a wrap up blurb at the end. I'll quote it here for dramatic effect.  <img src="http://caustiq.esoteriq.org/nb/moods/smilies/wink.gif" alt=";)" /></p>

<blockquote>
  <p>[...] I want to let it be known that I had an absolute blast coding this
  summer. Meeting Gaston and being able to collaborate with him in person at
  the Jive offices was a real highlight of it all. I am looking forward to
  further collaboration with Gaston as I maintain the PEP implementation in the
  future. I am also happy to have met everyone in XSF, including Peter
  Saint-Andre and Kevin Smith. You guys are awesome.</p>
  
  <p>My efforts will not stop here. With new versions of XEP-0163 and XEP-0060 on
  the way, I have already talked to Gaston about helping to implement these new
  versions in the future.</p>
  
  <p>Until then, cheers!  <img src="http://caustiq.esoteriq.org/nb/moods/smilies/smiley.gif" alt=":)" /></p>
</blockquote>]]></description>
</item>
<item>
<link>http://caustiq.esoteriq.org/nb/archives/2007/08/#e2007-08-19T21_56_08.txt</link>
<title>PEP in Openfire: Complete</title>
<dc:date>2007-08-19T21:56:08-07:00</dc:date>
<dc:creator>AJagucki</dc:creator>
<dc:subject>Programming, Jabber</dc:subject>
<description><![CDATA[<p>Openfire now has a complete implementation of Personal Eventing via Pubsub
(XEP-0163). According to Gaston, my work on PEP will be included in the next
Openfire release (3.4.0 I believe). For more information on the implementation
and pointers to its source code, visit the <a href="http://caustiq.esoteriq.org/projects/pep/">project's section</a> on my main
site.</p>

<p>Below you will find the deliverables that I indicated I would provide in the
Google Summer of Code proposal at the beginning of the summer:</p>

<ul>
<li><a href="http://caustiq.esoteriq.org/projects/pep/pep_sys_tests.pdf">System test plan document</a></li>
<li><a href="http://caustiq.esoteriq.org/projects/pep/pep_design.pdf">Architectural and detailed design document</a></li>
<li><a href="http://caustiq.esoteriq.org/projects/pep/index.shtml#source">Implementation disseminated through a SCMS</a></li>
<li><a href="http://caustiq.esoteriq.org/projects/pep/doc/">Documentation</a></li>
<li>Report on final testing and evaluation will be available on code.google.com
in the GSoC dashboard.</li>
</ul>

<p>With the meat of this post out of the way, I want to let it be known that I
had an absolute blast coding this summer. Meeting Gaston and being able to
collaborate with him in person at the Jive offices was a real highlight of it
all. I am looking forward to further collaboration with Gaston as I maintain
the PEP implementation in the future. I am also happy to have met everyone in
XSF, including Peter Saint-Andre and Kevin Smith. You guys are awesome.</p>

<p>My efforts will not stop here. With new versions of XEP-0163 and XEP-0060 on
the way, I have already talked to Gaston about helping to implement these new
versions in the future.</p>

<p>Until then, cheers!  <img src="http://caustiq.esoteriq.org/nb/moods/smilies/smiley.gif" alt=":)" /></p>]]></description>
</item>
<item>
<link>http://caustiq.esoteriq.org/nb/archives/2007/08/#e2007-08-09T04_46_11.txt</link>
<title>PEP in Openfire: Nearly Complete</title>
<dc:date>2007-08-09T04:46:11-07:00</dc:date>
<dc:creator>AJagucki</dc:creator>
<dc:subject>Programming, Jabber</dc:subject>
<description><![CDATA[<p>I am pleased to announce that the Google Summer of Code project to implement
<a href="http://code.google.com/soc/xmpp/appinfo.html?csaid=3E0E4A887EE8F266">PEP in Openfire</a> is very nearly <em>complete</em>. It is indeed usable at the
moment and further below in this post you will find a public test server
running the latest revision available for you to play with.</p>

<p>A whole lot of progress was made in the last two weeks, including
implementations (along with c2s and s2s verifications) for the following
sections:</p>

<ul>
<li>Account Owner Publishing</li>
<li>Contact Notification Filtering</li>
<li>Generating Notifications</li>
<li>Sending the Last Published Item</li>
<li>Recommended Defaults</li>
</ul>

<p>The only section left to implement and verify is 14.1: '<a href="http://www.xmpp.org/extensions/xep-0163.html#impl-subscriptions">Cancelling
Subscriptions</a>.' The <a href="http://caustiq.esoteriq.org/projects/pep.shtml">PEP project page</a> on my main site has a table with
the current status of the project. That page might also contain links to a
beta release with pre-compiled JAR packages available to download in the near
future.</p>

<p>Until that time comes, you are welcome to join my friends and I on the public
test server by connecting to <strong><code>jabber.esoteriq.net</code></strong>. If you are looking for a
Jabber client to test PEP with, I recommend using either the latest version of
<a href="http://psi-im.org/development">Psi</a> or <a href="http://sourceforge.net/cvs/?group_id=68334">Coccinella</a> from their respective versioning repositories.
Keep in mind that this is a <em>development test server</em>. Expect restarts,
database resets, and even temporary downtime when the server gets updated to
the latest revision. Join us in the group chat at
<strong><code>pepdev@conference.jabber.esoteriq.net</code></strong> and say hello  <img src="http://caustiq.esoteriq.org/nb/moods/smilies/smiley.gif" alt=":)" /> . Direct bug reports
(and/or praises  <img src="http://caustiq.esoteriq.org/nb/moods/smilies/wink.gif" alt=";)" /> ) to one of the addresses listed in the contact section of
<a href="http://caustiq.esoteriq.org/nb/">my weblog</a>.</p>

<p>Also, thanks to Ben Slote for generously hosting the public test server.</p>]]></description>
</item>
<item>
<link>http://caustiq.esoteriq.org/nb/archives/2007/07/#e2007-07-28T23_00_42.txt</link>
<title>PEP in Openfire: Subscriptions and Coccinella Tests</title>
<dc:date>2007-07-28T23:00:42-07:00</dc:date>
<dc:creator>AJagucki</dc:creator>
<dc:subject>Jabber</dc:subject>
<description><![CDATA[<p>Work on implementing <a href="http://www.xmpp.org/extensions/xep-0163.html">XEP-0163</a> in <a href="http://www.igniterealtime.org/projects/openfire/">Openfire</a> is nearly complete. Its
current state is very usable now that PEP service auto-subscribe on presence
subscriptions has been included in a revision I committed earlier in the
week.</p>

<h2>Contact Subscriptions</h2>

<p>A subscription to a PEP service's root collection node (and thus all leaf PEP
nodes) is generated and processed by the server during two different
situations. The first instance can occur if user <em>Foo</em> has a PEP service in
memory on the server and user <em>Bar</em> decides to subscribe to <em>Foo</em>'s presence.
Upon <em>Bar</em>'s presence subscription being authorized, a subscription to <em>Foo</em>'s
root PEP node is automatically created by the server. The second instance
occurs when both of our example users already have established presence
subscriptions to each other, but neither have a PEP service created yet (since
PEP services are virtual and are actually created dynamically in Openfire as
the need arises for efficiency purposes). Once either user decides to publish
some personal eventing data and a PEP service is created on the server, anyone
who already has a presence subscription to the owner of the new PEP service
automatically gets a subscription created for the owner's root PEP node as
well.</p>

<p>With the <a href="http://www.xmpp.org/extensions/xep-0163.html#contact-subscribe">Contact Subscription</a> section of XEP-0163 now implemented,
testing with PEP supporting clients like <a href="http://thecoccinella.org/">Coccinella</a> and <a href="http://psi-im.org/">Psi</a> is much
more viable (before this point, raw packets needed to be created and sent
manually for PEP service/node subscriptions). Below are screenshots taken
during my latest tests, including tests for publishing <a href="http://www.xmpp.org/extensions/xep-0080.html">User Geolocation</a>
and <a href="http://www.xmpp.org/extensions/xep-0108.html">User Activity</a> data to Openfire using Coccinella. There is also a shot
of my friend buchan (aka <a href="http://buchan.esoteriq.org/weblog">Jared Hendry</a>) publishing his <a href="http://www.xmpp.org/extensions/xep-0118.html">User Tune</a>
data taken from iTunes using Psi.</p>

<p>Next week I will be implementing the last couple sections of the XEP,
starting with <a href="http://www.xmpp.org/extensions/xep-0163.html#contact-filter">Contact Notification Filtering</a>.</p>

<h2>Client Tests</h2>

<p><em>Publishing geolocation using Coccinella:</em></p>

<p><img src="/images/pep-geoloc.png" alt="Geolocation-1" /></p>

<p><em>Viewing geolocation in Coccinella:</em></p>

<p><img src="/images/pep-geoloc1.png" alt="Geolocation-2" /></p>

<p><em>Viewing geolocation in Psi:</em></p>

<p><img src="/images/pep-geoloc2.png" alt="Geolocation-3" /></p>

<p><em>Publishing user activity using Coccinella:</em></p>

<p><img src="/images/pep-activity.png" alt="Activity-1" /></p>

<p><em>Viewing user activity in Coccinella:</em></p>

<p><img src="/images/pep-activity1.png" alt="Activity-2" /></p>

<p><em>Viewing buchan's tune in Psi:</em></p>

<p><img src="/images/pep-tune.png" alt="Tune" /></p>]]></description>
</item>
<item>
<link>http://caustiq.esoteriq.org/nb/archives/2007/07/#e2007-07-22T18_29_51.txt</link>
<title>PEP in Openfire: Contact Service Discovery</title>
<dc:date>2007-07-22T18:29:51-07:00</dc:date>
<dc:creator>AJagucki</dc:creator>
<dc:subject>Jabber</dc:subject>
<description><![CDATA[<p>Over the last few days I finished implementing <a href="http://www.xmpp.org/extensions/xep-0163.html#contact-disco">Contact Service Discovery</a>.
Doing so was not as straightforward as I thought it might be. I once again
needed to extend Openfire's API with the introduction of a new class I called
<a href="http://svn.igniterealtime.org/svn/repos/openfire/branches/pep/src/java/org/jivesoftware/openfire/disco/UserItemsProvider.java"><code>UserItemsProvider</code></a>. I then needed to modify <a href="http://svn.igniterealtime.org/svn/repos/openfire/branches/pep/src/java/org/jivesoftware/openfire/disco/IQDiscoItemsHandler.java"><code>IQDiscoItemsHandler</code></a>
so that it would accumulate <em>items</em> from all implementers of
<code>UserItemsProvider</code> anytime a <em>disco#items</em> query was sent to a user's JID.
The default discoverable items for a user include every resource they can be
addressed with (if the <em>disco#items</em> query came from someone with a
bidirectional subscription to the addressee's presence). These default items
were hardcoded into <code>IQDiscoItemsHandler</code>, so I refactored it some to make use
of the new <code>UserItemsProvider</code> interface. Ultimately, this allowed me to make
<code>IQPEPHandler</code> an implementor of <code>UserItemsProvider</code> as well, enabling me to
provide PEP nodes as <em>items</em> while respecting the access models in place for
each node.</p>

<p>With all of this done, I went ahead and created the same Shakespearean dummy
users as those in the examples for the <a href="http://www.xmpp.org/extensions/xep-0163.html#contact-disco">Contact Service Discovery</a> section
of the XEP. Everything worked out as planned, with the access models being
respected for each <em>disco#items</em> query. Check <a href="/contact_disco.txt">here</a> for a complete log of
the XML console during my tests.</p>

<p>However, this was only after I discovered and corrected  what I believe to be
typos in XEP-0163 in which access models are set within fields surrounding
<code>&lt;value&gt;</code> elements with superfluous <code>&lt;option&gt;</code> elements. After checking the
mailing list I discovered that others had encountered this as well. As <a href="http://mail.jabber.org/pipermail/standards/2006-October/012765.html">this
thread explains</a>, everything works as expected when the seemingly needless
<code>&lt;option&gt;</code> elements are removed in the example node creation packets. As
<a href="http://stpeter.im">Peter Saint-Andre</a> has told me before, there is <a href="http://www.xmpp.org/extensions/tmp/xep-0163-1.1.html">a newer version of
XEP-0163</a> being finalized which does not suffer these same typos. I will
bring this little issue up during our next GSoC meeting in
jdev@conference.jabber.org just to be sure I and those from the mailing list
correctly assumed the example packets to contain typos. Since Openfire's node
access model configuration code works as expected without the <code>&lt;option&gt;</code>
elements, I agree with those from the mailing list that it was probably a
typo.</p>

<p>With another section from XEP-0163 implemented, my goal for next week is to
attack the next section: <a href="http://www.xmpp.org/extensions/xep-0163.html#contact-subscribe">Contact Subscription</a>. Currently, PEP nodes can be
subscribed to with explicit pubsub subscription packets, but I will need to
implement the auto-subscribe with presence functionality as well.</p>

<p>When Contact Subscription and <a href="http://www.xmpp.org/extensions/xep-0163.html#contact-filter">Contact Notification Filtering</a> are
finished, I will be very close to done with the complete implementation of
XEP-0163.  <img src="http://caustiq.esoteriq.org/nb/moods/smilies/smiley.gif" alt=":)" /> Any extra time left in the summer I will likely spend
implementing the new versions of XEP-0163 and XEP-0060. Why would I stop when
I am having this much fun?  <img src="http://caustiq.esoteriq.org/nb/moods/smilies/smiley.gif" alt=":)" /></p>]]></description>
</item>
<item>
<link>http://caustiq.esoteriq.org/nb/archives/2007/07/#e2007-07-19T01_19_01.txt</link>
<title>PEP in Openfire: Midterm Status</title>
<dc:date>2007-07-19T01:19:01-07:00</dc:date>
<dc:creator>AJagucki</dc:creator>
<dc:subject>Jabber</dc:subject>
<description><![CDATA[<p>Last week's <a href="http://caustiq.esoteriq.org/nb/archives/2007/07/#e2007-07-10T22_04_10.txt">refactoring of the PubSub framework</a> underwent a more thorough
testing and verification for compatibility with PEP. With the changes working
as planned, much progress was made towards completion of the implementation of
the actual protocol specification (as opposed to implementation of the
architectural design of PEP in Openfire).</p>

<p>At the beginning of this week, the PEP implementation was at a stage where I
could make use of <a href="http://psi-im.org/">Psi's</a> preliminary PEP support to test with Openfire.
When a user publishes his/her Mood in Psi, and the node they are publishing to
does not already exist, their PEP service must automatically create the node.
After I setup this bit of logic in my <code>IQPEPHandler</code>, I was able to give Psi's
mood support a try. Below are screenshots of the trial along with Psi's XML
console output.</p>

<p><em>Publishing mood with PEP:</em></p>

<p><img src="/images/pep-mood-1.png" alt="Mood-1" title="PEP Mood in Psi" /></p>

<p><em>Viewing the node contents in the contact tooltip:</em></p>

<p><img src="/images/pep-mood-2.png" alt="Mood-2" title="PEP Mood in Psi" /></p>

<p><em>XML Console Output:</em></p>

<pre><code>&lt;iq type="set" id="aabda" &gt;
&lt;pubsub xmlns="http://jabber.org/protocol/pubsub"&gt;
&lt;publish node="http://jabber.org/protocol/mood" &gt;
&lt;item id="current" &gt;
&lt;mood xmlns="http://jabber.org/protocol/mood"&gt;
&lt;flirtatious/&gt;
&lt;text&gt;Denise is near...&lt;/text&gt;
&lt;/mood&gt;
&lt;/item&gt;
&lt;/publish&gt;
&lt;configure&gt;
&lt;x&gt;
&lt;field type="hidden" var="FORM_TYPE" &gt;
&lt;value&gt;http://jabber.org/protocol/pubsub#node_config&lt;/value&gt;
&lt;/field&gt;
&lt;field var="pubsub#access_model" &gt;
&lt;value&gt;presence&lt;/value&gt;
&lt;/field&gt;
&lt;/x&gt;
&lt;/configure&gt;
&lt;/pubsub&gt;
&lt;/iq&gt;


&lt;iq type="result" id="aabda" to="ajagucki@127.0.0.1/Psi" /&gt;


&lt;message from="ajagucki@127.0.0.1" to="ajagucki@127.0.0.1"
         id="http://jabber.org/protocol/mood__ajagucki@127.0.0.1__g1tc1" &gt;
&lt;event xmlns="http://jabber.org/protocol/pubsub#event"&gt;
&lt;items node="http://jabber.org/protocol/mood" &gt;
&lt;item id="P1tcu6gwk9RQChT" &gt;
&lt;mood xmlns="http://jabber.org/protocol/mood"&gt;
&lt;flirtatious/&gt;
&lt;text&gt;Denise is near...&lt;/text&gt;
&lt;/mood&gt;
&lt;/item&gt;
&lt;/items&gt;
&lt;/event&gt;
&lt;headers xmlns="http://jabber.org/protocol/shim"&gt;
&lt;header name="pubsub#subid"&gt;yShj3lEQl1F8kjoI1ag7XYP41pbyNaysqNAOVn76&lt;/header&gt;
&lt;/headers&gt;
&lt;/message&gt;
</code></pre>

<p>Below is a table that gives an overview of which sections in the specification
have been implemented and verified for correctness. One should keep in mind
that some of the work that appears to be incomplete may already be implemented
in Openfire's PubSub framework, requiring only minor tweaks to be considered
implemented for PEP.</p>

<table border="1">
  <thead>
    <tr>
      <th>Section of XEP-0163</th>
      <th>Implemented</th>
      <th>Verified</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Account Owner Service Discovery</td>
      <td align="center">Yes</td>
      <td align="center">Yes</td>
    </tr>
    <tr>
      <td>Account Owner Node Creation
      </td>
      <td align="center">Yes</td>
      <td align="center">Yes</td>
    </tr>
    <tr>
      <td>^ Auto-creation when publishing to nonexistent nodes
      </td>
      <td align="center">Yes</td>
      <td align="center">Yes</td>
    </tr>
    <tr>
      <td>Contact Service Discovery
      </td>
      <td align="center">No</td>
      <td align="center">No</td>
    </tr>
    <tr>
      <td>^ Communicate PEP support for contact discovery
      </td>
      <td align="center">Yes</td>
      <td align="center">Yes</td>
    </tr>
    <tr>
      <td>^ Return appropriate PEP items respecting node access models
      </td>
      <td align="center">No</td>
      <td align="center">No</td>
    </tr>
    <tr>
      <td>Contact Subscription</td>
      <td align="center">No</td>
      <td align="center">No</td>
    </tr>
    <tr>
      <td>Account Owner Publishing</td>
      <td align="center">Yes</td>
      <td align="center">No</td>
    </tr>
    <tr>
      <td>Contact Notification Filtering</td>
      <td align="center">No</td>
      <td align="center">No</td>
    </tr>
    <tr>
      <td>Generating Notifications</td>
      <td align="center">Yes</td>
      <td align="center">No</td>
    </tr>
    <tr>
      <td>Sending the Last Published Item</td>
      <td align="center">No</td>
      <td align="center">No</td>
    </tr>
    <tr>
      <td>Recommended Defaults</td>
      <td align="center">No</td>
      <td align="center">No</td>
    </tr>
    <tr>
      <td>Cancelling Subscriptions</td>
      <td align="center">No</td>
      <td align="center">No</td>
    </tr>
  </tbody>
</table>

<p>If you wish to follow the progress even more closely, you can checkout the
latest revision from <a href="http://svn.igniterealtime.org/svn/repos/openfire/branches/pep">my PEP branch</a> in Openfire's svn repository (thanks
Gaston  <img src="http://caustiq.esoteriq.org/nb/moods/smilies/wink.gif" alt=";)" /> ):</p>

<pre><code>svn co http://svn.igniterealtime.org/svn/repos/openfire/branches/pep
</code></pre>]]></description>
</item>
<item>
<link>http://caustiq.esoteriq.org/nb/archives/2007/07/#e2007-07-10T22_04_10.txt</link>
<title>PEP in Openfire: More Progress</title>
<dc:date>2007-07-10T22:04:10-07:00</dc:date>
<dc:creator>AJagucki</dc:creator>
<dc:subject>Jabber</dc:subject>
<description><![CDATA[<h2>Refactoring <code>PubSubEngine</code></h2>

<p>Between now and my last post I have spent most of my time improving upon the
(not so efficient) design for PEP that was in place. As it was previously,
each user's <code>PEPService</code> had its own <a href="http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/javadoc/org/jivesoftware/openfire/pubsub/PubSubEngine.html"><code>PubSubEngine</code></a> to handle the actual
underlying PubSub related work involved with PEP. Consider the memory overhead
incurred if there are 100,000 users each with their own <code>PubSubEngine</code> that
is performing the same exact PubSub functions. Clearly this is a waste of
memory. However, the <code>PubSubEngine</code> was designed in a manner so that it was
deeply intertwined with a single <a href="http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/javadoc/org/jivesoftware/openfire/pubsub/PubSubService.html"><code>PubSubService</code></a> instance which was one
of its member variables.</p>

<p>In one of my previous meetings with Gaston we looked at the feasibility of
abstracting out the <code>PubSubService</code> from the <code>PubSubEngine</code> in an effort to
allow every user's <code>PEPService</code> to work with a single <code>PubSubEngine</code> from
within the <code>IQPEPHandler</code>. Unfortunately, it was not a very trivial change to
make. There were a number of class variables in <code>PubSubEngine</code> whose
constructors required a <code>PubSubService</code>. A lot of code was modified or moved
elsewhere from <code>PubSubEngine</code>. More than I expected in fact. Of course, the
<code>PubSubService</code> interface along with its implementors (<code>PubSubModule</code>) needed
to be modified as well to accommodate the changes made in this major refactor.</p>

<p>As arduous as it was, I have completed this refactoring and Openfire happily
compiles and runs. It would have been nice to have unit tests available for
the PubSub framework in place already, but that is not the case. If there are
any bugs introduced from the refactoring I will take care of them as they are
encountered with my own tests as I continue implementation of <a href="http://www.xmpp.org/extensions/xep-0163.html">XEP-0163</a>.
Although my task may be more difficult as a result, the savings in memory
overhead on large deployments will be well worth the effort. Gaston said this
refactoring would be the hardest part of the project, so it is a relief to
have completed it. The implementation from here on out should be fairly
trivial.  <img src="http://caustiq.esoteriq.org/nb/moods/smilies/smiley.gif" alt=":)" /></p>

<h2>Goals</h2>

<p>My next few goals are as follows:</p>

<ul>
<li>Make <code>PEPService</code> implement the Cacheable and Externalizable interfaces
for even more efficiency.</li>
<li>Create <code>PEPService</code>s dynamically when a user attempts to utilize PEP.
This ensures we only allocate PEP resources for those users interested
(instead of preallocating resources for <em>every</em> user).</li>
<li>Make adding '<code>identity</code>' elements to the server's <code>disco#info</code> result
dynamic in the same manner that is done for <code>feature</code>s.</li>
<li>Proceed with implementation.</li>
</ul>]]></description>
</item>
<item>
<link>http://caustiq.esoteriq.org/nb/archives/2007/06/#e2007-06-30T23_52_42.txt</link>
<title>PEP in Openfire: Status Report</title>
<dc:date>2007-06-30T23:52:42-07:00</dc:date>
<dc:creator>AJagucki</dc:creator>
<dc:subject>Jabber</dc:subject>
<description><![CDATA[<p>In my <a href="http://caustiq.esoteriq.org/nb/archives/2007/06/#e2007-06-21T00_09_59.txt">previous post</a> I mentioned several Java classes in Openfire's
codebase that would be useful to digest before I started my design phase for
the PEP implementation. In this update I will go into more detail about these
and several other classes as I describe the current design and initial
implementation that I have been working on throughout the week.</p>

<p>Before I do so, here is a more concise version of this post for you
<a href="http://www.urbandictionary.com/define.php?term=tl%3Bdr">'tl;dr'</a> folks out there: Initial design phase is complete and
implementation has started on the PEP skeleton classes that are in place.
Things are proceeding as planned and there are no major hiccups.</p>

<p>Now if that does not cut it for you, read on.  <img src="http://caustiq.esoteriq.org/nb/moods/smilies/smiley.gif" alt=":)" /></p>

<p>The design of PEP in Openfire is primarily concerned with the flow of IQ
packets through the server. Openfire uses its <strong><a href="http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/javadoc/org/jivesoftware/openfire/IQRouter.html">IQRouter</a></strong> class to route
particular packets off to <strong><a href="http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/javadoc/org/jivesoftware/openfire/handler/IQHandler.html">IQHandler</a></strong>s depending on the namespace of
the handler's <strong><a href="http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/javadoc/org/jivesoftware/openfire/IQHandlerInfo.html">IQHandlerInfo</a></strong>. I have written an IQHandler called
<strong>IQPEPHandler</strong> which handles IQ packets with PubSub related namespaces. With
the ability to intercept PubSub related packets I can determine if the packet
is meant for Personal Eventing and act accordingly.</p>

<p>The IQPEPHandler class also has a map of users to <strong>PEPService</strong>s. PEPService
implements the <strong><a href="http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/javadoc/org/jivesoftware/openfire/pubsub/PubSubService.html">PubSubService</a></strong> interface and allows the server to
interact with each user's PEP nodes using the <strong><a href="http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/javadoc/org/jivesoftware/openfire/pubsub/PubSubEngine.html">PubSubEngine</a></strong>. </p>

<p>Here is a bit of eyecandy showing Psi's PEP related menu items enabled
and a PEP node being created from the XML console: <img src="/images/pep.png" alt="PEP" title="PEP in Openfire on Psi" /></p>

<p>With this skeleton in place I will be continuing implementation at a nice
pace. Gaston will be creating my own svn branch soon and once that happens I
will import my code into that repository and continue my work in public.</p>]]></description>
</item>
<item>
<link>http://caustiq.esoteriq.org/nb/archives/2007/06/#e2007-06-21T00_09_59.txt</link>
<title>PEP Planning At The Jive HQ</title>
<dc:date>2007-06-21T00:09:59-07:00</dc:date>
<dc:creator>AJagucki</dc:creator>
<dc:subject>Jabber</dc:subject>
<description><![CDATA[<p>Yesterday I took a trip downtown to the Jive Software offices here in
Portland to meet my mentor, Gaston. After we met up and grabbed some tea from
their break room, we made our way to his work area and started discussing
exactly how <a href="http://www.xmpp.org/extensions/xep-0163.html">PEP</a> could fit into Openfire's codebase. I took note of
several key classes that I may need to either modify or utilize in some
manner. I will list them below for those curious:</p>

<ul>
<li><a href="http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/javadoc/org/jivesoftware/openfire/IQRouter.html">IQRouter</a></li>
<li><a href="http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/javadoc/org/jivesoftware/openfire/disco/IQDiscoInfoHandler.html">IQDiscoInfoHandler</a></li>
<li><a href="http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/javadoc/org/jivesoftware/openfire/disco/IQDiscoItemsHandler.html">IQDiscoItemsHandler</a></li>
<li><a href="http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/javadoc/org/jivesoftware/openfire/pubsub/PubSubModule.html">PubSubModule</a></li>
<li><a href="http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/javadoc/org/jivesoftware/openfire/pubsub/PubSubEngine.html">PubSubEngine</a></li>
</ul>

<p>When I begin my design and implementation phases I will go into detail about
these classes and explain why they are note worthy.</p>

<p>I had a good time with Gaston at the Jive HQ and I left motivated. We both
agreed to make our meeting a weekly recurrence.</p>

<p>Today I spent some time writing up a system test document. Here is an excerpt
from its introductory paragraph:</p>

<blockquote>
  <p>The purpose of this document is to provide an overview of the system tests to
  be performed when implementing the Personal Eventing Protocol (PEP) in the
  Openfire Jabber server. These tests are designed to ensure all of the use case
  examples outlined in XEP-0163 (an XMPP extension protocol document) are
  accounted for.  As of the time this document has been typed, there are very
  few (if not only one) Jabber client(s) that support PEP. Psi is one such
  Jabber client that has included early PEP support in its version 0.11 release
  candidate. This version of Psi is able to discover Jabber servers with PEP
  support and includes PEP functionality such as publishing Mood, Tune, and
  Avatar nodes. Thus, Psi will be the client used for testing where possible. In
  addition we will be observing the raw XML packets flowing from Psi's XML
  console and ensuring correct behavior with respect to XEP-0163.</p>
</blockquote>

<p>After writing up a list of system tests I had a top-down view of the project
and it gave me ideas about things that will need to be addressed during my
design phase. Beginning the design is on my agenda for tomorrow.</p>

<p>Also, for those curious about Google's surprise for GSoC students this year,
<a href="http://www.oreilly.com/catalog/producingoss/">here it is</a>. Signed by the author with "Happy Hacking."  <img src="http://caustiq.esoteriq.org/nb/moods/smilies/smiley.gif" alt=":)" /> I thought it
was a fitting gift.</p>]]></description>
</item>
</channel>
</rss>
