Necromancing here
ht4n is annoying.
First, it comes under the GNU General Public License v3 (not the LGPL), and a commercial, closed source license. Basically, no further than that.
Then it is written in C++.NET, which, while faster than Thrift, creates a platform dependency on Windows (mono doesn't support C++.NET).
And because it is written in C++.NET, it comes with those annyoing separate 32/64-bit dll-versions, that only ever run on a x86 (32/64) processor on Windows.
If you want one and not the other, you have to recompile...
Both these issues combined, it's not only stupid and commercial license-mobbing, it also defeats the idea of a VM-language like .NET.
Since my Chrubuntu Chromebook uses Linux (with ARM processor) and C++.NET doesn't work there, I've ported the Java Thrift-Client to C#.
You can find it > here <.
Comes with a nice example program btw.
Basically
ThriftClient client = null;
long ns = -1;
try
{
client = ThriftClient.create("localhost", 38080);
if (!client.namespace_exists("test"))
{
System.Console.WriteLine("Namespace test does not exist");
client.create_namespace("test");
}
ns = client.namespace_open("test");
System.Console.WriteLine(client.hql_query(ns, "show tables").ToString());
client.namespace_close(ns);
} // End Try
catch (System.Exception e)
{
System.Console.WriteLine (e.Message);
System.Console.Error.WriteLine (e.StackTrace);
try
{
if (client != null && ns != -1)
client.namespace_close(ns);
}
catch (System.Exception ex)
{
System.Console.WriteLine (ex.Message);
System.Console.Error.WriteLine("Problem closing namespace \"test\" - " + e.Message);
}
System.Environment.Exit(1);
} // End Catch
The Thrift-Client works anywhere, with any number of bits.
And - best of all - from this point on, you can use all the Java Thrift-samples/tutorials with minimal changes.