incubator-wave-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Evan Hughes <ehu...@gmail.com>
Subject Re: Api & Client Rewrite
Date Sat, 24 Dec 2016 12:02:10 GMT
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 <pablojan@gmail.com> 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 <wisebaldone@apache.org>:

> 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
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message