Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

passivate client  RSS feed

 
zb cong
Ranch Hand
Posts: 416
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello
i use the swing write the client-side console,but this client side console fuction not as normal,it don't receive info ACTIVATELY, it works as a monitor to superwise other computer(i call it server),the server push data to the client-side console,that means the swing client PASSIVATELY get info,one info item arrived,the one item is displayed on a table within the client console.
who can tell me,what's the better solution to my requirement,socket or rmi?and how?
thank you very much!
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the server is also written in Java, then it's probably easier to do this in RMI... RMI hides a lot of the low level socket IO and serialization issues that you would have to deal with if you just used just sockets, and it handles situations where the IP address of the server may not always be the same. If, however, you aren't sure if the server is going to be written in Java, then sockets are a better choice.

Even though your client is written in Swing, this question has more to do with the RMI/sockets question, and this post should probably be moved to the 'Distributed Java' forum.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!