Entity Properties or Forge Storage? A Performance Battle for Atlassian App Developers
Andrei Pisklenov
Atlassian Solutions Architect | Atlassian Developer (Cloud and Data Center) | Certified Atlassian Expert
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:
Forge Storage:
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:
领英推荐
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:
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!
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.
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.
Product Owner of Report Builder (Actonic GmbH)
6 个月Andrei Pisklenov did you create this after the morning talk about our new app? ??