Are there any tips or rules for increasing performance of RMI calls?
I'd define an API that uses object IDs, so that clients operate with IDs only, and the server performs all the work of finding reference to object by ID.
Suppose you write a chat application with RMI. Instead of coding
ChatRoom remoteChatRoom; // ... somehow get reference to chat room remoteChatRoom.postMessage (message);I'd use
// when connecting to chat room, get room ID int CHAT_ROOM_ID = chatServer.getRoomID(); // chat server will take care // about finding local reference to room // by object id and somehow post message in it chatServer.postMessage (CHAT_ROOM_ID, message);Any better ideas?