Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] compile createSourceEventStream #153

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Dschoordsch
Copy link

Creating a source event stream from the compiled query is about 1.5 to 2 times faster. The use case for createSourceEventStream is running the event stream and resolvers in different processes. That means compiling the resolvers is not necessary and just costs performance, thus a separate function is exposed for just this use case.
It does not actually compile anything, but that's an implementation detail und thus compileCreateSourceEventStream name was chosen.

This needs some polishing and tests, but I would like to know if you're interested in this at all?

Relates-To: ParabolInc/parabol#5468

Add `createSourceEventStream` to the `CompiledQuery`.

Signed-off-by: Georg Bremer <[email protected]>
Add a benchmark to show it's worth exposing the function.

Signed-off-by: Georg Bremer <[email protected]>
The use case for createSourceEventStream is running the event stream and
resolvers in different processes. That means compiling the resolvers is
not necessary and just costs performance.

Signed-off-by: Georg Bremer <[email protected]>
@Dschoordsch
Copy link
Author

@markrzen could you take a look and let me know if this is something you would be willing to accept? If yes, I will polish it up.

@markrzen
Copy link
Contributor

markrzen commented Dec 9, 2021

Hey @Dschoordsch, I am not a maintainer of the library. You will want to ping the good folks on this list:
https://github.com/zalando-incubator/graphql-jit/blob/main/MAINTAINERS

@ruiaraujo
Copy link
Collaborator

I wont have time before the weekend to check it.

@Dschoordsch
Copy link
Author

@ruiaraujo did you have chance to take a look whether or not a compileCreateSourceEvent function would be something you would accept?

@Dschoordsch
Copy link
Author

@boopathi could you take a look if that's something which you would be interested in?

@Dschoordsch Dschoordsch changed the title [WIP] compile createSourceEventStream [RFC] compile createSourceEventStream Jan 14, 2022
@oporkka
Copy link
Member

oporkka commented May 24, 2022

@Dschoordsch We would like to learn if there are more needs for this in the GraphQL JIT user community

@laurisvan
Copy link

@Dschoordsch We would like to learn if there are more needs for this in the GraphQL JIT user community

Subscriptions are essential for our service, so at least we'd be interested in trying this out. I've checked createSourceEventStream in graphql before, and frankly speaking I'm not fully aware of how it works these days. Probably some kind of "for dummies" explanation would be great. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants