We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › Multiuser applet
Page Index Toggle Pages: 1
Multiuser applet (Read 515 times)
Multiuser applet
Mar 26th, 2006, 11:30am
 
I've been making a couple of versions of a multi-user applet..
I started by making text-files holding control over everything the applet needed, but that was really hard on my server, and computer.. so i rewrote it to work with mysql, but of course i couldn't think of a way _not_ to write my password in the pde file and still connect to the mysqlserver, so i dropped that and made a dynamic php file which connects to the mysql server and handles my sql-calls from processing.. itstops if the "style" of the sql doesn't match anything i do (so it's safe enough), but it's .. a bit slow as well.. about something inbetween the text-files and mysql version..

anybody got an idea on how i can quickly save data that all the users need, how not to hammer the server with unnessecary querys, etc?

http://wliia.org/projects/co/
click and drag objects, or doubleclick and edit
positions and text are saved in the database,
so other users will see what you update

http://wliia.org/projects/coDraw/
just move mouse around to draw
what you see drawn is what is saved in the database, so it's what other people will see drawn as well


any help is apperciated


-seltar
Re: Multiuser applet
Reply #1 - Apr 8th, 2006, 3:47am
 
Have you thought about writing a udp server? If your web host will allow it (which is rare), you could write a socket server to handle any clients with udp requests. This could be a lot quicker, and allow your clients to automatically receive incoming udp packets (so rather than constantly checking for updates, you wait until the updates are sent out by the server). Plus your server would never really need to save to sql, unless you wanted to retain information about objects even after the server was down.

I'd like to do some work with multi-user applet but my web host won't host a custom written socket server (I probably wouldn't either, if I were them). Hopefully you have some success. Smiley
Page Index Toggle Pages: 1