pombredanne / cmoon Goto Github PK
View Code? Open in Web Editor NEWThis project forked from bigmaliang/cmoon
Something basic about web written in C (trace, db, data backend, ...).
This project forked from bigmaliang/cmoon
Something basic about web written in C (trace, db, data backend, ...).
介绍 ==== 在脚本语言众多的情况下,moon 是web开发的一种C语言解决方案。 他主要是一些web开发常用的库和组件集合。 应用初始骨架请参考 github.com/bigml/reage 应用具体实例请参考 github.com/bigml/dida 使用moon开发的网站应用,主要有: 106.187.96.70 imdida.org (需绑定host访问) www.kosherall.com.cn $ git clone --recursive git://github.com/bigml/cmoon.git # mkdir -p /var/log/moon/ && chmod 777 /var/log/moon/ 系统性能 ====== 测试对象 测试时间 响应数/秒 失败率 php-fpm 180秒 19066.339 0.017191% moon 180秒 20281.45 0.022023% 详细请参考 doc/webbench/dynamic-get-s.txt 通过使用 webbench 进行跨机器、高速内网环境测试, 动态页面获取, 无业务逻辑情况下, moon(unix domain socket fastcgi) 与 php-fpm 的响应性能基本没有差别。 目录结构 ======= moon/ |-- Make.env 编译相关宏定义 |-- Makefile 编译文件 |-- maketool 编译辅助工具 |-- mtools 常用管理脚本 |-- doc 各种文档 | |-- lib 内部公共库文件目录 |-- event 支持插件的高并发处理缓冲层后台, 详情请参考该目录文档和代码 | |-- deliver web push 解决方案 (参考 deliver/README) `-- eii 中文分词工具(暂无内容) 开发环境 ======= Debian RedHat apt-get install locales dpkg-reconfigure locales git git-core git.i386 lighttpd spawn-fcgi spawn-fcgi.i386 postgresql postgresql-server.i386 libpq-dev postgresql84-devel.i386 libevent-dev libevent-devel.i386 libfcgi-dev fcgi-devel.i386 (http://www.fastcgi.com/dist/fcgi.tar.gz) libmemcached-dev libmemcached-devel.i386 libjson0-dev https://github.com/jehiah/json-c libgd2-xpm-dev gd-devel.386 pkg-config /usr/local/src/ 目录下手动安装 --------------------------- clearsilver http://clearsilver.googlecode.com/svn/trunk/ clearsilver depend on streamhtmlparser http://streamhtmlparser.googlecode.com/svn/trunk/ streamhtmlparser ./autogen.sh --disable-wdb --disable-perl --disable-ruby --disable-java --disable-python mkdir libs cd streamhtmlparser; make; cd .. cp streamhtmlparser/.libs/libstreamhtmlparser.so libs/ cp streamhtmlparser/.libs/* /usr/local/lib/ mkdir -p man/man3/ touch man/man3/1.3 (clearsilver代码需稍作修改, patch -p0 -i lib/patches/cs.diff, 可能需要 path -i lib/patches/rules.diff) make eMail git://github.com/deanproxy/eMail.git depend on dlib git://github.com/deanproxy/dlib.git discount git://github.com/Orc/discount.git libmongoclient https://github.com/algernon/libmongo-client.git (代码需要稍作修改,patch -p0 -i lib/patches/libmongoclient.diff) 修改Make.env,各种库的依赖路径, 如果装好上面软件后还出现编译错误, 请自行修改 Make.env 之 DEPEND LIBRARY 部分. 能编译通过后,请参考应用 doc/system.txt 文档准备数据库和 web 服务器环境,便可以开始开发。 注: == 1. 代码规范请参考 doc/spec.c 用 4 个空格缩进,请不要使用Tab缩进。 (setq-default indent-tabs-mode nil) in ~/.emacs 2. RESERVED key in request url /json/xxx: output json /image/xxx: output image _op: add, mod, del for ... _nmax: max number _nmin: min number _ntt: total number _nst: start number _npg: page number (_nst will overwrite _npg) _npp: number perpage _type_object: 请求中包含对象/数组时,该参数的值让 viki 将其当作对象解析,多个对象时逗号隔开 ADD /json/zero/image 上传图片 _upfile_data_type: 说明上传文件的数据类型 text 文本文件,对应js的 readAsText(file) binstr 二进制流,对应js的 readAsBinaryString(file) dataurl base64编码过的字符串,确保 url 传输安全,对应js的 readAsDataURL(file)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.