× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



But "stateful" DB interfaces require some way of pairing multiple
​ ​
concurrent users with persistent DB connections. Do you write your own
​ ​
"connection" manager, or rely on a pre-built framework?

Are you talking about optimistic vs. pessimistic locking(n1)? There is
tooling for that in Rails(n2). I haven't looked into it for Node.js other
than just before sending this response, and I mostly found people asking
for the feature but not a lot of solutions.

n1:
http://stackoverflow.com/questions/129329/optimistic-vs-pessimistic-locking
​n2:
http://api.rubyonrails.org/classes/ActiveRecord/Locking/Pessimistic.html​​;


Aaron Bartell
litmis.com - Open Source and IBM i. No Limits.


On Thu, Aug 27, 2015 at 5:21 PM, Nathan Andelin <nandelin@xxxxxxxxx> wrote:

Thanks for the reply, Aaron. But the question isn't about the syntax of SQL
paging. It's about how you manage DB state in a multi-user environment.

A number of IBM i Node.js examples follow a pattern something like:

var db = require('/QOpenSys/QIBM/ProdData/Node/os400/db2i/lib/db2');

db.init(...);
db.conn(...);
db.exec(...);
db.close(...);

But "stateful" DB interfaces require some way of pairing multiple
concurrent users with persistent DB connections. Do you write your own
"connection" manager, or rely on a pre-built framework?




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.