Closed smoya closed 1 month ago
Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
Love this idea a lot. It would be interesting to see how we tackle these problems.
What storage should we use? How can we get budget for it? Shall we use https://github.com/asyncapi/server-api as server for making the sharing logic? Or rather a separate microservice that just owns such responsibility?
I have a feeling that we can go serverless for this approach(like cloudflare workers and cloudflare KV as a storage). Though we have to see the costing a bit, but I think it's really easy to get up and running with this approach.
Yeah second what @aayushmau5 says, I like this idea @smoya. Sharing your state (doc) with others and other tools becomes very interesting.
I have a feeling that we can go serverless for this approach
Yeah guess loads of ideas we could go, but if you wanted you could go with a simple AWS Serverless solution that uses API Gateway + DyanmoDB (or s3) for example to store the data (even put a TTL on the data in the table so it expires/deletes after X days). Also, they offer quite a big free tier there. (Any hosting would work just need to figure out where as you said)
Great idea! From my point of view, the most important to remember is that Studio
like Playgroud
will be used by people on their own, behind their firewalls, in their own private clouds, or sometimes private access to public clouds like Google Cloud or MS Azure, in case of many corporations. So once we jump into implementation we need to, first of all, make sure people can easily disable Share
button component, or enable it in an easy most vendor-neutral way possible.
make sure people can easily disable Share button component
Yeah, I guess it would be good to identify a pattern in for feature flags in general. I imagine the studio will grow in the future with more and more features, so having a well-documented and easy-to-use feature system would be great.
This issue has been automatically marked as stale because it has not had recent activity :sleeping:
It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.
There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.
Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.
Thank you for your patience :heart:
This issue has been automatically marked as stale because it has not had recent activity :sleeping:
It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.
There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.
Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.
Thank you for your patience :heart:
@smoya how's it going with this?
Any help needed?
I resumed development on the chatbot and I could really use this feat.
@AceTheCreator AFAIK nobody is working on this feature yet.
@smoya no worries. I'll look into it and come up with something, then we can iterate from there. what do you think?
@smoya no worries. I'll look into it and come up with something, then we can iterate from there. what do you think?
Do you feel it falls into https://www.asyncapi.com/roadmap? If it does, I think you are free to pick it up (well we are always free to pick up whatever, but always convenient to follow the roadmap, right?).
This issue has been automatically marked as stale because it has not had recent activity :sleeping:
It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.
There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.
Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.
Thank you for your patience :heart:
This issue has been automatically marked as stale because it has not had recent activity :sleeping:
It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.
There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.
Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.
Thank you for your patience :heart:
still relevant
Since Netlify Blobs are available to general public, I believe we could use them to store the AsyncAPI docs when clicking on the "share" button (by calling a Netlify serverless function which does the store). Later, we could retrieve it inside a Netlify Edge Function, and somehow inject it in the final rendered page and use it (this should be tested, not sure if will work but seems so) as in the following example https://www.netlify.com/blog/add-personalization-to-static-html-with-edge-functions-no-browser-javascript/
Since Netlify Blobs are available to general public, I believe we could use them to store the AsyncAPI docs when clicking on the "share" button (by calling a Netlify serverless function which does the store). Later, we could retrieve it inside a Netlify Edge Function, and somehow inject it in the final rendered page and use it (this should be tested, not sure if will work but seems so) as in the following example https://www.netlify.com/blog/add-personalization-to-static-html-with-edge-functions-no-browser-javascript/
This seems a good solution, any limits on no. of blobs stored ?
This seems a good solution, any limits on no. of blobs stored ?
I couldn't find such info. I left a question in Netlify forums just in case: https://answers.netlify.com/t/blobs-pricing-and-limits/119907
This seems a good solution, any limits on no. of blobs stored ?
I couldn't find such info. I left a question in Netlify forums just in case: https://answers.netlify.com/t/blobs-pricing-and-limits/119907
Got an answer. Not written in stone but enough for us I would say.
can’t officially promise you that this is final, but in case you’re cautious about using this before knowing how much it will cost, Blobs will be likely priced something like this: Customers get 100GB for free, and additional GBs will cost 9 cents a month. Things might change, but that’s the ballpark.
Hey @smoya , can we start developing on this as we have decided to go with netlify blob as an external storage ?
Hey @smoya , can we start developing on this as we have decided to go with netlify blob as an external storage ?
Hi @ibishal, the last decision is not on my plate but on Studio code owners. Anyway I guess you are more than free to work on your side and submit a PR so they can review it.
Hi @ibishal please feel free to open a PR.
@smoya @KhudaDad414 is it fine if I work on this under the bounty program.
Reason/Context
The idea of this proposal is to add a "Share" button (or any component that fits) allowing the user to generate a URL that can be shared with anyone, and that will open the Studio but with the desired spec file loaded, representing that file in a certain moment in time, and loading any Studio setting the person who shared configured by then as well.
Sharing a URL that points to a reproducible Studio state is useful for several scenarios:
You can see an example of such feature in Go (language) playground: https://play.golang.org/p/ENxYVMoY9VZ
Description
Let's see first a couple of mocks to illustrate the idea:
This is not as trivial as it might seem. I'm gonna add some context:
The first idea was to just accept all state (spec file, settings...) encoded as base64 in a query param. Then the studio will decode that value to obtain the state and draw it. The problem with this approach, as @magicmatatjahu stated, is that each browser have their own limitations on the URL length (also with the length of each query parameter). Most of them, limiting the full URL to 2048 chars which is not a lot. E.g. Streetlights MQTT example has ~6000 chars already.
With such limitation in place, there are not a lot of solutions for solving this.
Proposal
TL;DR: Storing the state in an external storage. Downloading it later and import it into the Studio.
Note: Other services like Chatbot could also use this service.
Obviously, this is only the big picture. Details should be clarify. Further investigation should be done, especially around the following topics among others:
cc @magicmatatjahu @derberg