Looking to make its APIs faster, Google introduced early this week two experimental features in Google Data Protocol, one for partial response and one for partial update.
Google Data Protocol offers a secure means for developers to write applications that let users access and update data stored by Google products.
"Together, partial response and partial update can drastically reduce the network, memory, and CPU resources needed to work with Google APIs," said Kyle Marvin and Zach Maier of the Google Data Protocol team, in a blog post.
Explaining how partial response works, team members cited an example of a developer writing an Android calendar widget and wishing to display the time and title of recently changed events on Google Calendar.
"With the old Calendar Data API, you would request your calendar's events feed and receive a large amount of information in response, including lots of extra data like the attendee list and the event description," Marvin and Maier wrote. "With the addition of partial response, however, you can now use the fields query parameter to request only relevant information, in this case, event titles and times.
If a developer wants to enable a widget to change the time of calendar events, partial update makes this easy by editing data received in the partial response and using the HTTP PATCH verb to send modified data back to the server, the team members said.
"The server then intelligently interprets your PATCH, updating only the fields you chose to send. Throughout this entire read/modify/write cycle, the unneeded data remains server-side and untouched," they said.
Partial response and partial update as of early this week were supported in varying degrees in YouTube Data API, Calendar Data API, Picasa Web Albums Data API, and Sidewiki Data API. Plans call for adding support for most Google Data Protocol APIs soon.
Find your next job with techworld jobs