3 ms·
The conventional approach would be to have a process dedicated to database communication. Other processes would then talk to that process via some IPC mechanis
by yellowapple 9y ago
The conventional approach would be to have a process dedicated to database communication. Other processes would then talk to that process via some IPC mechanism.
This is reflected in the Erlang way of doing things (since there's no such thing as "shared memory", at least not directly); a process needing data from the DB sends a message to the DB connector process, which runs the query via one of a set of pooled connections and sends the result back as another message to the requesting process.