Programming for interoperability between software developers is... problematic. OK, it's a nightmare. None of us have the time to write for Traveller, much less coordinate. And coordination typically gives way to committee, resulting in nothing.
There are two proven technologies which suggest a set of web-based services for Traveller programmers.
Serialized Data
There are three text-based serialization solutions currently popular. JSON is the easiest, and is native to JavaScript and ActionScript, and is supported by Perl, Python, Ruby, and other web languages.
JSON makes a good return content from a web service. It allows structured data with a minimum of fuss. The simplest JSON object is a quoted string, such as 'A788899-A'.
REST
As a programming approach, REST is a lightweight alternative to Web Services and RPC. With it, your application can implement services simply and modularly.
REST consists of URLs which form a state-encoded request. They're platform and language independent, and can run in the presence of a firewall -- they're safe.
EXAMPLES
Since our software tends to be 'builder' based and 'sector' based, I'll use those as examples.
Let's say that my base URL is http://eaglestone.pocketempires.com/rest/. I could provide services on top of it such as:
http://eaglestone.pocketempires.com/rest/uwp?sector=Deneb&hex=1925
http://eaglestone.pocketempires.com/rest/uwp?sector=Deneb&name=Deneb
http://eaglestone.pocketempires.com/rest/uwp
The third call, with no parameters, would return a random UWP according to whatever rules my service supports.
http://eaglestone.pocketempires.com/rest/word?lang=vilani&syllables=2&count=5
This call generates 5 Vilani words with 2 syllables each.
http://eaglestone.pocketempires.com/rest/upp
A random UPP.
http://eaglestone.pocketempires.com/rest/sec?sector=Deneb
See Joshua Bell's format for this one.
http://eaglestone.pocketempires.com/rest/career?service=marines&term=3&upp=nnnnnn
This one would return a structure such as:
You get the idea.
There are two proven technologies which suggest a set of web-based services for Traveller programmers.
Serialized Data
There are three text-based serialization solutions currently popular. JSON is the easiest, and is native to JavaScript and ActionScript, and is supported by Perl, Python, Ruby, and other web languages.
JSON makes a good return content from a web service. It allows structured data with a minimum of fuss. The simplest JSON object is a quoted string, such as 'A788899-A'.
REST
As a programming approach, REST is a lightweight alternative to Web Services and RPC. With it, your application can implement services simply and modularly.
REST consists of URLs which form a state-encoded request. They're platform and language independent, and can run in the presence of a firewall -- they're safe.
EXAMPLES
Since our software tends to be 'builder' based and 'sector' based, I'll use those as examples.
Let's say that my base URL is http://eaglestone.pocketempires.com/rest/. I could provide services on top of it such as:
http://eaglestone.pocketempires.com/rest/uwp?sector=Deneb&hex=1925
http://eaglestone.pocketempires.com/rest/uwp?sector=Deneb&name=Deneb
http://eaglestone.pocketempires.com/rest/uwp
The third call, with no parameters, would return a random UWP according to whatever rules my service supports.
http://eaglestone.pocketempires.com/rest/word?lang=vilani&syllables=2&count=5
This call generates 5 Vilani words with 2 syllables each.
http://eaglestone.pocketempires.com/rest/upp
A random UPP.
http://eaglestone.pocketempires.com/rest/sec?sector=Deneb
See Joshua Bell's format for this one.
http://eaglestone.pocketempires.com/rest/career?service=marines&term=3&upp=nnnnnn
This one would return a structure such as:
Code:
ruleset: CT
survival: y
skills: [ pilot, jot ]
continue: y
aging: []
You get the idea.
Last edited: