A web instant message(im) service written by Golang,this is the backend program.
- Golang
- govendor
- Mysql
- Node
- Docker
- docker-compose
git clone https://github.com/adolphlwq/webim $GOPATH/src/github.com/adolphlwq/webim
docker-compose up -d
Then browse localhost:8080
- auth(login and register)
- login
- register
- list
- contacts
- list all contacts of you
- list messafes unread
- API
- front end render
- list messafes unread
- add new contact
- delete contact
- list contact
- list all contacts of you
- chat/message
- into chat page when click a contact of contact list
- unread set to zero
- see history messages
- send and receive message(real time if both are online)
- delete messages
- deploy
- server
- docker-compose
- test case
- messages are saved to db(mysql)
- set
state
to each message - three main situations when chat:
- both are offline
- both are online(use websocket)
- one is online and the other offline(cache messages)
send message 1. transfer msg to receiver by websocket
sender --------------> ChatServer -------------------------------------------> receiver
`msg_send` 2. save msg to db with state `msg_done`
send message 1. save msg to db with state `msg_cache`
sender --------------> ChatServer -------------------------------------------> receiver (`offline`)
`msg_send`
- 使用Golang scrypt包加密后存储MySQL编码问题...(Error 1366: Incorrect string value: '\xC9c\x8B~\xB9\xA0...' for column 'password')
- change utf8 to utf8mb4 in mysql 5.5+
- DB:如何存储好友关系
- A Million WebSockets and Go