Subj : Queues vs. Sockets (battle resurrected)
To : MCMLXXIX
From : Digital Man
Date : Thu Oct 22 2009 10:57 pm
Re: Queues vs. Sockets (battle resurrected)
By: MCMLXXIX to Deuce on Thu Oct 22 2009 11:21 am
> Ok. You're in a room with a computer, and you're tasked with writing
> internode (and eventually interbbs) comm for a chat room or game..
>
> There are two large buttons in front of you.
>
> 1st button: Queue() objects
> 2nd button: Socket() objects
>
> which button would you push?
>
> Granted I've already pushed a button... I'm just not sure if it was the
> right one. It's starting to make things very complicated.
There's another button which is the File object.
Anyway, Queues can't be used to communicate between BBSes (you need sockets or
files to do that), so if you want to do interbbs, it might make sense to just
use sockets. If you don't ever want to do interbbs, or you don't mind using a
different communication mechanism between different nodes of your own BBS and
nodes of other BBSes, then you can use Queues to communicate between your
nodes. Another downside of Queues is you can't communicate with nodes running
on other computers (for the rare BBS, like Vertrauen, that has nodes split
across multiple systems), so you'll need to use Socket or File I/O for that
case.
So, if you want to support all use cases (inter and intra BBS, single and multi
system BBSes) using a single mechanism, sockets are the way to go.
digital man
Snapple "Real Fact" #135:
A single coffee tree produces only about a pound of coffee beans per year.
---
� Synchronet � Vertrauen � Home of Synchronet � telnet://vert.synchro.net