{"action":"created","issue":{"url":"https://api.github.com/repos/maidsafe/crust/issues/419","labels_url":"https://api.github.com/repos/maidsafe/crust/issues/419/labels{/name}","comments_url":"https://api.github.com/repos/maidsafe/crust/issues/419/comments","events_url":"https://api.github.com/repos/maidsafe/crust/issues/419/events","html_url":"https://github.com/maidsafe/crust/issues/419","id":116595697,"number":419,"title":"Beacon should only be started explicitly using API, not the config file.","user":{"login":"inetic","id":40127,"avatar_url":"https://avatars.githubusercontent.com/u/40127?v=3","gravatar_id":"","url":"https://api.github.com/users/inetic","html_url":"https://github.com/inetic","followers_url":"https://api.github.com/users/inetic/followers","following_url":"https://api.github.com/users/inetic/following{/other_user}","gists_url":"https://api.github.com/users/inetic/gists{/gist_id}","starred_url":"https://api.github.com/users/inetic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inetic/subscriptions","organizations_url":"https://api.github.com/users/inetic/orgs","repos_url":"https://api.github.com/users/inetic/repos","events_url":"https://api.github.com/users/inetic/events{/privacy}","received_events_url":"https://api.github.com/users/inetic/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/maidsafe/crust/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"closed","locked":false,"assignee":{"login":"vinipsmaker","id":865914,"avatar_url":"https://avatars.githubusercontent.com/u/865914?v=3","gravatar_id":"","url":"https://api.github.com/users/vinipsmaker","html_url":"https://github.com/vinipsmaker","followers_url":"https://api.github.com/users/vinipsmaker/followers","following_url":"https://api.github.com/users/vinipsmaker/following{/other_user}","gists_url":"https://api.github.com/users/vinipsmaker/gists{/gist_id}","starred_url":"https://api.github.com/users/vinipsmaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinipsmaker/subscriptions","organizations_url":"https://api.github.com/users/vinipsmaker/orgs","repos_url":"https://api.github.com/users/vinipsmaker/repos","events_url":"https://api.github.com/users/vinipsmaker/events{/privacy}","received_events_url":"https://api.github.com/users/vinipsmaker/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2015-11-12T17:13:48Z","updated_at":"2015-11-25T18:03:57Z","closed_at":"2015-11-25T18:03:57Z","body":"The `Service` object should have a new public member function named `start_beacon(udp_port: u16) -> io::Result<u16>`, beacon should not be started implicitly through `Service::new` and any mention of beacon should be removed from the config file structure.\r\n\r\nThe tricky part about this task is that since beacon acceptor was previously created in the constructor, its presence was used as an indicator whether we can write into the bootstrap.cache file or not. Since we no longer can rely on it, we need other means to ensure our bootstrap.cache file doesn't get corrupted (written to by multiple processes).\r\n\r\nHere is some brain dump of alternatives:\r\n\r\n1. Use actual database\r\n2. Use memory mapped files to sync file access between processes\r\n3. Create a thread that will accept connections on a predefined TCP port, only one process per PC can successfully start such acceptor. Only the process with the acceptor can access the cache file, and all the other processes will need to communicate changes to the file through TCP connections.\r\n4. All processes shall first write to a unique temporary files, once done, the temporary files will be renamed to the bootstrap.cache file."},"comment":{"url":"https://api.github.com/repos/maidsafe/crust/issues/comments/159689294","html_url":"https://github.com/maidsafe/crust/issues/419#issuecomment-159689294","issue_url":"https://api.github.com/repos/maidsafe/crust/issues/419","id":159689294,"user":{"login":"vinipsmaker","id":865914,"avatar_url":"https://avatars.githubusercontent.com/u/865914?v=3","gravatar_id":"","url":"https://api.github.com/users/vinipsmaker","html_url":"https://github.com/vinipsmaker","followers_url":"https://api.github.com/users/vinipsmaker/followers","following_url":"https://api.github.com/users/vinipsmaker/following{/other_user}","gists_url":"https://api.github.com/users/vinipsmaker/gists{/gist_id}","starred_url":"https://api.github.com/users/vinipsmaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinipsmaker/subscriptions","organizations_url":"https://api.github.com/users/vinipsmaker/orgs","repos_url":"https://api.github.com/users/vinipsmaker/repos","events_url":"https://api.github.com/users/vinipsmaker/events{/privacy}","received_events_url":"https://api.github.com/users/vinipsmaker/received_events","type":"User","site_admin":false},"created_at":"2015-11-25T18:03:57Z","updated_at":"2015-11-25T18:03:57Z","body":"Solved in #422"}}