Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 115 lines (74 sloc) 3.233 kb
4bdd4dc @vii make README more markdowned
authored
1 teepeedee2
2 ================================
80fc285 @vii unbreak the live comment updates, update the readme and mark mopoko as p...
authored
3
4bdd4dc @vii make README more markdowned
authored
4 What's this?
5 --------
3171a1f @vii release
authored
6
3c091c7 @vii better quickstart
authored
7 teepeedee2 is a webapplication framework for dynamic webpages. It's
8 goal is to be fast. It only works on Linux.
4bdd4dc @vii make README more markdowned
authored
9
3c091c7 @vii better quickstart
authored
10 Quickstart
4bdd4dc @vii make README more markdowned
authored
11 --------
80fc285 @vii unbreak the live comment updates, update the readme and mark mopoko as p...
authored
12
3c091c7 @vii better quickstart
authored
13 You need SBCL. On Ubuntu or Debian
14
15 $ sudo apt-get install sbcl
16
17 Untar or git clone
18
19 $ git clone git://github.com/vii/teepeedee2.git
80fc285 @vii unbreak the live comment updates, update the readme and mark mopoko as p...
authored
20
4bdd4dc @vii make README more markdowned
authored
21 $ cd teepeedee2
22
3c091c7 @vii better quickstart
authored
23 Start sbcl and run the quickstart.lisp
4bdd4dc @vii make README more markdowned
authored
24
3c091c7 @vii better quickstart
authored
25 $ sbcl --load quickstart.lisp
4bdd4dc @vii make README more markdowned
authored
26
3c091c7 @vii better quickstart
authored
27 This will download the following packages with asdf-install, and their
28 dependencies: iterate cffi cl-irregsexp trivial-backtrace
4bdd4dc @vii make README more markdowned
authored
29
3c091c7 @vii better quickstart
authored
30 Note that it DISABLES the GPG signature checking! You will be running
31 UNVERIFIED CODE.
80fc285 @vii unbreak the live comment updates, update the readme and mark mopoko as p...
authored
32
3c091c7 @vii better quickstart
authored
33 It will try to download the following packages with
34 Install where?
35 1) System-wide install:
36 System in /usr/lib/sbcl/site-systems/
37 Files in /usr/lib/sbcl/site/
38 2) Personal installation:
39 System in /home/username/.sbcl/systems/
40 Files in /home/username/.sbcl/site/
41 -->
4bdd4dc @vii make README more markdowned
authored
42
3c091c7 @vii better quickstart
authored
43 Enter "2" and press enter.
4bdd4dc @vii make README more markdowned
authored
44
3c091c7 @vii better quickstart
authored
45 Lots of downloading and compiling will occur.
80fc285 @vii unbreak the live comment updates, update the readme and mark mopoko as p...
authored
46
3c091c7 @vii better quickstart
authored
47 Then visit http://localhost:8080/hello
4bdd4dc @vii make README more markdowned
authored
48
3c091c7 @vii better quickstart
authored
49 You can now enter new pages at the SBCL REPL
4bdd4dc @vii make README more markdowned
authored
50
3c091c7 @vii better quickstart
authored
51 CL-USER> (in-package #:teepeedee2.quickstart)
4bdd4dc @vii make README more markdowned
authored
52
3c091c7 @vii better quickstart
authored
53 QUICKSTART> (defpage "/goodbye" ((name "Friend"))
54 (<div (<h1 "Bye bye " name) (<p "The universal time is " (get-universal-time))))
4bdd4dc @vii make README more markdowned
authored
55
56
57 Benchmarking
58 --------
59
60 (in-package #:tpd2)
3c091c7 @vii better quickstart
authored
61 (defpage "/test" (name) :create-frame nil
62 (tpd2.ml.html:<h1 "Hello " name))
63
64 (http-start-server 8080)
65
4bdd4dc @vii make README more markdowned
authored
66 (event-loop)
67
68 Use apachebench
80fc285 @vii unbreak the live comment updates, update the readme and mark mopoko as p...
authored
69
3c091c7 @vii better quickstart
authored
70 $ ab -n 100000 -c10 http://127.0.0.1:8080/test?name=John
80fc285 @vii unbreak the live comment updates, update the readme and mark mopoko as p...
authored
71
72
73
4bdd4dc @vii make README more markdowned
authored
74 More info
75 --------
80fc285 @vii unbreak the live comment updates, update the readme and mark mopoko as p...
authored
76
3171a1f @vii release
authored
77 This webserver is not finished and I wrote it to learn and experiment
78 with Common Lisp. There is a lot to be tidied up, now I know the
79 language better. If you have any interest in using it, please get in
80 touch with me, John Fremlin <john@freml.in>, or
81 http://john.fremlin.org/contact.html
82
83 It is faster than all(?) other web application frameworks for serving
84 small dynamic webpages. Please let me know if you have a case where
85 another framework is faster!
86
87 You can see benchmarks comparing it to other web application platforms
88 like PHP and Rails in this presentation
89 http://tlug.jp/meetings/2008/11/serving-dynamic-webpages-in-less-then-a-millisecond_john-fremlin_handout.pdf
90
91 You can see an example of it running a blog on http://john.freml.in.
92
93 It is designed so that small fragments of JavaScript can be delivered
94 at low overhead to many clients.
95
96 However, it also includes general support libraries for quickly
97 generating XML/HTML (tpd2.ml2), for doing fast networking in a
98 continuation passing style, i.e. fast event driven userspace
99 threading (tpd2.io).
100
80fc285 @vii unbreak the live comment updates, update the readme and mark mopoko as p...
authored
101
3171a1f @vii release
authored
102 For an example application, loaded by default, see the src/game directory.
103
104 The addons/ directory contains a few of the other projects (but not
105 all) that teepeedee2 depends on. They are released under their own
106 licence.
107
108 The licence for most of tpd2 is the Lisp LGPL. However, I take no profit
109 from making this, and request that if you make an application with it,
110 please release the source so others can learn from it. Don't be
111 selfish!
112
113 It runs on SBCL and ClozureCL. It shouldn't be hard to port to other
3c091c7 @vii better quickstart
authored
114 modern Common Lisps.
Something went wrong with that request. Please try again.