Subj : Queues vs. Sockets To : MCMLXXIX From : Digital Man Date : Tue Apr 29 2008 06:53 pm Re: Queues vs. Sockets By: MCMLXXIX to Digital Man on Mon Apr 28 2008 09:37 pm > Ok.. now that I've cleared up the issues surround my ability to even ask > questions in here... > > I've come really far with some of these javascript games... and the next > logical step is making them multiplayer (real-time) > > With the amount of data I intend to be passing back and forth between > nodes, file IO seems like a huge PITA. I could be wrong, but that's just > how it seems. I've had moderate success using named queues to communicate > between nodes in a makeshift "chat lobby" I made... but it leaves open > Queues behind in memory, which interferes with the ability to detect > whether or not there are any other users connected. Named queues are *supposed* to be automatically deleted when the last "user" thread deletes their instance of the queue object (which *should* happen whenever the script terminates). > that leaves me with sockets, unless there's a way to free up queues from > memory so they don't show up in the named_queue list. Don't abandon the Queue idea so quickly. I'll see if I can reproduce what you're describing and fix it. > that being said.. is there a simple way to create a local socket connection > between 2 nodes? the format is a little confusing, and I've had no success > so far making it work. File I/O or a Queue would be easier. I'd like to see if we can get the named queues working for ya. digital man (xbox-live: digitlman) Snapple "Real Fact" #56: 1/4 of the bones in your body are in your feet. Norco, CA WX: 69.4øF, 56% humidity, 2 mph WSW wind, 0.00 inches rain/24hrs .