Hi everyone,I'm migrating an Android app from a REST endpoint to gRPC, and so far things are going well. I just have a few questions on some aspects that I'm unsure of, I hope that someone can help me out.
- Should I be making RPC calls on the main thread? I've been doing that so far with blocking stubs, and performance is good, but sometimes the main thread gets infinitely frozen. I don't know if I'm perhaps not handling errors properly.
- I've so far been initialising a new stub/connection on every activity/fragment, would this mean that multiple HTTP connections are open? Would initialising a single stub in my Application be a better solution? I just haven't tried it out as I don't know how I'd tell if there's a difference.
Thanks for the response, I've added deadlines as a start, so my app is hanging far less.