Golang Chat App on Docker

Job ID: 30724329

Budget: €30 – €250 EUR

Hi, I am trying to build a robust golang chat app for 2 clients to interact. It should scale seamlessly for millions of users. It's for a chat app for android and iOS phone. It is similar to Facebook messenger. When a person clicks on "chat" , it will start a chat window and they can do a 1:1 chat. I've decided to use Golang because of its gRPC framework.


Here's what I know,

Complete source code for golang chat app + packaging in Docker Container -
https://www.youtube.com/watch?v=mML6GiOAM1w&t=1162s
this runs fine but it always connects to localhost:8080 (in line 67). I can create another user using command -
cd client/
go run main.go -N <NewUser>

How do I make sure 2 separate users create a different chat session? Also, it is an insecure connection (line 67 in client/main.go). How do I make it secure/ encrypted?

I wanted to use this as base code and work on top of this but there are advanced codes available - eg) this one uses redis as backend to store chats -
https://betterprogramming.pub/how-to-build-a-concurrent-chat-app-with-golang-and-websockets-fb48562a1329
https://gist.github.com/gjtorikian/8894dec140a6e57934572f5b447f6d51

Another Example -
This video tells how to create a chat app - https://www.youtube.com/watch?v=pRSKJIt3PYU -
source code - https://github.com/rrrCode9/gRPC-Bidirectional-Streaming-ChatServer/
but it doesn't have the code to package in docker container. you may use this for your reference.

Once you give me the code for go chat server, I will host the docker container in Google cloudRun. - https://cloud.google.com/run.

You need to tell me how to client/main.go script can be run from client machines (android and iOS) so that two persons can have a chat session. Its fine if it can be provided as an API service. I can call the API to send message and receive message. In that case, can I host client/main.go in a separate docker container?
Related categories: Golang Docker