https://kotlinlang.org logo
Join SlackCommunities
Powered by
# kroto-plus
  • v

    v0ldem0rt

    03/23/2020, 6:36 PM
    Google ramping official gRPC support https://grpc.io/docs/tutorials/basic/kotlin/
  • m

    marcoferrer

    03/25/2020, 3:06 PM
    Yeah Ive asked them when they were planning on publishing a development road map so I could help out some. https://github.com/grpc/grpc-kotlin/issues/3 One issue I have with their current implementation is that it uses 1 or 2 patterns that kroto used early on. Those patterns we super brittle and made it really difficult to discover bug and manage calls
    👍 4
  • m

    marcoferrer

    03/25/2020, 3:07 PM
    I really want it to be successful but just hope that the implementers have an open mind to hearing feedback
  • r

    Riku

    03/26/2020, 7:57 AM
    As someone mentioned earlier it seems that Armeria is ok with unary calls using Kroto+ but I can’t get streaming to work.
  • r

    Riku

    03/26/2020, 7:57 AM
    Copy code
    [INFO ] c.l.a.s.l.LoggingService - [S][id: 0x02b871f4, L:/127.0.0.1:9090 - R:/127.0.0.1:54222][<h2c://richards-macbook-pro.local:9090/report.ReportService/GetReports#POST>] Request: {startTime=2020-03-26T07:55:46.064Z(1585209346064000), length=5B, duration=344µs(344068ns), scheme=gproto+h2c, name=report.ReportService/GetReports, headers=[:authority=localhost:8080, :path=/report.ReportService/GetReports, :method=POST, :scheme=http, x-user-agent=grpc-web-javascript/0.1, dnt=1, user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36, content-type=application/grpc, accept=application/grpc-web-text, x-grpc-web=1, sec-fetch-dest=empty, grpc-timeout=2000m, origin=<http://localhost:3000>, sec-fetch-site=same-site, sec-fetch-mode=cors, referer=<http://localhost:3000/rcr_report>, accept-encoding=gzip, deflate, br, accept-language=en-US,en;q=0.9,fi;q=0.8, x-forwarded-proto=http, x-request-id=bbd8169b-b9c4-4db3-9b66-82d2093640bd, te=trailers, grpc-accept-encoding=identity,deflate,gzip, x-envoy-expected-rq-timeout-ms=2000], content=DefaultRpcRequest{serviceType=GrpcLogUtil, method=report.ReportService/GetReports, params=[]}}
    [INFO ] c.l.a.s.l.LoggingService - [S][id: 0x6dbfd97c, L:/127.0.0.1:9090 - R:/127.0.0.1:54224][<h2c://richards-macbook-pro.local:9090/report.ReportService/GetStatus#POST>] Request: {startTime=2020-03-26T07:55:46.066Z(1585209346066000), length=5B, duration=528µs(528312ns), scheme=gproto+h2c, name=report.ReportService/GetStatus, headers=[:authority=localhost:8080, :path=/report.ReportService/GetStatus, :method=POST, :scheme=http, x-user-agent=grpc-web-javascript/0.1, dnt=1, user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36, content-type=application/grpc, accept=application/grpc-web-text, x-grpc-web=1, sec-fetch-dest=empty, origin=<http://localhost:3000>, sec-fetch-site=same-site, sec-fetch-mode=cors, referer=<http://localhost:3000/rcr_report>, accept-encoding=gzip, deflate, br, accept-language=en-US,en;q=0.9,fi;q=0.8, x-forwarded-proto=http, x-request-id=e9abb891-73d8-40fc-a9f0-9ec319023af9, te=trailers, grpc-accept-encoding=identity,deflate,gzip], content=DefaultRpcRequest{serviceType=GrpcLogUtil, method=report.ReportService/GetStatus, params=[]}}
    [INFO ] c.l.a.s.l.LoggingService - [S][id: 0x02b871f4, L:/127.0.0.1:9090 - R:/127.0.0.1:54222][<h2c://richards-macbook-pro.local:9090/report.ReportService/GetReports#POST>] Response: {startTime=2020-03-26T07:55:46.088Z(1585209346088000), length=5B, duration=1248µs(1248517ns), totalDuration=25366µs(25366491ns), headers=[:status=200, content-type=application/grpc, grpc-encoding=identity, grpc-accept-encoding=gzip, server=Armeria/0.98.0, date=Thu, 26 Mar 2020 07:55:46 GMT], content=DefaultRpcResponse{}, trailers=[grpc-status=0]}
    [WARN ] c.l.a.s.l.LoggingService - [S][id: 0x6dbfd97c, L:/127.0.0.1:9090 - R:/127.0.0.1:54224][<h2c://richards-macbook-pro.local:9090/report.ReportService/GetStatus#POST>] Response: {startTime=2020-03-26T07:55:56.067Z(1585209356067000), length=0B, duration=1577µs(1577015ns), totalDuration=10003ms(10003333672ns), cause=io.grpc.StatusException: CANCELLED, headers=[EOS, :status=200, content-type=application/grpc+proto, grpc-status=1, server=Armeria/0.98.0, date=Thu, 26 Mar 2020 07:55:56 GMT], content=DefaultRpcResponse{cause=io.grpc.StatusException: CANCELLED}}
    io.grpc.StatusException: CANCELLED
    	at io.grpc.Status.asException(Status.java:541) ~[grpc-api-1.28.0.jar:1.28.0]
    	at com.linecorp.armeria.internal.common.grpc.GrpcLogUtil.rpcResponse(GrpcLogUtil.java:58) ~[armeria-grpc-0.98.0.jar:?]
    	at com.linecorp.armeria.server.grpc.ArmeriaServerCall.closeListener(ArmeriaServerCall.java:461) ~[armeria-grpc-0.98.0.jar:?]
    	at com.linecorp.armeria.server.grpc.ArmeriaServerCall.doClose(ArmeriaServerCall.java:330) ~[armeria-grpc-0.98.0.jar:?]
    	at com.linecorp.armeria.server.grpc.ArmeriaServerCall.close(ArmeriaServerCall.java:299) ~[armeria-grpc-0.98.0.jar:?]
    	at com.linecorp.armeria.server.grpc.FramedGrpcService.lambda$doPost$1(FramedGrpcService.java:201) ~[armeria-grpc-0.98.0.jar:?]
    	at com.linecorp.armeria.server.HttpResponseSubscriber$1.run(HttpResponseSubscriber.java:522) ~[armeria-0.98.0.jar:?]
    	at com.linecorp.armeria.internal.common.DefaultTimeoutController.invokeTimeoutTask(DefaultTimeoutController.java:252) ~[armeria-0.98.0.jar:?]
    	at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98) [netty-common-4.1.45.Final.jar:4.1.45.Final]
    	at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:170) [netty-common-4.1.45.Final.jar:4.1.45.Final]
    	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164) [netty-common-4.1.45.Final.jar:4.1.45.Final]
    	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472) [netty-common-4.1.45.Final.jar:4.1.45.Final]
    	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500) [netty-transport-4.1.45.Final.jar:4.1.45.Final]
    	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) [netty-common-4.1.45.Final.jar:4.1.45.Final]
    	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.45.Final.jar:4.1.45.Final]
    	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-common-4.1.45.Final.jar:4.1.45.Final]
    	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_232]
    g
    • 2
    • 5
  • r

    Riku

    03/26/2020, 7:58 AM
    any guess why they might be incompatible?
  • o

    okue

    04/13/2020, 3:22 PM
    Hi, i have a question about logging error messages. Is there a way to log error messages of exceptions thrown by override methods of
    XxxCoroutineGrpc.XxxImplBase()
    ? This is an example method:
    Copy code
    override suspend fun someMethod(x: X): Y {
        ...
        throw StatusRuntimeException(Status.NOT_FOUND)
    }
    and I want to call
    log.warn(e, e.message)
    when this method
    someMethod
    throws an exception. Is there a class like Spring’s ControllerAdvice?
  • o

    okue

    04/15/2020, 9:33 PM
    Will this feature be released soon? https://github.com/marcoferrer/kroto-plus/issues/78#issuecomment-572300724
  • m

    marcoferrer

    04/16/2020, 7:52 PM
    @okue The state of current events delayed work on a few features. I want to target Monday the 27th for a release for this. I apologize for the delay and hopefully the target date is soon enough
    o
    • 2
    • 1
  • r

    rocketraman

    04/16/2020, 8:15 PM
    gRPC Kotlin launched today — check out the docs at grpc.io to try it out! Shout out to @Brent Shaffer and the rest of the team that worked on this Thread in Slack Conversation
  • m

    marcoferrer

    04/16/2020, 8:15 PM
    Nice!
  • r

    rocketraman

    04/17/2020, 2:23 AM
    Did they ever get back to you on the "community input" thread you raised?
  • m

    mkerr

    04/17/2020, 10:08 PM
    https://cloud.google.com/blog/products/application-development/use-grpc-with-kotlin
  • m

    mkerr

    04/17/2020, 10:09 PM
    looking at their code, it looks pretty similar to the grpc-java usage with the one difference being coroutine support
  • m

    mkerr

    04/17/2020, 10:09 PM
    (ie it still uses builders)
  • m

    marcoferrer

    04/17/2020, 10:09 PM
    Yeah I know they focused purely on the grpc runtime. I think there is another team that is actually work on protobuf specific support
  • m

    mkerr

    04/17/2020, 10:10 PM
    gotcha
  • m

    marcoferrer

    04/17/2020, 10:10 PM
    Ive been following the project and giving feedback where i can
  • m

    marcoferrer

    04/17/2020, 10:10 PM
    Theyre open to feedback
    g
    • 2
    • 1
  • m

    marcoferrer

    04/17/2020, 10:11 PM
    https://github.com/grpc/grpc-kotlin/issues/32
    👍 3
  • m

    marcoferrer

    04/17/2020, 10:11 PM
    https://github.com/grpc/grpc-kotlin/issues/3
  • m

    mkerr

    04/20/2020, 7:19 PM
    are you planning on building on top of their grpc-kotlin when it stabilizes ?
  • v

    v0ldem0rt

    04/22/2020, 5:23 AM
    I think it would be nice if we contribute back to grpc-kotlin
    g
    • 2
    • 1
  • g

    Gary

    05/24/2020, 6:14 AM
    @marcoferrer something I really love about Kroto+ is the great Kotlin first syntax of all the generators. Wondering is it possible that the Kroto+ message DSL is compatible with grpc-kotlin? I actually haven't tried using the two things together, apologies if it already is possible.
  • r

    Riku

    08/23/2020, 5:57 PM
    kroto+ discussed in the first talk:

    https://www.youtube.com/watch?v=V3BzDyQVeGw▾

    . btw we are making a first release for an app (related to airports) built on kroto+ this month, with more apps in the works! ❤️ for all the work @marcoferrer
    🆒 1
    👍 1
  • m

    marcoferrer

    08/25/2020, 12:44 AM
    This is awesome! Thanks a ton for sharing.
  • m

    marcoferrer

    08/25/2020, 12:44 AM
    This reminded me to post this recording from this years gRPC Conf

    https://www.youtube.com/watch?v=SfmdAA2kwWI&amp;t=1s▾

    ❤️ 2
  • o

    okue

    09/11/2020, 4:22 AM
    Is there a plan to bump up library dependencies?
    • 1
    • 2
  • j

    Jeff Z

    10/26/2020, 10:51 PM
    I filed an issue asking - but has anyone had success using kroto-plus with bazel? Im having trouble figuring out the entrypoints for configuring this as a kotlin compiler plugin
  • m

    Mark Allanson

    05/17/2021, 4:06 PM
    Did the exception handling proposal ever go anywhere?