-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
Implement Parser-API (Intent-Driven) #401
Comments
Hi @smoya 🙂, I don't have much context about what this is about, but through the links and bullet points, I got a better grasp of the purpose of an intent-driven API. Here are a few key topics I wanted to share. I think having the
Breaking changes to the spec propagating to tooling is indeed a tough problem. But I'm not sure I understand the solution to this. For example, if we are talking about the method I'd love any feedback on my questions, since I might be missing the solution to all of this 😅 |
That would be awesome!🤞 I have to say that we had the pleasure to have @alequetzalli in the Contributor first meeting.
Yeah, exactly. But we won't swap to the new method immediately but progresively, deprecating the old one and keeping support for the deprecated one for few versions. |
ahh got it, yes it makes sense to progressively update the methods. Thanks for helping 😃 |
I had a question about the send and receive operation, but David outdid me 😅 Speaking of breaking changes, I have a few comments about the implementation itself:
|
It only affects people that know the spec in details...so not many folks
yes yes yes, consistency across parsers would be awesome, would make many things much easier long term. I'm just not sure if it has to be super perfect now if we should not focus on implementing it first in JS Parser and then update Parser-API based on our learnings.
I have nothing against the idea, I'm just concerned about asyncapi/parser-api#4
we should take advantage of it definitely. in short: I do not want for example in here https://github.com/asyncapi/nodejs-ws-template/pull/65/files I still need to:
To get channel path. But my intent is to get a channel path that an app can subscribe to:
IDE is there to help me understand what options I have for as a template developer, I would really prefer as this is what I'm actually looking for
now yes, It could also be just a config that you pass to the parser, like mapping of actions, what they mean 😆 I really think things like
there always need to be some TS fanatic in the group |
@derberg I don't think
Yes. |
Yeah, most of frameworks do it in that way. And this is what originally @jonaslagoni and I thought about. No clear strategy if deprecations should stay there for one or two versions as you mentions. Worth to discuss. We already have an issue for discussing about how to keep a compatibility matrix where this can also be in the same topic: asyncapi/parser-api#25. I would love to see more people involved!
I hope that happens at some point, same for Generator as mentioned by asyncapi/community#212 :D |
I think finding a perfect balance between design (parser-api) and implementation (parser-js) can be achieved so we can design the API while we validate it.
Besides my answer on asyncapi/parser-api#4 (reply in thread), I want point out that not all the programming languages have native support for enums ( I think it's worth to move this discussion to asyncapi/parser-api#4 and reactivate it by involving more people. |
I think it is time we should start implementing it yes 👍 I think if we keep the implementation in the What do you think about that approach?
I agree, that it would be good to match it with v3, especially since the actions send and receive play better together with the intents.
Bottom line is that naming of intents is hard to do as you point out @derberg, I think the specifics are out of scope for this issue. The current intents serve nothing but examples to give an idea about what they might be 🙂 As we start using them in implementations, we will start to learn what is missing and what not working and what is. |
TBH my understanding was that we agreed to do Parser API few months ago and that now you just want to push forward the API proposed back then 😅 Not a single codeowner of Parser JS objects intents-driven API. Just go for it and let us argue on specific things on PR level.
I agree with @jonaslagoni that this is the way to go, it works in other repos, and we have release infrastructure ready 👍🏼
might be it will disqualify idea and Parser API will in the end just be a set of guidelines. I don't think any of us imagines it is possible to satisfy all programming languages on API design level. First, most important is that JavaScript developers must be happy to work with the API the way they are used to in JS, and consistency with other languages is not going to be a good argument for them.
if this would be true @fmvilas, you would not drop these in your proposal for v3 😄 |
@derberg agree it requires vocabulary and initial learning but I meant "isApplicationSubscribing" is not confusing. It has nothing to do with our meaning of publish and subscribe. It's common EDA vocabulary. |
I kind of agree with @derberg that tooling should not try to fix what's wrong with the spec. I know there are other proposals and issues regarding the topic of perspective on publish and subscribe operations. Thinking about this now, I feel the main problem is that the spec takes a perspective of the consumer or producer of messages to begin with. If you look at OpenAPI, then you see that what you describe is the HTTP endpoints and the data. You don't describe who does what (yes, there is a list of servers in there, though). For example, a Taking this to AsyncAPI, we can establish the same principles. There is a channel that carries certain messages. If there is a So in summary, I would maybe focus on channels and messages rather than who produces/consumes the messages to/from those channels. If there is a need to describe the roles of consumers and producers, then maybe a separate schema or subschema can describe these relations. Sorry if all this has been discussed and considered somewhere else already. |
@felixjung Your point is not only very valid and useful. It is also in the direction of some of the discussions people are having in asyncapi/spec#618 (comment). So I encourage you to join the issue, read the comments thread (starting from the one I linked here) and add your point in there. You might be also interested in the following issues (even though are not 100% related to this topic): Thanks for your help!!! |
Haha, yeah #618, that's the one I remember reading at some point when I complained I didn't understand what an operation was in a channel with multiple message schemas. 😂 Thanks, will do the reading and posting part. |
For the reference, #453 it is considered now the implementation to follow of the Parser-API |
This task is under development, and all PR's should target next-major branch, where also Migrate project to TypeScript is happening. |
This issue has been automatically marked as stale because it has not had recent activity 😴 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 ❤️ |
No way |
Issue is resolved in v2 ParserJS - now in https://github.com/asyncapi/parser-js/tree/next-major branch |
Reason/Context
Some months ago we created https://github.com/asyncapi/parser-api, an API definition all AsyncAPI parsers should eventually implement.
An introduction can be found as well in this blog post: https://www.asyncapi.com/blog/intent-driven-api
Ideally, we should implement it for the next major AsyncAPI Spec v3.0.0.
@jonaslagoni and I scheduled a Contributor-first meeting on the 6th December 2021 for having a debate around pros/cons of implementing such a thing.
The video is available here.
The slides are available here.
The list of pros/cons we ended up collecting (attendees suggested) during the meeting was written here.
Here is the summary of all pros/cons we found out, including the ones mentioned above:
Introduce intent-driven API
Positive sides:
Negative sides:
Introduce parser-api
Positive sides:
Negative sides:
Keep normal API
We can still add support functions to ease use-cases such as
allMessages()
as the current parser-js support.Positive sides:
Negative sides:
Description
Focus should go only into supporting
v3.0.0
. However, retro compatibility might be a thing.More info at asyncapi/parser-api#26
As a side note, there is already a WIP implementation in Go here https://github.com/asyncapi/event-gateway/blob/master/asyncapi/v2/v2.go.
As per the data collected, it seems implementing this new Intent-Driven API as the Parser-API gives more benefits than cons, specially for the mid and long term. So the community can count me in for moving this forward if we decide we should do.
Now the question is... Shall we move forward? I need your help!
cc @fmvilas @magicmatatjahu @jonaslagoni @derberg as codeowners.
cc @KhudaDad414 @lbroudoux @rmelian @BOLT04 @iamdevelopergirl @aayushmau5 as randomly picked individual contributors.
The text was updated successfully, but these errors were encountered: