{"action":"created","issue":{"url":"https://api.github.com/repos/bitwalker/swarm/issues/4","repository_url":"https://api.github.com/repos/bitwalker/swarm","labels_url":"https://api.github.com/repos/bitwalker/swarm/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/bitwalker/swarm/issues/4/comments","events_url":"https://api.github.com/repos/bitwalker/swarm/issues/4/events","html_url":"https://github.com/bitwalker/swarm/issues/4","id":173872851,"number":4,"title":"Deadlock when registering process","user":{"login":"szlend","id":7301807,"avatar_url":"https://avatars.githubusercontent.com/u/7301807?v=3","gravatar_id":"","url":"https://api.github.com/users/szlend","html_url":"https://github.com/szlend","followers_url":"https://api.github.com/users/szlend/followers","following_url":"https://api.github.com/users/szlend/following{/other_user}","gists_url":"https://api.github.com/users/szlend/gists{/gist_id}","starred_url":"https://api.github.com/users/szlend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szlend/subscriptions","organizations_url":"https://api.github.com/users/szlend/orgs","repos_url":"https://api.github.com/users/szlend/repos","events_url":"https://api.github.com/users/szlend/events{/privacy}","received_events_url":"https://api.github.com/users/szlend/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2016-08-29T21:07:20Z","updated_at":"2016-09-25T14:36:10Z","closed_at":null,"body":"First off, great job on the library! I can't believe how easy it was to incorporate it into my project. There is one issue that I found though. When spawning lots of processes very rapidly across multiple nodes, I often run into a deadlock. I've tracked the issue to this line\r\n\r\nhttps://github.com/bitwalker/swarm/blob/ec943bde2e5741e5a475b8bbe42f433645da9f06/lib/swarm/tracker.ex#L123\r\n\r\nIt seems both nodes try to call each other's Swarm.Tracker at the same time and time out when none of them can reply."},"comment":{"url":"https://api.github.com/repos/bitwalker/swarm/issues/comments/249425156","html_url":"https://github.com/bitwalker/swarm/issues/4#issuecomment-249425156","issue_url":"https://api.github.com/repos/bitwalker/swarm/issues/4","id":249425156,"user":{"login":"szlend","id":7301807,"avatar_url":"https://avatars.githubusercontent.com/u/7301807?v=3","gravatar_id":"","url":"https://api.github.com/users/szlend","html_url":"https://github.com/szlend","followers_url":"https://api.github.com/users/szlend/followers","following_url":"https://api.github.com/users/szlend/following{/other_user}","gists_url":"https://api.github.com/users/szlend/gists{/gist_id}","starred_url":"https://api.github.com/users/szlend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szlend/subscriptions","organizations_url":"https://api.github.com/users/szlend/orgs","repos_url":"https://api.github.com/users/szlend/repos","events_url":"https://api.github.com/users/szlend/events{/privacy}","received_events_url":"https://api.github.com/users/szlend/received_events","type":"User","site_admin":false},"created_at":"2016-09-25T14:36:10Z","updated_at":"2016-09-25T14:36:10Z","body":"I just wrote a small benchmark for swarm. It's similar to what I do in my project, but a lot worse. Basically what it does is it starts a process called `n` and then it tires to ping `m` (n-1, n+1, n-2, n+2, ...) amount of processes around it. And if the process doesn't exist, it lazily spawns it. The next process then repeats that until it reaches a certain depth.\r\n\r\nIt seems to work fine with just one node, but as soon as I add another it just keeps spawning processes until it runs out of resources. Though maybe it's because I haven't handled conflict resolution. It's weird though cause it doesn't print a single line when distributed.\r\n\r\nI don't know if this is a very realistic case that you want to handle, but on my project I currently use `syn`and `hash_ring` and it seems to handle that kind of workload fine.\r\n\r\nhttps://github.com/szlend/swarm_test\r\n\r\nI hope this helps you in any way :)"}}
{"actor":{"display_login":"szlend"}}