You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wave-dev@incubator.apache.org by Waqee Khalid <kh...@gmail.com> on 2016/06/16 15:18:35 UTC

Wave Thread Safe

Hello guys,

I've been tasked to implement federation for wave using matrix protocol as
my gsoc project. For this purpose, I want to know if calls to the wave
server like waveletProvider.getDeltaSignerInfo() are thread safe. Can I
process incoming packets on different threads concurrently?

I would be extremely thankful for any help in this regard.

Regards,
Waqee Khalid

Re: Wave Thread Safe

Posted by Waqee Khalid <kh...@gmail.com>.
Oh cool, I can spawn different threads by looking at wavelet ids then.

Also, why was xmpp federation removed?

On Sun, Jun 19, 2016 at 10:18 PM, Yuri Z <ve...@gmail.com> wrote:

> Hi
> That's great news!
> Regarding thread safety/multi threading - yeah the methods should be thread
> safe, but almost all are sync and blocking. In general, i think it is
> impossible to apply deltas for the same wavelet in several threads as
> deltas order is important. It is possible to work on several wavelets at
> the same time - wavelet per thread - which is how it works already.
> Also, it is possible that we will update the current concurrency
> control/persistence mechanism to include changes from
> https://github.com/vega113/Wiab.pro
> Good luck!
>
> On Thu, Jun 16, 2016 at 6:18 PM Waqee Khalid <kh...@gmail.com> wrote:
>
> > Hello guys,
> >
> > I've been tasked to implement federation for wave using matrix protocol
> as
> > my gsoc project. For this purpose, I want to know if calls to the wave
> > server like waveletProvider.getDeltaSignerInfo() are thread safe. Can I
> > process incoming packets on different threads concurrently?
> >
> > I would be extremely thankful for any help in this regard.
> >
> > Regards,
> > Waqee Khalid
> >
>

Re: Wave Thread Safe

Posted by Yuri Z <ve...@gmail.com>.
Hi
That's great news!
Regarding thread safety/multi threading - yeah the methods should be thread
safe, but almost all are sync and blocking. In general, i think it is
impossible to apply deltas for the same wavelet in several threads as
deltas order is important. It is possible to work on several wavelets at
the same time - wavelet per thread - which is how it works already.
Also, it is possible that we will update the current concurrency
control/persistence mechanism to include changes from
https://github.com/vega113/Wiab.pro
Good luck!

On Thu, Jun 16, 2016 at 6:18 PM Waqee Khalid <kh...@gmail.com> wrote:

> Hello guys,
>
> I've been tasked to implement federation for wave using matrix protocol as
> my gsoc project. For this purpose, I want to know if calls to the wave
> server like waveletProvider.getDeltaSignerInfo() are thread safe. Can I
> process incoming packets on different threads concurrently?
>
> I would be extremely thankful for any help in this regard.
>
> Regards,
> Waqee Khalid
>