Real time communication between ifc web viewer and web apps
jstec opened this issue · 30 comments
We offer a 600$ bounty for implementing this funcionality:
- Overview
In a generic way it is about implementing a real-time communication system between web applications. These applications "chat" among themselves sending messages in json format. The goal is that the ifc.js web viewer can communicate with another web application and vice versa.
Communication can be 1-N :
• A web application can send messages to N web viewers.
• A web viewer can only send messages to an application.
• A web application can receive messages from N web viewers.
• A web viewer can only receive messages from an application.
The exchange of messages does not involve any server but is carried out directly between browsers, between tabs in the same browser or between tabs and other browsers.
To implement this system of communication between browsers, WebRTC technology will be used. In the signaling process, handshake to initiate communication, neither STUN nor TURN servers will be used, since the communication is performed within the same machine. WebRTC technology allows video, audio and text communication, only text communication (json messages) is used.
- Functional requirements
2.1. An application displays an ifc
Description
The APP1 web application wants to display an ifc file. A new browser tab or window is created where the IFCViewer1 web viewer displays the file. A two-way communication channel is established between APP1 and IFCViewer1.
Acceptance criteria
• The application can open the web viewer in a tab of the same browser.
• The application can open the web viewer in a separate window.
• The application tells the viewer the url of the ifc to be displayed.
• The viewer downloads the ifc file and show it.
• A unique two-way communication channel is created between the APP1 application and the IFCViewer1 viewer.
2.2. An application displays more than one ifc
Description
The APP1 application has already displayed an ifc according to "An application displays an ifc" now from the same application you want to display a second ifc.
Acceptance criteria
• The application can open the web viewer in a tab of the same browser showing the second ifc.
• The application can open the web viewer in a separate window showing the second ifc.
• The application tells the viewer the url of the ifc to display.
• The viewer downloads the ifc file and displays it.
• A new unique two-way communication channel is created between the APP1 application and the IFCViewer2 viewer.
• Messages sent by the APP1 application are received by IFCViewer1 and IFCViewer2.
• Messages sent by IFCViewer1 are received by APP1.
• The messages sent by IFCViewer2 are received by APP1.
2.3. An application close communication
Description
The APP1 application has opened the IFCViewer1 and IFCViewer2 viewers. The browser tab or window corresponding to APP1 is closed, the communication channels APP1<->IFCViewer1 and APP1<->IFCViewer2 are closed.
Acceptance criteria
• When the APP1 application is closed, the communication channels APP1<->IFCViewer1 and APP1<->IFCViewer2 are closed.
• Before the channels are closed, a message is sent to IFCViewer1 and IFCViewer2 notifying the communication is closed.
• IFCViewer1 and IFCViewer2 receive the communication closing message and can decide whether to close their tab or window as well.
2.4. A web viewer close communication
Description
We have the APP1 application has opened two IFCViewer1 and IFCViewer2 web viewers. The IFCViewer1 tab or window closes and therefore the APP1<->IFCViewer1 communication channel is also closed.
Acceptance criteria
• Closing IFCViewer1 closes the communication channel APP1<->IFCViewer1
• Before IFCViewer1 closes the communication channel APP1<->IFCViewer1 sends a message to APP1 notifying the closure of the communication.
• Bi-directional communication between APP1 and IFCViewer2 keeps alive.
- Non Functional requirements
3.1. Message format
Description
JSON messages are as follows:
{
"payload": { message content here }
"status": {
"returncode": 0,
"messages": [
{
"code": 0, // message code
"message": "message text here"
},
...
{
"code": N, //
"message": "message text here"
}
]
}
}
::take
🟢🟢🟢
::take
Hi, @aka-blackboots! Thanks for taking this bounty! The due date is April 5, 2023 UTC.
If you need to submit some pull requests (PR) to complete the tasks, make sure that the last and only the last PR has a title that either starts with the bounty ID or is exactly the same as the bounty name. After the PR is merged, this bounty’s status will automatically changed to done.
If you do not need to make a PR, tell the manager @agviegas to run ::done
command after your tasks is confirmed to be done.
Good luck!
::drop
🟢🟢🟢
::drop
Hi, @aka-blackboots! Thanks for giving it a try! It’s now once again available for anyone to take.
Hi, why the bounty is unassigned? Is there any problem?
@jstec the bounty is open and anyone can take it, but we can't force anyone to do it. People freely take bounties that they want to do.
I'm sorry i thought the bounty was already assigned and was unassigned. My mistake.
::take
🟢🟢🟢
::take
Hi, @avirads! Thanks for taking this bounty! The due date is April 26, 2023 UTC.
If you need to submit some pull requests (PR) to complete the tasks, make sure that the last and only the last PR has a title that either starts with the bounty ID or is exactly the same as the bounty name. After the PR is merged, this bounty’s status will automatically changed to done.
If you do not need to make a PR, tell the manager @agviegas to run ::done
command after your tasks is confirmed to be done.
Good luck!
i have completed the task. how can we proceed further?
::done
Ok.. pls send the demo invite to avirads at Gmail dot com. I am available today.
🔴🔴🔴
Hi, @avirads! The date is past due, your assignment has been revoked. It’s now available for anyone to take.
::done
::take
🟢🟢🟢
::take
Hi, @avirads! Thanks for taking this bounty! The due date is May 19, 2023 UTC.
If you need to submit some pull requests (PR) to complete the tasks, make sure that the last and only the last PR has a title that either starts with the bounty ID or is exactly the same as the bounty name. After the PR is merged, this bounty’s status will automatically changed to done.
If you do not need to make a PR, tell the manager @agviegas to run ::done
command after your tasks is confirmed to be done.
Good luck!
::done
Great. Has the payment been made? I'll update the bounty accordingly.
Done🚀