Flutter-NodeJs WebSocket real time chat app

432 views
Skip to first unread message

Πέτρος Πολλάκης

unread,
Jul 18, 2019, 4:09:43 AM7/18/19
to Flutter Development (flutter-dev)
Hello community! 

I need help to understand the logic and maybe some example will be very useful! \

I want to create and simple real time chat app with Nodejs and flutter. The simple piece of this I already created like send message to WebSocket server and get it back to all connections but my question's is: 

How can I create separate connection's per 2 users ?
The history of messages will be saved in database and probably I will get it into an array and then send it from server side to client? 

I think to achieve the second question needed the answer of the first question.

Sorry if that question's is basic but I'm newbie.

Regards! 

chandra shekar reddy

unread,
Jul 18, 2019, 11:07:56 AM7/18/19
to Flutter Development (flutter-dev)
You could use Firebase real-time Database instead of web Sockets. It works with both Node.js and Flutter. It makes work lot easier compared to Web Sockets.

Πέτρος Πολλάκης

unread,
Jul 18, 2019, 4:34:18 PM7/18/19
to Flutter Development (flutter-dev)
Yeah I know that but I want to make it custom. If you know something (without firebase) tell me :) Thanks!

Sam Jane

unread,
Sep 18, 2019, 2:15:50 AM9/18/19
to Flutter Development (flutter-dev)
Do u got anything with websockets...??


On Thursday, July 18, 2019 at 1:39:43 PM UTC+5:30, Πέτρος Πολλάκης wrote:

Paul Liu

unread,
Sep 18, 2019, 12:19:00 PM9/18/19
to Flutter Development (flutter-dev)
Hello,

What I would like to suggest is to think about the server as a telephone switch. Users always send message to the server and server is responsible for routing the message to the intended receivers. 

This means you will need to include receiver id, maybe chatroom id and so forth with each message so the server knows how to route the message.


Πέτρος Πολλάκης於 2019年7月18日星期四 UTC+8下午4時09分43秒寫道:

Gajjar Jay

unread,
Jul 10, 2020, 2:29:37 AM7/10/20
to Flutter Development (flutter-dev)
if you implement chat app so tell me how ?
because today same Question how to implement chat app in flutter with node.js

i know this question is basic but i'm newbie.


On Thursday, July 18, 2019 at 1:39:43 PM UTC+5:30, Πέτρος Πολλάκης wrote:
Reply all
Reply to author
Forward
0 new messages