drneau.com Forum Index drneau.com
A discussion board for drneau.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Working on networking

 
Post new topic   Reply to topic    drneau.com Forum Index -> Development and Release News
View previous topic :: View next topic  
Author Message
drneau
Site Admin


Joined: 13 Feb 2005
Posts: 2385
Location: Woodbury, MN

PostPosted: Sat Jul 07, 2007 8:54 am    Post subject: Working on networking Reply with quote

Doing the v3 networking now. I'll update this thread as it progresses.
_________________
--
Dr. Neau (not a real doctor)
http://drneau.com
http://home.comcast.net/~jneau
Back to top
View user's profile Send private message Send e-mail Visit poster's website
drneau
Site Admin


Joined: 13 Feb 2005
Posts: 2385
Location: Woodbury, MN

PostPosted: Mon Jul 09, 2007 3:37 pm    Post subject: Reply with quote

OK. I've been working on this a LOT and have the strategy fairly well firmed up and tested/implemented.

In v2, each time the client connected all console-related items (layouts, audios and images) were transferred to the client. If the client lost a connection, you had to reconnect it by hand. When you reconnected the client, all components were transferred again.

Fair to say that in v2 I didn't have much forethought in regards to networking. What WAS nice about the networking in v2 is that the client didn't require fileshare access to the server to work. That part will hold true for v3. I don't want you to be a home networking expert to get this to work!

v3 is vastly different

First thing you'll notice in v3...when you start it, it asks you to specify a location for the client repository. This isn't a pointer to the server repository...this is meant to be a directory local to the client system that will hold a cache of console components (audios, chip designs, console layouts and images). Just like the server repository, you can have it live wherever you want...even on a memory stick.

When the client connects to the server, the first thing it does is send the server a summary of what is contained in the client repository. The server evaluates this summary. If the client repository contains files that aren't in the server repository, the server tells the client to remove them. If the server repository contains console components that either aren't on the server or are different (same name, but different data) than those on the client, the new component is fired off to the client.

I have that working now.

