Coder Social home page Coder Social logo

webserver's Introduction

WebServer

Linux 环境下 C++ 轻量级 Web 服务器。用于学习 Linux 环境网络编程。

  • 使用线程池 + 非阻塞 socket + epoll(ET 和 LT 均实现)+ 事件处理(Reactor 和模拟 Proactor 均实现)的并发模型
  • 使用状态机解析 HTTP 请求报文,支持解析 GET 和 POST 请求
  • 访问服务器数据库实现 Web 端用户注册,登录功能,可以请求服务器图片和视频文件
  • 实现同步/异步日志系统,记录服务器运行状态
  • 经 Webbench 压力测试,可以实现上万的并发连接和数据请求

1 基础知识

高性能服务器程序框架

I/O 模型

Reactor 事件处理模式

I/O 复用

项目整体介绍

2 开发环境

ubuntu 16,gcc,cmake,clion

3 设计框架

4 代码解读

线程同步机制封装

http 请求解析类

半同步/半反应堆线程池

阻塞队列

日志类

webserver 类

5 压力测试

6 更新日志

  • 完成配置系统

7 快速运行

参考资料

游双 《Linux 高性能服务器编程》

webserver's People

Contributors

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