The open source world needs a way to communicate between languages that is:
- Very fast
- Very efficient
- IS NOT a protocol
- IS a statically typed serialization format
- Supports many languages (python, perl, ruby, java, c#, VB, php, erlang, javascript, etc...)
- Takes into account the datatype differences in the languages, and makes that configuratble (ie. PHP Array -> Python Dict or List?)
- Full support for binary types.
- Streaming support.
- Allows for static type specifications to be written once and re-used
- Supports plugins for validation (although the library should not validate beyond basics, like Max Length)
- Versioned so that it could be extended without breaking backward compatibility (within major versions)
- Did I mention FAST?
This would be like throwing Google Protocol Buffers, Facebook Thrift, yaml, Python Pickle, PHP Serialize, json, xml schemas, and more into a pot... stew for 10 hours... and serve.
This really needs to be unified.
Here is an example type specification (written in XML) that we use at AppCove: This brings static aspects to dynamic languages (such as PHP and Python), while retaining the benefits of a dynamic language.
<Extruct>
<Struct Name="Task.Select.I">
<String Name="Ledger_MSID" />
</Struct>
<Struct Name="Task.Select.O">
<String Name="Ledger_MSID" />
<Int Name="Public_MNID" />
<String Name="Type" />
<String Name="Name" />
<Int Name="Create_User_MNID" />
<Int Name="Owner_User_MNID" />
<Int Name="Assign_User_MNID" />
<String Name="Detail_HTML" />
<String Name="Note" />
<String Name="StartDate" />
<String Name="DueDate" />
<Decimal Name="HourEstimate" />
<Decimal Name="HourEstimate_Total" />
<Decimal Name="TimeLogged" Nullable="1"/>
<Decimal Name="TimeLogged_Total" Nullable="1"/>
<Int Name="PercentComplete" />
<String Name="Priority" />
<Int Name="Status_MNID" />
<String Name="Status_Name" />
<Int Name="Hidden" />
<Decimal Name="Markup" />
<Int Name="Billable" />
</Struct>
</Extruct>