RMI Login and Threads

H

HeidiWeber

Hallo

i´m new to RMI. I´ve made the RMI Tutorial from SUN. I have first 2
questions:

1)
If more clients connect to the server. Becomes every client
automaticaly his own thread thread? Or must i implement "thread
programming"?

2)
I want to realise user autentification by ID and Password. Is there a
"simple" solution for this problem - perhabs a tutorial? Or how can i
do this? How can i ensure the methods, the whole server?

Best regards
cu
Heidi
 
D

Daniel Pitts

Hallo

i´m new to RMI. I´ve made the RMI Tutorial from SUN. I have first 2
questions:

1)
If more clients connect to the server. Becomes every client
automaticaly his own thread thread? Or must i implement "thread
programming"?

2)
I want to realise user autentification by ID and Password. Is there a
"simple" solution for this problem - perhabs a tutorial? Or how can i
do this? How can i ensure the methods, the whole server?

Best regards
cu
Heidi

Hello Heidi, (That's my Wife's name too)
With RMI, the threads are created and handled automatically for you,
but you must be aware that your methods might be called by several
threads, and handle them accordingly. I suggest reading "Java
Concurrency in Practice" <http://www.javaconcurrencyinpractice.com/>
to learn about the proper ways to handle this.

For your second question, this is no "simple" answer... This is also a
broad topic.
First, you have to store the user id and password. Preferibly storing
the password in a one-way-function encrypted form.
Second, you *should* try to ensure that the password (in either its
original or encrypted form) is never sent through clear-text. SSL is
often the appropriate choice.
Third, You have to keep track of authenticated sessions.

I hope this helps,
Daniel.
 
H

HeidiWeber

How to...

Hallo

i´m new to RMI. I´ve made the RMI Tutorial from SUN. I have first 2
questions:

1)
If more clients connect to the server. Becomes every client
automaticaly his own thread thread? Or must i implement "thread
programming"?

2)
I want to realise user autentification by ID and Password. Is there a
"simple" solution for this problem - perhabs a tutorial? Or how can i
do this? How can i ensure the methods, the whole server?

Best regards
cu
Heidi

Hello Heidi, (That's my Wife's name too)
With RMI, the threads are created and handled automatically for you,
but you must be aware that your methods might be called by several
threads, and handle them accordingly. I suggest reading "Java
Concurrency in Practice" <http://www.javaconcurrencyinpractice.com/>
to learn about the proper ways to handle this.

For your second question, this is no "simple" answer... This is also a
broad topic.
First, you have to store the user id and password. Preferibly storing
the password in a one-way-function encrypted form.
Second, you *should* try to ensure that the password (in either its
original or encrypted form) is never sent through clear-text. SSL is
often the appropriate choice.
Third, You have to keep track of authenticated sessions.

I hope this helps,
Daniel.
 
H

HeidiWeber

Hello Daniel,

thank you very much for your help.

But can you or someone else give me perhaps an example? Or a tutorial?
Without the problematic with ssl. Thats the next big thema...

Best regards
cu
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,111
Latest member
KetoBurn
Top