I am developing a website that will use Cassandra to store a database and Solr to index and search for some of the data contained in this database (only some of the data that I want to search). I intended to use PHP for server-side scripting, interacting with the Cassandra database and providing dynamic HTML content based on the contents of the database.
When a user commits something in the database, I foresaw that PHP would issue a record in Cassandra, and if it was the data that needed to be searched, the same data could be written to the Solr index. The thing is, I donโt need the searchable data in the Solr index, and I donโt want the process of adding it to the index through PHP to consume valuable resources, especially during peak hours. Is there a way to have asynchronous updates to the Solr index in the background, passing data directly from Cassandra? Perhaps a queue of searchable data could be created that is used to update the Solr index during downtime by some background process?
I'm new to this, but somehow I would like the connection between Cassandra and Solr to be isolated from the main PHP scripts. I'm not sure that Cassandra and Solr can be effectively connected with Java, and only for a higher level of access to Cassandra (for reading / writing to the database) and Solr (for requesting data that can be searched), the creation of the web will be supported in PHP content. I appreciate any suggestions.
source share