The social cloud maintains a “Logs” entry for each existing
session in CloudMoV, with the session ID as the primary key
and an array list as the value, which corresponds to individual
messages in this session. When a user in a session posts a comment,
this message is first sent to his VM surrogate, which further
injects the message into the social cloud via another Servlet
listener. Themessage is stored as a “Message” entry in the social cloud, with the message content as the value, and an auto-generated
integer as the key. Entries “Logs” and “Message” are annotated
by a @OneToMany relationship, to facilitate the data
management. VM surrogates of users in the same session send
periodical HTTP query requests to the social cloud for the latest
comments from others. The default interval for retrieval of new
comments is 10 seconds. The retrieved messages are stored and
updated on the surrogates, which process them into well-formed
XML formats for efficient parsing at the user devices. The user
devices retrieve theXML files from the surrogates at a lower frequency
(with default interval 1minute), in order tominimize the
power consumption and the traffic. Fig. 6 presents social message
exchanges among a mobile user, his VMsurrogate, and the
GAE.