Forge with web-sockets

Hi there,

We want to achieve real-time information display and interaction with one of our app. Using the custom ui and polling is not a solution, since we can run out the call limit very fast.
We are interested how we achieve this. Can we use web-sockets with Forge? If yes, how, because we did not find any public document about it.

@kchan
The use case is the following: user “A” opens the forge app’s issue glance and start a voting session. User “B” open this issue glance as well. When user “B” votes for an option, user “A” should see this vote immediately, without refreshing the page or the issue glance (and vice versa).
We started with the solution to poll the changes frequently for users to get the latest information about the votes, however, this will eat up our call limit very fast, if for example, we poll every 3 seconds.

@attila.bordas could you please clarify what do you mean by “call limit”?

Our problem is, that no push/real time technology is documented for the Forge Custom UI yet. Therefore we are forced to implement some kind of polling mechanism which is not supported due to the Invocation Limits.

Our goal was to show to the users the current state of the vote under an in progress estimation session. For example that how long time left from the vote and who vote already. For this, we have to run a polling from every user client to fetch these information until the vote ended in every 3 seconds for example.

For example, if we have a small team (let 6 user), who want to estimate 25 issue. The time limit for the voting session be 3 minutes and we refresh the voting state in every 3 seconds, than we will invoke the backend 6x25x3x(60/3) = 9000 times (we can’t count some additional invocations that we have to call but don’t connected closely to the voting session). We can play planning poker 5 times a week with a team like that. We can increase that number if we play a little with the numbers and decrease the polling rate but than we will lose user experience.

We calculate with the limits by this docs: https://developer.atlassian.com/platform/forge/platform-quotas-and-limits/

Small team Bigger team
Number of seat 6 25
Number of issue 25 30
Time limit for the voting 3 1
Polling rate 3 3
Invocations 9000 15000
Number of session we can run with a team size ( the limit for free apps is 50000 invication ) 5 3

@attila.bordas I feel like there’s a misunderstanding here either from my or your side. Do you use requestJira in your Custom UI app? If you do and you’re worried about its limits then I believe it doesn’t fall into “invocations limit” from the page you listed above. If you just need to call Jira/Confluence REST API then you likely don’t need a backend function - you can do this purely on the frontend and it won’t fall into the invocations limit.

Hi @Dmitrii , thank you for clarifying this and thank you for the alternative solution.

We are interested in the web-socket solution mentioned in this story: https://devpost.com/software/smart-guess-for-planning-poker

@kchan Could you please give some hints about using web-sockets in Forge? Thanks!

2 Likes

Any update on this?

Hey @attila.bordas, I helped the people who created that application with issues with their app unrelated to the web-socket solution that they’ve created.

Perhaps @bjornbrynjar may be willing to provide some insight.

I see. Thank you for clarifying this!
I’ll contact @bjornbrynjar to help us.