@RestResource annotated apex classes are just like normal apex class and only difference is they expose the apex class as a HTTP GET,POST,PUT or PATCH web-service and hence all the governor limits applicable to the apex class context apply here .
These limits will be 50,000 queries in a context,150 DML,100 SOQL limit of context ,CPU limit ,Heap size limit etc ,all this generally apply .
Also since its a webservice its very important to consider there will be 3MB size limit for the response you return from the apex class.
Coming to the no of API calls ,each request will count against number of API calls and no of API calls allowed for your org depends on edition and as well as license .Also these API calls can be purchased from sfdc with some additional cost(Contact SFDC for same )
Before jumping into writing your custom apex rest service i would strongly recommend to use the standard REST API provided by sfdc ,if any of the API provided by sfdc meets the requirement i would use that as they are faster and have capability to automatically return data in chunks
http://www.salesforce.com/us/developer/docs/api_rest/
The above document link has reference and you will find explanation for standard REST services available out of box.If any of them dont fit then you will need to build apex REST service and an optimized code is necessary to avoid governor limits .
Update:
API limits
http://na1.salesforce.com/help/doc/en/integrate_api_rate_limiting.htm
For enterprise its 1K per licence for salesforce licence
As per the link in your question, the following are not separate limits for the managed package, rather they're counted towards the whole org:
- The total heap size
- The maximum CPU time
- The maximum transaction execution time
Having said that, your DMLs inside the batch will have a separate limit for the managed package namespace, though the maximum CPU time for an example will stay the same for all apex in your org, regardless whether the code is executed withing the namespace of the managed package or your org in general.
So in regards to method executions, this link says that the maximum number of asynchronous Apex method executions falls into the Force.com Platform Apex Limits
"The limits in this table aren’t specific to an Apex transaction and
are enforced by the Force.com platform."
Meaning that the governor limit will apply for the managed package as well.
Best Answer
The ten minute limit is pretty hard to reach in normal conditions, but you need to remember that executing Apex Code is only one part of a transaction, while the ten minute limit applies to everything in the transaction, literally in wall-clock time. For example, it's possible to roll back transactions partway using the DML retry mechanism; while the CPU time can be harvested back because of retries, the limit towards the ten minutes would still apply.
One "easy" way to see this is to write a complicated query with sub-queries and expensive formulas against an object with millions of records in a Batchable's start method. If there's a lot of database time used, this could theoretically cause the Batchable class to fail. That's why it's preferable to query only the fields you need, and then query the remainder of the fields and any sub-queries in the execute method.
Realistically, you'll probably never see this error, but you should know that it can occur. In those cases, all you can do is try again; this would usually resolve the issue. One theoretical point where you could hit this limit is if you consistently use row locks in a way that causes maximum lock timeout (~10 seconds), which would theoretically allow you to construct a transaction that runs for an hour or longer if not for this limit. To avoid that situation, remember to always lock parents before children, and do so in record Id order, when possible.