Entity Properties or Forge Storage? A Performance Battle for Atlassian App Developers

Entity Properties or Forge Storage? A Performance Battle for Atlassian App Developers

Forge, the framework for building apps on Atlassian Cloud products like Jira and Confluence, provides multiple options for storing in-app data. Two primary methods are "Entity Properties" and "Forge Storage." Understanding the performance characteristics of each is crucial for developers looking to optimize their applications effectively. This article compares the performance of these two storage methods, explores when to use each one, and outlines how to conduct performance tests to evaluate their efficiency.

Watch the full video for an in-depth discussion


Overview of Entity Properties and Forge Storage

Entity Properties: Entity Properties allow developers to store data directly on Atlassian entities, such as issues, pages, or users. This data is stored as key-value pairs associated with specific entities and is accessible via the REST API. This method is ideal for tightly coupling data with a specific Atlassian object and making it accessible across different parts of a plugin or even across multiple plugins.

Forge Storage: Forge Storage offers a key-value storage system that operates independently of Atlassian entities. Designed for more general-purpose storage needs, Forge Storage provides flexibility and scalability. Data is accessed via the Forge Storage API, making it suitable for broader use cases.

When to Use Each Method

Entity Properties:

  • Best for data that needs to be tightly coupled with a specific Atlassian entity, such as issue-specific metadata in Jira.
  • Ideal when data needs to be easily accessible through the Atlassian REST API, which aids integration with other plugins or scripts.
  • Recommended for relatively small datasets that do not require complex querying or relationships.

Forge Storage:

  • Ideal for general-purpose storage needs where data is not directly associated with an Atlassian entity.
  • Suitable for storing larger datasets or when complex querying capabilities are necessary.
  • Preferred when data needs to be stored globally or scoped to a tenant or environment, rather than being tied to specific entities.

Performance Testing

To effectively compare the performance of Entity Properties and Forge Storage, we conducted a series of read and write operations, measuring the time taken to perform each request as well as the entire series of operations for both methods. Each operation was repeated 100 times to minimize fluctuations and obtain the most accurate average results.

Watch the video for a detailed explanation of the measurement techniques.

Performance Testing Results

Let's start with Entity Properties:

  • The average time to set an issue entity property is around 201 ms (milliseconds) per request, with most requests ranging between 140 ms and 240 ms.
  • Get operations are faster, averaging around 151 ms per request.

How to Read the Charts: The x-axis represents the duration of the requests (in ms), while the y-axis shows the number of requests for each duration.



Now, let's look at Forge Storage:

  • The average time to set a storage entity is just 86 ms! Surprisingly, this is more than twice as fast as the equivalent “set” operation for Entity Properties.
  • The “get” operation is even more impressive, with an average time of only 67 ms, again more than twice as fast compared to getting an issue entity property.



Conclusion

Choosing between Entity Properties and Forge Storage depends on the specific needs of your application. Entity Properties are ideal for data that is closely tied to Atlassian entities and needs to be accessible through the REST API, especially when security is not a concern. In contrast, Forge Storage is better suited for more flexible and scalable storage needs, allowing for querying and aggregation.

Our performance tests show that Forge Storage is more than twice as fast as Entity Properties for both read and write operations. Even considering the limitations of the Forge platform, Forge Storage appears to be the preferable option for storing your app’s data.

The Atlassian team has done an excellent job optimizing the performance of Forge Storage. Even though there is still a long roadmap of improvements ahead, it is already proving to be fast and reliable for a variety of app needs. Well done, Atlassian!

Feel free to check out the repository containing the app I used for these performance tests and share your own results!

https://github.com/andrei-pisklenov/forge-performance-check

What about the data residency and your own location. Have you looked it from that perspective as well? By default the storage should be somewhere in US, but Jira EPs are with Jira data. The latter should be close to your usage if you havent specified it manually.

回复
Sunandan Gokhroo

Product @Atlassian | ESCP | MDI

6 个月

This is amazing Andrei Pisklenov ??. Thank you so much for dedicating your time to conduct this thorough test and for sharing your insightful findings. Your effort is greatly appreciated and invaluable to our progress.

Rustem Shiriiazdanov

Product Owner of Report Builder (Actonic GmbH)

6 个月

Andrei Pisklenov did you create this after the morning talk about our new app? ??

回复

要查看或添加评论,请登录

Andrei Pisklenov的更多文章

社区洞察

其他会员也浏览了