gRPC long polling integration testing 1.0-9

gRPC long polling

License

License

Categories

Categories

Net gRPC Networking
GroupId

GroupId

com.payneteasy.grpc-long-polling
ArtifactId

ArtifactId

integration-testing
Last Version

Last Version

1.0-9
Release Date

Release Date

Type

Type

jar
Description

Description

gRPC long polling integration testing 1.0-9
gRPC long polling

Download integration-testing

How to add to project

<!-- https://jarcasting.com/artifacts/com.payneteasy.grpc-long-polling/integration-testing/ -->
<dependency>
    <groupId>com.payneteasy.grpc-long-polling</groupId>
    <artifactId>integration-testing</artifactId>
    <version>1.0-9</version>
</dependency>
// https://jarcasting.com/artifacts/com.payneteasy.grpc-long-polling/integration-testing/
implementation 'com.payneteasy.grpc-long-polling:integration-testing:1.0-9'
// https://jarcasting.com/artifacts/com.payneteasy.grpc-long-polling/integration-testing/
implementation ("com.payneteasy.grpc-long-polling:integration-testing:1.0-9")
'com.payneteasy.grpc-long-polling:integration-testing:jar:1.0-9'
<dependency org="com.payneteasy.grpc-long-polling" name="integration-testing" rev="1.0-9">
  <artifact name="integration-testing" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.payneteasy.grpc-long-polling', module='integration-testing', version='1.0-9')
)
libraryDependencies += "com.payneteasy.grpc-long-polling" % "integration-testing" % "1.0-9"
[com.payneteasy.grpc-long-polling/integration-testing "1.0-9"]

Dependencies

compile (13)

Group / Artifact Type Version
com.payneteasy.grpc-long-polling : grpc-long-polling-client jar 1.0-9
com.payneteasy.grpc-long-polling : grpc-long-polling-server jar 1.0-9
com.google.code.findbugs : jsr305 jar 3.0.2
io.grpc : grpc-core jar 1.27.2
io.grpc : grpc-stub jar 1.27.2
io.grpc : grpc-protobuf jar 1.27.2
ch.qos.logback : logback-classic jar 1.2.3
ch.qos.logback : logback-core jar 1.2.3
org.slf4j : slf4j-api jar 1.7.30
org.slf4j : jcl-over-slf4j jar 1.7.30
org.slf4j : log4j-over-slf4j jar 1.7.30
org.slf4j : jul-to-slf4j jar 1.7.30
org.eclipse.jetty : jetty-servlet jar 9.4.26.v20200117

test (2)

Group / Artifact Type Version
junit : junit jar 4.12
io.grpc : grpc-testing jar 1.27.2

Project Modules

There are no modules declared in this project.

gRPC long polling implementation

Build Status Maven Central codecov codebeat badge Codacy Badge Quality Gate Status

Many web servers (ex. nginx), load balancers do not yet support HTTP/2 upstream. This project implemented both gRPC server and client with long polling via HTTP/1.1

Client example

ManagedChannel channel = LongPollingChannelBuilder.forTarget("http://localhost:9096/test").build();
GreeterGrpc.GreeterBlockingStub service = GreeterGrpc
        .newBlockingStub(channel)
        .withDeadlineAfter(5, TimeUnit.SECONDS);

HelloRequest request = HelloRequest.newBuilder().setName("hello").build();
HelloReply reply = service.sayHello(request);

Server example

LongPollingServer pollingServer = new LongPollingServer();

Server grpcServer = LongPollingServerBuilder.forPort(-1)
        .longPollingServer(pollingServer)
        .addService(new GreeterImpl())
        .build();
grpcServer.start();

ServerListener serverListener = pollingServer.waitForServerListener();

HelloWorldServer server = new HelloWorldServer(9096, new LongPollingDispatcherServlet(serverListener));
server.start();

Versions

Version
1.0-9
1.0-8
1.0-7
1.0-5