You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Raphaël Ouazana-Sustowski <ra...@linagora.com> on 2015/11/23 14:55:26 UTC

Implementation of JMAP protocol in James

Hi,

JMAP is a transport-agnostic, stateless JSON-based API for synchronising 
a mail client with a mail server [1].

As some of you may know we are working on implementing JMAP in James. We 
are in the early stage of architecting the code.

The current specification [2] supports only HTTP(S) protocol as 
transport. So first step is to add a module serving HTTP(S) requests in 
James.
We are pretty advanced in this topic. You can have a look at the 
following PR:
https://github.com/linagora/james-project/pull/40
The minimal feature set of this server is:
- serving HTTP(S) requests with port configuration (allowing random port 
for tests)
- servlet mapping
- filter mapping

We are embedding Jetty for this. Configuration can be done either in 
Java:
Configuration.builder()
   .port(5000)
   .serve("/foo")
     .with(Ok200.class)
   .serve("/bar")
     .with(Bad400.class)
.build()

or with an XML configuration:
<httpservers>
     <httpserver>
         <port fixed="5000"/>
         <mappings>
             <mapping>
                 <path>/foo</path>
                 <servlet>org.apache.james.http.jetty.Ok200</servlet>
             </mapping>
             <mapping>
                 <path>/bar</path>
                 <servlet>org.apache.james.http.jetty.Bad400</servlet>
             </mapping>
         </mappings>
     </httpserver>
</httpservers>

Note that this HTTP Server could also be used for other James features, 
like:
- exposing metrics
- exposing Hystix dashboard

Once this HTTP(S) server is in place, we can use it for serving JMAP 
requests.
You can already have a look on our work-in-progress feature branch [3], 
already providing Authentication support and a first JMAP request, 
getMailboxes.
The implementation of the protocol is done in server/protocols/jmap [4] 
while data storage is in server/data/data-jmap [5].
Each JMAP request can be handled by a Method, such as GetMailboxesMethod 
in server/protocols/jmap/src/main/java/org/apache/james/jmap/methods 
[6].
JMAP Module is then integrated by default in the cassandra-guice module, 
allowing to launch James with Cassandra backend and JMAP support with a 
simple configuration.
It stays of course possible to use JMAP with any supported James 
backend.

Now that we have some working stuff, we are requesting your advice on 
what we have done, and more precisely on the following points:
- What do you think about using James to serve HTTP(S) requests?
- What do you think of our way of integrating an HTTP(S) server in 
James?
- What do you think about supporting JMAP into James?
- What do you think of our way of integrating JMAP in James?

Regards,
Raphaël Ouazana.

[1] http://jmap.io/index.html
[2] http://jmap.io/spec.html
[3] https://github.com/linagora/james-project/tree/jmap
[4] 
https://github.com/linagora/james-project/tree/jmap/server/protocols/jmap
[5] 
https://github.com/linagora/james-project/tree/jmap/server/data/data-jmap
[6] 
https://github.com/linagora/james-project/tree/jmap/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: Implementation of JMAP protocol in James

Posted by Benoit Tellier <be...@minet.net>.
Hi,

Le 11/12/2015 11:09, Matthieu Baechler a écrit :
> Hi,
> 
> To follow Raphael's message, I just pushed our Jmap developments to
> James trunk.
> 
> Feel free to try it and/or read the code.

Yes, I gonna have a look, looks like it is interesting ;-)

> 
> Feedback welcome as usual.
> 
> Cheers,
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: Implementation of JMAP protocol in James

Posted by Matthieu Baechler <mb...@linagora.com>.
Hi,

To follow Raphael's message, I just pushed our Jmap developments to 
James trunk.

Feel free to try it and/or read the code.

Feedback welcome as usual.

Cheers,

-- 
Matthieu Baechler

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org