This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## 通讯协议相关业务逻辑 | |
| ###### `(3. socket消息的定义在/model/config/protocol中,各个事件对应的业务在哪些接口或模块?各自的业务流程和场景是怎样的?)` | |
| ### C2S_REGISTER_REQ :注册身份请求 | |
| 用户登陆时,客户端发送`C2S_REGISTER_REQ`socketio协议请求: | |
| ``` | |
| message_sign.send({ | |
| type: MsgType.C2S_REGISTER_REQ, | |
| data:{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## 我的方案 | |
| #### 连接socket管理 | |
| 采用和原先系统一样的方式,也是保存在内存里面.之前做得项目也都是放在内存里面的. | |
| 研究过保存到redis中,但是redis本身并不适合存储复杂的数据结构,所以socket管理一般都是放在本地内存里的 | |
| 参考资料: | |
| https://stackoverflow.com/questions/9459814/storing-and-retrieving-sockets-in-redis/9459982#9459982 | |
| #### 通讯协议更改?? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 聊天模块通讯管理 | |
| ---------- | |
| ## socket现有管理方案 | |
| ### 连接socket管理 | |
| ###### `(1. socket.io的封装,目前在/model/socketio/,socket.io服务是承载在默认3001端口(配置在/model/config/index)的http server上,socket事件的监听模式是怎样?)` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| title: mongodb3.* 设置用户认证 | |
| date: 2016-03-27 20:07:43 | |
| tags: [mongodb] | |
| categories: [mongodb] | |
| --- | |
| #mongodb3.* 设置用户认证 | |
| 1、mongodb是没有默认管理员账号,所以要先添加管理员账号,在开启权限认证。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 聊天模块代码结构 | |
| ---------- | |
| ## 路由层 | |
| 路由层主要包括: 居民通讯,医生通讯两个部分 | |
| ### 居民通讯分析 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #580服务端代码结构 | |
| ---------- | |
| 主要包括: 服务器代码http-server和socket.io-server. http-server是项目主要逻辑服务端, 负责项目的具体逻辑.socket.io-server是项目聊天服务器, 负责用户相关通讯 | |
| ##http-server服务端代码分析 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 运行环境 | |
| * [nodejs-v0.10.*](https://nodejs.org/en/download/releases/) | |
| * Windows、Linux 或 MacOS 操作系统 | |
| * [mongodb]((https://www.mongodb.org/)) | |
| * [redis](http://redis.io/download) | |
| # 部署服务端 | |
| ## 下载源码 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| title: 小技巧系列--不修改mysql限制,连接远程内网数据库 | |
| date: 2016-01-05 11:17:43 | |
| categories: [mysql, ssh] | |
| tags: [mysql, ssh] | |
| --- | |
| # 不修改mysql限制,连接远程内网数据库 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #staticTool(静态文件生成工具) | |
| 基本功能:上传xls的zip压缩文件,通过xls文件与数据库表的映射关系,写入数据库数据,并生成相关的服务端静态文件,客户端静态文件 | |
| # 运行环境 | |
| python 2.7 | |
| mysql | |
| # 部署服务端 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| title: 如何在Windows下开发,Linux下运行程序 | |
| date: 2015-12-31 16:07:43 | |
| categories: [Windows, Linux] | |
| tags: [Windows, Linux] | |
| --- | |
| ``` | |
| As we know, 服务端程序一般都是运行在Linux系统中,而Linux下的一些日常软件,却没办法做到像Windows下那样的精美,so,问题来了:有没有办法做到在Windows上进行代码的编写,而运行是在linux下呢??? |