2013-04-03 32 views
1

所以我明白,我们可以让许多客户使用我们的应用程序,我们可以使用基于域名或其他标准的命名空间的每个客户端分离的数据。App Engine的多租户SSL和账单

有也是一种方式,让不同的客户端有对于我们分别计费每个域不同的SSL?以及整体账单情况如何,有没有办法知道客户应该付多少费用,还是有办法查看每个客户/域使用的资源?

+0

为什么不运行每个客户端单独的应用程序?为您提供数据,域/ SSL证书,配额和账单的分离。 –

回答

1

第一,得到一个命名空间的静力学:

from google.appengine.api import namespace_manager 
from google.appengine.ext.db import stats 

namespace_manager.set_namespace('') # Unlock DB from namespace 
namespace_stat = stats.NamespaceStat.get_by_key_name(namespace) 

statadistics = { 
    'bytes': namespace_stat.bytes, 
    'entities': namespace_stat.count} 

# Please note that statics are not upto date. 
# Last update can be read from namespace_stat.timestamp 
# read more at https://developers.google.com/appengine/docs/python/datastore/stats 

我不知道,如果多个SSL区可与GAE使用。也许有*.yourdomain.com SSL证书子域可以帮助你,The Invoice Machine使用这些方法。