-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NEW] Word cloud generation for poll responses #6
Conversation
@murtaza98 @ramkumarkb could you please take a look. Thanks. |
src/lib/finishPollMessage.ts
Outdated
|
||
if (poll.wordcloud && useInternet.value) { | ||
const attachment = <IMessageAttachment>{ | ||
imageUrl: `https://quickchart.io/wordcloud?text=${poll.options.join( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 points here
-
If we're hard-coding this url here then how would the organisations who have hosted their own quickcharts server connect this app to it? For this reason, I'd earlier suggested to keep this api url as a app setting.
-
Are we planning to support paid plans for quickcharts? On the pricing page of quickcharts, it says that it has some rate limitation for the free plan - if that's the case then this might be an issue with bigger communities and for such big communities we'd need to add support for their paid plans.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Murtaza.
- I realized (on contacting Ian from Quickchart) that they haven't integrated the word-cloud API in their open-source codebase so there wouldn't be much use hosting a Quickchart server. The only way to access the word-cloud API is through the public URL which some organizations might not have access to. Hence the
boolean
app setting determining whether the org has access or not. - I'm unsure whether word-cloud hits would be included within the paid version since it hasn't been integrated. Moreover, the current rate-limitation is 1 chart/sec which I think should be pretty scalable.
Let me know your thoughts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- If that's the case, then I think we don't have any option here with QuickChart 😞 Did he happen to mention when they will be allowing this feature? Also during your research did you find any alternative chart generator which provides on-premise hosting? I'm asking this because if we're introducing this public internet access limitation in this app, then the communities using Rocket.Chat within on-premise would miss out on this feature.
- They say its a
60 requests per minute per IP rate limit
so if all the users are accessing the room from a different network then the limit is fair enough, however if all the users are on a private network behind a (Router + NAT) then although each of them will have a different local IP, but the same public IP - In that case if there is a single room with more than 60 users, they all would be identified as a single entity/IP and the rate limit will come into picture. Please give some thought on this and check if we can add support for the paid plan. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
Unfortunately no. They seem to be in a fix whether to include it within the docker image or spin it out as a separate image. They don't seem to have time-boxed this change.
I found a few on RapidAPI but they don't seem to have a locally hosted or open-source version and are all paid. -
Valid point. I've mailed inquiring whether word-cloud is included within the paid plan. Will update here. Thanks.
Decided to shun Quickchart in favor of an in-house wordcloud-api I developed. This has theoretically no rate-limits, requires no Internet-access to generate wordclouds and can be self-hosted for on-premise users. If no API endpoint is provided a poll summary would be generated. Worcloud API endpoint is kept empty by default to enable the wordcloud feature to work out-of-the-box. Users can then insert either the in-house wordcloud-api or any other API (eg Quickchart) Other changes
Screencast.from.10-07-21.09.36.25.AM.IST.mp4@murtaza98 please take a look |
@murtaza98 resolved all comments and fixed lint. Please take a look. Thanks. |
wordcloud
property added to IPoll interface.Screencast.from.28-06-21.08.20.04.PM.IST.mp4
Closes #3