GithubHelp home page GithubHelp logo

shenfeng / dictionary Goto Github PK

View Code? Open in Web Editor NEW
117.0 14.0 33.0 16.36 MB

Pure c with epoll: A English-English dictionary to assist reading

Ruby 0.98% JavaScript 56.73% Java 26.60% Clojure 1.71% Python 0.30% Shell 0.88% C 12.80%

dictionary's Introduction

A simple online english dictionary

A simple and ease to use English dictionary written in C using epoll in server side and javascript in client side. Data is extracted from LDOCE

Directory structure:

  1. /server Server side code, in C.
  2. /client Javascript/HTML/CSS
  3. /test/java Util test and performance test code
  4. /src Clojure and java code to generate the dbdata file

dbdata file format

  • first 2 byte: how many words in this file. big-endian
  • the rest are word items, one by one
  • word items are sorted asc
  • word item format, five parts, in order
    1. word
    2. \0
    3. 1 bit: 0 is gzipped data, 1 is unzipped
    4. 15 bit: how many bytes of data of this word
    5. data of this word

Linux epoll's performance is amazing

while 800k idle connection is kept, still 53.4k req/s. more info

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.