[ 
https://issues.apache.org/jira/browse/MAHOUT-510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13015666#comment-13015666
 ] 

Ted Dunning commented on MAHOUT-510:
------------------------------------

That stitching has to be kind of fancy because there is a lot of polymorphism 
that goes on.

That was a big point of the ModelSerializer ... as I remember the readBinary 
allows a super 
class to be passed in and the actual class is burned into the serialized 
representations.  
This gives type safety with a simple API.  Since we don't know the actual type 
to be returned,
we can't use the normal Writable structure.  This polymorphism is internal as 
well as external
although most of the internal stuff should be hidden by the PolymorphicWritable 
static methods.

Anyway, the upshot as I see it is that the static convenience methods in 
ModelSerializer really
did have value in that they put an official imprimatur on the required idioms.
 

> Standardize serialization mechanisms
> ------------------------------------
>
>                 Key: MAHOUT-510
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-510
>             Project: Mahout
>          Issue Type: Task
>    Affects Versions: 0.4
>            Reporter: Sean Owen
>            Assignee: Sean Owen
>             Fix For: 0.5
>
>         Attachments: MAHOUT-510.patch, MAHOUT-510.patch, MAHOUT-510.patch
>
>
> At the moment this is tracking a broader concern: to standardize as much as 
> possible how we approach serialization. The long-term goal is notionally to 
> use the following "encodings" as the input/output of Mahout stuff, and by 
> extension, probably internally too.
> - Text
> - Vector Writable
> - (maybe Avro)
> not
> - Serializable
> - GSON / JSON

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to