SHIV5T3R / CO-DE

An Open Source Collaborative Code Editor
35 stars 26 forks source link

Connection Handler For Sockets #6

Closed SHIV5T3R closed 1 year ago

SHIV5T3R commented 1 year ago

This issue aims to introduce a reliable and efficient Connection Manager that facilitates real-time communication between clients and the server through WebSocket technology.

Expected Behavior

WebSocket Integration

The Connection Manager should be seamlessly integrated into the Flask backend, leveraging the Flask-SocketIO.

WebSocket Endpoint

A dedicated WebSocket endpoint should be established to handle WebSocket connections from clients. Clients should be able to connect and disconnect gracefully from the WebSocket endpoint.

Connection Pool Management

The Connection Manager should efficiently manage WebSocket connections, maintaining an active connection pool to handle multiple clients concurrently.

Error Handling

Comprehensive error handling mechanisms should be implemented to gracefully manage errors during WebSocket connections, preventing crashes and providing meaningful error messages to clients.

Broadcasting Updates

The Connection Manager should support broadcasting updates to multiple clients simultaneously. This is crucial for real-time collaborative features, ensuring all connected clients receive relevant updates in real time.

Performance Optimization

The Connection Manager should be optimized to minimize resource usage, maximizing the number of concurrent WebSocket connections the server can handle efficiently.

Logging and Monitoring

Detailed logging and monitoring features should be incorporated into the Connection Manager to track WebSocket connections, detect anomalies, and facilitate troubleshooting.


Implementing the Connection Manager with WebSocket support in the Flask backend will empower the application to handle real-time communication between clients and the server effectively. This will open up opportunities for collaborative features and enable the application to deliver a more dynamic and responsive user experience.

jaybuurdd commented 1 year ago

I will setup the layout for connection configuration on app run and api endpoint that will allow the user to connect or disconnect

FuadGoloba commented 1 year ago

I will setup the layout for connection configuration on app run and api endpoint that will allow the user to connect or disconnect

I would like to collaborate on the task

ayushkatoch98 commented 1 year ago

Me too, if there is space available.

MrBisquit commented 1 year ago

Let me express my idea of how I think it should go (Also I would like to contribute)

MrBisquit commented 1 year ago

I can probably help with the small frontend part of this.

akash1520 commented 1 year ago

I will setup the layout for connection configuration on app run and api endpoint that will allow the user to connect or disconnect

I would like to contribute as well, if nothing else than I will make sure all the errors are handled well.

ZakariaTalhami commented 1 year ago

@MrBisquit

  • Server sees if the file is set to locked (meaning only one person can view/edit it) and if it's locked just return a locked and some info about who it's locked by

Two points I would like to raise here:

  1. Do we want to lock on file level?
  2. When locking an edit, should we block viewing?

I think we should allow viewing of the code that is being edited. I think it would defeat the purpose of the app if you cant see the edits in realtime. Also, I think it would be better if we could enable locking on line level. That way two people can contribute to the code on the same file.

jaybuurdd commented 1 year ago

I will setup the layout for connection configuration on app run and api endpoint that will allow the user to connect or disconnect

@FuadGoloba @ayushkatoch98 @akash1520 hey guys, since you want in on the specific task I'm doing I'll set up just a layout for the api and modify the config to integrate flask-socketio and we can go from there with creating the endpoint. Are you familiar with Flask already??

akash1520 commented 1 year ago

I will setup the layout for connection configuration on app run and api endpoint that will allow the user to connect or disconnect

@FuadGoloba @ayushkatoch98 @akash1520 hey guys, since you want in on the specific task I'm doing I'll set up just a layout for the api and modify the config to integrate flask-socketio and we can go from there with creating the endpoint. Are you familiar with Flask already??

Not really, I haven't worked with it that much but I have worked with REST architecture in nodejs a lot, so I don't think I'll have a problem picking it up!

jaybuurdd commented 1 year ago

I will setup the layout for connection configuration on app run and api endpoint that will allow the user to connect or disconnect

@FuadGoloba @ayushkatoch98 @akash1520 hey guys, since you want in on the specific task I'm doing I'll set up just a layout for the api and modify the config to integrate flask-socketio and we can go from there with creating the endpoint. Are you familiar with Flask already??

Not really, I haven't worked with it that much but I have worked with REST architecture in nodejs a lot, so I don't think I'll have a problem picking it up!

Nice what's your discord username? I'll add you to the group chat.

akash1520 commented 1 year ago

I will setup the layout for connection configuration on app run and api endpoint that will allow the user to connect or disconnect

@FuadGoloba @ayushkatoch98 @akash1520 hey guys, since you want in on the specific task I'm doing I'll set up just a layout for the api and modify the config to integrate flask-socketio and we can go from there with creating the endpoint. Are you familiar with Flask already??

Not really, I haven't worked with it that much but I have worked with REST architecture in nodejs a lot, so I don't think I'll have a problem picking it up!

Nice what's your discord username? I'll add you to the group chat.

akashhuyaar

MrBisquit commented 1 year ago

@MrBisquit

  • Server sees if the file is set to locked (meaning only one person can view/edit it) and if it's locked just return a locked and some info about who it's locked by

Two points I would like to raise here:

  1. Do we want to lock on file level?
  2. When locking an edit, should we block viewing?

I think we should allow viewing of the code that is being edited. I think it would defeat the purpose of the app if you cant see the edits in realtime. Also, I think it would be better if we could enable locking on line level. That way two people can contribute to the code on the same file.

What I meant was the users can choose to lock the file if they don't want other people on it.

ayushkatoch98 commented 1 year ago

I will setup the layout for connection configuration on app run and api endpoint that will allow the user to connect or disconnect

@FuadGoloba @ayushkatoch98 @akash1520 hey guys, since you want in on the specific task I'm doing I'll set up just a layout for the api and modify the config to integrate flask-socketio and we can go from there with creating the endpoint. Are you familiar with Flask already??

I have experience with Django and Django Channels (which is literally websockets) and flask is almost the same so yeah... I wont have any issues with using Flask. My Discord zeref98

FuadGoloba commented 1 year ago

I will setup the layout for connection configuration on app run and api endpoint that will allow the user to connect or disconnect

@FuadGoloba @ayushkatoch98 @akash1520 hey guys, since you want in on the specific task I'm doing I'll set up just a layout for the api and modify the config to integrate flask-socketio and we can go from there with creating the endpoint. Are you familiar with Flask already??

Yeah, familiar with Flask

SHIV5T3R commented 1 year ago

40 handled the rest of this, thanks to all who contributed, this base will make everything far easier for us now 🔥