12
Quake Data Quake Data Distribution Distribution System System Alan Jones Alan Jones Stephen Jacobs Stephen Jacobs David Oppenheimer David Oppenheimer

Quake Data Distribution System Alan Jones Stephen Jacobs David Oppenheimer

Embed Size (px)

Citation preview

Page 1: Quake Data Distribution System Alan Jones Stephen Jacobs David Oppenheimer

Quake Data Quake Data Distribution SystemDistribution System

Alan JonesAlan Jones

Stephen JacobsStephen Jacobs

David OppenheimerDavid Oppenheimer

Page 2: Quake Data Distribution System Alan Jones Stephen Jacobs David Oppenheimer

QDDSQDDS GoalGoal

– Distribute rapid notification of earthquake Distribute rapid notification of earthquake parametric information from all regional parametric information from all regional networks and NEIC to both sophisticated networks and NEIC to both sophisticated earthquake recipients and the general public.earthquake recipients and the general public.

BlameBlame– Designed, written by Stephen Jacobs in 1998Designed, written by Stephen Jacobs in 1998– Design input from SM, DO, RS, WEDesign input from SM, DO, RS, WE

Supported by Alan Jones since 2000Supported by Alan Jones since 2000– Retired IBM’er, USGS VolunteerRetired IBM’er, USGS Volunteer– Affiliated with SUNY BinghamtonAffiliated with SUNY Binghamton

Administered by DO and SMAdministered by DO and SM

Page 3: Quake Data Distribution System Alan Jones Stephen Jacobs David Oppenheimer

Clients/ContributorsClients/Contributors

Delivers information toDelivers information to– QDM (Recenteqs systems)QDM (Recenteqs systems)– CISN Display CISN Display – Software at RSN’s for teleseismic waveform Software at RSN’s for teleseismic waveform

triggers EqInTheNews. triggers EqInTheNews. – PG&E GIS systemPG&E GIS system– CBS News (Seismic/Eruption)CBS News (Seismic/Eruption)

3 distribution hubs (2 USGS and one at 3 distribution hubs (2 USGS and one at IRIS). IRIS).

13 permanent , 21+ transient13 permanent , 21+ transient

Page 4: Quake Data Distribution System Alan Jones Stephen Jacobs David Oppenheimer

Design StrategyDesign Strategy Based on an expanded client-server model. Based on an expanded client-server model.

– In client-server model, the client makes requests to a In client-server model, the client makes requests to a server, and the server merely responds to each server, and the server merely responds to each request. In this case, the server initiates contact when request. In this case, the server initiates contact when it has data to send as well as responding to requests.it has data to send as well as responding to requests.

““Hub” terminology for the server-like systems at the Hub” terminology for the server-like systems at the center of the model; “Leaf" for the client-like center of the model; “Leaf" for the client-like systemssystems

Each seismic network wishing to participate in the Each seismic network wishing to participate in the data exchange would have a "leaf“data exchange would have a "leaf“

Leaves would, in general, talk to two or more Leaves would, in general, talk to two or more "hubs". "hubs".

Hub does not care about at data content (usually)Hub does not care about at data content (usually)

Page 5: Quake Data Distribution System Alan Jones Stephen Jacobs David Oppenheimer
Page 6: Quake Data Distribution System Alan Jones Stephen Jacobs David Oppenheimer

Strategy continuedStrategy continued

Subscription to QDDS is self-initiated for Subscription to QDDS is self-initiated for users who only need to receive users who only need to receive information information

Requires no intervention by maintainers of Requires no intervention by maintainers of QDDS distribution systems. QDDS distribution systems.

Information delivery is designed to be Information delivery is designed to be robust in the presence of network outages robust in the presence of network outages and support large numbers of clients.and support large numbers of clients.

Written in Java and therefore cross-Written in Java and therefore cross-platform portableplatform portable

Page 7: Quake Data Distribution System Alan Jones Stephen Jacobs David Oppenheimer

Strategy continuedStrategy continued When a seismic network has data on an event When a seismic network has data on an event

to share, they put data in a file in a spool to share, they put data in a file in a spool directory which the QDDS software polls directory which the QDDS software polls every seconds. every seconds.

The leaf picks up the contents of the file in The leaf picks up the contents of the file in the spool directory, and submits/uploads it to the spool directory, and submits/uploads it to every hub using a TCP connection. every hub using a TCP connection.

When a hub receives the message, it When a hub receives the message, it – stores it to its output and storage directory. stores it to its output and storage directory. – assigns it a unique message number assigns it a unique message number

