Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
gbcdev committed Apr 5, 2016
2 parents fe32c75 + 0fbff9f commit b496071
Show file tree
Hide file tree
Showing 151 changed files with 8,031 additions and 9,045 deletions.
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
.*
apps/taptank/frameworks/

bin/getopt_long
bin/python_env/
bin/beanstalkd/
bin/openresty/
bin/redis/

tmp/
logs/
db/
175 changes: 99 additions & 76 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,113 +1,136 @@
# Change Log

### 0.8.0

- CHANGES & IMPROVE:
- refactor all global functions, wrap they as separated modules
- use supervisor control all processes
- packages/redis: unified redis driver for NginxLua and LuaSocket
- packages/beanstalkd: unified beanstalkd driver for NginxLua and LuaSocket
- packages/mysql: unified mysql driver for NginxLua and LuaSocket
- packages/event: improved event binding component
- packages/gbc: refactor "GameBox Cloud Core" as a package
- packages/tests: unittests support
- NginxRedisLoop: subscribe any channel without more redis connections
- add Vagrant support
- upgrade all libs
- improved cc.class(), cc.bind(), cc.unbind()
- improved cc.import()
- remove mysql driver

- BUGFIX:
- fix Job Worker


### 0.7.0
- CHNAGES:
- When user writes a new action, an property of the action named `ACCEPTED_REQUEST_TYPE` can be set. It is used for determining which type of the request can access the action.

- IMPROVE:
- `Job Worker` only prints job finished info in debug mode.
- The codes of the actions of `Job Worker` can be updated dynamically.
- CHNAGES:
- When user writes a new action, an property of the action named `ACCEPTED_REQUEST_TYPE` can be set. It is used for determining which type of the request can access the action.

- IMPROVE:
- `Job Worker` only prints job finished info in debug mode.
- The codes of the actions of `Job Worker` can be updated dynamically.

- BUGFIX:
- `luasec-0.5` should be installed correctly in 32-bit linux.
- The actions of `Job Worker` should be settled only in `worker/actinos`.
- BUGFIX:
- `luasec-0.5` should be installed correctly in 32-bit linux.
- The actions of `Job Worker` should be settled only in `worker/actinos`.

### 0.6.0

- CHNAGES:
- `Quick Server` rename to `GameBox Cloud Core`, short name is `gbc-core`.
- `start_quick_server.sh` rename to `start_server`.
- `stop_quick_server.sh` rename to `stop_server`.
- `status_quick_server.sh` rename to `check_server`.
- the `conf/config.lua` option `quickserverRootPath` rename to `serverRootPath`.
- CHNAGES:
- `Quick Server` rename to `GameBox Cloud Core`, short name is `gbc-core`.
- `start_quick_server.sh` rename to `start_server`.
- `stop_quick_server.sh` rename to `stop_server`.
- `status_quick_server.sh` rename to `check_server`.
- the `conf/config.lua` option `quickserverRootPath` rename to `serverRootPath`.

### 0.5.1

- FEATURE:
- Job Worker is finished as a module of Quick Server.
- Job Service package is offered. User can use it to add a job easily.
- FEATURE:
- Job Worker is finished as a module of Quick Server.
- Job Service package is offered. User can use it to add a job easily.

- BUGFIX:
- start/stop/status shells can exit normally, if some errors happend in progress.
- start/stop/status shells can get the config of Quick Server in any path.
- Monitor can show correct number of jobs in Beanstalkd.
- BUGFIX:
- start/stop/status shells can exit normally, if some errors happend in progress.
- start/stop/status shells can get the config of Quick Server in any path.
- Monitor can show correct number of jobs in Beanstalkd.

