mgate - fastcgi worker of moon
moon is a highy concurrency dynamic web solution write in c (currently by bigmaliang@gmail.com)
Like YII, ThinkPHP write in PHP, mgate is another web MVC framework write in c.
Web framework is so simple. And I'm familar with C. So, there is mgate.
Mgate is developed for high speed web application, it is hard to learn(compare with PHP), and not very easy to agile develop. So, if you just want to copy a web site as soon as possible(3 days for a milk farmer's site), mgate is not suitable for you.
mgate
├── walk model. database operation
├── fly view. home directory of you site. (html, js, css, image...)
├── run controller. dynamic web page/interface handler. just a viki cgi.
├
├── mevent model(for high concurrency). refer mevent/README for further info.
├── xport mevent local plugin.
├
├── tpl html templates directory. commonly used by run/ and pager/
├── pager tools produce static html. like cms.
├── mtl scripts, tools...
`── pub public c library
- git clone --recursive https://github.com/bigml/mgate.git mgate
- cd mgate; sed -i 's/voov/PROJNAME/g'
grep -rl voov .
- find -name '*voov*'; rename them
- mkdir -p /var/log/moon/mgate/; chmod 777 /var/log/moon/mgate/
- refer doc/system-*.txt for how mgate work, and how config it
- refer mevent/README, mevent/mbase/README to begin develop
-
reserved request key
- /json/xxx: output json
- /image/xxx: output image
- /json/zero/image?_op=add for image upload
-
reserved request parameter
-
_op: add, mod, del for REST request
-
_type_object: object parameter names of this request (tell server these paramter is json object rather than string), divide by ',' on multi json objects.
-
_upfile_data_type: the file type uploaded
- text text file, accord readAsText(file) in js
- binstr binary stream, accord readAsBinaryString(file) in js
- dataurl base64 coded string,makesure url secury,accord readAsDataURL(file) in js
-
_nmax: max number
-
_nmin: min number
-
_ntt: total number
-
_nst: start number
-
_npg: page number (_nst will overwrite _npg)
-
_npp: number perpage
-