Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question
0

Marshalling

According to this:

http://www.gigaspaces.com/wiki/displa...

A POJO is marshalled before being written to the space. There aren't a lot of details on this so I have some questions:

  • Does marshalling only involve the "SpaceProperty" annotated javabean properties or do non-transient class member fields get marshalled?
  • When the marshalled representation of the object is sent across the wire are each of the data members (aka fields) serialized then deserialized before arriving at the other end? Does it use standard java serialization?
  • Is the object stored in Gigaspaces as the marshalled representation?
  • Does the object need to be unmarshalled before certain operations and which operations?
  • Is this all done using reflection?
  • When the POJO implements Externalizable do the semantics change?

Regards, Larry

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=2517]{quote}

asked 2008-08-04 13:38:20 -0600

larrychu gravatar image

updated 2013-08-08 09:52:00 -0600

jaissefsfex gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0
  • Does marshalling only involve the "SpaceProperty" annotated javabean properties or do non-transient class member fields get marshalled?

Only fields with getter/getter methods or ones which got the @SpaceProperty when the @SpaceClass(includeProperties=IncludeProperties.EXPILICT ) specified

  • When the marshalled representation of the object is sent across the wire are each of the data members (aka fields) serialized then deserialized before arriving at the other end? Does it use standard java serialization?

If the fields are primitives - these are deserialized before stored within the GigaSpaces space entry. If the fields are non-primitives: when using native serialization mode YES. When using light serialization NO. When using compressed serialization - these are compressed at the client side and stored in their compressed mode.

  • Is the object stored in Gigaspaces as the marshalled representation? NO. It is stored within special holder object that got only the user fields data. It is not the user original object.

  • Does the object need to be unmarshalled before certain operations and which operations? Object will be unmarshalled automatically. Users are not aware of this.

  • Is this all done using reflection? YES. But fields/methods are cached. So the performance impact is ZERO. Still , if you have plenty of fields, iterating thru the fields will have some impact. That's why non indexed fields should be placed into a payload class that will be part of the parent Space Class.

  • When the POJO implements Externalizable do the semantics change? YES. In this case the user object is serialized and sent to the remote space. It is transfered into the GigaSpaces space entry at the space side.

See more here: http://www.gigaspaces.com/wiki/displa... http://www.gigaspaces.com/wiki/displa... http://www.openspaces.org/display/OBC... http://www.openspaces.org/display/PRT... - A library that will help to increase the space capacity by packing the Space Objects.

Shay

answered 2008-08-05 11:28:05 -0600

shay hassidim gravatar image
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2008-08-04 13:38:20 -0600

Seen: 48 times

Last updated: Aug 05 '08