GithubHelp home page GithubHelp logo

chxchxkkk / uvb-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rossdylan/uvb-server

0.0 0.0 0.0 138 KB

Server for Ultimate Victory Battle. Written in C.

License: MIT License

C 97.05% Makefile 2.95%

uvb-server's Introduction

UVB - Ultimate Victory Battle

Build Status

Ultimate Victory Battle is a game created by Computer Science House. The basic premise is this. There is a server, every one else tries to crash the server. There are also counters and statistics, but thats just to rank how hard each player is hitting the server.

Most people end up writing a client which floods a server with traffic. I thought it would be more fun to write a server which can handle the flood of traffic. That server is what I have attempted to build here.

Revision 4 - Changelog

  1. Store counters in LMDB In the LMDB branch counters are persisted to disk using LMDB. In order to achieve reasonable performance we use the MDB_WRITEMAP and MDB_MAPASYNC options. This sacrifices write durability for speed, which in the case of UVB is fine (for now).

  2. Modified buffer_append and added buffer_fast_clear. These changes make it possible to avoid reallocing and memseting the buffer memory during clear, we still use the default realloc/memset way, but for printing the status page we avoid that and just use buffer_fast_clear which resets the buffer index to 0; These changes will probably be propogated out the master soon.

  3. Filter out non azAZ09 characters, limit names to 15 characters Because people are shitlords

  4. Pipelined requests. Previously there was a 1-1 mapping between tcp stream and request. So when a single request was finished, we clean everything up, and close the connection. Now we don't assume this, and instead just keep handling http requests from a connection until it stops.

  5. Use SO_REUSEPORT Previous connections were loadbalanced acrossed threads via EPOLL_ONESHOT and a shared epoll fd. While this works fine, we might be able to get more performance if SO_REUSEPORT is used since it allows multiple threads to bind on the same port while the kernel balances connections acrossed them. This way we hopefully get better cache locality because each connection is pinned to a single thread which is pinned to a single cpu.

  6. Each thread is pinned to a single CPU. Connections are no longer shared among threads so if we pin threads to CPUs we might improve performance.

People

  • Ross Delinger
  • Rob Glossop

uvb-server's People

Contributors

rossdylan avatar robgssp avatar kevinmgranger 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.