Hacker News new | past | comments | ask | show | jobs | submit login

If concurrency doesn't help, you can always just not use it. You don't need to run logically separate modules in different processes.

What if you put the entire state in a single GenServer? You can still delegate modifying different parts of the state to different modules, just call functions in those modules from a single server process.




It does help. Any given action will modify a fairly small part of the overall state (at most around .01% of it). But what part of the state it can modify is fairly arbitrary based upon the action. Your dependency could be dataA, dataB, then dataC. Or dataC, dataV, then dataA. Which, if you isolate into processes could create races and/or deadlocks. They would be very unlikely, but they could still happen.

This is why I went with software transactional memory. In the generally unlikely event that there's some overlap, the changes will just be rolled back and re-done.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: