From: Jim D. <ji...@du...> - 2008-07-12 16:25:49
|
Gregg, Thanks for the detailed discussion. I obviously have much to learn here as I don't know much about the proper usage of xAP schemas, BSC, and other items you've brought to my attention here. I have a good deal of information to digest. I assume a detailed description of the standard shemas and specifically "BSC" can be found the xap automation web site? I have yet to read all that material in detail. I think I need to do that first. I realize that the standard proxy stuff is more client-server based. I had extended the proxy stuff to be more peer centric (I believe), when I created proxy_client_server.pl. I realize the name is rather awkward, but my intention and how I use it is really more peer-centric. Each MH node on my LAN uses proxy_client_server to offer up messages for a device it has locally attached and listens for messages from other nodes to take advantage of resources the other peers have available locally attached. My naive understanding of xAP is that it is intended to be used in a similar way, each node broadcasts information for resources it has access to and listens for information other peers have access to. I will go off and understand more of xAP and get back on the list with more knowledge. Thanks, Jim Gregg Liming wrote: > Jim Duda wrote: > >> For a long time now, I've been wanting to play with replacing the >> proxy stuff with xAP infrastructure. I do a lot with proxies as I >> have multiple MH boxes in my house on a local LAN. > > I assume that you realize/know this; but, just in case... the proxy > solution is inherently client-server whereas xAP (and xPL for that > matter) is peer-centric. > >> I have three code modules, xAP_speak, xAP_play, and xAP_w800 >> which perform what the proxy function does for those three applications. >> I've used this simple project as a way to learn about xAP. > > I'm guessing/hoping that you've adopted existing schemas where it > applies. Any data reported via a w800 could be mapped into a BSC > message and speaking has a schema as well. You would want to map each > device reportable by a w800 as a distinct endpoint rather than pass it's > ID (e.g., A1, K2) as a parameter in the message payload. > >> I'm now tinkering with if there is a way to perform this stuff >> down in the lower library modules, to make it more embedded and >> transparent. > > While technically possible, that's definitely not in keeping w/ the > spirit/intent of either xAP or xPL. In particular, at least half of the > issue is to adopt standard schemas that translate to rather meaningful > events. Although BSC tries to do this to a large degree over a lot of > devices, there is really no similarity between something like speaking > and digital I/O. Since an appropriate use of schema is required for > each device type, it is unlikely that any generic schema be appropriate > for all and therefore used/applied transparently. > > In addition, xAP's current spec has a UID limitation of 256 per > "gateway". That implies that you then have to create "virtual devices" > to handle situations where that number could be greater. IMO, this is a > huge pita. Fortunately, a forthcoming spec will resolve this > limitation. If this is a show-stopper, then use xPL as it is free of > the UID sillyness. > >> I'm trying to understand what is the best use case. > > IMO, distinct gateways and/or device support should be added as needed > to accomodate varying device types. BSC already exists and covers a > huge set of possibilities. Likewise, so does speak, display and a > number of others. To be honest, I don't know of a widely used schema > that does not already have built-in support. > >> I have been playing around with X10_W800.pm. I have a modified version >> which sends W800 messages in a xAP schema. > > Not to "beat a dead horse"; but, this is hopefully a standard schema > vice one that you've invented. > >> I was struggling to get >> the "receive" side to work. I couldn't find a way to pull the messages >> from the xAP item inside the code module. I put together the TEST.pm >> as a smaller test case. I couldn't figure out why it wouldn't work, >> hence the posting. > > There are lots of examples in mh's lib dir: BSC.pm, ZoneMinder_xAP, > OneWire_xAP all implement item libs that can send and receive xAP > messages. The design pattern is to create a private xAP item in some > item's constructor and tie it to the item. Then, the set method is > overwritten and tested against setby. If setby is the tied xAP item, > then you grab data from the xAP item. Otherwise, you assume its a direct > call. > >> I'm coming up to speed on xAP. I know there was always some grand >> plan about using xAP for proxy support, in lieu of the socket >> method used now. I realize there is some small start to be found >> in xAP_send.pl (that's where I cloned the add_hook from for X10_W800). > > I don't think that there was ever a concept of simply replacing the > proxy conduit w/ a xAP conduit. That just doesn't make sense and is an > abuse of xAP (or xPL for that matter). > >> I'd like to help development something with xAP. Proxies are something >> I use and can test. >> >> Suggestions? > > Have your w800 support handle BSC fully. Then you don't have to worry > about anything else as there is built-in support for BSC. > > Gregg > > ------------------------------------------------------------------------- > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! > Studies have shown that voting for your favorite open source project, > along with a healthy diet, reduces your potential for chronic lameness > and boredom. Vote Now at http://www.sourceforge.net/community/cca08 > ________________________________________________________ > To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365 > > |