Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/morgwai/grpc-utils
Some utility classes for developing gRPC services
https://github.com/morgwai/grpc-utils
concurrent grpc grpc-java java manual-flow-control multithreading
Last synced: about 1 month ago
JSON representation
Some utility classes for developing gRPC services
- Host: GitHub
- URL: https://github.com/morgwai/grpc-utils
- Owner: morgwai
- License: apache-2.0
- Created: 2021-04-17T17:00:16.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-02-16T04:32:05.000Z (10 months ago)
- Last Synced: 2024-11-15T07:46:38.721Z (about 1 month ago)
- Topics: concurrent, grpc, grpc-java, java, manual-flow-control, multithreading
- Language: Java
- Homepage:
- Size: 736 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gRPC utils
Some helpful classes when developing gRPC services.
Copyright 2021 Piotr Morgwai Kotarbinski, Licensed under the Apache License, Version 2.0
**latest release: [7.1](https://search.maven.org/artifact/pl.morgwai.base/grpc-utils/7.1/jar)**
([javadoc](https://javadoc.io/doc/pl.morgwai.base/grpc-utils/7.1))## MAIN USER CLASSES
### [ConcurrentInboundObserver](https://javadoc.io/doc/pl.morgwai.base/grpc-utils/latest/pl/morgwai/base/grpc/utils/ConcurrentInboundObserver.html)
Base class for inbound `StreamObservers` (server method request observers and client response observers), that pass results to some outboundObserver and may dispatch message processing to other threads. Handles all the synchronization and manual flow-control.### [DispatchingOnReadyHandler](https://javadoc.io/doc/pl.morgwai.base/grpc-utils/latest/pl/morgwai/base/grpc/utils/DispatchingOnReadyHandler.html)
Streams messages to an outbound `CallStreamObserver` from multiple concurrent tasks with respect to flow-control. Useful when processing of 1 inbound message may result in multiple outbound messages that can be produced concurrently in multiple threads.### [OrderedConcurrentInboundObserver](https://javadoc.io/doc/pl.morgwai.base/grpc-utils/latest/pl/morgwai/base/grpc/utils/OrderedConcurrentInboundObserver.html)
A `ConcurrentInboundObserver` that uses [OrderedConcurrentOutputBuffer](https://javadoc.io/doc/pl.morgwai.base/java-utils/latest/pl/morgwai/base/utils/concurrent/OrderedConcurrentOutputBuffer.html) to ensure that outbound messages are sent in the order corresponding to the inbound messages order.### [BlockingResponseObserver](https://javadoc.io/doc/pl.morgwai.base/grpc-utils/latest/pl/morgwai/base/grpc/utils/BlockingResponseObserver.html)
A `ClientResponseObserver`, that blocks until the response stream is completed with either `onCompleted()` or `onError(error)`.## EXAMPLES
See [sample app](sample)