Java applets and access to other "clients"!

Discussion in 'Java' started by Rune Andresen, Aug 24, 2003.

  1. Hi, I hope someone here can help me :)

    I wish to make a java-applet that can communicate with another client which
    have downloaded the same applet. The java security in default makes this
    impossible, the applets can only send data to the server they where
    downloaded from. I have heard that the applets have more access if they are
    downloaded from a https, or the applet can ask the computer to get more
    access, but I have not suceeded to do this.

    Regards
    Rune J.A
     
    Rune Andresen, Aug 24, 2003
    #1
    1. Advertising

  2. "Rune Andresen" <> wrote in message
    news:biark6$80t$...
    > Hi, I hope someone here can help me :)
    >
    > I wish to make a java-applet that can communicate with another client

    which
    > have downloaded the same applet. The java security in default makes this
    > impossible, the applets can only send data to the server they where
    > downloaded from. I have heard that the applets have more access if they

    are
    > downloaded from a https, or the applet can ask the computer to get more
    > access, but I have not suceeded to do this.
    >


    An applet requires a special permission to be able to open a connection to a
    machine other than the one it came from. Either the user grants this
    privilege directly in the JVM security properties or the applet (signed)
    requests it and the user then grants it. Applet security has nothing to do
    with https.

    Two typical problems with the kind of client-to-client communication you're
    attempting are finding out the real IP of the other client and accomodating
    the firewall. An easy solution (when it is possible) is to allow the
    server from which the applet comes to proxy the communication. The server
    keeps the client informed of available peers and forwards messages from one
    peer to another. Clients all connect to the server with outgoing channels so
    firewalls are not issue. And since the communication is with the original
    server there's no security problem. You don't even have to craft a custom
    protocol as you can use HTTP with servlets. Whether you use this structure
    depends on whether you can run an application on your server and what kind
    of performance and scalability you hope to achieve.

    Cheers,
    Matt Humphrey http://www.iviz.com/
     
    Matt Humphrey, Aug 24, 2003
    #2
    1. Advertising

  3. Hi, thank you very much :)

    I have heard about your first suggestion about asking the client about
    permission. Do you know how to implement this; where in the Java API this
    exists?

    I whish to achieve a high performance connection for a real-time
    communication. With which implementation on the server side would you
    prefere in this case? Is tomcat enough or is a apache server solution better
    (to achieve a faster connection)

    Thank you for this knowledge ! :)

    Regards
    Rune Andresen

    "Matt Humphrey" <> skrev i melding
    news:ew82b.6972$...
    >
    > "Rune Andresen" <> wrote in message
    > news:biark6$80t$...
    > > Hi, I hope someone here can help me :)
    > >
    > > I wish to make a java-applet that can communicate with another client

    > which
    > > have downloaded the same applet. The java security in default makes this
    > > impossible, the applets can only send data to the server they where
    > > downloaded from. I have heard that the applets have more access if they

    > are
    > > downloaded from a https, or the applet can ask the computer to get more
    > > access, but I have not suceeded to do this.
    > >

    >
    > An applet requires a special permission to be able to open a connection to

    a
    > machine other than the one it came from. Either the user grants this
    > privilege directly in the JVM security properties or the applet (signed)
    > requests it and the user then grants it. Applet security has nothing to

    do
    > with https.
    >
    > Two typical problems with the kind of client-to-client communication

    you're
    > attempting are finding out the real IP of the other client and

    accomodating
    > the firewall. An easy solution (when it is possible) is to allow the
    > server from which the applet comes to proxy the communication. The server
    > keeps the client informed of available peers and forwards messages from

    one
    > peer to another. Clients all connect to the server with outgoing channels

    so
    > firewalls are not issue. And since the communication is with the original
    > server there's no security problem. You don't even have to craft a custom
    > protocol as you can use HTTP with servlets. Whether you use this

    structure
    > depends on whether you can run an application on your server and what kind
    > of performance and scalability you hope to achieve.
    >
    > Cheers,
    > Matt Humphrey http://www.iviz.com/
    >
    >
     
    Rune Andresen, Aug 24, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    7
    Views:
    3,718
    John Currier
    Sep 4, 2005
  2. Francesco
    Replies:
    1
    Views:
    534
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=
    Dec 27, 2006
  3. Abbas
    Replies:
    3
    Views:
    301
    John Saunders
    Mar 15, 2007
  4. Replies:
    2
    Views:
    990
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=
    Oct 14, 2007
  5. musosdev
    Replies:
    4
    Views:
    309
    Alexey Smirnov
    Jan 12, 2008
Loading...

Share This Page