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 0362A200BE5 for ; Sat, 24 Dec 2016 13:02:32 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 0214C160B2F; Sat, 24 Dec 2016 12:02:32 +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 4D161160B2B for ; Sat, 24 Dec 2016 13:02:31 +0100 (CET) Received: (qmail 38212 invoked by uid 500); 24 Dec 2016 12:02:25 -0000 Mailing-List: contact wave-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: wave-dev@incubator.apache.org Delivered-To: mailing list wave-dev@incubator.apache.org Received: (qmail 38196 invoked by uid 99); 24 Dec 2016 12:02:25 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Dec 2016 12:02:25 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id C34EA1A066A for ; Sat, 24 Dec 2016 12:02:24 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.13 X-Spam-Level: ** X-Spam-Status: No, score=2.13 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, WEIRD_PORT=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 1fxXI72Ym3At for ; Sat, 24 Dec 2016 12:02:23 +0000 (UTC) Received: from mail-wj0-f173.google.com (mail-wj0-f173.google.com [209.85.210.173]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id AA0DB5F46D for ; Sat, 24 Dec 2016 12:02:22 +0000 (UTC) Received: by mail-wj0-f173.google.com with SMTP id v7so270721591wjy.2 for ; Sat, 24 Dec 2016 04:02:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=TSQsm3Le8ZXNjgJhpw6Q7DIprsBIQv1tpjoMdu2HB70=; b=h3STRJMyhLb6qJZdJF4pv3123f9ZwuSE9P+A1i+irxuHApvSeB1Skcdh39tArDgGjB iw1agNn/ICZYgzs13t7Q+51iaYEmS/Q8E2wXqfqskcHyPMhTkIYxPqYZpCQR92j+dL+a EMnHDOWzDi8Z9gCmCnSu9GL683XkMMqCE/phZxoxrWk7nu0CmTBR2EWA/Q4b1yiipiDL fZb79aKnOdf+sMN+FGzJ0a2mtpgMhIrF780JqN0HgWmC3R4cxdVeLncK2Qg4cMNrlD0P S4OpKla0Y/dK8FWgujQRnSdT1u2GsI4An4axXXtQ/JWCBTuNr2eE1N2uGvJgQkD+uorY sY/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=TSQsm3Le8ZXNjgJhpw6Q7DIprsBIQv1tpjoMdu2HB70=; b=L7tEZ4wj4xVK3wRr7UxI0cC9KdD2YkpR9FcHZhD8iZp9XDNFSz6NKpMLrnIpsxK7LS cfuzebIz3GkdiWQW2xtfYWmi3v8wPmyARsVVK7GTDF2jvhCMxoxynoDA07o2e89ELLDH d0fboML8siYq+Oj0SXWmju6PiqBdqU1aN5ItdHlQMPu49StIo/j+Lb7piIp3NIKGGLF0 92p/VTJ+fWB2IyevG+C4OSzn0gW/CxFcH7zsctqHTMr+ilAlQNuA4cJlyPwpHzCjvXvi JPpyVMnstyN/zlQHLM9awy4RiuwV+10zrUKq9Kbu1QMsgsxVNRZjK1nFukJp2gDYjOKO Ts2Q== X-Gm-Message-State: AIkVDXKL4rY/eATAAHuu7mIcVTGqxJTdhja98cW2Oa5gHGN/DIA3FHeDmSGEy6LDgl2EVAbuW+KVl7jWOuW0iw== X-Received: by 10.194.88.3 with SMTP id bc3mr16246453wjb.143.1482580940734; Sat, 24 Dec 2016 04:02:20 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Evan Hughes Date: Sat, 24 Dec 2016 12:02:10 +0000 Message-ID: Subject: Re: Api & Client Rewrite To: wave-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=089e010d833652c6b90544664624 archived-at: Sat, 24 Dec 2016 12:02:32 -0000 --089e010d833652c6b90544664624 Content-Type: text/plain; charset=UTF-8 1) The Json representation is made from the protobuf using proto3's json form. So think of the proto files as a specification in essence and they do reduce the data bandwidth needed and the amount of storage needed. 2) The atmosphere websockets implementation is a bit dated and can be written using the java core websocket api. With sessions I believe just checking a session still exists before sending or receiving on a websocket will remove all the issues and we can close the socket at that time. On Sat, 24 Dec 2016 at 20:16 Pablo Ojanguren wrote: Hi Evan, That's cool. Two questions... - Is there any advantage providing the API's data as protobuf insteand just JSON? It might be easier just to provide the latest. - It seems good idea to have a separated URL context for the API Also, there are some improvements in SwellRT's servlets regarding session management... that you could take for this effort. I will be happy to discuss details of API's methods and messages. Cheers 2016-12-24 8:52 GMT+01:00 Evan Hughes : > Hello All, > > Just wanting to get some feedback from the community as I start rewriting > the client and the api behind it (to replace the Gwt code in the repo and > the current servlets). > > http://localhost:9898/api/auth/login?format=json > http://localhost:9898/api/auth/login?format=protobuf > http://localhost:9898/api/auth/login // defaults to the protobuf > > currently using url's like the ones above with a response like: > > { > "email": true > } > which states that email authentication is available (allows us to add > oauth providers latter). The change of URL is due to using client side > frameworks (Angular 2) instead of GWT to achieve the UI which will be > at a non /api/ route. This also lets the server be more easily > configured to be of use to SwellRT and other projects as our client > isn't part of the backend anymore and the server is an abstract > element.Ive also made the source for this endpoint at > /wave/src/main/java/org/apache/wave/server/api/v1/LoginServlet.java so > that we can remove dead code as we transition into one naming scheme > instead of the 3 that exist atm. > > ~ Evan Hughes > --089e010d833652c6b90544664624--