Comments (4)
The ContextState.install/restore API from Reactive Contexts (linked above) worries me a bit because I could see it leading to the possibility of applications leaking context, but I don't think we need to go that far in order to enable what you are wanting to do. It ought to be possible to accomplish as much with just the ThreadContextProvider SPI. What you are describing seems very useful and I agree is a good integration point to provide, but I wonder if it would better be done as separate from the mp-concurrency spec in order to avoid coupling to a specific version of RxJavaHooks that might possibly change over time?
from microprofile-sandbox.
I don't think it's specifically related to install/restore because your proposal with begin/end is the exactly same (it uses different method names and intermediate types but serves exactly the same purpose and has no additional benefit nor drawback).
What this propagator SPI buys us is that:
- We can have optional plugins for each propagator type
- The mp-concurrency would load/set them up, so the user would be sure that context propagation is whole when loaded
- It'd be as easy as including them in the classpath to get contexts propagated
But the spec should not depend on RxJava, nor mandate that SPI plugins for RxJava exist. Its implementation would take care of that.
from microprofile-sandbox.
Thanks for clarifying about the implementations, not the spec, providing the plugins. That makes much more sense. Can you elaborate more on the specifics, maybe by walking through an example of what mp-concurrency would define the propagator SPI as and how it would be implemented? When I looked at the RxJava link, it seems to already have a plugin point to the ServiceLoader, META-INF/services/io.reactiverse.reactivecontexts.core.ContextPropagator, that is defined by RxJava. So I assume the plugin would be an implementation of this RxJava interface (and utilizing ThreadContextProvider SPI) rather than of a propagator interface defined by mp-concurrency. I might be missing something here, but I don't see what change would be made to enable this other than calling this out/recommending it for implementations.
from microprofile-sandbox.
Moved to eclipse/microprofile-context-propagation#7
from microprofile-sandbox.
Related Issues (18)
- initial interfaces for microprofile concurrency
- Define JWT bridge spec final name HOT 5
- Basic readme needed for sandbox concurrency spec
- Update sandbox concurrency spec with SPI and config
- concurrency: add SPI for context providers HOT 2
- concurrency: support per-application SPI providers HOT 4
- concurrency: support `ThreadContext` lookup without CDI HOT 4
- Create GraphQL README HOT 2
- Create the API annotations #GraphQL HOT 1
- Add "deprecationReason" in ... #GraphQL HOT 4
- Update spec draft according to change made (if approved by majority) #GraphQL HOT 3
- Support JAR-based deployment without container HOT 8
- Annotation descriptions are inconsistent for LRA HOT 2
- @NestedLRA instead of @LRA? HOT 6
- Remove LRA files from the sandbox HOT 1
- Remove microprofile-sandbox/proposals/streams HOT 3
- More detail on MicroProfile Working Group Proposal HOT 2
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 microprofile-sandbox.