Comments (4)
I don't quite understand what your proposal is? What is the benefit of removing the io.micronaut:micronaut-discovery-core
library from the dependencies?
In general, if you look at the implementation of the GrpcEmbeddedServer server class, you will see that the only way to remove it is to rewrite GrpcEmbeddedServer.
I want to say that the situation now is this: Micronaut provides you with the default implementation of the GrpcEmbeddedServer server, but no one is stopping you from writing your own implementation without using discovery-core. Add an analogue of GrpcEmbeddedServer and mark it as @primary bean and thatβs it, after that everything should work without discovery-core.
But, I think, it is worth adding conditions for GrpcEmbeddedServer, that the default implementation of the server should only use the class io.micronaut.discovery.ServiceInstance
@graemerocher I think it's better to change the conditions for GrpcEmbeddedServer
From this:
@Requires(classes = io.grpc.ServerBuilder.class)
To this:
@Requires(classes = {
io.grpc.ServerBuilder.class,
io.micronaut.discovery.ServiceInstance.class
})
@graemerocher WDYT?
from micronaut-grpc.
@altro3 if I understand correctly, Micronaut discovery is an optional feature, meaning that I, as a user, can opt out
However, the current implementation of GrpcEmbeddedServer
requires io.micronaut:micronaut-discovery-core
runtime dependency or it'll fail on startup. It requires me, as a user, to add it to the runtime dependencies, even tho I don't wanna use discovery at all.
from micronaut-grpc.
That's right, it's optional. Hmm, it works. you need to write your own implementation of the EmbeddedServer interface without using discovery. It might make sense to add an Alternative default implementation of the server without using discovery, which would be enabled if there is no ServiceInstance.class
class in the classpath. And add a condition to GrpcEmbeddedServer for the presence of this class. Then one or another implementation will be enabled, depending on the connected discovery library
from micronaut-grpc.
Well, looking at the code again, I see 2 solutions:
-
Implement the ability to start a service without using classes from discovery, but then you will have to duplicate some classes that are in discovery, for example, events that the service is started or stopped. And the benefit of this is not entirely clear.
-
Change compileOnly to implementation for the
io.micronaut:micronaut-discovery-core
dependency, because this implementation cannot work without this library.
I'm leaning towards the second solution.
from micronaut-grpc.
Related Issues (20)
- GRPC embedded server fails with `@MicronautTest(rebuildContext=true)` HOT 1
- breaking change not exposing micronaut-runtime
- Dependency Dashboard
- Memory Leak in ByteBufToProtoMessageConverter.java:57 HOT 1
- Support `ServerInterceptors` HOT 3
- GRPC Graal tests failed after upgrading to Netty 4.1.84
- Feature Request: avro-support (I can code it - just need a gradle project to get me going) HOT 3
- Template is outdated
- Migrate to new configuration ascidoc macro
- grpc now supports the following client lib automated retry & resiliency features HOT 3
- Cucumber Micronaut test: Embedded gRPC server not starting
- gRPC Documentation generation fails
- Retry on Client Side HOT 1
- Add com.google.protobuf:protobuf-kotlin to Micronaut BOM
- Micronaut 4.2.0 breaks grpc services HOT 10
- round_robin for gRPC client does not work with Kubernetes service discovery
- Del @Deprecated gRPC HOT 1
- How to pass password of encrypted private key when enabling grpc.ssl HOT 7
- Grpc request failing with "onStreamError" on enabling ssl and http2 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from micronaut-grpc.