Create backend.c

Modified set_heart_beat function adding random hb option.