Questions about user's IP

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Questions about user's IP

Steven Costiou
Hi again,
I have an other small question !

Is that possible to get back the ip address of a session (i.e. the ip of the user connected to a running application) ?

-Steven Costiou-

Reply | Threaded
Open this post in threaded view
|

Re: Questions about user's IP

ZuLuuuuuu-2
Hi,

I don't know if this is the most efficient way to do it but I get the
ip address like this:

ILApplication#request nativeRequest ip hostAddressString


Canol

On Oct 31, 7:50 pm, Steven Costiou <[hidden email]> wrote:
> Hi again,
> I have an other small question !
>
> Is that possible to get back the ip address of a session (i.e. the ip of the
> user connected to a running application) ?
>
> -Steven Costiou-
Reply | Threaded
Open this post in threaded view
|

Re: Questions about user's IP

Bèrto ëd Sèra
What about ipv6?

On 1 November 2010 09:25, ZuLuuuuuu <[hidden email]> wrote:
Hi,

I don't know if this is the most efficient way to do it but I get the
ip address like this:

ILApplication#request nativeRequest ip hostAddressString


Canol

On Oct 31, 7:50 pm, Steven Costiou <[hidden email]> wrote:
> Hi again,
> I have an other small question !
>
> Is that possible to get back the ip address of a session (i.e. the ip of the
> user connected to a running application) ?
>
> -Steven Costiou-



--
==============================
Constitution du 24 juin 1793 - Article 35. - Quand le gouvernement viole les droits du peuple, l'insurrection est, pour le peuple et pour chaque portion du peuple, le plus sacré des droits et le plus indispensable des devoirs.
Reply | Threaded
Open this post in threaded view
|

Re: Questions about user's IP

Paolo Bonzini-2
On 11/01/2010 11:27 AM, Bèrto ëd Sèra wrote:

> What about ipv6?
>
> On 1 November 2010 09:25, ZuLuuuuuu <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hi,
>
>     I don't know if this is the most efficient way to do it but I get the
>     ip address like this:
>
>     ILApplication#request nativeRequest ip hostAddressString

I'm not sure Sport/Swazoo supports IPv6.

Paolo
Reply | Threaded
Open this post in threaded view
|

Re: Questions about user's IP

Janko Mivšek
Hi guys!

On 01. 11. 2010 11:54, Paolo Bonzini wrote:

> On 11/01/2010 11:27 AM, Bèrto ëd Sèra wrote:
>> What about ipv6?
>>
>> On 1 November 2010 09:25, ZuLuuuuuu <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>>     Hi,
>>
>>     I don't know if this is the most efficient way to do it but I get the
>>     ip address like this:
>>
>>     ILApplication#request nativeRequest ip hostAddressString


To obtain peer's IP address simply ask Swazoo's HTTPRequest>>peer.


> I'm not sure Sport/Swazoo supports IPv6.

No, but in this case probably not needed, or more generally, is already
a time to add ipv6 support to Swazoo?

Janko


--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si
Reply | Threaded
Open this post in threaded view
|

Re: Questions about user's IP

Bèrto ëd Sèra
http://www.ipv6actnow.org/2010/10/remaining-ipv4-address-space-drops-below-5/

I'd say that yes, it's time to move.

Bèrto

2010/11/1 Janko Mivšek <[hidden email]>
Hi guys!

On 01. 11. 2010 11:54, Paolo Bonzini wrote:
> On 11/01/2010 11:27 AM, Bèrto ëd Sèra wrote:
>> What about ipv6?
>>
>> On 1 November 2010 09:25, ZuLuuuuuu <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>>     Hi,
>>
>>     I don't know if this is the most efficient way to do it but I get the
>>     ip address like this:
>>
>>     ILApplication#request nativeRequest ip hostAddressString


To obtain peer's IP address simply ask Swazoo's HTTPRequest>>peer.


> I'm not sure Sport/Swazoo supports IPv6.

No, but in this case probably not needed, or more generally, is already
a time to add ipv6 support to Swazoo?

Janko


--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si



--
==============================
Constitution du 24 juin 1793 - Article 35. - Quand le gouvernement viole les droits du peuple, l'insurrection est, pour le peuple et pour chaque portion du peuple, le plus sacré des droits et le plus indispensable des devoirs.
Reply | Threaded
Open this post in threaded view
|

