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

Nikita Vetoshkin commented on MESOS-1921:
-----------------------------------------

I'd vote for string + address family enum:
  * Easily represented in JSON.
  Using human readable representation won't require special handling to encode 
protobuf to json. It becomes more important with upcoming HTTP API for 
framework/executors.
  * A lot of languages do just fine with IP addresses in string format. They 
actually require addresses to be strings.
  Some of them are:
     ** golang
     ** python
     ** java
  * Parsing overhead doesn't seem like a strong assertion
  It doesn't seem that there are or will be hot loops doing {{inet_pton}}.
  There's a good saying: "Don't optimize what you haven't profiled" :)


> Design and implement protobuf storage of IP addresses
> -----------------------------------------------------
>
>                 Key: MESOS-1921
>                 URL: https://issues.apache.org/jira/browse/MESOS-1921
>             Project: Mesos
>          Issue Type: Task
>            Reporter: Dominic Hamon
>            Assignee: Evelina Dumitrescu
>
> We can use {{bytes}} type or statements like {{repeated uint32 data = 
> 4[packed=true];}}
> {{string}} representations might add again some parsing overhead. An 
> additional field might be necessary to specify the protocol family type 
> (distinguish between IPv4/IPv6). For example, if we don't specify the family 
> type we can't distinguish between these Ip addresses in the case of 
> byte/array representation: 0:0:0:0:0:0:IPV4 and IPv4 (see 
> http://tools.ietf.org/html/rfc4291#page-10)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to