- IMPROVE:
- In error messages, redundant paths can be stripped.
- Quick Server supports Mac OS now.
- start/stop/status use more colors for displaying.
- start/stop/status can show the version and mode of Quick Server.
- tools.sh can display the result better, even if the result is a lua table.
- Support job worker module in shells.
- Add lib luasec-0.5.0.
- IMPROVE:
- In error messages, redundant paths can be stripped.
- Quick Server supports Mac OS now.
- start/stop/status use more colors for displaying.
- start/stop/status can show the version and mode of Quick Server.
- tools.sh can display the result better, even if the result is a lua table.
- Support job worker module in shells.
- Add lib luasec-0.5.0.

### 0.5.0

- UPGRADE:
- upgrade luasocket to 3.0-rc1.
- add luainspect lib.
- upgrade luasocket to 3.0-rc1.
- add luainspect lib.

- IMPROVE: make installation better, improve installation shell.
- offer an unique install.sh instead of install_ubunutu.sh and install_centos.sh.
- except fundamental packages from linux distro, such as "git", "zip" and some building tools, all other packages can be installed without online. This can save much time.
- the install.sh supports parameters, ex. user can set the path of installation.
- offer an unique install.sh instead of install_ubunutu.sh and install_centos.sh.
- except fundamental packages from linux distro, such as "git", "zip" and some building tools, all other packages can be installed without online. This can save much time.
- the install.sh supports parameters, ex. user can set the path of installation.

- IMPROVE: offer all new wiki docs by Sphinx project in ".rst" format.
- the new wiki can be outputed in many file formats, such as html, pdf, latex, etc.
- it is easy to generated with make tools.
- the wiki docs in html format is released with Quick Server, in "docs/" dir.
- the new wiki can be outputed in many file formats, such as html, pdf, latex, etc.
- it is easy to generated with make tools.
- the wiki docs in html format is released with Quick Server, in "docs/" dir.

- CHNAGE: almost all Quick Server codes are refactored.
- new architecture, all modules with "Server" in name are refactored to "Connect".
- package mechanism, all functions is offerd as package.
- Http and WebSocket modules are refactored, inheriting from "ConnectBase".
- new broadcast mechanism.
- adjust options in config.lua, more simple, more better.
- new maintain and manager shells.
- monitor the processes of Quick Server at any time, and the status can be shown in web.
- new architecture, all modules with "Server" in name are refactored to "Connect".
- package mechanism, all functions is offerd as package.
- Http and WebSocket modules are refactored, inheriting from "ConnectBase".
- new broadcast mechanism.
- adjust options in config.lua, more simple, more better.
- new maintain and manager shells.
- monitor the processes of Quick Server at any time, and the status can be shown in web.

### 0.4.0

