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