sinedsem
sinedsem

Reputation: 5723

RMI: many requests, one data

I have RMI server with 2 methods: first changes some value in an array, second reads some value. Array is located in the server's memory. And I have a lot of (1-∞) clients, which call these methods. What happens when a few clients try to change the same value at the same time? Server crashes? Or only acces time increased (server makes request queue?) ?

Upvotes: 0

Views: 156

Answers (1)

user207421
user207421

Reputation: 310980

What happens when a few clients try to change the same value at the same time? Server crashes? Or only acces time increased (server makes request queue?) ?

Neither. The RMI Specification carefully states that there are no guarantees about server-side threading. That means that all the calls can execute concurrently. It is up to you to provide any required synchronization.

Upvotes: 1

Related Questions