Google Wave’s Federation Protocol Under the Hood, Part 2

Posted Feb 11, 2010 by Anthony in Architecture, Blogs, Google Wave


Purpose [Updated 4/3/2010]

This post is the second in a series aimed at understanding the internals of the FedOne protocol.  I will focus on the startup process in this post. Specifically, the classes and packages involved coupled with how they interact.  If you are not familiar with Guice, I recommend reading the first post in this series, which covers pre-requisites to understanding the FedOne codebase.


Startup Process

When you startup your Wave server, you may use a command that resembles the following:
java -jar dist/fedone-server-0.2.jar –client_frontend_hostname=127.0.0.1 –client_frontend_port=5222 –xmpp_component_name=wave –xmpp_server_hostname=%XMPP_SERVER_HOSTNAME% –xmpp_server_ip=%XMPP_SERVER_IP% –xmpp_server_port=5275 –xmpp_server_secret=%XMPP_SERVER_SECRET% –xmpp_server_ping=”acmewave.com” –certificate_private_key=%PRIVATE_KEY_FILENAME% –certificate_files=%CERTIFICATE_FILENAME_LIST% –certificate_domain=%CERTIFICATE_DOMAIN_NAME% –waveserver_disable_verification=true –waveserver_disable_signer_verification=true –xmpp_jid=wave.%WAVE_SERVER_DOMAIN_NAME% –xmpp_server_description=”FedOne

This startup command maps to ServerMain.java within the package org.waveprotocol.wave.examples.fedone (until otherwise specified, all files I list are housed within this package).  The flags that are passed via the command are specified in FlagSettings.java.  There you will see the annotation @Flag (specified in Flag.java).  The main() method of ServerMain.java calls FlagBinder.java to read in the Flags and validate them against the allowable values as specified in FlagSettings.java.  FlagBinder then returns an injectable Guice module which is used by the Injector in the run() method.  

The above describes how the command line arguments are propagated throughout FedOne.  The following Activity Diagram illustrates the complete startup process (click image to see full-size).

Next In Series The next post will cover some of the dependencies in the FedOne code (those managed by Guice).  I will show a diagram of the dependencies in the GraphViz tool using a data file produced by the Grapher extension of Guice.

Related posts:

  1. Google Wave’s Federation Protocol Under the Hood, Part 3 Purpose [Updated 4/3/2010] This is the third post in...
  2. Google Wave’s Federation Protocol Under the Hood, Part 5 Purpose [Updated 4/3/2010] This is the fifth and final post...
  3. Google Wave’s Federation Protocol Under the Hood, Part 4 Purpose [Updated 4/3/2010] This is the fourth post in...
  4. MongoWave: Persistence on Google FedOne Wave Server with mongoDB Purpose My company, SESI, has been working on applying...
  5. Google Wave’s Federation Protocol Under the Hood, Part 1 Purpose [Updated 4/3/2010] This post is the first in...

Related posts brought to you by Yet Another Related Posts Plugin.

Tags: , , , ,

2 Responses to “Google Wave’s Federation Protocol Under the Hood, Part 2”

  1. [...] Google Wave’s Federation Protocol Under the Hood, Part 2 Posted Feb 11, 2010 [...]

    Reply to this comment
  2. [...] Part 2 – Startup Process [...]

    Reply to this comment

Leave a Reply

Subscribe without commenting