Hello,

> as far as basic transactional sanity, its reasonable; we imitate the  
> constructs used by Hibernate.  in a concurrent environment, 

I forgot to mention that what I have in mind are not several instances of 
SQLAlchemy, but a single instance which would be part of something like an 
"application server". Then all client requests would be processed by one and 
the same instance of SQLAlchemy, running on the server side.

> its not  possible to insure that objects in memory are always exactly in 
> sync  with the database, 

In such an environment, where SQLAlchemy should "know" at runtime which 
objects are modified by other clients, it should be possible to automatically 
keep everything in sync, no?

> without going back to the database to refetch the data, or by 
> pessimistically locking everything (which is not  recommended). 

Why not recommended? In some cases, consistency is more important than 
performance...

My uneducated guess would be that without pessimistic locking, you would get 
lots of transaction failures in a concurrent environment. And that there 
would be a lot of handwork to cleanup behind. :-(

> If you always use your Session objects within a SessionTransaction,  
> then youll have ACID behavior as good as that which you get from  
> working with the database directly.

That's fine, thanks. :-)
 
> note that SQLAlchemy is not a "framework" and does not "insure" any  
> particular programming pattern, and is also a bit more open ended  
> than Hibernate.  so while its easier than not to write sane code  
> using SQLAlchemy, its not a substitute for knowing the basics of how  
> transactions work.

No problem for me, I love learning how things work in principle.

But, between "knowing something about the theoretical basis" (what's a lock, 
what does rollback mean), and being able to actually implement an entire 
transaction manager "by hand" "from scratch", there's a H-U-G-E difference 
imho. Something like five years of CS studies and at least as much of actual 
practical experience I guess.

Sincerely,

Wolfgang Keler

-- 
My email-address is correct.
Do NOT remove ".nospam" to reply.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to