Re: Questions about user's IP

Paolo Bonzini-2
In reply to this post by Janko Mivšek
On 11/01/2010 02:05 PM, Janko Mivšek wrote:
> >  I'm not sure Sport/Swazoo supports IPv6.
>
> No, but in this case probably not needed, or more generally, is already
> a time to add ipv6 support to Swazoo?

I think we should gradually phase out Sport usage and rely on Grease for
anything but sockets.  Then a per-dialect package can add sockets.  This
way each dialect can add IPv6 independently.

Paolo
Reply | Threaded
Open this post in threaded view
|

Re: Questions about user's IP

Steven Costiou
Hi,
thanks for the help =)

What exactly is the impact of using ipv4 instead of ipv6 on web applications as Iliad's ?
Sorry if the question sucks, but i really know nothing about web technologies...

-Steven Costiou-



2010/11/1 Paolo Bonzini <[hidden email]>
On 11/01/2010 02:05 PM, Janko Mivšek wrote:
>  I'm not sure Sport/Swazoo supports IPv6.

No, but in this case probably not needed, or more generally, is already
a time to add ipv6 support to Swazoo?

I think we should gradually phase out Sport usage and rely on Grease for anything but sockets.  Then a per-dialect package can add sockets.  This way each dialect can add IPv6 independently.

Paolo

Reply | Threaded
Open this post in threaded view
|

Re: Questions about user's IP

Bèrto ëd Sèra
It's a complex question. The main thing is that IP were born as a sort of public telephone number, so that a machine connected to the network has one number and you can reach it by "dialling" that number. Yet, pretty soon there were much more telephones than available numbers, so stuff like NAT was born, meaning that you dial a public switch (a router) and then sort of ask the lady "can you connect me with the hospital, please?" which is sort of ridiculous, but it's exactly the way most of the existing internet traffic goes nowadays.

Now IPV6 has a hell of a lot of "more numbers", so you can simply dial someone and connect to him. This has a lot of implications, starting with security, because sitting behind a NAT was pretty unpleasant for a number of reasons, but it also meant that nobody can simply call you to advertise a new cola brand. Most people relied on that for their security, they simply configured the "lady" (the router) and had all single numbers sitting on unreachable private networks like 192.168.0.x

The change is not going to happen overnight, but most servers nowadays already give you ONE ipv4 address and a /64 ipv6 public network you can manage. So it's much better to get ready for it. Anyway, I do suggest you read a bit on the subject, as it may mean everything and nothing, depending on what you want to do.

Bèrto

On 1 November 2010 19:03, Steven Costiou <[hidden email]> wrote:
Hi,
thanks for the help =)

What exactly is the impact of using ipv4 instead of ipv6 on web applications as Iliad's ?
Sorry if the question sucks, but i really know nothing about web technologies...

-Steven Costiou-



2010/11/1 Paolo Bonzini <[hidden email]>

On 11/01/2010 02:05 PM, Janko Mivšek wrote:
>  I'm not sure Sport/Swazoo supports IPv6.

No, but in this case probably not needed, or more generally, is already
a time to add ipv6 support to Swazoo?

I think we should gradually phase out Sport usage and rely on Grease for anything but sockets.  Then a per-dialect package can add sockets.  This way each dialect can add IPv6 independently.

Paolo




--
==============================
Constitution du 24 juin 1793 - Article 35. - Quand le gouvernement viole les droits du peuple, l'insurrection est, pour le peuple et pour chaque portion du peuple, le plus sacré des droits et le plus indispensable des devoirs.
Reply | Threaded
Open this post in threaded view
|

Re: Questions about user's IP

Nicolas Petton
In reply to this post by Steven Costiou
Le lundi 01 novembre 2010 à 18:03 +0100, Steven Costiou a écrit :
> What exactly is the impact of using ipv4 instead of ipv6 on web
> applications as Iliad's ?
> Sorry if the question sucks, but i really know nothing about web
> technologies...

As long as the underlying web server (Swazoo here) supports ipv6, there
should be no impact on Iliad applications themselves.

Cheers,
Nico

Reply | Threaded
Open this post in threaded view
|

Re: Questions about user's IP

Janko Mivšek
In reply to this post by Steven Costiou
Hi Steven,

I'd say if you are at the start of the journey into a web technologies
land, you can safely ignore IPv6 for few years to come. While we the
developers and maintainers of Smalltalk web technologies need to start
thinking about it already.

Best regards
Janko

On 01. 11. 2010 18:03, Steven Costiou wrote:

> Hi,
> thanks for the help =)
>
> What exactly is the impact of using ipv4 instead of ipv6 on web
> applications as Iliad's ?
> Sorry if the question sucks, but i really know nothing about web
> technologies...
>
> -Steven Costiou-
>
>
>
> 2010/11/1 Paolo Bonzini <[hidden email] <mailto:[hidden email]>>
>
>     On 11/01/2010 02:05 PM, Janko Mivšek wrote:
>
>         >  I'm not sure Sport/Swazoo supports IPv6.
>
>         No, but in this case probably not needed, or more generally, is
>         already
>         a time to add ipv6 support to Swazoo?
>
>
>     I think we should gradually phase out Sport usage and rely on Grease
>     for anything but sockets.  Then a per-dialect package can add
>     sockets.  This way each dialect can add IPv6 independently.
>
>     Paolo
>
>

--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si
Reply | Threaded
Open this post in threaded view
|

Re: Questions about user's IP

Bèrto ëd Sèra
In reply to this post by Steven Costiou
One of the immediate consequences on your questions, however, is that in an IPV4 world there are things called "floating IPs". This means that an ISP has a finite amount of "public numbers" it can assign and it keeps moving them to cover its traffic. The idea is that an ISP has many more total customers than contemporary connections, so some of this "public numbers" are always unused (and can be recycled) at a given moment. So, if nobody is using IP x.z.v.t I'll see that, and give it to the next customer who gets connected.

This has an impact on your stats, if you try and track somebody based on their IPs, because the same client may change it with variable (and mostly unpredictable) frequency. This is why most of the accurate stats use cookies instead of IPs. And it may change in the future, if and when IPV6 gets dominant.

Bèrto

On 1 November 2010 19:03, Steven Costiou <[hidden email]> wrote:
Hi,
thanks for the help =)

What exactly is the impact of using ipv4 instead of ipv6 on web applications as Iliad's ?
Sorry if the question sucks, but i really know nothing about web technologies...

-Steven Costiou-



2010/11/1 Paolo Bonzini <[hidden email]>

On 11/01/2010 02:05 PM, Janko Mivšek wrote:
>  I'm not sure Sport/Swazoo supports IPv6.

No, but in this case probably not needed, or more generally, is already
a time to add ipv6 support to Swazoo?

I think we should gradually phase out Sport usage and rely on Grease for anything but sockets.  Then a per-dialect package can add sockets.  This way each dialect can add IPv6 independently.

Paolo




--
==============================
Constitution du 24 juin 1793 - Article 35. - Quand le gouvernement viole les droits du peuple, l'insurrection est, pour le peuple et pour chaque portion du peuple, le plus sacré des droits et le plus indispensable des devoirs.
Reply | Threaded
Open this post in threaded view
|

Sport or Grease (was Questions about user's IP)

Janko Mivšek
In reply to this post by Paolo Bonzini-2
On 01. 11. 2010 15:09, Paolo Bonzini wrote:

> I think we should gradually phase out Sport usage and rely on Grease for
> anything but sockets.  Then a per-dialect package can add sockets.  This
> way each dialect can add IPv6 independently.

Well, I can say that I'm not yet convinced that Grease is adding enough
good things to be worth. Ok, it helps to the portability of the code but
on the other hand it introduces more complexity and the code is less
readable. In Aida we solved the portability problem for a long time
simply with:

  - avoiding using nonportable code from libraries
  - mark nonportable methods in comments as "Squeak specific" etc.
  - using Sport for Times, Files and Sockets.

This way methods stay as simple as before while you can find simply
enough the nonportable ones by full-text search. Also, the number of
nonportable methods in Aida is surprisingly small, which is another
argument against complicating the life with Grease.

Something similar goes with Swazoo too except that there methods are not
clearly marked as "XX specific", which we can do of course.

Best regards
Janko


--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si