Forge SQL vs Externally hosted DB

Hi everyone! I’m brand new to this community and I hope I’m not making anyone frustrated by posting questions that have already been posted, if so, please direct me to those posts.

I am currently developing a plugin that has a strong dependence on a database with lots of tables and relationships and I’m a little bit alarmed by some of the limitations in forge sql:

  • Foreign keys are not supported. You can still perform JOIN operations, but DELETE operations will not be cascaded.
  • Each SQL statement can only contain a single query.

My first question is about FK not being supported; what are the consequences? Is it only that I can’t have cascading DELETE operations or are there other consequences for this?

My second question is regarding the 150 DML req/s. My question is; what happens when those limits are reached? And Is there anything else we should keep in mind regarding this limitation?

My third question is on the topic of “Runs on atlassian” and forge sql. If we were to host our own database that our plugin makes queries to, how would that affect the “Runs on atlassian” badge and what are the consequences of that? Other than the extra work of hosting and maintaining that DB what, if any, are the Forge SDK related consequences of relying on an external db?

I appreciate you taking the time to read this and hope my questions are relevant and easy to understand.

Best regards,
Alexander

1 Like

Hello @AlexanderSopov

Thank you for your questions

FK not being supported; what are the consequences? Is it only that I can’t have cascading DELETE operations or are there other consequences for this?

While foreign keys are useful in some use-cases, they often come in the way of running data migrations and scalability. Tthis trade off means that delete cascades will not be supported. Additionally, your app will need to enforce referential integrity and cannot depend on the database to enforce it when the query is executed.

regarding the 150 DML req/s. My question is; what happens when those limits are reached? And Is there anything else we should keep in mind regarding this limitation?

Once your app hits the per installation rate limits, a 429 response will be returned. Once the time-window for rate-limit enforcement rolls over, then the rate-limit counter resets. The other limit that you may hit before the DML/s limit is the database execution time per minute (seconds/min), which rolls over every minute.

is on the topic of “Runs on atlassian” and forge sql. If we were to host our own database that our plugin makes queries to, how would that affect the “Runs on atlassian” badge and what are the consequences of that?

ROA badging is available for apps that exclusively use Atlassian-hosted compute and storage and do not egress data.

If you were to use a remote data store, you will have to define an egress, secure the endpoints or use forge remotes to access this data store. Do note that apps that use remotes will not be eligible for “Runs on Atlassian” badging as the data is stored external to Atlassian infrastructure.

Please do note that should you run your own database, you will have to maintain the database, apply security patches, ensure that you participate in remote data residency requests and implement appropriate data lifecycle for remote data.

Hope this helps!

Varun

Hi Varun!

Thank you for your reply, this helps a lot!

1 Like