- UPGRADE: From Openresty 1.7.2.x to 1.7.7.x.
- IMPROVE: make install_ubunutu.sh better in order that user can install Quick Server convenienty, and fix some bugs in it.
- create a symbol link for nginx, after Openresty installation.
- Add option "--no-check-certificate" for each "wget" command.
- "status\_quick\_server.sh" shell file should be copied to installation directory while installation is finished.
- Change those shell tools director, move them from "/opt" to installation path.
- Add a new shell tool named "restart\_nginx\_only.sh" in order to restart nginx processes.
- Add a parameter for install_ubuntu.sh for specifying installation path insted of absolute path.
- Quick Server configure files, including "redis.conf" and "nginx.conf", are modified automatically via "sed" tool.
- create a symbol link for nginx, after Openresty installation.
- Add option "--no-check-certificate" for each "wget" command.
- "status\_quick\_server.sh" shell file should be copied to installation directory while installation is finished.
- Change those shell tools director, move them from "/opt" to installation path.
- Add a new shell tool named "restart\_nginx\_only.sh" in order to restart nginx processes.
- Add a parameter for install_ubuntu.sh for specifying installation path insted of absolute path.
- Quick Server configure files, including "redis.conf" and "nginx.conf", are modified automatically via "sed" tool.
- FEATURE: Support plugin mechanism.
- Add some methods into "cc" framework, "load" and "bind" etc, for package file(lua file).
- Give two plugin examples: "Ranklist" and "ChatRoom", converted from "RanklistAction" and "ChatAction".
- Add simple functionality tests for above plugins.
- Add some methods into "cc" framework, "load" and "bind" etc, for package file(lua file).
- Give two plugin examples: "Ranklist" and "ChatRoom", converted from "RanklistAction" and "ChatAction".
- Add simple functionality tests for above plugins.
- IMPROVE: Add a demo action named "HelloworldAction"
- include a simple method "/sayhello" to show "hello world".
- there are two other methods "addandcount" and "sayletters" to show how to write a function with plugins.
- Add "helloworld" client which supports both html and websocket.
- include a simple method "/sayhello" to show "hello world".
- there are two other methods "addandcount" and "sayletters" to show how to write a function with plugins.
- Add "helloworld" client which supports both html and websocket.
- CHANGE: delete install_mac.sh. The installation of mac env will be supported in next version.
- OTHER MINOR CHANGES:
- IMPROVE: upgrade Quick Server wiki.
- BUGFIX: when deploying lua codes defined by user, the target directory in Quick Server shoule be created.
- IMPROVE: The target directory in Quick Server can be configured via "luaRepoPrefix" in config.lua for deploying lua codes defined by user.
- CHANGE: obsolete the old interface of uploading user codes.
- IMPROVE: Add two sql files: "base.sql" and "pre_condition.sql" in conf/sql for configuring MySql.
- CHANGE: don't need to set "root" privilege in nginx conf file.
- IMPROVE: Add README file for each sub-dir.
- CHANGE: change some shells which are used to encapsulate "nginx" command in "openresty/nginx".
- IMPROVE: upgrade Quick Server wiki.
- BUGFIX: when deploying lua codes defined by user, the target directory in Quick Server shoule be created.
- IMPROVE: The target directory in Quick Server can be configured via "luaRepoPrefix" in config.lua for deploying lua codes defined by user.
- CHANGE: obsolete the old interface of uploading user codes.
- IMPROVE: Add two sql files: "base.sql" and "pre_condition.sql" in conf/sql for configuring MySql.
- CHANGE: don't need to set "root" privilege in nginx conf file.
- IMPROVE: Add README file for each sub-dir.
- CHANGE: change some shells which are used to encapsulate "nginx" command in "openresty/nginx".

### 0.4.0-rc0

- FEATURE: Add an new action "SessionAction" to generate **session_id** for user.
- FEATURE: adjust many interfaces in RanklistAction.
- Each interface calling needs checking **session_id**.
- "Add" interface can generate a uid according to the **nickname** when user calls it first time.
- the format of uid is "nickname+numbers" in order to keep each uid unique.
- score, remove, getrank and getrevrank should get key from param "uid".
- "GetRevRank" also replies score.
- "GetRankAction" also return socre.
- "AddAction" can return a percent to indicate "rank/total", in other words, it's the user's positiono in a ranklist.
- Add some test cases for RanklistAction.
- Each interface calling needs checking **session_id**.
- "Add" interface can generate a uid according to the **nickname** when user calls it first time.
- the format of uid is "nickname+numbers" in order to keep each uid unique.
- score, remove, getrank and getrevrank should get key from param "uid".
- "GetRevRank" also replies score.
- "GetRankAction" also return socre.
- "AddAction" can return a percent to indicate "rank/total", in other words, it's the user's positiono in a ranklist.
- Add some test cases for RanklistAction.
- BUGFIX: if a redis command fails, it replies an int 0 not a string "0".

### 0.3.9
Expand All @@ -120,9 +143,9 @@
### 0.3.8

- FEATURE: implement chatting room, ChatAction module.
- Add a new sub-table as the configuration for ChatAction in config.lua.
- assign an user to a channel automatically.
- Add some tests cases for ChatAction.
- Add a new sub-table as the configuration for ChatAction in config.lua.
- assign an user to a channel automatically.
- Add some tests cases for ChatAction.
- IMPROVE: remove BeginSession interface.
- IMPROVE: optimize some lua codes in the initialization of mysql and redis.

