Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

session migration using serialization.

 
william kane
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How does session migration happen using serialization/de serialization when the servers are deployed in different physical machines?
To put it more crudely, how can the serialized text file be used transported to the other JVM on a different physical machine for the other server instance to deserialize the session state.
Hope I am clear about my query,
Thanks in advance,
William Kane
 
Scott Selikoff
author
Saloon Keeper
Posts: 4014
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's one of the main purposes of serialization, to have the freedom to transfer JVM objects to other machines and invoke remote methods on them.

Precisely how's it done depends on which transportation mechanism you use as well as well as the software, although its usually some form of XML I believe. For example, EJB and Web Services both use a form of serialization to transfer objects via RMI. Some web servers will detect whether or not external calls or truly external or not, and skip deserialization/deserilization of local objects as a performance enhancement.
[ November 04, 2005: Message edited by: Scott Selikoff ]
 
william kane
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Scott Selikoff:
That's one of the main purposes of serialization, to have the freedom to transfer JVM objects to other machines and invoke remote methods on them.

Precisely how's it done depends on which transportation mechanism you use as well as well as the software, although its usually some form of XML I believe. For example, EJB and Web Services both use a form of serialization to transfer objects via RMI. Some web servers will detect whether or not external calls or truly external or not, and skip deserialization/deserilization of local objects as a performance enhancement.

[ November 04, 2005: Message edited by: Scott Selikoff ]

Thanks Scott,
But I am still not clear about your answer. How is session migration in web servers analogous to remote method invocation in EJB? Do we have a remote interface coming into play anywhere in this scenario? If no, how are the text files that have been serialized accessed to by the other web server to deserialize and reconstruct the migrated session?
Thanks again,
William Kane
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13061
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you saying text files? All objects attached to a HttpSession should be Serializable so the session can be serialized by the normal Java object serialization methods.
Are there servlet containers that serialize via XML?
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic