Need guidance on setting up a networking system to update multiple devices on the same network
I'm having a difficult time figuring out where to start looking for a solution to a problem, I was hoping someone could give me some guidance, here's what I'm trying to do:
1) I want to be able to have multiple devices communicate and update data to each other over wifi and/or wired connection
2) I want to be able to limit logins, user 1 can only log into one device at a time. EG if user one is logged into device 1, if they attempt to log into device 2 the login fails. What is a good way to keep track of this?
3) If user 1 updates a piece of data on device 1, user 2 currently logged into device 2 should be able to see that update, as should user 3 on device 3, ad infinitum.
4) One thing that I also have to figure out is how to allow each device to function if the network goes down independ开发者_如何学Goently, then updates each device as the network is restored. Data integrity has to be maintained in some way. The only way I'm familiar with is a Master/Slave architecture where each 'slave' device sends their updates to the 'master' device and that dictates which one is committed based on the time of the transaction.
I've considered implementing something like a Token Ring, where each device on the network that is running my application broadcasts a signal that it's available and sequentially passes a token that either updates data, or says who is logged in at that terminal. My worries about this is it won't scale well with too many terminals. I'm also not sure of how to broadcast an application recognization so that each application on the network can recognize others that need to be updated as anything changes. I have little experience setting up communication between devices and I just need a place to start.
I would suggest a web server to control the broadcasting of data and tracking the devices. This way any code changes wouldn't require a update on the 'master' device. Each device would broadcast any updates to the server (which would then push this update out to all the other devices) as well as continuous server polling to track the user on the device and it's connectivity.
精彩评论