independently of other hubs numbering systemsindependently of other hubs numbering systems– initiates distribution of message to all leavesinitiates distribution of message to all leaves

Log everythingLog everything

Page 8: Quake Data Distribution System Alan Jones Stephen Jacobs David Oppenheimer

Permanent leavesPermanent leaves Known to hub through its entry in the hub's Known to hub through its entry in the hub's

comm.lstcomm.lst Keeps trying to upload for a period of time if it does Keeps trying to upload for a period of time if it does

not get an immediate connection.not get an immediate connection. Can stop running for any length of time with no Can stop running for any length of time with no

problem. When it starts back up, it will again receive problem. When it starts back up, it will again receive events. Any events lost during its down time will be events. Any events lost during its down time will be requested when the leaf comes back up. requested when the leaf comes back up.

A permanent leaf receives "alive" messages but it A permanent leaf receives "alive" messages but it does not send alive messages. When it receives an does not send alive messages. When it receives an alive message, it responds with an "Alive Reply": alive message, it responds with an "Alive Reply": message which contains the Version and Level of message which contains the Version and Level of the copy of QDDS it is running. the copy of QDDS it is running.

Page 9: Quake Data Distribution System Alan Jones Stephen Jacobs David Oppenheimer

Transient leavesTransient leaves Can only receive messagesCan only receive messages Can self (re)register with hubsCan self (re)register with hubs Not known to the hub when the hub starts. When Not known to the hub when the hub starts. When

the transient leaf starts, it issues a "request to the transient leaf starts, it issues a "request to register" command to the hub. When the hub register" command to the hub. When the hub accepts the request, it creates a new file called accepts the request, it creates a new file called "comm.lst.trans" and writes the leaf's data into it. "comm.lst.trans" and writes the leaf's data into it.

sends alive messages periodically to each hub to sends alive messages periodically to each hub to which it is attached. If a period of time goes by which it is attached. If a period of time goes by with no alive messages from a transient leaf, it is with no alive messages from a transient leaf, it is removed from the hub's in-memory list of leaves. removed from the hub's in-memory list of leaves. The comm.lst.trans file is re-written with the leaf The comm.lst.trans file is re-written with the leaf removed. removed.

Page 10: Quake Data Distribution System Alan Jones Stephen Jacobs David Oppenheimer

TransmissionTransmission

If message < 64kb hub sends UDP If message < 64kb hub sends UDP datagramsdatagrams– Minimizes use of CPU and I/OMinimizes use of CPU and I/O– Low connection overheadLow connection overhead– UDP datagrams not guaranteed to reach UDP datagrams not guaranteed to reach

all leaves all leaves Larger files are sent via TCP Larger files are sent via TCP

– TCP socket connections are only TCP socket connections are only attempted once in message distribution attempted once in message distribution

Page 11: Quake Data Distribution System Alan Jones Stephen Jacobs David Oppenheimer

Error Detection/RecoveryError Detection/Recovery A leaf determines that it has missed messages in A leaf determines that it has missed messages in

one of two situationsone of two situations– It will receive, for example, message 3 followed by It will receive, for example, message 3 followed by

message 5. message 5. – Hubs send out an "alive"/heartbeat message if no events Hubs send out an "alive"/heartbeat message if no events

have been dispatched in the last few minutes. The "alive" have been dispatched in the last few minutes. The "alive" message contains the ID of the last message that was message contains the ID of the last message that was dispatched. dispatched.

The leaves keep track of which messages have The leaves keep track of which messages have been missed, and every few minutes send out a been missed, and every few minutes send out a request for each message that is currently missing request for each message that is currently missing using the message number (ID). using the message number (ID).

The hub will respond either with a data message The hub will respond either with a data message corresponding to that ID, or a message to say "I corresponding to that ID, or a message to say "I received your request, but I do not have a message received your request, but I do not have a message with that ID". with that ID".

Page 12: Quake Data Distribution System Alan Jones Stephen Jacobs David Oppenheimer

LimitationsLimitations Cannot pass through firewalls without Cannot pass through firewalls without

explicit configuration. explicit configuration. Message delivery is not guaranteed Message delivery is not guaranteed Primitive security, but Alan Jones has Primitive security, but Alan Jones has

implemented public/private keys to the implemented public/private keys to the system.system.

No Subscriptions (clients get everything)No Subscriptions (clients get everything) No installation packageNo installation package 1-sec polling, but supports callback method 1-sec polling, but supports callback method

to receive messages directlyto receive messages directly Protocol largely undefinedProtocol largely undefined