Code Monkey home page Code Monkey logo

bcsys's Introduction

BcSys

BcSwoole开发框架.

特点

  1. 支持API以及非API的形式
  2. 使用了Swoole进行服务器的开发,常驻内存,结合Swoole的特点,常态信息进行内存常驻
  3. Mysql结合PDO和数据库连接池的特点,减少数据库IO操作,并且增加了Mysql连接心跳包检测机制
  4. Redis结合了phpredis的扩展和Mysql一样,实现了连接池的特性
  5. 控制器支持回调函数的写法,也支持回调函数+协程的方式写法
  6. 实现了sh脚本启动服务
  7. sql执行错误异常log追踪日志
  8. 采用了动态依赖注入的写法,结合IOC/DI的**对象统一管理
  9. 支持异步Mysql连接客户端 --ps:阻塞同步业务不建议使用,导致数据无法同步

说明

  • 禁用了define等污染环境的函数系统变量的使用,所有的变量都其特定的命名空间
  • 使用了全局变量桶来存储全局变量

启动例子

chmod 777 Bcsys/sh/bc
Bcsys/sh/bc start

nginx配置例子

server {
    listen       80;
    server_name  music.crazylaw.cn;

	// 如果要用到html而非API形式的时候,需要指定root路径,否则会直接进入rewrite模式
    root /wwwroot/share/music;
    index  index.html index.htm index.php;

    // 由于路由机制,必须配置重写路径
    if (!-e $request_filename) {
       rewrite ^/(.*)  /index.php?$1 last;
    }


    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }

    # 此处端口号为:9555,可以自定义设置端口
    location ~ \.php$ {
             proxy_pass http://127.0.0.1:9555$request_uri;
             proxy_http_version 1.1;
             proxy_set_header Connection "keep-alive";
             proxy_set_header X-Real-IP $remote_addr;
             fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
             include fastcgi_params;
    }
}

bcsys's People

Contributors

whiteccinn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  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.