-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Paul, first of all: sorry for the late reply.


On 22.12.2012 16:29, Paul Alfille wrote:
> Very thoughtful note.
> 
> Let me explore one of your ideas, on polling.
> 
> 
> On Fri, Dec 21, 2012 at 6:06 PM, Michael Markstaller
> <m...@elabnet.de <mailto:m...@elabnet.de>> wrote:
> 
> 
> And then I thought, if it wouldn't be great for owserver to have
> some kind of long-polling API where the client only gets notified
> if something interesting (again: iButtons, IO's) has changed
> instead of polling every 100ms.. Though I have no idea if/how this
> could be implemented.. During the next days I wanted to add some
> timestamp-output to debugging to find out where we loose these
> 1-3secs but maybe there is an easier way/thought..
> 
> 
> The only way owserver could notify you of changes, is indeed to
> poll, every so often.
> 
> One method would be to add that function into owserver, as you
> suggest.
> 
> Another way would be to create an "owpoll" that would be configured
> to poll owserver. 1. The overhead of communicating with owserver is
> negligible. (just chain some owservers together to prove this). 2.
> owpoll could implement it's own configuration and communication 
> system. It's not clear how you'd want the signalling to be done. 3.
> owpoll could also act as a passthough to owserver to simplify the 
> client connections. 4. Perhaps owpoll could have some intelligence
> about what frequency to poll given items.

Let me specify this.. and why..
I agree that the overhead of polling owserver every 100ms (* I don't
use owfs/fuse at all, sorry ;)) is negligible..
But there is some, somewhere, owserver eats 25% of my CPU..

The reason behind this is simple and goes back to many (days, weeks)
tests done with mobile, battery-driven clients: polling often is very
costly: the bill is simply runtime.
These tests were with an event-driven system (EIB/KNX) but the basics
are the same: the server could run and do&consume what it likes, as
long as it doesnt bother clients with irrelevant packets forcing them
to wakeup from standby..
The signalling is simple:
http://en.wikipedia.org/wiki/Long_polling#Long_polling
Simplified; "Don't speak until you have something new for me" ;)

Surely, this could be implemented as a sep. "owpoll" or so, this is
what I do (around 5 corners) now.. but..

> On the other hand, 1-wire has a assynchronous presence detect mote
> for some bus masters that we don't exploit. Because it's hard to do
> for serial connections, and any communication on the bus can
> interfere with it. I suppose that we could use it on the USB bus.
> owlib knows when the bus is idle and so could sense new connections
> during that period. (This only works for ibuttons being plugged in,
> not new sensor values, those still need polling.)

It would be great if we could expose more things there (I don't care
if some DIY-stuff works, Ok, well I do but not if it affects stability
like accepting DS2490/9490 without an id-chip it's counter-productive
IMHO)

Really, I never got to understand this "Presence-Pulse" thing in real
life, either I didn't understand it or it's not working at all (fully
besides owfs!, talking about looking at logicanalyzer and osci now..)
Anyway: even if, it would be great but there are only two chips AFAIK
that support it at all and I dont have them in the field and they
arent what I'd call cheap, so we still have to poll somewhere ;)


Finally, the first target is to make the SEARCH_ROM on multiple DS9490
*much* faster, then lower the CPU-load (I just suspect my kind of
"hardcore polling" to be *one* of the reasons..)
And then, third, it would be nice if owserver could poll itself (or
being told to do) and give me just whatever channged ;)

best regards,

Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEARECAAYFAlDebE8ACgkQaWRHV2kMuAKCfgCfTkNKOmQPsNbfZIgxvYeHEOhY
MB8AnRazyU0o9qwTnU+K1SHIUzp5SjaH
=dL5L
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to