Coder Social home page Coder Social logo

http based drpc client about drpc HOT 8 OPEN

storj avatar storj commented on September 18, 2024
http based drpc client

from drpc.

Comments (8)

vtolstov avatar vtolstov commented on September 18, 2024

as i understand that drpc does not send any http2 headers by default so its not possible to determine how to handle this request in this combo server ?
does it possible to handle native drpc client without drpcmigrate client helper that sends special bytes before data?

from drpc.

zeebo avatar zeebo commented on September 18, 2024

What do you mean by "native drpc client?" Since it's going through http, something has to exist to map the http request into a drpc stream, which is a drpchttp.Protocol with the built in ones defined here. There's no built in way for a drpc client to wrap a request into an http request, though.

from drpc.

vtolstov avatar vtolstov commented on September 18, 2024

Let me explain - with grpc i can handle incoming grpc connections to http2 server. Parse incoming stream data and get service/method and payload.
With drpc - i cant handle simple drpc connection created with tcp connect and drpc.New()

from drpc.

vtolstov avatar vtolstov commented on September 18, 2024

how can i create drpc connection to http based drpc server that can switch protocol by content-type header ?

from drpc.

vtolstov avatar vtolstov commented on September 18, 2024

may be i need to create drpc.Transport that utilise http1/http2 connection?

from drpc.

vtolstov avatar vtolstov commented on September 18, 2024

can you add to drpchttp transport that uses http connection for drpc?

from drpc.

zeebo avatar zeebo commented on September 18, 2024

One option might be to use a websocket based transport like https://pkg.go.dev/go.bryk.io/pkg/net/drpc/ws

from drpc.

zeebo avatar zeebo commented on September 18, 2024

This will be a tracking issue to extend the drpchttp package to include a client that wraps an http.Transport or something. It may be limited to unitary streams. It'd be cool if it worked against twirp or grpc-web servers as well as the basic drpchttp server.

from drpc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.