madhusriram / dictionary

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

Home Page:http://dict.shenfeng.me

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

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

http://dict.shenfeng.me


Languages

Language:JavaScript 54.2%Language:Java 25.4%Language:C 12.2%Language:Clojure 1.6%Language:Shell 1.6%Language:CSS 1.5%Language:Ruby 0.9%Language:HTML 0.9%Language:Smarty 0.7%Language:Makefile 0.3%Language:Python 0.3%Language:Groff 0.2%