Greetings, hope I'm asking in the right venue here. I'm playing around with writing a home automation system, mostly as a learning experience, and partially because I don't really like anything that exists right now in that space. I'm targeting .NET (C#) just because it's the language I know best. And I'm completely new to the Actor model (though I've been doing plenty of research).
I'm strongly considering Akka.net as the platform that use as a backbone for everything, but I'm trying to decide if it's overkill since I will likely never be using remoting, etc. I'm pretty much just looking at it from an architectyural standpoint for the following reasons: 1. I need to support (concurrent) event publishing from all of the devices that are monitored (e.g., a long living thread per device / device hub listening for changes). 2. I need to support multiple clients requesting changes to the system at the same time (concurrent message processing, though I'm not talking hundreds of clients, so the single-threaded nature of an Actor is ok here). 3. I need to support an internal tree structure of devices and their current state (i.e. a single threaded Actor that listens for all device changes, and modifies an internal state, and then possibly publishes a "DeviceStateUpdated" event for clients?). So something like ActorSystem - HarmonyHubActor (Example device hub, which would receive GENERIC messages for things connected through the Harmony Hub, and parse it for the specific device and state to change, etc.) - ZWaveActor (Example device hub, which would receive GENERIC messages for things connected through ZWave controller, and parse it for the specific device and state to change, etc.) - DeviceStateActor (Holds the system's current state internally, responds to broadcasts about state changes, publishes events for ClientActor to publish out to clients through web sockets, etc.) - CommandActor (for handling commands from an API, etc., to change device states) - ClientActor (Handles requests from an API, or a SignalR front end, etc., for communication with clients) And really that's about it at this early stage. The only other caveat being that I want to make the inclusion of device hub actors dynamic by configuration (Config file for now most likely, later dynamic config stored in SQLite or similar maybe), and most likely allow for inclusion of new "modules" as they are written that could then be configured (i.e., I add a "NestThermostat" module DLL in, it loads it, and now I can add "Nest" device hubs in my config, etc.) I'm really just looking for someone to tell me if Akka.NET would be overkill on this, or if I'm barking up the right tree. Otherwise I think I'd have to do a lot of thread management and ConcurrentQueue work, etc., and it really seemed like Akka / actors might be a good alternative, but there are a lot of pieces to Akka that I will almost certainly never touch, like remoting, so I was just worried it might be too much. Thoughts? -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