Expand Down
21 changes: 6 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@ GameBox Cloud Core 为开发者提供一个稳定可靠,可伸缩的服务端
- [OpenResty](http://openresty.org)
- [LuaJIT](http://luajit.org)

<br />

- 使用 Lua 脚本语言开发服务端功能

也许您认为在服务端使用 Lua 脚本显得有点不务正业,但 NodeJS 的流行却证明了合适的基础架构可以让一种语言突破原本的应用场景。更何况相比 NodeJS,OpenResty 提供的同步非阻塞编程模型,可以避免写出大量的嵌套 callback,不管是从开发效率还是维护成本上来说都更胜 NodeJS。

用 Lua 脚本语言开发服务端功能还有一个巨大的好处,那就是可以和使用 Cocos2d-Lua(quick-cocos2d-x)的客户端共享大量代码。比如数据 Schema 定义、数据对象、游戏逻辑等等,都可以在客户端和服务端之间共享同一份代码。做过网络游戏的同学一定对如何保持客户端和服务端代码在数据接口上的一致头疼过。现在使用 GameBox Cloud Core,这些问题统统消失不见。

<br />

- 支持短连接和长连接,满足从异步网络到实时网络的各种需求

Expand All @@ -34,19 +32,12 @@ GameBox Cloud Core 为开发者提供一个稳定可靠,可伸缩的服务端
- [WebSocket RFC 文档](https://tools.ietf.org/html/rfc6455)
- [WebSocket](http://zh.wikipedia.org/wiki/WebSocket)

<br />

- 支持插件机制,使用第三方插件加快功能开发
## Get Started

GameBox Cloud Core 支持插件机制,开发者可以使用成熟的第三方插件来加快服务端功能开发。未来 GameBox Cloud 团队也将提供插件仓库,让开发者可以分享各种有用的插件。

<br />

### Get Started

- [安装 GameBox Cloud Core](http://gameboxcloud.com/docs/core/install/)
- [创建 Hello,World 应用程序](http://gameboxcloud.com/docs/core/helloworld/)
- [更多文档](http://gameboxcloud.com/docs/)
- [版本日志](http://gameboxcloud.com/docs/core/changelog/)
- [源代码仓库](https://bitbucket.org/gameboxcloud/gbc-core)
- [快速开始](https://github.com/dualface/gbc-docs/blob/master/src/guide/get-started.md)
- [更多文档](https://github.com/dualface/gbc-docs/)
- [源代码仓库](https://github.com/dualface/gbc-core)
- [项目管理](https://www.pivotaltracker.com/n/projects/1474648)
- [Bug 报告](https://github.com/dualface/gbc-core/issues)
- 技术支持: QQ群 <424776815>
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.8.0
73 changes: 73 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.

# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "ubuntu/vivid64"

# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false

# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
config.vm.network "forwarded_port", guest: 8088, host: 8088

# Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network "private_network", ip: "192.168.33.10"

# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
# config.vm.network "public_network"

# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"

# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
# config.vm.provider "virtualbox" do |vb|
# # Display the VirtualBox GUI when booting the machine
# vb.gui = true
#
# # Customize the amount of memory on the VM:
# vb.memory = "1024"
# end
#
# View the documentation for the provider you are using for more
# information on available options.

# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
# such as FTP and Heroku are also available. See the documentation at
# https://docs.vagrantup.com/v2/push/atlas.html for more information.
# config.push.define "atlas" do |push|
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
# end

# Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use.
config.vm.provision :shell, run: "always", path: "vagrant-support/bootstrap.sh"

# config.vm.provision "shell", inline: <<-SHELL
# sudo apt-get update
# sudo apt-get install -y apache2
# SHELL
end
Loading

0 comments on commit b496071

Please sign in to comment.