I am working on a system which uses SQLAlchemy to read/write to a MySQL database. I have a Factory which makes multiple repositories each one with his own session. I read the documentation os SQLAlchemy and it states that one session should not be used by different processes.
I cannot use same session as it the code will run on different machines.
My question is, is it a good practice to make different sessions? Will it have concurrency problems or races?
Example: If i have 2 sessions writing multiple records to the db, and have a collision of a record. Will the session.commit() abort everything?