On Mon, Mar 27, 2017 at 1:33 PM John Blum <jb...@pivotal.io> wrote:

> However, I definitely disagree with this...
>
> *>  I think that customers would be ok to run PdxInstance.getObject() to
> get their pojos when required.*
>
> IMO, I think (PDX) serialization really ought be treated as an "internal"
> concern and really should NOT be exposed to users.  This is more of an
> implementation detail than anything else, and in an application, as a
> developer, I can tell you what I want to manipulate my POJOs.  You do not
> see Hibernate or other mapping/persistent frameworks having you deal with
> the "internal" classes to make an entity "persistent" (i.e. attached vs.
> non-attached, etc).
>

I agree and disagree. I am not a fan of the current model of either the
Object or PdxInstance coming back from the API to get, etc. I think we need
a way to specify that we want either the marshaled or unmarshaled object
rather than the ambiguity. There are times where optimizing from the
marshaled form is desired or working with the generic PdxInstance is
preferable.

Longer term, I think the serialization mechanics should be "configurable",
> being able to plugin whatever serialization framework (e.g. Avro, Protobuf)
> makes sense for my application.
>

100% agree and I think that it makes the argument for unambiguous method
for getting the marshaled or unmarshaled object.

-Jake

Reply via email to