GithubHelp home page GithubHelp logo

yinghaoyu / ttserver Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 20.56 MB

Shell 10.76% C++ 54.18% CMake 0.50% Makefile 21.19% C 2.66% Java 0.04% Batchfile 0.02% Roff 9.38% M4 0.39% XSLT 0.03% CSS 0.06% JavaScript 0.78% Objective-C++ 0.01%

ttserver's Introduction

TTServer

TTServer主要包含了以下几种服务器:

  • LoginServer: 负载均衡服务器,分配一个负载小的MsgServer给客户端使用
  • MsgServer: 消息服务器,提供客户端大部分信令处理功能,包括私人聊天、群组聊天等
  • RouteServer: 路由服务器,为登录在不同MsgServer的用户提供消息转发功能
  • FileServer: 文件服务器,提供客户端之间得文件传输服务,支持在线以及离线文件传输
  • MsfsServer: 图片存储服务器,提供头像,图片传输中的图片存储服务
  • DBProxy: 数据库代理服务器,提供MySQL以及redis的访问服务,屏蔽其他服务器与MySQLredis的直接交互
  • HttpMsgServer: 对外接口服务器,提供对外接口功能。(目前只是框架)
  • PushServer: 消息推送服务器,提供IOS系统消息推送。(IOS消息推送必须走apns

服务端流程

服务端的启动没有严格的先后流程,因为各端在启动后会去主动连接其所依赖的服务端,如果相应的服务端还未启动,会始终尝试连接。

  1. 启动db_proxy后,db_proxy会去根据配置文件连接相应的MySQL实例,以及redis实例。

  2. 启动route_serverfile_servermsfs后,各个服务端都会开始监听相应的端口。

  3. 启动login_serverlogin_server就开始监听相应的端口(8080),等待客户端的连接,而分配一个负载相对较小的msg_server给客户端。

  4. 启动msg_server(端口8000),msg_server启动后,会去主动连接route_serverlogin_serverdb_proxy_server,会将自己的监听的端口信息注册到login_server去,同时在用户上线,下线的时候会将自己的负载情况汇报给login_server

服务端口号

服务 端口
login_server 8080/8008
msg_server 8000
db_proxy_server 10600
route_server 8200
http_msg_server 8400
file_server 8600/8601

ttserver's People

Contributors

yinghaoyu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.