On Mon, 2019-12-02 at 17:24 +0700, Tellier Benoit wrote:

[...]

> 
> > Are routes modular or each endpoint can declare some point of
> > extensions?
> 
> Each endpoint will have to declare it's own extensions.

That sounds like a good choice

> 
> Note that my proposal leverage the Task model we use on `POST`
> actions.
> 
> > Cheers,
> > 
> 
> Taking `POST /users/BOB/mailboxes` endpoint
> 
> UserMailboxes routes takes a Set<TaskRegistration> as a constructor
> parameter annotated with @Named("allMailboxesTasks")
> 
> We write a task registration for user mailbox reIndexing (action
> reIndex) generating the task to reIndex one mailbox.
> 
> We  for user mailbox jmapView recomputation (action
> recomputeJMAPFastMessageViewProjection) generating the task to
> recompute
> JMAP fastMessageView projection.
> 
> Binding to TaskRegistration action reIndex can be done in
> webadmin-guice-data.
> 
> Binding for TaskRegistration action
> recomputeJMAPFastMessageViewProjection can be done in
> webadmin-guice-data-jmap.
> 
> I can then be calling:
> 
>  - `POST /users/BOB/mailboxes?task=reIndex`
>  - `POST
> /users/BOB/mailboxes?task=recomputeJMAPFastMessageViewProjection`
> 
> We can reuse the same mechanism for other routes (we only need to
> write
> new bindings)
> 
> (Not included in this explanation)
> 
> Does it answers your questions?

Yes, very well. Thank you for the explanation.

> Does it look like a desirable solution?

Yes, I agree it's a good solution for this specific case and probably
for some other cases too.

-- 
Matthieu Baechler


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

Reply via email to