Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id EFDD7200CAE for ; Wed, 21 Jun 2017 15:02:31 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id EDF6F160BE2; Wed, 21 Jun 2017 13:02:31 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 40040160BD0 for ; Wed, 21 Jun 2017 15:02:31 +0200 (CEST) Received: (qmail 88656 invoked by uid 500); 21 Jun 2017 13:02:30 -0000 Mailing-List: contact dev-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mesos.apache.org Delivered-To: mailing list dev@mesos.apache.org Received: (qmail 88644 invoked by uid 99); 21 Jun 2017 13:02:29 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Jun 2017 13:02:29 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 90BDCC0118 for ; Wed, 21 Jun 2017 13:02:29 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.796 X-Spam-Level: X-Spam-Status: No, score=-0.796 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.796] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=ncsu-edu.20150623.gappssmtp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id irTqm94NorXm for ; Wed, 21 Jun 2017 13:02:27 +0000 (UTC) Received: from mail-pf0-f169.google.com (mail-pf0-f169.google.com [209.85.192.169]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 7901C5F2EE for ; Wed, 21 Jun 2017 13:02:26 +0000 (UTC) Received: by mail-pf0-f169.google.com with SMTP id c73so24326037pfk.2 for ; Wed, 21 Jun 2017 06:02:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ncsu-edu.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=6RP4a6uGHR8+qEPt91+Om6wSqz2XhNqRilabFE2o8/E=; b=oQmOo79Va5KUnxWY71LaMcxlT3epymBvhI+HjnMhPjiLb51hoB4KfHILQ58EzpA18d uBjX6qMI3zcdDXqivXWA89yO49yQkeG1m7NLRura8XoBeAyAFKrj+pyKOQoD5DAkHXYO 5bWEbgrlODVcmHjvCaWZnjj689Ko/s+eu38oxnZkEkSB0anau0OZaX/YOFfHjM4XAtVQ eF0gUFeV29uRF1hgkiVh5GF7yT4P3DvsrHlZ4xMh3jn0dDekUrcHtbs19ccHz3YfP+aQ 9xaFZtEMfPs+a7pSewf730nPqDgex4MepffgcWoSYH0uaHwD8u+lfu8Icygbh9bs0TyJ uGYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=6RP4a6uGHR8+qEPt91+Om6wSqz2XhNqRilabFE2o8/E=; b=Lh7nRX0czjvn/Twkko81S5BTWy76ofI+TF+X6tKv1eWGZEAnFgplVJDHJhOG+gsBYE jlCMG8C1DwT7epSC8s8GZtJTFfABOOyES5OGOjWYG6j/kjHRJEqtyRjjC51aLYMAZBB5 t3iPCGsL3SpGstlEUh3TMRukbV7AdDpmQDvjHlBSp4xbJHwbZtHXQWT88MqR4hePHMzF bl+nFFHYVMClYdBM+CsVRIjMFLlN1dTXZqT1XEbye5TXLAZWLlqY1/TWVPOXwG7XpMwy auZqGLySe4JpL1KIUBDXp5Yf3A4182ytGHETS5eo1Cnl1iBnaHfiDzT6sjUychfUc3nm 341w== X-Gm-Message-State: AKS2vOzK7GskKnodtcRsN0QEpMw0oviD0xtEmxckIkGl4ryzuycZ1huT pcZRZUs/i9C5n+WYMMCeMt0rLBqv+XGUPJs= X-Received: by 10.84.195.129 with SMTP id j1mr42633706pld.191.1498050144522; Wed, 21 Jun 2017 06:02:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.188.142 with HTTP; Wed, 21 Jun 2017 06:02:04 -0700 (PDT) In-Reply-To: References: From: Wenzhao Zhang Date: Wed, 21 Jun 2017 09:02:04 -0400 Message-ID: Subject: Re: An independent server communicating between master and client To: dev@mesos.apache.org Content-Type: multipart/alternative; boundary="94eb2c0ef362ba16d6055277fa20" archived-at: Wed, 21 Jun 2017 13:02:32 -0000 --94eb2c0ef362ba16d6055277fa20 Content-Type: text/plain; charset="UTF-8" Thanks, But I think Mesos right now uses Proto2, not Proto3. If I switch entirely to a REST server with ProtocalBuffer, I think this will be fully compatible with Mesos? Thanks Wenzhao On Wed, Jun 21, 2017 at 3:53 AM, James Peach wrote: > > > On Jun 20, 2017, at 11:23 AM, Wenzhao Zhang wrote: > > > > Hello, All: > > > > I'm working on an independent server, which should be able to talk to the > > master&client via HTTP POST requests. > > I setup a Jersey REST server. My initial plan is to use *JSON/XML* to > map > > Entities, as this is widely used. > > > > However, I find some communication compatibility issues, > > 1. I generate the Java classes from the *.proto files. > > I try to create an Event.Offers object via a REST (with *JSON*) call, > > but get some data stream deserializing errors. > > I think this is because of the complex structure of the generated > > classes. They are not POJO's, e.g. they don't have public constructors. > > Your JSON serializer needs to follow the Protobuf JSON mapping, with the > exception that field names are not mapped to lowerCamelCase. > > https://developers.google.com/protocol-buffers/docs/proto3#json > > > > 2. "src/cli/execute.cpp" sets "ContentType" to "*PROTOBUF*". > > I think in most cases, Mesos internally uses "PROTOBUF", not JSON. > > > > So, given the above issues, > > Should I implement my server with *ProtocalBuffer*, is this a better > > approach? > > Or should I try to convert PROTOBUF to JSON inside Mesos? > > > > Could anyone kindly give some suggestions? I become confused on this > point. > > > > Thanks very much > > Wenzhao > > --94eb2c0ef362ba16d6055277fa20--