Cube42
home
Napkin
Think Tank
RAMP
consulting
contact us
Getting Involved
Help is always needed. If you can write in Java then your more than welcome to build a generator for your favorite language. The sourceforge project is here. To get involved just send an email to cube42
Introduction
RAMP is a light weight solution for building protocols that are to run between codebases of different programming languages. This makes RAMP somewhat like CORBA except you do not need to have any additional architecture at either side. The way it works is that a protocol designer defines the protocol in a .ramp XML file. Then the designer uses RAMP to generate API's for any language using that protocol. Finally the programmers use the generated API to finish the client and server. If the protocol changes, the XML file is simply updated and the API is regenerated.
Client vs Server
The term client and server should be clarified in RAMP. The server is the section of code that is waiting for something to connect. The client is the code that is doing the connecting. Thus the main difference is simply how the initial connections are being made.

The RAMP file
Inside the RAMP file the protocol designer defines the constants, datatypes, client types, client to server messages, and the server to client messages. A message is defined to be run in only one direction. You can define the same message twice for each direction. All of these are transformed into data structures or objects depending on how the designer of the code module envisioned it.

You can download a sample RAMP protocol file here

Message Scoping
In the protocol it is possible to define more than one type of client that will be connecting to the server. This is done using the client types. For instance you many want an admin client and a user client. So you would define two client types. After that you would simply assign each type of message to one or the other. Now what if both clients want a logout message? In this case we have inheritence among the client types. You would define a logged in client and assign the logged out message to that client type. After that you would have your basic client and admin client extend the logged out client type.

Supported Languages
To support a language, a code generator must be implented. This code generator has the ablity to take a properly formed ramp XML document and turn it into an API for a language. The API must allow the users to communicate with other RAMP standard langages using the ramp protocol.
Java Generator
The java generator is the original code generator for RAMP. Here are some of the features.
  • Every ConstantSet is turned into a type save constant class
  • Each data structure turns into a java class
  • Every Identifier turns into a Identifier class with the equals and hashcode method overloaded
  • Every Pair has an identifier nested in it
  • Collections become type save classes that wrap a collection class
  • Communication with the server is done through a connections class with the ability to connecto to the server
C Generator
This generator gives a C coder the ability to build a client or server in C for connecting to any other peice of software that was generated from RAMP. Features for the C Generator. NOTE: the generated C code does not automatically deal with creating the socket or dealing with sessions. The code generated will provide a library of data structures and methods for marshalling and unmarshalling the data structures into a bit stream.
  • Works with the glib libraries
  • Every data structure becomes a struct
  • Every message becomes a struct
  • Marshalling methods are provided for turning the structs into byte arrays
  • Unmarshalling methods are provided for turning the bytes arrays back into structs
  • Destroy methods are provided for freeing any memory used in an array or message
  • Size methods are provided that allow a user to see how much space a message or data structure is using
  • A map of message codes to message types is provided
  • Validator methods are provided to make sure a message or data structure is valid
Html Generator
The Html generator allows a user to turn their protocol into html style documentation. Thus allowing an easy to view version of protocol. Features
  • Internal links are provided so the user can easy click to other messages or data structures
  • The html can be regenerated easly any time someone changes any part of the protocol
Status
RAMP is just finishing its prototype version. In that version we have created a working C and Java API using RAMP. These API's have been tested against each other and work quite well. The formal release for RAMP should be some time in early September. In that time we will be changing the format of the ramp file and adding more features. With any luck the following peices of software will be released.
  • Eclipse Pluggin for working with RAMP
  • A Java Web Start enabled graphical version of RAMP
  • An encryption solution
  • Perl support
  • C++ support
Questions?
Any questions can be asked here.
Contributors
  • Dutch Meyers
  • Ben Chobot
  • Ville Aikas
  • Matt Paulin
  • A.J. Cantu
  • Jehanzeb Pathan