views:

21

answers:

1

I am developing an open "protocol" for dynamic ridesharing services using mobile phones. It is based on XML-RPC and uses marshalled objects as parameters (quite like Soap).

Every entity and operation will be heavily documented in the draft. As example, look at this first skeleton of a documented Prefs object to be used in the Protocol.


Prefs object

Stores the preferences of a Trip set by the Person who creates it [..]

Attribute   Type       Requirement
age         string      MAY
nonsmoking  boolean     MAY
gender      string      MAY
drive       boolean     MAY
ride        boolean     MAY
  • Even if all attributes of Prefs objects are optional, objects of type Prefs MUST be provided when doing XML-RPC calls. In case of zero attributes provided, an empty object representend with an empty XML-RPC struct MUST be provided
  • gender MUST be any of the values {'M', 'F', 'B'}, meaning 'male', 'female' or 'both'

The following is a valid Prefs object used in Protocol operations:

<struct>
 <member>
  <name>nonsmoking</name>
  <value>
   <boolean>0</boolean>
  </value>
 </member>
 <member>
  <name>gender</name>
  <value>
   <string/>
  </value>
 </member>
 <member>
  <name>ride</name>
  <value>
   <boolean>0</boolean>
  </value>
 </member>
 <member>
  <name>drive</name>
  <value>
   <boolean>0</boolean>
  </value>
 </member>
 <member>
  <name>age</name>
  <value>
   <string>18-40</string>
  </value>
 </member>
</struct>

An operation using Prefs objects would have a complete description of an HTTP POST operation with all the details etc.

Would you call this one a Protocol or still an API? I.e., if we write a Protocol which is based on another Protocol (in this case XML-RPC), is the derivative work a Protocol again?

I would like to know that because I will talk about this in my bachelor thesis and I don't want to say something very stupid :)

Thank you!

+1  A: 

Strictly speaking every API is a protocol. Protocols often are based on other protocols. TCP is based in IP. HTTP lies on top on TCP, HTTPS is based on HTTP and so on.

Your protocol is no networking protocol, but an application level communication protocol.

codymanix
Thank you very much for the clarification!
bodom_lx