apache/dubbo-demo

Sponsored OSS

By The Apache Software Foundation

Updated 9 months ago

Image
0

10K+

apache/dubbo-demo repository overview

About this sample

This example demonstrates building up of Dubbo rpc server and client with lightweight API. The API is quite simple and straightforward.

Follow steps below to run this example.

Start Server

Run the command below to start the Dubbo rpc server

mvn clean package
mvn -Dexec.mainClass=org.apache.dubbo.samples.provider.Application exec:java

Now, you have a server running on port 50052 which accepts triple protocol requests.

More usages of triple protocol can be found here:

Start Client

There are two ways to test the server works as expected:

  • Standard HTTP tools like cURL.
  • Dubbo sdk client.
cURL
curl \
    --header "Content-Type: application/json" \
    --data '["Dubbo"]' \
    http://localhost:50052/org.apache.dubbo.samples.api.GreetingsService/sayHi/
SDK client
mvn -Dexec.mainClass=org.apache.dubbo.samples.client.Application exec:java

Tag summary

Content type

Image

Digest

sha256:e34f8df76

Size

266 MB

Last updated

9 months ago

docker pull apache/dubbo-demo:simple-provider

This week's pulls

Pulls:

74

Jul 6 to Jul 12