title: Commit to a log like Kafka + database with ACID properties?
body: <p>I'm planning in test how make this kind of architecture to work:</p>
  
  <p><a href="http://www.confluent.io/blog/turning-the-database-inside-out-with-apache-samza/" rel="nofollow">http://www.confluent.io/blog/turning-the-database-inside-out-with-apache-samza/</a></p>
  
  <p>Where all the data is stored as facts in a log, but the validations when posted a change must be against a table. For example, If I send a "Create Invoice with Customer 1" I will need to validate if the customer exist and other stuff, then when the validation pass commit to the log and put the current change to the table, so the table have the most up-to-date information yet I have all the history of the changes.</p>
  
  <p>I could put the logs into the database in a table (I use PostgreSql). However I'm concerned about the scalability of doing that, also, I wish to suscribe to the event stream from multiple clients and PG neither other RDBMS I know let me to do this without polling.</p>
  
  <p>But if I use Kafka I worry about the ACID between both storages, so Kafka could get wrong data that PG rollback or something similar.</p>
  
  <p>So:</p>
  
  <p>1- Is possible to keep consistency between a RDBMS and a log storage OR
  2- Is possible to suscribe in real time and tune PG (or other RDBMS) for fast event storage?</p>