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 https://youtu.be/Ge791dR98Pg

 

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.

18f2f5b8-ae07-4a11-93b3-57db9af75df6.png

f834bd1b-e6f4-4ad1-8adb-e008b22be59d.png

 

 

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.

0fb5e329-2c34-45ca-b912-c3ecb9ac5f9e.png

2937a574-15e2-4a9d-a35e-01b9946af3b8.png

 

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!

2 comments

Gonchik Tsymzhitov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 29, 2024

Happy read like this articles :) @Andrei Pisklenov _Actonic_  Thanks as usual!

M Amine
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 25, 2024

Interesting article.

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events