cancel
Showing results for 
Search instead for 
Did you mean: 

Software Transactional Memory in KDB+?

stefanscottalex
New Contributor
Hi -I'm interested in understanding how KDB+ handles concurrency, whereseveral KDD+ processes might be reading and writing to the same tableat the same time.I have been reading up on Software Transactional Memory and Multi-Version Concurrency Control, as well as Memory-Mapped Files:http://en.wikipedia.org/wiki/Software_transactional_memoryhttp://en.wikipedia.org/wiki/Multiversion_concurrency_controlhttp://en.wikipedia.org/wiki/Memory-mapped_fileAs far as I understand, Software Transactional Memory is similar toMulti-Version Concurrency Control. Instead of using "locks" to handleconcurrency, these methods handle concurrency by using timestamps onthe data. Transactions are executed very optimistically, but they arefirst saved to a log, and then the timestamps on the data are checkedto determine whether a transactions can be committed or must be rolledback (and then retried).Does the logging feature in KDB+ implement Software TransactionalMemory (or provide the building blocks for the developer to implementit)?Thanks for any insights!
1 REPLY 1

stefanscottalex
New Contributor
Hi -I forgot to mention this link in my previous post:https://code.kx.com/trac/wiki/Cookbook/LoggingThis talks about Logging in Q and KDB+.I think that Software Transactional Memory could be implemented on topof this - but I'm not sure, so I'd appreciate any ideas.