I want to know, is it possible to use a mySQL database simultaneously from a PHP website and a Java Website both making continous read and write operations. Are there any tradeoffs?
Does connection pooling affect this?
I want to know, is it possible to use a mySQL database simultaneously from a PHP website and a Java Website both making continous read and write operations. Are there any tradeoffs?
Does connection pooling affect this?
From my understanding MySQL locks a unit upon writing to ensure no reads happen during that: so writing blocks any reading you do. Depending on the storage engine you use (more on that here) it may only block a row; or the entire table; you should probably choose to do rows, although it takes more resources to do that, as your DB will be accessed by multiple applications that may not hold their own caches, etc. and blocking one sounds like it would be disasterous.
A connection pool should reduce the amount of stress on your DB making connections and the amount of time it takes for the Java or PHP to fetch data, it should help, but not during the query aspect.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.