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

Duplex gRPC via Jetty #995

Merged
merged 1 commit into from May 19, 2019

Conversation

Projects
None yet
2 participants
@oldergod
Copy link
Collaborator

commented May 17, 2019

Part of square/wire#957

Test prints a trace I can't find the cause of.

14:44:23.901 [qtp873105556-28] WARN  org.eclipse.jetty.server.HttpChannel - /routeguide.RouteGuide/RouteChat
java.lang.IllegalStateException: closed
	at okio.RealBufferedSink.emit(RealBufferedSink.kt:186)
	at misk.web.ResponseKt.writeToJettyResponse(Response.kt:47)
	at misk.web.BoundActionMatch.handle(BoundAction.kt:227)
	at misk.web.jetty.WebActionsServlet.handleCall(WebActionsServlet.kt:72)
	at misk.web.jetty.WebActionsServlet.doPost(WebActionsServlet.kt:53)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at org.eclipse.jetty.websocket.servlet.WebSocketServlet.service(WebSocketServlet.java:177)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:873)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:542)

@oldergod oldergod requested a review from swankjesse May 17, 2019

internal class GrpcStreamMarshaller<T>(val adapter: ProtoAdapter<T>) : Marshaller<GrpcReceiveChannel<T>> {
override fun contentType() = MediaTypes.APPLICATION_GRPC_MEDIA_TYPE

@Suppress("PARAMETER_NAME_CHANGED_ON_OVERRIDE")

This comment has been minimized.

Copy link
@swankjesse

swankjesse May 18, 2019

Member

Hmmmm.... Just use the supertype’s name?

}

class BlockingGrpcChannel<T> : GrpcSendChannel<T>, GrpcReceiveChannel<T> {
private val queue = LinkedBlockingDeque<T>(2)

This comment has been minimized.

Copy link
@swankjesse

swankjesse May 18, 2019

Member

2 feels hacky but this class won't survive the week so I'm okay with it.

This comment has been minimized.

Copy link
@oldergod

oldergod May 18, 2019

Author Collaborator

It works with 1 yo
so I changed it to 1

@oldergod oldergod force-pushed the bquenaudon.2019-05-15.jettyrpc branch from e51dbca to eb2e7ac May 18, 2019

@oldergod oldergod merged commit 070a100 into master May 19, 2019

2 checks passed

ci/circleci: java Your tests passed on CircleCI!
Details
ci/circleci: node Your tests passed on CircleCI!
Details

@oldergod oldergod deleted the bquenaudon.2019-05-15.jettyrpc branch May 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.