the Apache Etch service communication framework recently integrated a new binding
for Go, which we want to share with you.
Etch is a RPC-like service framework. You write service descriptions, e.g.:
service HelloWorld {
string say_hello(string name)
}
Then you generate code for Go proxies and stubs. On the server you just implement
the service methods, e.g.:
func (base *ImplHelloWorldServer) say_hello (name string) string {
return "Hello World to " + name
}
On the client you start a remote connection and call the service:
remote := NewRemoteServer("127.0.0.1:4001")
remote.TransportControl(etch.START_AND_WAIT_UP, 4000)
returnString := remote.Say_hello("Test")
So far it supports everything you know from protocol buffers, but also
provides defined RPC semantics. It supports bidirectional (server- and
client-directed) calls, blocking and non-blocking calls, user defined types,
error handling, and other things. The transport is binary-encoded for
efficiency, other language bindings also support xml.
Apache Etch is available for Go in an early alpha version. There are other
language bindings for Java, C and C#, check http://incubator.apache.org/etch/
The Go Binding is available in the binding-go folder of our trunk at
http://svn.apache.org/repos/asf/incubator/etch/trunk/
There is a pre-generated example for you to have a closer look at
http://svn.apache.org/repos/asf/incubator/etch/trunk/binding-go/runtime/src/test/go/example/
We are very happy to hear your feedback. If you like Etch or want to get
involved, we are happy to get in contact!
Looking forward to your comments,
Holger