Generic call is a mechanism that ensures information is correctly transmitted when the client does not have interface information. It generalizes POJOs into generic formats (such as dictionaries, strings), and is generally used in scenarios like integration testing and gateways.
This example demonstrates generic calls between Dubbo-Go and Dubbo Java services, showing how services can interoperate regardless of the language they're implemented in.
Dubbo Java examples can be used to test interoperability with Dubbo-Go. You can start java server with go client, or go server with java client for testing.
This example uses ZooKeeper as the registry. The following command starts ZooKeeper from docker, so you need to ensure that docker and docker-compose are installed first.
# Start ZooKeeper registry docker run -d --name zookeeper -p 2181:2181 zookeeper:3.4.14
Using Dubbo-Go as provider, you can start it from command line tool:
cd go-server/cmd && go run server.go
Using Dubbo-Go as consumer with generic calls:
cd go-client/cmd && go run client.go
Using Dubbo Java as provider:
cd java-server/java-server mvn clean package sh run.sh
Using Dubbo Java as consumer:
cd java-client/java-client mvn clean package sh run.sh
This example is designed to test interoperability between Dubbo-Go and Dubbo Java:
The client will make various generic calls to the server, including: