Skip to content

Commit

Permalink
README.md: Improve grammar (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
xtian authored Oct 19, 2020
1 parent 844e55b commit 5b36a42
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,26 +45,26 @@ This library is made of four main modules:
Once a connection is created, it creates a holder and
assigns the connection pool as the heir. Then the holder
is promptly given away to the pool. The connection itself
is mostly dummy. It is there to handle connections and pings.
is mostly a dummy. It is there to handle connections and pings.
The state itself (such as the socket) is all in the holder.

Once there is a checkout, the pool gives the holder to the
client process and store all relevant information in the
client process and stores all relevant information in the
holder table itself. If the client terminates without
checking in, then the holder is given back to the pool via
the heir mechanism. The pool will then discard the connection.

One important design in DBConnection is to avoid copying of
information. Other database libraries would send a request
to the connection process, do the query in the connection
process and send it back to the client. This means a lot of
data copying in Elixir. DBConnection works by keeping the
socket in the holder and works on the socket directly.
One important design detail in DBConnection is that it avoids
copying data. Other database libraries would send a request
to the connection process, perform the query in the connection
process, and then send it back to the client. This means a lot of
data copying in Elixir. DBConnection keeps the socket in the
holder and works on it directly.

DBConnection also takes all of the care necessary to handle
failures and it shuts down the connection and the socket
whenever the client does not checkin the connection, to avoid
recycling sockets/connection in a corrupted state (such as a socket
failures, and it shuts down the connection and the socket
whenever the client does not check in the connection to avoid
recycling sockets/connections in a corrupted state (such as a socket
that is stuck inside a transaction).

### Deadlines
Expand Down

0 comments on commit 5b36a42

Please sign in to comment.