I think you don't want to write a 'filter' over the GRPC server code. I
think Paul was suggesting that you write your own servlet that manually
wraps a generated GRPC client-stub and produces the output that you want.
You can then run that code in the same process and connect to a GRPC server
using the InProcessServer and InProcessChannel or you can have the client
stub talk to a remote server.

i.e you manually emulate what the GRPC-go gateway does to see if that's
useful for you

On Wed, Aug 24, 2016 at 11:06 AM, <ccl...@dieselpoint.com> wrote:

> Could you give me a bit of direction here? I can't make heads or tails of
> the internal Grpc server code, nor can I find where I would add a filter to
> handle json-over-http calls.
>
> All I really need is to know where to put some kind of interceptor,
> filter, or hook that can examine incoming headers, and if it's a request
> for json, deserialize, handle, serialize, and respond. My guess is that it
> wouldn't be to tough to add a proxy layer somewhere. A quick example would
> save me hours...
>
>
>
> On Thursday, August 18, 2016 at 4:51:26 PM UTC-5, Paul Johnston wrote:
>>
>> Maybe it's possible to use what you have already and use that as the
>> reverse-proxy to a yet-to-be-written gRPC service for some of the most
>> performance-critical parts of your API, and see if that gRPC offering works
>> for you and your customers.  Once you discover the patterns you like, you
>> could consider writing a protoc plugin that generates code in the REST
>> style familiar to your existing codebase.
>>
>> On Thursday, August 18, 2016 at 10:48:38 AM UTC-6, ccl...@dieselpoint.com
>> wrote:
>>>
>>> Our app has a REST API we've implemented using Jax-RS, Jetty, and
>>> Resteasy.
>>>
>>> I'd like to port the whole thing to gRPC, and offer both a gRPC and a
>>> JSON/REST interface to our customers.
>>>
>>> Our product is not yet released, so I have some flexibility in
>>> redesigning the API. But it's going to be necessary to support query
>>> parameters in the URL, i.e. GET /hello?foo=bar
>>>
>>> Is this possible using the Java code? Maybe there's a Netty component
>>> for it?
>>>
>>> (I see that there is a way to do it in Go:
>>> https://github.com/grpc-ecosystem/grpc-gateway. Need the same thing in
>>> Java.)
>>>
>>>
>>>
>> --
> You received this message because you are subscribed to the Google Groups "
> grpc.io" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to grpc-io+unsubscr...@googlegroups.com.
> To post to this group, send email to grpc-io@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/grpc-io/52aad5c7-e10a-4433-b2bb-c07e7a5de355%40googlegroups.com
> <https://groups.google.com/d/msgid/grpc-io/52aad5c7-e10a-4433-b2bb-c07e7a5de355%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To post to this group, send email to grpc-io@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CADQ0XY1JV%3DXLYuO31kkaBgaJs9-H-vXieSfya5AcnjjMzQ0tCA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to