[jdev] JEP-0060 for PubSub Earthquake data transport (testing)

Bob Wyman bob at wyman.us
Thu Jan 20 17:21:22 CST 2005


I’d appreciate it if folk who are familiar with JEP-0060 could take a look
at the support we’re building into PubSub for distributing customized
real-time feeds of XML encoded Earthquake data using PubSub’s implementation
of JEP-0060 PubSub protocol. These feeds will include Tsunami warnings when
they are issued.

This is a real-time feed and, as far as the folk we work with at USGS know,
it is the only real-time earthquake data feed in XML format today
 (Thus,
this is a unique service for Jabber/XMPP!) Please play with it and consider
supporting these feeds in any client you might be developing. Also, please
send me any comments you might have. Consider that if there had been even
one Jabber user in the Indian Ocean area or one Jabber user in some other
part of the world that could have made a phone call to a friend on vacation
in Thailand, Indonesia, etc. the outcome of the recent tsunami might have
been a little bit different...

You can see a sample Atom feed which logs a feed of all the events we're
publishing here:
http://atom.pubsub.com/90/69/6169a3b8e062b66f7afd592f.xml


To create a subscription, read the "tutorial" that I wrote during the summer
on using PubSub's JEP-0060 support: You'll find it at: 
http://www.pubsub.com/docs/pubsub_xmpp_draft.html

Once you've created a Jabber/XMPP session and logged in, then to subscribe
to ALL notices, you’d do something like this:

<iq type="set" to="xmpp.pubsub.com" id="sub301">
  <pubsub xmlns="http://jabber.org/protocol/pubsub">
    <subscribe node="pubsub/topics/301"
jid="kn_at_pubsub_dot_com at xmpp.pubsub.com">
      <options>
        <x xmlns="jabber:x:data" type="submit">
          <field var="FORM_TYPE" type="hidden">
  <value>http://jabber.org/protocol/pubsub#subscribe_options</value>
          </field>
          <field var="title">
            <value>All Earthquake Messages</value>
          </field>
          <field var="query-string">
            <value><![CDATA[ !GEONAME:XXXXXX]]></value>
          </field>
         </x>
      </options>
    </subscribe>
  </pubsub>
</iq>

If you only wanted stuff with a magnitude greater then 2.5, you would change
the query string to: "MAGNITUDE>2.5".

Other fields available include:

SEISMICREGIONNAME 
SEISMICREGION (Flinn-Engdahl Region see:
http://neic.usgs.gov/neis/epic/fer.html)
GEOREGION
GEONAME
MAGNITUDE
DEPTH (in kilometers)

A sample record payload will look something like this:

<entry>
<title><![CDATA[ M 1.4 (D) NORTHERN CALIFORNIA 2005-01-20 19:00:32 (UTC)
]]></title>
<id>tag:pubsub.com,2005:EQ:nc51155939</id>
<link rel='alternate' type='text/html'
href='http://earthquake.usgs.gov/recenteqsUS/Quakes/nc51155939.htm'/>
<modified>2005-01-20T15:02:30-05:00</modified>
<issued>2005-01-20T15:02:30-05:00</issued>
<summary type='text/plain'>A micro earthquake occurred at 19:00:32 (UTC) on
Thursday, January 20. The magnitude 1.4 event has been located in NORTHERN
CALIFORNIA. (This is a computer-generated message and should not be
considered authoritative.) </summary>
<content type='text/xml'>
<Message xmlns='http://pubsub.com/xmlns'>
<topic>Earthquakes</topic>
<publisher>PubSub Earthquake Publisher</publisher>
<messageID>51155939</messageID>
<revisionID>2</revisionID>
<publication-date>2005-01-20T15:02:30-05:00</publication-date>
<contentType>EQMessage</contentType>
<content>
<Earthquake MsgNumber="5115593902" MsgVersion="1.0" >
<DataMessage Action="Add" TimeReceived="2005-01-20T15:02:30-05:00">
<Identifier EventIDKey="nc51155939" DataSource="NC" Version="1"/>
<Event Type="Earthquake" Version="1" MsgTypeCode="E " Latitude="40.5358"
Longitude="-123.5405" Depth="0.1" GeoRegionCode="36" GeoRegionName="NORTHERN
CALIFORNIA" SeismicRegionCode="3" SeismicRegionName="OREGON, CALIFORNIA AND
NEVADA" NumPhases="15" MinDistance="26" AzimuthalGap="176.4"
RMSTimeError="0.05" HorizontalError="0.4" VerticalError="3.1"
Time="2005-01-20T19:00:32.100Z" LocationMethod="L" Verified="N">
<Magnitude Value="1.4" Type="D" NumStations="0" MagError="0"/>
</Event>
<AddOn Type="USGS Earthquake Page" Version="1"
Link="http://earthquake.usgs.gov/recenteqsUS/Quakes/nc51155939.htm"
Description="autogenerated"></AddOn>
<AddOn Type="Waveform_nc" Version="1"
Link="http://quake.wr.usgs.gov/waveforms/wavesall/nc51155939.rsec0.html"
Description="Waveforms"></AddOn>
</DataMessage>
</Earthquake>
</content>
</Message>
</content>
</entry>

Let me know if working with this stuff interests you and if you have any
questions
 We’re going to do a press release on this next week and announce
it publicly then.

I would love to see something like a map built into my Jabber client that
would "Beep" and show a star or other mark whenever an earthquake is
reported... The same UI widgets could be used for a variety of other
applications in the future...

Let's see if we can make Jabber JEP-0060 PubSub the best platform for "world
shaking" developments! (Yes, I know that's lame...)

bob wyman




More information about the JDev mailing list