Home » Cloud » Build an efficient mobile app using gRPC

Build an efficient mobile app using gRPC

Transmitting data from mobile devices to a backend server can be a very resource-intensive process. Using the standard HTTP/1.1 protocol, frequent connections from a mobile device to a cloud service can drain the battery, increase latency, and block other apps from connecting.


Google’s gRPC framework handles remote procedure calls (RPC) between mobile clients and backend servers more efficiently. It uses the HTTP/2 standard, which introduces bi-directional streaming, flow control, header compression, and the ability to multiplex requests over a single TCP/IP connection. You can use gRPC to make your mobile app more bandwidth-efficient and to reduce latency between your app and services running in the cloud. Better battery life, reduced data transfer fees and faster response times make for happy mobile users!


You can explore an end-to-end sample that demonstrates how to build an efficient photo-sharing app using these technologies here: Image management for mobile apps using gRPC and Google Cloud Platform. The sample application provides an open-source reference implementation of the entire design pattern, including two backend services connecting to both iOS and Android mobile clients.
There are three components of the sample:
  • Mobile appUsing the mobile app, the user can upload photos, vote for photos, and view a list photos uploaded by their friends that is sorted by the photos’ newness and popularity.
  • Metadata service—The metadata service stores information about images, users, and votes. It’s designed for high-volume traffic using gRPC and Google Cloud Datastore.
  • Image processing application—A Google App Engine application orchestrates a set of Google Cloud Platform services to resize the images uploaded by users into a set of sizes designed for optimal display on mobile devices.
image-management-mobile-apps-grpc-simple.png


As always, we appreciate your feedback. Let us know what you think using the Feedback link at the top of the the article.

- Posted by Syne Mitchell, Google Cloud Platform Technical Writer

Feed Source: Google Cloud Platform Blog
Article Source: Build an efficient mobile app using gRPC

About Admin

Powered by WP Robot