ppegusii / cs677-smart-homes-IoT

Programming Assignment 1: Internet of Things and Smart Homes
GNU General Public License v2.0
2 stars 0 forks source link

Leader Selection Algorithm #14

Closed ameetrivedi closed 9 years ago

ameetrivedi commented 9 years ago

For Leader Election Algorithm using Bully Algorithm with device ID as the decision maker (where Gateway has the highest Device ID) seems apt. It sounds kind of monotony that gateway always wins but that should be the case because:

Reasons:

  1. The entire system falls apart if Gateway goes dead
  2. Broadcasting the messages and receiving the "I am alive" acks from devices/sensors is easier at the gateway since it is directly connected to all other devices/sensors/user/database.
ppegusii commented 9 years ago

Bully seems fine. I'm not sure 2 helps because every process will have to know the ip:port of every other process and be able to communicate with them.

We should probably design this generically enough so that the existing code has no knowledge of which ordering method we are using so that we can easily switch from clock sync to logical.