Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't see why it is confusing that applications for high concurrency would solve problems differently than big data.

I am also an Erlang noob, but I don't think pattern matching has to account for all parameters. To my understanding erlang pattern matching is very efficient, and anything you would pattern match on function parameters, you would have to do some type of logic in the function if you had no pattern matching, so I don't see how pattern matching would negatively effect performance.

ETS tables to share data between threads actually make a lot of sense if you think of your program with the idea that no matter what "x" is, this process should properly handle it, because you can't guarantee when the message you sent will be processed.

An ETS table is a DB, but you can replicate it by having a single genserver hold that data, and use calls to retrieve and manipulate it. It gives you one spot for your data to be. If you had that same data in messages or function call stacks, by the time the process executes it, it could be stale.

Its useful if you need one "true source" of individual pieces of data that needs to be synchronized. Its about decoupling data from processes.



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

Search: