开发者

Fielding's "large-grain data objects"

Roy Fielding's REST dissertation (http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm) frequently mentions 'large-grained objects' and 'large-grained data'. For example,

开发者_开发知识库

"The REST interface is designed to be efficient for large-grain hypermedia data transfer, optimizing for the common case of the Web, but resulting in an interface that is not optimal for other forms of architectural interaction."

I understand that most web-pages are 'large-grained' as they are thousands of bytes long and that using UDP for streaming audio would involve small-grained data.

But in practice, what are the smallest quantities of data that a RESTful system should be used for? A lot of examples discuss RESTful interfaces for database queries where the data being returned (minus packet info) could be only a few bytes eg a user's status.


This is really not an easy question to give an absolute answer to.

However, I would say that if your messages are so small that the interaction becomes too chatty to be viable over a regular 100 mb/s network connection, then the messages are also too small for REST.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