4 ms·
> Migrating our ORM to write commands on SQL [...] Interesting. What do you mean by commands on SQL?
by andreygrehov 9y ago
> Migrating our ORM to write commands on SQL [...]
Interesting. What do you mean by commands on SQL?
- parasubvert 9y agoSorry, i wasn’t clear. I meant that previously we did read/write using HQL. We migrated to CQRS where the command part would generate an INSERT statement to the database (Using the ORM) and also update the Solr index (using Jackson data binding to JSON).
- andreygrehov 9y agoAh, gotcha, makes sense. Thank you for the explanation. Did you guys treat Solr as a source of truth? Curious about use cases in which client updates a record and then immediately queries it through something like Solr.
- parasubvert 9y agoYeah we used The Solr real time get handler and a few caching tricks - we updated the cached result set for the client so we didn’t need to request Solr immediately. If I recall the cache had a TTL of about 30 seconds that could be bypassed with a refresh button for super users - intended to shock absorb the system for common queries. Generally it took a second for new data to be queriable. For the writes to Solr we listened for Hibernate events. It’s been 5 years or so and I don’t think this has changed much with either Elastic or Solr product-wise