On Fri, Feb 15, 2013 at 1:22 AM, John Carlson <yottz...@gmail.com> wrote:

> If you have to start a new relational database transaction for each http
> post when submitting hundreds of posts,  that's going to create a lot of
> overhead,  if you choose to use session ids and leave the tranaction open,
> then you risk not committing something.  If you use database pools, you are
> protected both ways I believe.
>
A technique I've seen used (albeit, only once or twice) is to batch updates
from multiple connections, and run batches at 20+Hz while there is demand
for them. This only requires one connection from the server to its
database, and allows you to respond and close each HTTP connection in a
predictable amount of time, and allows you to ensure the updates are
committed before replying. The limitation of this technique is that you
can't have ad-hoc updates, since those would be too difficult to batch
consistently and sensibly.

It's a bit specialized, but is able to handle a lot of updates.
_______________________________________________
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc

Reply via email to