Cloudkibo / CloudKibo

CloudKibo
0 stars 0 forks source link

KiboChat Desktop Application Design #494

Open sojharo opened 7 years ago

sojharo commented 7 years ago

Task based on following conversation:

I have looked into Electron. We can use both Reactjs and Angularjs2 with electron in order to build the desktop applications. If we don't want to use any framework still then we can use plain javascript to create desktop applications.

https://medium.com/@Agro/developing-desktop-applications-with-electron-and-react-40d117d97564#.onpkqfnvw

https://scotch.io/tutorials/build-a-music-player-with-react-electron-i-setup-basic-concepts

http://reactdesktop.js.org/

https://auth0.com/blog/create-a-desktop-app-with-angular-2-and-electron/

http://electron.atom.io/

===============

Sojharo Asak

Open a high priority task to do the design, and open tasks

Also let me know if we should use a framework or not.

We would use ReactJS not Angular.

Allah Hafiz

Jawaid

sojharo commented 7 years ago

This is under construction, I have prepared initial draft. There are still some points that I need to think and research on. Also, I would put more flows in this.

https://docs.google.com/document/d/12qeHRXekPwku7VmPMgTGT1PJnnSbUWG35xhONRuY6f0/edit#heading=h.mv0w4pfe07tt

jekram commented 7 years ago

I will review it later.

Is this document on our shared drive. Please provide external path name

sojharo commented 7 years ago

Yes,

CloudKibo Shared > Documentation > Design > KiboChat Desktop > KiboChat Desktop

jekram commented 7 years ago

Thanks

sojharo commented 7 years ago

Yesterday, Asad and I had a discussion on this and I realised the following problem which needs to be discussed:

In mobile, we get the contacts from the mobile address book and then send them to server to know which of them are already on KiboChat. However, it would not be possible to do so on desktop. As there is not always an address book on desktop OS. If there is any, then OS doens’t allow to get data of any other application. There is no such API.

There are two possible solutions:

  1. Our server should start storing the address book of the user. (It would require some thought on contact management if user is also using several phones)
  2. We should connect with user’s gmail account as all the android contacts of user are linked with its gmail account and are shown in https://contacts.google.com/u/0/ We can use the API to connect to it.
sojharo commented 7 years ago

I have visited the desktop application of WhatsApp and it was completely dependent on mobile. Due to structure found there, I had to completely rewrite the design document:

https://docs.google.com/document/d/12qeHRXekPwku7VmPMgTGT1PJnnSbUWG35xhONRuY6f0/edit#

The previous version of document is moved to appendix.

I have documented how we would be making desktop application and what work would be required on current mobile and server side to do this.

@Assadbintahir It is highly crucial to read this document to understand the entire picture.

Sir, let me know what your opinion about whatsapp structure. I think later we should be doing same structure on web application as well and move the conference into separate application of itself.

jekram commented 7 years ago

@sojharo Thanks

I have read the document and it is interesting how Whatapps is doing. Give me one day to think about it.

Can you add a picture also.

Q. I do not understand WebRTC and Socket.io discussion. May a picture would help

Q. When you are using Whatsapp you are not limited just to desktop only, you can send from either?

Q. Is there any data stored on the desktop?

I do not understand this comment:

"I think later we should be doing same structure on web application as well and move the conference into separate application of itself."

sojharo commented 7 years ago

I have updated the document with picture and answers to questions.

Q. I do not understand WebRTC and Socket.io discussion. May a picture would help

This discussion was about the technology whatsapp is using to do communication between mobile and desktop application. They have used the websocket on their server using which they are doing communication between mobile and desktop. In one review, someone was wondering that why they aren't using webrtc datachannel to do direct communication between mobile and desktop as websocket requires the data to be passed through server to reach mobile. The reason he gave for this was the handshaking time which webrtc takes during signalling.

screen shot 2017-02-19 at 5 38 20 pm

Q. When you are using Whatsapp you are not limited just to desktop only, you can send from either?

Yes, we are not limited to desktop only. We can send the message from mobile as well which would appear on desktop.

Q. Is there any data stored on the desktop?

No, they don't store any data on the desktop. I closed the desktop application and then disconnected the mobile from internet and opened the desktop application again. It didn't show any data and asked to logout because mobile is not connected to Internet.

jekram commented 7 years ago

So they are not using webtrc? Or they use it in some cases?

sojharo commented 7 years ago

no they are using websockets.

sojharo commented 7 years ago

Please find the list of tasks that I thought for all three platforms:

https://docs.google.com/document/d/12qeHRXekPwku7VmPMgTGT1PJnnSbUWG35xhONRuY6f0/edit#

@Assadbintahir Please review the complete document and let me know if you think any task is missing here. Discuss this document with me as soon as exams are over.