ipf icon indicating copy to clipboard operation
ipf copied to clipboard

Migrate FM persistence to Spring Data

Open ghost opened this issue 13 years ago • 4 comments

If FM's persistence is using SpringData, it would be a deployment issue what kind of DB is being used (relational or not).

On the next step, we could combine some parts of the prototype implementation from Jens and the current one and make a real outstanding product for high reliable messaging.

ghost avatar Jul 21 '11 09:07 ghost

Interesting idea but how do you ensure same lock semantics across DB implementations? I did a lot of research and debugging to get instance-level locking right and performance in Derby. You're on your way to hell!

krasserm avatar Jul 21 '11 09:07 krasserm

Generally, such issues like locking should be addressed by the stack below Spring Data integration (understand combination of driver, DB and JPA implementation). As to Derby, the "right" instance locking in Derby is implemented "right" by the Hibernate Derby driver version 3.5+ combined with the Derby version that supports such locking.

ghost avatar Jul 21 '11 11:07 ghost

Sure, that's the way to go but what if the underlying database doesn't support the locking protocol used by the FM manager such as lock upgrades, for example? Or what if the database implements lock upgrades with table locks? In this case say hello to deadlocks under heavy load. Make sure you do extensive concurrency tests when working on this.

Are you planning to make an extension here or a replacement of the existing persistence impl?

krasserm avatar Jul 21 '11 12:07 krasserm

Currently I have no idea what will be essential for the design, I have to read some more about non-relational DBs. I will let you know what are my considerations if I get that further. You are right, whatever gets implemented has to be load-tested to validate the design.

I don't plan to do anything yet, it is just an idea that seems to be useful. I think the first thing to do in this direction would be to find out if the hibernate specific stuff could be dropped, so that only the JPA api is in use.

ghost avatar Jul 21 '11 12:07 ghost