Interesting questions.
On 1/7/07, Paul Davis <[EMAIL PROTECTED]> wrote:
I've been working with the ownet python access method to owserver for
the past few weeks. In doing so, I became aware of the fact that a
separate connection is opened to owserver for each operation (read,
dir, write). This means that for even the simplest operation, 3
separate connections are typically required. For more complex
operations the count goes up dramatically. Performing a scan for
DS2401 devices on a hub branch requires at least 22 separate
connections to discover two sensors.
I know it seems like a lot, but there is no measurable impact on performance
compared to, say, owfs, directly. The 1-wire bus is FAR slower than tcp.
How did this design of owserver come to be? There is a lot of
The design mimics http design.
Persistent connections have their own set of issues:
1. Unbounded memory for number of connections
2. Arbitrary limits on connections or durations, with timers, cleanup
threads.
3. Susceptibility to DOS attack (even inadvertantly) when many connections
are made but not finished.
Persistent connections are most useful when there is state information that
persists. OWFS is essentially stateless. Each request for the 1-wire bus is
independent of history. So the only thing we would be preserving is the
actual network connection.
overhead associated with TCP connection startup and shutdown. I don't
understand why multiple operations could not be carried out over a
persistent connection, eliminating the over head of all these
connections. This also makes me wonder why there is not an option to
use UDP as opposed to TCP. I didn't see any discussion of this in the
UDP would probably work, but if the data (for the larger memory reads) gets
split, there is some overhead in checking completeness and order. My read
was that UDP is best for data updates where missing old data can be safely
discarded.
archives (could have missed it I suppose). If this was a conscious
decision, I'd like to understand the reasoning. I've been studying
the owserver source, but I don't have enough of a handle on it yet to
provide any insight into this. Comments?
There is no reason why we can't have a version of owserver that uses UDP, or
persistent TCP connections, or UNIX sockets. The current design seemed
relatively simple, robust, and pretty fast. Have you any test results that
suggest a change?
Paul Alfille
P.S. I'm working on a directory speedup that would essentially send the
entire directory in a single message (since many of the clients do that
anyways).
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers