Which assets import tutorial is the most up to date recommendation for using async queues?

There are two tutorials having to do with assets import:

They both tell you to use the same forge template: jira-service-management-assets-import-type

However, the template seems to be directly related to the former tutorial. The later tutorial similarly suggests two separate queues, but defines different responsibilities for each queue. The former tutorial has an older modification date and is listed on the later tutorial as a dependency of sorts in the Before you begin section:

This tutorial assumes you’re already familiar with developing an Assets Import app on Forge and the Imports REST API for Assets. If not, see Import third party data into Assets and Imports REST API Guide.

So my hunch is that the guidance provided in the later tutorial is the current best practice for async queues associated with importing external assets, but the template just hasn’t been updated to reflect that and you are on your own to adapt the template. Can anyone confirm this?

@LucasTheisen,

I’ve been working on that area with some SaaS partners and trying to improve the surrounding materials. So far, I’ve been able to work up a full example app:

The concrete use case isn’t all that useful. Nobody needs a list of Products from DummyJSON. Indeed, that use case is simple enough that out-of-the-box JSON import can handle it. Moreover, for the scale of importing fewer than 200 assets doesn’t justify the complexity of using the 2 queue scenario.

That said, I think real-world usage often justifies the 2 queue configuration because it helps get around the Forge invocation limits. Here are scenarios where I would recommend the 2 queue setup:

  • Very large data sets >1000 assets. Because 1 or more of the following will inevitably apply.
  • Many items without pagination. Because you may need to introduce wait time between requests to avoid rate limiting, which will eat up a single invocation’s 25s limit.
  • Many items, many pages. Similar reason where rate limits may apply per page.
  • Slow APIs. Similar to wait times, slow APIs can eat up 25s without producing much. Esp if 1 page of data would take more than 25s, Async Events have 900s limit.

Even with async queues, there is still an expectation of “paging” (or more precisely chunking) the data.

After the sample app, I’ve been working on reworking the docs but I’m stuck interleaving that with other work so progress has been slow. If you run into specific question about assets-import please do at-mention me so I can jump in with what I know.

1 Like