aspose file tools*
The moose likes Distributed Java and the fly likes Serialized object or Remote object ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Serialized object or Remote object ?" Watch "Serialized object or Remote object ?" New topic
Author

Serialized object or Remote object ?

Jibby Lala
Ranch Hand

Joined: Aug 29, 2010
Posts: 35

hello all,

i m trying to create a framework for creating distributed applications, i wanted to decouple server functionality like registering/join, unregister the clients and application functionality like for the game logic, in two different remote objects. i m also declaring the callback remote object which has the only the update method, which is implemented by the clients to get updated by the server.

i have general concept about serialized objects.

but in this scenario i m not sure whether i need to use serialized object for application logic (which could consist of several objects) or remote object is ok?

God bless

jibby
Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2264
    
    3

Howdy, Jibby!

i m trying to create a framework for creating distributed applications, i wanted to decouple server functionality like registering/join, unregister the clients and application functionality like for the game logic, in two different remote objects. i m also declaring the callback remote object which has the only the update method, which is implemented by the clients to get updated by the server.


So, there are going to be 2 remote objects + 1 remote object that will be observable, right?

Well champ, the thing is, the objects that will be transferred over the network will have to implement java.io.Serializable. So, for instance, depending on the way you implement your callback, the Serializable objects will be transferred from the server to the client side or the server will call the clients and they will go to the server and get the updates.


Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
Jibby Lala
Ranch Hand

Joined: Aug 29, 2010
Posts: 35
well thanks for reply
i have a example design like this:

at client site i have this method which is getting update from/ call from server/my game logic:



and this could be so called my business logic class which is remote or serialized, which is for example just logic of chat applicaiton





and this is mycallback interface



my question is that when

when i will go for more complex business logic and i will need to communicate with more classes in that main business logic ,like taking GAMELOGIC i need to communicate with player class ,move class, score class and board class etc.
The flow of application will always be like this(like this message class will be passed as an argument from server and all the communication of client and other classes will only be possible via this class or there is some direct communication with client and with classes possible?) or it can be change. i m not sure, as i get this sample from tutorial or it can be change.
i am not expert, so i need little bit of feedback concerning this design.

THANKS
 
Consider Paul's rocket mass heater.
 
subject: Serialized object or Remote object ?