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

Bar Rotstein commented on SOLR-13007:
-------------------------------------

Observing ZkNodeProps#load:
{code:java}/**
   * Create Replica from json string that is typically stored in zookeeper.
   */
  public static ZkNodeProps load(byte[] bytes) {
    Map<String, Object> props = null;
    if (bytes[0] == 2) {
      try {
        props = (Map<String, Object>) new JavaBinCodec().unmarshal(bytes);
      } catch (IOException e) {
        throw new RuntimeException("Unable to parse javabin content");
      }
    } else {
      props = (Map<String, Object>) Utils.fromJSON(bytes);
    }
    return new ZkNodeProps(props);
  }{code}
Seems like javabin can be quite easily used to send messages to overseer using 
the work queues, and then have overseer compute the final cluster state as JSON.
Is that what you had in mind [~noble.paul]?
WDYT?

> Use javabin instead of JSON to send messages to overseer
> --------------------------------------------------------
>
>                 Key: SOLR-13007
>                 URL: https://issues.apache.org/jira/browse/SOLR-13007
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Noble Paul
>            Priority: Major
>
> The messages themselves are ephemeral and the readability is not a big issue. 
> Using javabin can:
> * reduce the payload size
> * make processing faster



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to