Re: [shlug] 一个新的高性能服务端软件框架Wheatserver

52 views
Skip to first unread message

Johncan Lam

unread,
Apr 9, 2013, 10:52:05 AM4/9/13
to sh...@googlegroups.com
用来做服务器管理?


在 2013年4月9日下午10:04,wheat <haoma...@gmail.com>写道:
Wheatserver来自于构造一个开源的uWSGI轻量级的项目,但随着项目发展,可插拔式的工程构建使得发展为通用应用服务器,分离的模块使得极易构造出适合的应用环境。通过Wheatserver,我们构建出了一个极快的WSGI应用服务器和Redis集群管理应用,我们发现Wheatserver能极大的提高高性能服务器端软件的构建。

特性

  • 快速: 全部用C实现,丢弃任何不需要的组件
  • 低内存: 保存进程低内存需要并且采取措施使多个工作进程能尽量共享只读内容
  • 插件式: 模块可以自由增加和卸载,可以方便自定义所需模块
  • 监控: 自定义模块监控内容,可以通过客户端直接查看统计信息
  • 热重启: 改变配置文件后可以通过发送信号来热重启
  • 运维: 通过非常简单的命令接口协议使管理人员能方便的控制

--
-- You received this message because you are subscribed to the Google Groups Shanghai Linux User Group group. To post to this group, send email to sh...@googlegroups.com. To unsubscribe from this group, send email to shlug+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/shlug?hl=zh-CN
---
您收到此邮件是因为您订阅了 Google 网上论坛的“Shanghai Linux User Group”论坛。
要退订此论坛并停止接收此论坛的电子邮件,请发送电子邮件到 shlug+un...@googlegroups.com
要查看更多选项,请访问 https://groups.google.com/groups/opt_out。
 
 

none_nobody

unread,
Apr 9, 2013, 9:41:06 PM4/9/13
to sh...@googlegroups.com
写的不错嘛,从开始到现在写了多久了?

顺手写个宏可以用的,

看这里 sizeof(BuiltinCommands)/sizeof(struct command)
可以定义宏为:

#define asizeof(a)     (int)(sizeof (a) / sizeof ((a)[0]))

none_nobody

unread,
Apr 9, 2013, 10:53:20 PM4/9/13
to sh...@googlegroups.com
这里可能需要有一个动态装载模块的东东,才能方便扩展。

不管怎样,代码写的很不错。私聊。

On Wednesday, April 10, 2013 9:41:06 AM UTC+8, none_nobody wrote:
写的不错嘛,从开始到现在写了多久了?

wheat

unread,
Apr 10, 2013, 12:59:22 AM4/10/13
to sh...@googlegroups.com
5个月吧

在 2013年4月10日星期三UTC+8上午9时41分06秒,none_nobody写道:

wheat

unread,
Apr 10, 2013, 1:01:37 AM4/10/13
to sh...@googlegroups.com
还在思考到底是何种模块装载方式,是Apache的动态链接库还是Nginx的编译期加载。

目前比较简陋,在Makefile中直接加入目标模块目录。主要是考虑到框架还比较简单,很多东西可以一目了然不需要增加透明度。

在 2013年4月10日星期三UTC+8上午10时53分20秒,none_nobody写道:

none_nobody

unread,
Apr 10, 2013, 9:27:52 AM4/10/13
to sh...@googlegroups.com
怪不得代码里有些看上去很熟悉,原来是redis. :)

这个想法不错。

On Wednesday, April 10, 2013 12:58:54 PM UTC+8, wheat wrote:
服务器端软件框架,可以做WSGI应用服务器,CGI应用服务器,协议网关,反向代理,后端数据库集群的分发管理,再具体点的像做一个Redis的restful入口,写个Memached的Dynamo风格的代理,加个SPDY协议网关

Ben Luo

unread,
Apr 11, 2013, 5:03:40 AM4/11/13
to shlug
有没有可能部署到 Heroku,Sina 之类的服务器上?

2013/4/10 none_nobody <lyx...@gmail.com>:

wheat

unread,
Apr 12, 2013, 11:39:10 AM4/12/13
to sh...@googlegroups.com
饿,利用了Redis的list和dict(砍了部分)还有sds的原理,是重写的。。我不太确定我重写了是否需要申明。。

在 2013年4月10日星期三UTC+8下午9时27分52秒,none_nobody写道:

wheat

unread,
Apr 12, 2013, 11:40:38 AM4/12/13
to sh...@googlegroups.com
饿,据我所知,Heroku和SAE好像不支持C。。。
而且Wheatserver主要是面向高性能服务器端应用的,在IAAS上部署倒是正途(目前就在阿里云上部署了Wheatserver的应用)

在 2013年4月11日星期四UTC+8下午5时03分40秒,benluo写道:

none_nobody

unread,
Apr 12, 2013, 10:28:17 PM4/12/13
to sh...@googlegroups.com
看redis 的声明,你不应该将其改为BSD licenses. BSD可以闭源的,好像限制条件很多。
且redis 后面还有一段免责声明。

 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 *   * Redistributions of source code must retain the above copyright notice,
 *     this list of conditions and the following disclaimer.

On Friday, April 12, 2013 11:39:10 PM UTC+8, wheat wrote:
饿,利用了Redis的list和dict(砍了部分)还有sds的原理,是重写的。。我不太确定我重写了是否需要申明。。

wheat

unread,
Apr 14, 2013, 6:23:17 AM4/14/13
to sh...@googlegroups.com
没太明白你的意思。。。我没有使用BSD license。。。我不太确定重写部分Redis数据结构是否需要完整声明Redis Copying

在 2013年4月13日星期六UTC+8上午10时28分17秒,none_nobody写道:

none_nobody

unread,
Apr 14, 2013, 9:36:18 AM4/14/13
to sh...@googlegroups.com
严格来说,你的代码中有大段是基于redis 修改的,应属于redis redistribution  的范畴。例如 wheatserver/src/event_epoll.c   和  redis-2.6.10/src/ae_epoll.c 这两个文件的差异。其中有些只是变量名称不同,diff 可能差异很大,但是严格来说是同一段程序代码。


当然这是【我个人】的主张:如果 wheatserve 想做一个长期维护,吸引世界各国众人参与的项目,对待版权声明部分就需要谨慎处理。

而且代码的免责条款一定要写。虽然国内的法律上还不成问题,但跨国域的使用可能会有问题。

none_nobody

unread,
Apr 14, 2013, 9:42:09 AM4/14/13
to sh...@googlegroups.com
在根上有类似的COPYING 声明,这个声明类redis。而在其中另有好多个文件内中看到了声明 BSD-style license 。
 

 
 

wheat

unread,
Apr 15, 2013, 10:38:01 AM4/15/13
to sh...@googlegroups.com
Oh,我已经在所有从Redis学过来的文件加上了Redis声明,如event_*.c dict.c wstr.c

在 2013年4月14日星期日UTC+8下午9时36分18秒,none_nobody写道:
Reply all
Reply to author
Forward
0 new messages