mysql, redis
golang, revel
beedb mysql的orm
# install revel:
go get github.com/robfig/revel
go build -o bin/revel github.com/robfig/revel/cmd
# goalng package needs
go get github.com/astaxie/beedb
go get github.com/go-sql-driver/mysql
go get github.com/hoise/redis
sudo apt-get install mysql-server
需要安装ruby, activerecord gem
rake db:create
rake db:migrate
手动创建数据库
CREATE DATABASE `webchat_dev` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE webchat_dev;
source db/db.sql;
-
save message to list
key: room:roomkey
format: type|username|text|time -
room 最近用户存储在集合中
room:test:users
-
user 信息 Hash
key 是: user:id value 是: name, avatar, id