Week 5 Homework
2 HTTP Servers (really basic HTTP 0.9/GET only):
- gserver for thread spawning per connection
- tcpserver w/ prespawned thread pool
requirements:
- craft your own request / response objects
- servelets of your own design. start with time of the day app.
- static files from the filesystem.
- html files served plain
- html.erb files should render via erb.
- no caching, no clever.
Bare minimum HTTP protocol:
GET /index.html HTTP/1.0 CRLF
CRLF
HTTP/1.1 200 OK CRLF
Date: Thu, 07 May 2009 01:06:01 GMT CRLF
Last-Modified: Mon, 19 Jan 2009 23:02:19 GMT CRLF
Content-Length: 3750 CRLF
Content-Type: text/html CRLF
CRLF
...content...
- other responses are:
- 304 redirected
- 404 missing
- 500 app error
2 Chat Servers:
drb-based centralized chat server & client
- port 31337
- multiple users, nick
- multiple channels
- join/leave
- no protocol otherwise
- client does no authentication, just connects.
- server announces connection, etc.
- protocol is objects, not text.
multicast plaintext chat server/client (distributed `wall`)
- port 7387
- broadcast text to others.
- print all text you see.
- zero protocol
General Requirements:
- must be TDD. start with direct objects, no network.
- check your manifest before you package or I’ll dock you w/o mercy.
This entry was posted
on Wednesday, May 6th, 2009 at 6:48 pm and is filed under Homework.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.