Referring to the following in multi-client environment:

"If I got it right, when owserver returns from the write to
/simultaneous/temperature, fresh temp values can be read from the cache. If
you read from /uncached, you trigger a fresh conversion.

- write to /simultaneous/temperature
- immediately read temperatures from the cache (and not from /uncached)

S.M. originally I was under the impression, that after writing '1' to
/simultaneous/temperature, I would have to read back the value until
owserver sets it to '0' which would indicate that the conversion is done."


The model could be improved with owserver incrementing the value in
/simultaneous/temperature.  This will mean that if any client needs a
conversion, writing a random number to /simultaneous/temperature and
tracking the increment will be possible.

If no specific tracking is required, writing 0 and polling for 1 will also
work.

c-:


On 8 January 2016 at 03:26, Jan Kandziora <j...@gmx.de> wrote:

> Am 08.01.2016 um 01:07 schrieb Stefano Miccoli:
> >
> > I agree: since owserver is multi-threaded by design there is nothing
> > wrong with multiple client tasks/threads accessing it concurrently.
> > One should just avoid clogging the server wit an excessive number of
> > requests.
> >
> All is fine as long as you are not insisting on the order in which
> requests are served. That is because the owserver protocol is based on
> TCP, so the order of requests is only honoured per-socket. As soon there
> are multiple sockets, messages stuck in them are handled as the
> scheduler decides. And this isn't round-robin and not sorted by arriving
> time either. It's a complicated scheme based on throughput.
>
> So if you require to control the order of commands -as with
> synchronizing /simultaneous/temperature triggers to readouts of the
> chips-, you have to stuff them into the same socket on owserver side.
>
> Kind regards
>
>         Jan
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Owfs-developers mailing list
> Owfs-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
------------------------------------------------------------------------------
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to