224-1 / grand-central

Eclipse Public License 2.0
1 stars 1 forks source link

plug websockets into discordui page and make chat work #8

Open azureus89 opened 5 years ago

azureus89 commented 5 years ago

@sahabaishakhi your new issue ... look at the dev build (standard chat page) and formulate a strategy based on your understanding from that build on how to make the discord chat page work ... it is right now just a static template lets discuss this strategy today/tomorrow, and then proceed with the code

you can ignore the need for any userid / authentication ... we can discuss a stopgap for that as well

right now - just make the chat part work -- many clients connecting into the chat server to send messages, userid, whos online - next step

sahabaishakhi commented 5 years ago

@azureus89 do I have to wait for @kattakavya to finish her static discordUI template? should the discord chat be similar to the already existing main chat page?

azureus89 commented 5 years ago

yes coding will have to wait for her to migrate, but I need you to formulate a strategy and understanding of how to make it work first ... based on the already working chat example ... but some things will jhave to change ... that needs to be discussed and done as soon as possible ... kavyas code should be ready in time for that to happen

sahabaishakhi commented 5 years ago

@azureus89 it's unclear what is meant by the current chat page being static. need to understand the difference between what needs to be implemented and our current use case of clients being able to send messages to the webserver and messages being read from the websocket..

azureus89 commented 5 years ago

the discord page is simply a template - it is not connected to the websocket server -- it is not a working app. The boilerplate chat app (dev build) is a working app. It sends and recieves messages from the server. How do you take a template and turn it into an app. Turn a static page into a working app.

sahabaishakhi commented 5 years ago

Points for making discord page work using websockets: 1) start with having one 'interaction room' (such as dev-support) be the main-channel. we can use chord library's with-channel macro along with core async upon connecting via a client to the websocket endpoint. 2) all users/clients connected can have a tap to the main-channel. all messages from any client's websocket endpoint can be written into the main-channel, transferred via what's written in the message text-box. 3) when a client disconnects the from the chat server, they can be erased from the active users list which denotes who is online. 4) the next step would be to implement direct messaging between clients within the server using private channels..

azureus89 commented 5 years ago

lets start with 1. on your feature branch -- why dont you first take the dev build chat app and verify your theory of how channels and with-channel work ... what do websocket channels do exactly basically.

  1. -> this is fine, except when you launch it as an "app" and you have multiple users/ accounts/chat rooms -- not just interaction channels ... say our organisations chat and another organisations chat -- they cant be running on separate servers if say we are to create a web based chat service. They will all send messages to the same single server -- so thats the most crucial thing -- how to work with channels and separate messages -- not just how to bring all messages into one place -- this doesn't need much work because its the default behaviour

3/4 comes next ... deal with above first ... point 2 above summarises what your focus should be right now ... multiple interaction rooms is trivial ... its the same message with an added key/value like :room ... the client then maps messages into the relevant room based on this key ... this is like a 2 line map function, not where your attention should be

azureus89 commented 5 years ago

@sahabaishakhi when can we get started? ... @kattakavya will be joining you on this, but you are leading and deciding on task split

sahabaishakhi commented 5 years ago

@azureus89 I am clearing some of my understandings from the existing chat demo with @VikramShawFL but for the most part it's clear so we can proceed further.. we can start with having one interaction room for an organization working.

kattakavya commented 5 years ago

@sahabaishakhi can you explain me the task details,on which I should work on

sahabaishakhi commented 5 years ago

@kattakavya for now go through the documentation in the project for websockets and core async and understand how the current chat application works.

azureus89 commented 5 years ago

@sahabaishakhi whats next? when?

sahabaishakhi commented 5 years ago

@azureus89 we can start now. can we have the dev-support channel working? its working would be the same as the current chat application..

kattakavya commented 5 years ago

@azureus89 and @sahabaishakhi can you give a summary of the issue and what should i perform?