kiesel / johanna

JoHannah Session Server
MIT License
1 stars 2 forks source link

IPv6 support for Johanna #7

Closed sfuhrm closed 9 years ago

sfuhrm commented 9 years ago

Added separator in session id to obtain IPv6 support. Added unit tests to show the Ipv6 support. Refactored code to use apache commons codec hex encoding, reducing code repetition.

kiesel commented 9 years ago

The feature's awesome! :-)

However, there here are some thoughts about this:

sfuhrm commented 9 years ago

guarantee that every client treats it that way. Maybe there should be a fully BC-compliant way for IPv4 to just have no delimiter

Thought of this, too. This would mean dealing with multiple formats in the code which somehow also sucks. Clients parsing and reading back their own IP address sounds unlikely to me (they can get their IP in much easier way). Is the software used in production?

The ;-character is sometimes used as URL parameter separator instead of & in some setups; an application should encode this character when embedding the ID in an URL, true, but to be safe by expecting the worst it would be good to be able to configure as a startup flag which character to use as delimiter...

This makes sense to me. Will change that.

kiesel commented 9 years ago

Thought of this, too. This would mean dealing with multiple formats in the code which somehow also sucks. Clients parsing and reading back their own IP address sounds unlikely to me (they can get their IP in much easier way). Is the software used in production?

I think there's a slight misunderstanding here: the client does not read its own IP, but the IP address the server uses. This backs the option of multi-server setups with a simple connection distributor (aka. balancer) in front: the client would connect to the balancer which forwards to a selected server. The session gets constructed, there, and the client would re-connect directly to that server after a time. That's what the IP is for.

This particular software is a reimplementation of an existing service, but this is not in production use - to my knowledge - today.

sfuhrm commented 9 years ago

This particular software is a reimplementation of an existing service, but this is not in production use - > to my knowledge - today.

What do you propose? Is there still something missing from your perspective?

kiesel commented 9 years ago

Good, no. I think I can merge this.