Android DownloadManager with gRPC

52 views
Skip to first unread message

clement jean

unread,
Mar 26, 2020, 7:29:28 AM3/26/20
to grp...@googlegroups.com

Hi,

 

I recently posted a question on StackOverflow concerning the problem of using DownloadManager with gRPC.

To summarize, I want to serve static files from my server (C++) and being able to download these from the DownloadManager (Kotlin)

 

However, I need an URI to use DownloadManager. I have potentially a solution:

  • I could either map the RPC call with an URI (like the static_file attribute in Google Cloud YAML congirutation file)

 

But I’m working on a Standalon server not on Google Cloud, would it still be feasible to use a YAML config file from gRPC C++ and serve these files?

 

For more information on the problem, please check the question on StackOverflow

 

Thank you in advance

 

Clement Jean

Eric Gribkoff

unread,
Mar 26, 2020, 12:30:04 PM3/26/20
to clement jean, grp...@googlegroups.com
As a commenter on your StackOverflow question suggested, gRPC is for structured data not raw file downloads. Trying to map between a URI and the RPC call would not be enough to make DownloadManager work with gRPC, because the gRPC server is going to send and expect additional data beyond the raw file itself that will not be understood or sent by DownloadManager.

You can certainly use gRPC server and client to send large files, but it's not going to have the same set of features built-in for large file downloading (such as resuming your download later if the connection is broken) as using something like a HTTP server + a specific file download library/client. I would recommend just running a separate HTTP server for your file download needs.

Thanks,

Eric

--
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+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/AM6PR02MB36211D760C90C8D91F55E76AF4CF0%40AM6PR02MB3621.eurprd02.prod.outlook.com.
Reply all
Reply to author
Forward
0 new messages