"会话"与谷歌云端点 [英] "Sessions" with Google Cloud Endpoints

查看:108
本文介绍了"会话"与谷歌云端点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



据我了解, Google云端点是类似Google的 REST 服务的实现,因此它们不能在内存中保留任何会话数据,因此:


  • 用户必须为每个请求发送身份验证数据

  • 以后要使用的所有数据都必须持久 ,即对于我收到的每个API请求,我必须访问数据存储区,执行一些操作并再次存储数据。


这是正确?如果是这样,这在性能方面真的很好吗?

解决方案

数据存储非常快,特别是如果您执行密钥查找(如同查询)。如果您使用NDB,那么您将拥有自动查找您的查找的好处。


This question is only to confirm that I'm clear about this concept.

As far as I understand, Google Cloud Endpoints are kind of Google's implementation of REST services, so that they can't keep any "session" data in memory, therefore:

  • Users must send authentication data with each request.
  • All the data I want to use later on must be persisted, namely, with each API request I receive, I have to access the Datastore, do something and store the data again.

Is this correct? And if so, is this actually good in terms of performance?

解决方案

The datastore is pretty quick especially if you do a key lookup (as apposed to query). if you use NDB then you will have the benefit of auto memache your lookups.

这篇关于"会话"与谷歌云端点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