Using grpc-web should be fine if you don't need the bidi features
(streaming writes or watch).  In addition to those features, using the web
SDK gives you rich offline support (reconnects / retries, offline caching,
etc.), latency compensation (the ability to see your local writes
immediately without waiting for the network round-trip to reach the
backend) and a very friendly API (we abstract away a lot of the
complexities of the wire protocol and make it very JS friendly).

Thanks,
Michael

On Mon, Oct 21, 2019 at 1:12 PM Wenbo Zhu <[email protected]> wrote:

>
>
> On Mon, Oct 21, 2019 at 12:15 PM Sachin <[email protected]> wrote:
>
>> Hi
>>
>> Thanks for update. I will use SDK provided by Firestore but I could not
>> fully understood your comment. Can you please elaborate?
>>
>> My understanding is flow is as below
>> Browser (grpc-web)->Envoy Proxy [trancoder/translator from HTTP1.1 to
>> HTTP2(grpc)]->Firestore.
>>
>> So Firestore will get data in expected format and does not need
>> modifications to support grpc-web.
>>
> It depends on which APIs you are calling. The watch API is a bidi API,
> which is not supported by grpc-web.
>
> Also, I suspect there is  some non-trivial logic in the client SDK that is
> required to access Firestore from browsers.
>
> Any reason you want to use grpc-web, instead of the SDK?
>
>
>
>> Let me know.
>>
>> Thanks,
>> Sachin
>>
>>
>> On Saturday, 19 October 2019 18:52:15 UTC-7, Wenbo Zhu wrote:
>>>
>>> hi Sachin,
>>>
>>> Firestore ships SDKs for web and mobile clients. For Web, please check
>>> https://github.com/firebase/firebase-js-sdk
>>>
>>> Direct access of Firestore via grpc-web is not supported.
>>>
>>> - Wenbo
>>>
>>> On Fri, Oct 18, 2019 at 2:26 PM Sachin <[email protected]> wrote:
>>>
>>>> Hi
>>>>
>>>> Need inputs on using gRPC-web with Google APIs.
>>>>
>>>> Google cloud services RPC APIs to access its services e.g.
>>>> https://cloud.google.com/firestore/docs/reference/rpc/ shows RPC APIs
>>>> to access Firestore.
>>>>
>>>> I am trying to access the RPC APIs using gRPC-web with Envoy Proxy. But
>>>> I am not getting success.
>>>>
>>>> Does does anyone done the same? Any pointers will be helpful.
>>>>
>>>> Thanks,
>>>> Sachin
>>>>
>>>> --
>>>> 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 [email protected].
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/grpc-io/e9a3c582-0a07-4a31-b534-23ae6c6a3ed3%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/grpc-io/e9a3c582-0a07-4a31-b534-23ae6c6a3ed3%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> --
>> 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 [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/grpc-io/c607c336-9ae5-4244-8b05-6a5fc51bf7c8%40googlegroups.com
>> <https://groups.google.com/d/msgid/grpc-io/c607c336-9ae5-4244-8b05-6a5fc51bf7c8%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CAJCyStePGaT0H37qaL6KB6mM3mfOm%2Bs%3DfUrqY%3D-gb-3CZgizMA%40mail.gmail.com.

Reply via email to