owserver protocol don't need any change! i was thinking about it in last week, but the main problem is not tcp or ip protocol, the slow process isn't rs232 an usb too, is the onewire protocol, about 12kbps ?! well ds1820 need 1 second to read, AD conversor need about 10ms, any device need less than 1ms to work, i think that we don't need any speedup, ow protocol don't allow this, maybe the only speedup could be in owlib reading devices, udp can be good? maybe, tcp is very fast and we are shure that we will send and receive every packet without loss! i will try an tcp/udp proxy and work with it to test the php api with udp, after this i will tell if udp is faster to send or slower
Paul Alfille escreveu: > Interesting questions. > > On 1/7/07, *Paul Davis* <[EMAIL PROTECTED] > <mailto:[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). > > ------------------------------------------------------------------------ > Esta mensagem foi verificada pelo E-mail Protegido Terra > <http://mail.terra.com.br/>. > Scan engine: McAfee VirusScan / Atualizado em 05/01/2007 / Versão: > 5.1.00/4933 > Proteja o seu e-mail Terra: http://mail.terra.com.br/ > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > 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 > ------------------------------------------------------------------------- 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
