Repost ... HTML Musings..

M

Mark Firestone

------=_NextPart_000_0030_01C527DA.BAF52930
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit


I guess Outlook messed up my post because I hit reply. I should use a
real client. Here it is again, sorry if you saw it twice.


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,
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? 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? And if so, how can my
web server keep track of this?

Seems like this will be one of those educational projects... again...



------=_NextPart_000_0030_01C527DA.BAF52930--
 
E

Eric Hodel

--Apple-Mail-13--707830883
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; format=flowed

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,
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 would do the rewrite. If you keep extending yourself, eventually
you'll hit the point where you have to do this, and that will cause you
even more pain then :)
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?

You'll need to use either cookies or URLs with a session id attached.
And if so, how can my web server keep track of this?

You'll also need either a single-process web server like WEBrick to
reattach sessions to TCP sockets, or you'll need a separate process
that holds all the TCP sockets.

DRb works great for the latter, read out the session ID and builds up a
list of commands, then pass it to the DRb process which holds the TCP
session open. The DRb module does the work then hands you back the
results which you can turn into an HTML page.
Seems like this will be one of those educational projects... again...

--
Eric Hodel - (e-mail address removed) - http://segment7.net
FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04

--Apple-Mail-13--707830883
content-type: application/pgp-signature; x-mac-type=70674453;
name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFCNJk7MypVHHlsnwQRArKPAJwLkbVZR1oMVQbzfNCenu5kYp9qEgCgoMVJ
tK3S+dUGWKZbTXj7XNpblw0=
=x2f6
-----END PGP SIGNATURE-----

--Apple-Mail-13--707830883--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top