Other networking-related items that are either in the works or planned...
- Clients will auto-reconnect if they lose connection.
- The server can send a "kill yourself" message to selected clients...that tells them to NOT reconnect after disconnecting.
- Clients can have an "alias" that will appear in the client list table on the server so that you can tell which one is which (in case you don't have your IP addresses memorized)
- The client and server will have extremely detailed messaging to tell you what's going back and forth and when, and it'll be color-coded based on message type. For instance, when a client connects, you'll see something like the following...

Client network log (on the client):
Code:
04:08:40: Building InetAddress object for 192.168.1.102
04:08:40: Attempting connection to server


Server new-connection log (on the server):
Code:
04:08:41: Client connecting 192.168.1.102
04:08:41: Initialized
04:08:41: Listening for new clients


Client network log:
Code:
04:08:41: Connected
04:08:41: Starting listening service
04:08:41: Listening for updates...
04:08:41: OUT: Compnent Update Request


Server client monitor log (on the server...there's one for each client):
Code:
04:08:41: IN: Component Update Request
04:08:42: OUT: Remove component "vibrates.wav"
04:08:42: OUT: Add component "gonads.wav"


Client network log:
Code:
04:08:42: IN: Remove component "vibrates.wav"
04:08:42: IN: Add component "gonads.wav"


This is cool stuff. It will make any debugging a LOT easier.

Also:
- From the client, you'll be able to specify a component update at any time.
- From the server, you'll be able to tell clients to request component updates at any time.
- The client will give the server it's build number. If it doesn't match the client, the server will let the client connect, tell it that it is the wrong version and kill it. On the client side, you'll then get a note that the client is out of date (rather than it running for an hour and some weird thing happening).

Getting this complete is my primary goal for v3 in regards to networking. After v3 is out, I'll start adding more functionality from the client for those that have been asking for it.
_________________
--
Dr. Neau (not a real doctor)
http://drneau.com
http://home.comcast.net/~jneau
Back to top
View user's profile Send private message Send e-mail Visit poster's website
roadmanagerphil
"Straight to the Ace"


Joined: 12 Sep 2005
Posts: 99
Location: Columbus, OH

PostPosted: Wed Jul 11, 2007 9:40 am    Post subject: Reply with quote

Will there be, and is there now, a limit of clients connected to 1 server?
Back to top
View user's profile Send private message Visit poster's website AIM Address
drneau
Site Admin


Joined: 13 Feb 2005
Posts: 2385
Location: Woodbury, MN

PostPosted: Wed Jul 11, 2007 1:57 pm    Post subject: Reply with quote

roadmanagerphil wrote:
Will there be, and is there now, a limit of clients connected to 1 server?


As many as you want, now and in the future.
_________________
--
Dr. Neau (not a real doctor)
http://drneau.com
http://home.comcast.net/~jneau
Back to top
View user's profile Send private message Send e-mail Visit poster's website
roadmanagerphil
"Straight to the Ace"


Joined: 12 Sep 2005
Posts: 99
Location: Columbus, OH

PostPosted: Wed Jul 11, 2007 10:02 pm    Post subject: Reply with quote

damn. we did a tourney last weekend, with 4 computers, and they would NOT stay connected. Thought perhaps there was a limit, but then the game started, and I just didn't have time to mess with it. I think it might have had something to do with naming the wrong directory for images or sounds... Oh well. Looking forward to v3!
Back to top
View user's profile Send private message Visit poster's website AIM Address
AO
"Ace High"


Joined: 04 Apr 2006
Posts: 11

PostPosted: Wed Jul 11, 2007 10:05 pm    Post subject: Reply with quote

What information is streamed to the client? Is it like V2 that sends out each second countdown for the timer? Or did you just send out an update every 5 - 10 seconds and have the client sync up?

Networking (lack of) is the only reason I haven't been trying out the V3 beta Smile
Back to top
View user's profile Send private message
drneau
Site Admin


Joined: 13 Feb 2005
Posts: 2385
Location: Woodbury, MN

PostPosted: Wed Jul 11, 2007 10:51 pm    Post subject: Reply with quote

AO wrote:
What information is streamed to the client? Is it like V2 that sends out each second countdown for the timer? Or did you just send out an update every 5 - 10 seconds and have the client sync up?

Networking (lack of) is the only reason I haven't been trying out the V3 beta Smile


It'll probably still send out an update each second, but those are really small communications...in v3 they'll be even smaller. I'm doing the networking MUCH more intelligently.
_________________
--
Dr. Neau (not a real doctor)
http://drneau.com
http://home.comcast.net/~jneau
Back to top
View user's profile Send private message Send e-mail Visit poster's website
drneau
Site Admin


Joined: 13 Feb 2005
Posts: 2385
Location: Woodbury, MN

PostPosted: Wed Jul 11, 2007 10:59 pm    Post subject: Reply with quote

drneau wrote:
AO wrote:
What information is streamed to the client? Is it like V2 that sends out each second countdown for the timer? Or did you just send out an update every 5 - 10 seconds and have the client sync up?

Networking (lack of) is the only reason I haven't been trying out the V3 beta Smile


It'll probably still send out an update each second, but those are really small communications...in v3 they'll be even smaller. I'm doing the networking MUCH more intelligently.


This evening, I now have achieved the following:
- Each time you add a console component to the repository, it is instantly transmitted to the client and added to the client repository.
- Each time you remove a component from the repository, the client is told to remove it and it is removed from the client repository.
- Each time you rename a component, it is renamed on the client.

Just need to handle updating the content of the components. That's tomorrow night.
_________________
--
Dr. Neau (not a real doctor)
http://drneau.com
http://home.comcast.net/~jneau
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    drneau.com Forum Index -> Development and Release News All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group