"Mark Firestone" <hash_bang / retrobbs.org> schrieb im Newsbeitrag news:000601c52764$2d450cc0$4601a8c0 / retrobbs.org... > Just looking for some advice, about that boring ruby BBS that I'm always > rambling on about... > > ..I got the fido, and the smtp working... so I'm looking for a new > challenge, and it would be nice to actually have someone use the bloody > thing, so I thought, I'll hook it up to html... > > What's the best way to code this? If I had designed this thing properly > from the get-go, I could just write a separate cgi script in e-ruby ... > as *most* of the data is stored in a postgres database. > > The only stuff that isn't in postgres, is the user data, because it > would mean major surgery to change this (because of my poor design... > there are loads of places in the code where the program directly looks > at data. > > Anyway, I thought of just building a ruby web server into the program, => Webrick > in fact I've started playing with this... so should I do this, or go > though a major re-write to put the user stuff in postgres? I'd probably do that because it's more consistent. > As far as > http sessions go, can I assume that I'll keep the same TCP session for > an entire "user" session, or do I need cookies? No, you cannot assume that since HTTP is stateless. Although HTTP 1.1 provides a means for reusing a connection you still have to deal with interruptions etc. > And if so, how can my > web server keep track of this? One standard approach is to use session cookies. And since it's so common there's most likely a solution for this available already. You won't have to code this yourself. > Seems like this will be one of those educational projects... again... :-) Kind regards robert