java-spring-template icon indicating copy to clipboard operation
java-spring-template copied to clipboard

Add support of WebSocket protocol

Open Tenischev opened this issue 1 year ago • 20 comments

Reason/Context

WebSocket is one of the chose when we need establish connection between backend server and (usually web) client. Spring-WebSocket is relatively popular library among users (353 usages + 937 usages according to maven). At the moment template support only mqtt, amqp and kafka protocols.

Description

Provide support for WebSocket (wss) protocol using spring-websocket and\or spring-integration-websocket. Implementation should be aware of STOPM limitations and\or have SockJS fallback.

  • Create dedicate Publisher and Config in partials.
  • Update PublisherService, Config, MessageHandlerService and CommandLinePublisher template files.
  • Create Java tests, update 02_removeNotRelevantParts.js to avoid presence of wss tests in other protocol generation.
  • Create npm snapshot tests with providing corresponding mock API.

Docs and guides:

  • https://docs.spring.io/spring-integration/docs/6.1.5/reference/html/web-sockets.html#web-sockets
  • https://docs.spring.io/spring-framework/reference/web/websocket/server.html
  • https://spring.io/guides/gs/messaging-stomp-websocket/
  • https://www.baeldung.com/websockets-spring

Tenischev avatar Dec 12 '23 18:12 Tenischev

Bounty Issue's service comment

Text labels: bounty/2024-Q1, level/advanced, bounty/coding, bounty/dropped, bounty/eol End Of Life after: 2024-05-31 23:59:59 UTC-12:00

aeworxet avatar Dec 18 '23 15:12 aeworxet

I would like to work on this issue

Tenischev avatar Dec 18 '23 17:12 Tenischev

@asyncapi/bounty_team

aeworxet avatar Dec 19 '23 21:12 aeworxet

Bounty Issue's Timeline

Complexity Level Assignment date (by GitHub) Start date (by BP rules) End date (by BP rules) Draft PR submission Final PR submission Final PR merge
Advanced 2023-12-20 2024-01-01 2024-02-23 2024-01-19 2024-02-09 2024-02-23
Please note that the dates given represent deadlines, not specific dates, so if the goal is reached sooner, it's better.

aeworxet avatar Dec 20 '23 01:12 aeworxet

Can I take this up? I am in good in Java and Spring.

Jagrutiti avatar Jan 07 '24 14:01 Jagrutiti

Can I take this up? I am in good in Java and Spring.

I was actually looking for Docs issue. But came across something I understand.

Jagrutiti avatar Jan 07 '24 14:01 Jagrutiti

@Jagrutiti Please take a look at the top of the page, it says this issue already has an assignee.

aeworxet avatar Jan 07 '24 22:01 aeworxet

The issue does not have an active PR linked.

This assignee could be inactive. At least that's what I assumed. My bad.

Jagrutiti avatar Jan 08 '24 08:01 Jagrutiti

Assignees only for regular GitHub issues have the luxury of being inactive. The AsyncAPI Bounty Program Participants are responsible. Also, it is not the time for PR yet, according to the Bounty Issue's Timeline. Keep an eye on:

  • GH Discussion for Bounty Issues submission during the first and second full (seven-day) calendar weeks of the last month of the current calendar quarter (2023-03-04 ~ 2023-03-17 is the closest), to be able to make an early decision on the Bounty Issue's choice,
  • the #17_bounty channel in Slack till the end of that month (2023-03-18 ~ 2023-03-31 is the closest) to catch an up-for-grabs Bounty Issue and submit your candidature in its comments.

aeworxet avatar Jan 08 '24 16:01 aeworxet

@Tenischev, please provide an update to the PR.

aeworxet avatar Jan 29 '24 10:01 aeworxet

@Tenischev, please provide an update to the PR.

aeworxet avatar Feb 06 '24 08:02 aeworxet

Hello @asyncapi/bounty_team and everyone,

