Git Product home page Git Product logo

julia's Introduction

julia Build Status

中文

A small yet high performance http server and reverse proxy. You may view it as a tiny nginx.

Environment

  • gcc 5.4.0
  • linux 4.4.0

Dependency

Install

  $ git submodule update --remote --recursive
  $ cd src && make all
  $ make install # root required

Run

$ julia # roo required, default listening at 8000

You may modify the config file to specify the port if there is a confliction.

Debug

As julia run as a daemon, it is not convenient to debug. Follow the steps to make it run in debug mode:

  1. change the INSTALL_DIR in Makefile to your local repo, like:
INSTALL_DIR = /home/foo/julia/ # the last slash required
  1. turn on the debug instruction in config.json
"debug": true,

Exciting

Making a http server and host your site is not extremely cool? Then, what if your server is compiled by your own compiler?

Yes, i wrote a C11 compiler(let me call it wgtcc). It compiles julia, and the site runs well :) You can install wgtcc, then compile julia:

  $ make CC=wgtcc all

It surprised me that the server compiled by wgtcc runs extremely fast!

have fun :)

Todo

  1. fastcgi
  2. chunked transform
  3. benchmark

Reference

  1. nginx
  2. lighttpd
  3. juson

中文

julia 是一个短小精悍的高并发http服务器和反向代理。你可以将他想象成tiny nginx。我用它搭了博客。静态文件由julia serve, 动态内容pass到后端的uwsgi(类似于fpm)。

安装 调试 请参照上方。

最酷的是,这个服务器,包括正在运行的博客,都是我自己写的C编译器编译的。如果你对编译器也感兴趣,可以看这里。按照其readme安装wgtcc后,你可以这样编译julia:

  $ make CC=wgtcc all

have fun :)

性能

benchmark: ab

均为8 worker, 1KiB静态页面

并发 nginx julia
10 52K 54K
100 56K 56K
1000 46K 44K

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.