views:

40

answers:

2

Is it possible in Google App Engine to get resource usage by each user.

Basically, the app is to be used by each user separately. There is no data thats shared between users (Simplifying a bit here, as its projects which are separate, to which users belong). I dont want to blindly charge users the same value, but rather find out the actual usage of resources by each of them, and charge them for the same. How could this be done in Google App Engine.

Also, lets say I create an app in App Engine for Google Apps Marketplace. And, I want each of the companies to pay for there usage of app. Does the problem remain the same in this context also ?

Clarification: The resource usage by each user might vary a lot. It might even be, that most of the resources are being used by a single user (ex: heavy usage doesnt mean abuse of app, just that one would have to pay for the usage). Thats why I am trying to find per user resource usage.

Having separate apps for each user/project is an option (as suggested below). But then updates to the apps wont be easy.

A: 

for your second question you can create a diffrent APPID for each comany and deploy the app exclusively.

Manjoor
Would that be compatible with the Terms of Service restriction on using multiple apps for one app? Also, if you have hundreds of customers, this could become hard to manage.
Peter Recore
Yes, thats an option. But, then updates to the apps wont be easy.
ciju
It violates the GAE ToS.
Matt H
@Matt. H I am sorry but i could not locate an entry related to this in GAE ToS. Can you point it out for me?
Manjoor
+1  A: 

You can assess some of this using the quota API. This only records CPU used in your app, not in API calls, however. Appstats is capable of recording CPU usage for API calls, so with some work you could reverse-engineer that for your own purposes. For other quotas - bandwidth in and out, data stored, and emails sent - you'd need to record these yourself, manually.

A much simpler option would be to bill your customers per user, or per active user. Simply set those prices at a threshold where you make a reasonable profit off typical users. Your customers will probably thank you, too, as it's much easier for them to predict costs this way.

Nick Johnson