I would like to ask for extension time for this issue. As advance issue it's time consuming to create template representation of AsyncAPI doc for WS in Spring. This requires more time than I could devote due to my main job. I would appreciate if deadline could be moved for 3 weeks. About the scope, the left parts are - message sending and tests.

cc @derberg

Tenischev avatar Feb 22 '24 08:02 Tenischev

Bounty Issue's Timeline Extended

Complexity Level Assignment date (by GitHub) Start date (by BP rules) End date (by BP rules) Draft PR submission Final PR submission Final PR merge
Advanced 2023-12-20 2024-01-01 2024-03-15 2024-01-19 2024-03-01 2024-03-15
Please note that the dates given represent deadlines, not specific dates, so if the goal is reached sooner, it's better.

aeworxet avatar Feb 22 '24 09:02 aeworxet

I would like to ask for extension time for this issue. As advance issue it's time consuming to create template representation of AsyncAPI doc for WS in Spring. This requires more time than I could devote due to my main job. I would appreciate if deadline could be moved for 3 weeks. About the scope, the left parts are - message sending and tests.

@Tenischev to the extend of how I understand the scope of this issue, it went beyond the scope of being advanced and your estimations were to optimistic. I had a situation like this in generator, had to upgrade the bounty issue first to advanced and event this was not enough and I had do join and do some additional development with the contributor - I overestimated. If I would not have time to help with coding, the other solution I would do would be "reestimate and cut the scope", and left overs do after, as some side work, maybe good first issue, or if that could wait, I would put it on a waiting list for next bounty. I suggest you take it into account so this bounty deadline do not stress you out. Your case is difficult as you are owner of the issue and contributor in one person, so decision making is limited.

derberg avatar Feb 29 '24 12:02 derberg

@Tenischev, please change the state of the PR and provide an update to it.

aeworxet avatar Mar 05 '24 11:03 aeworxet

I would propose to evaluate and split issues in advance, atomizing them to Medium level from the start, so there remains a buffer possibility for reclassification to Advanced in case of a need.

A issue (underestimated level `Nightmare`)
  [ ] B issue (level `Medium` with possible reclassification to `Advanced`)
  [ ] C issue (solid level `Advanced`)

But not submit Advanced from the start, and then, in the process of resolution, find that it consists of 2+ Advanceds. Such an approach would only lead to stress, which can totally be avoided.

aeworxet avatar Mar 07 '24 07:03 aeworxet

@aeworxet you mean for future or for this one? as this one we already is not a medium? or you suggest to split this one into medium ones?

@Tenischev this week is submission week for Q2 bounty, so better do it this week

derberg avatar Mar 11 '24 08:03 derberg

@derberg For future. This one should be finished in the state it already is, but this experience should definitely be used on future tasks (talking about proper splitting without biting more than you can chew,) so this torture doesn't go in vain.

aeworxet avatar Mar 11 '24 11:03 aeworxet

Bounty Issue's service comment

@Tenischev receives the First Suspension for silently dropping the Bounty Issue and refraining from completion of the Bounty Issue within the assigned Timeline at the same time. With the utmost respect for the contributions made, but also having the best interests of the Bounty Program in mind, @Tenischev will be kept from participation in the Bounty Program from the current moment until 2024-05-31 23:59:59 UTC-12:00 (inclusive.) AsyncAPI hopes that this pause will provide an opportunity for reflection and perhaps a chance to address any challenges that may have led to this situation. Reward for this Bounty Issue is not paid to @Tenischev during 2024-Q1 and 2024-Q2, even in the case of its voluntary completion. Probation period after the First Suspension expiration will be from 2024-07-01 00:00:00 UTC+12:00 to 2024-12-31 23:59:59 UTC-12:00 (inclusive.)

aeworxet avatar Mar 19 '24 11:03 aeworxet

@Tenischev feel free to get in touch with me whenever you are available and have doubts. I hope I can somehow help.

derberg avatar Mar 19 '24 12:03 derberg

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:

github-actions[bot] avatar Sep 30 '24 00:09 github-actions[bot]