I'm working on Gamepad OOP (bug 852944). We want to have an actor-per-device-per-process model for IPC. Right now, Gamepad's platform specifics live in HAL, as it's just using the observer broadcast model. Moving to the new actor model, it doesn't feel like gamepad will really fit in HAL anymore, since adding things to PHal usually assumes observers for device -> content information broadcasts and synchronous calls for content -> device queries.
My first guess at implementing this would be to move gamepad's platform specifics over to DOM, and implement this all under the dom/gamepad directory, similar to how we've done other more complicated device webapi projects (like bluetooth). It feels like HAL assumes a broadcast model specifically for sensors, switches, etc, while more complex things get moved into DOM. I talked to dhylands (the HAL module owner) about this, and he directed me to a thread started by cjones a few years ago, which has even more ideas in it: https://groups.google.com/forum/#!searchin/mozilla.dev.platform/rfc$3A$20hal/mozilla.dev.platform/g72lXZpFLrg/k3bry9mgC1wJ So, does it make sense to keep HAL how it is right now, and have more complicated APIs live in DOM? Or should we look at extending HAL to handle things like actor creation/management for devices (if that's even possible)? I do admit that some of the confusion comes from the name of HAL, since "hardware" encompasses a lot more now than it did when the HAL layer started. _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform