Open josecelano opened 8 years ago
OK, I have installed ElasticSearch on Laravel Homestead with:
sudo -s
apt-get update
apt-get install openjdk-7-jre-headless -y
wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
echo "deb http://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-2.x.list
apt-get update
apt-get install elasticsearch
update-rc.d elasticsearch defaults 95 10
/etc/init.d/elasticsearch start
And it seems all work.
Copyright: https://bosnadev.com/2014/09/12/install-elasticsearch-on-laravel-homestead/
Anyway I would like to have feedback about using MySQL for small projects.
I think there is no problem by using MySQL in small projects and if the project grows you can switch to another DBMS like MongoDB. Just convert the stored events to MongoDB and there you go.
I am trying to run the sample but I do not have ElasticSearch installed on my homestead vagrant machine. I think it should be nice to run the sample if you only have MySQL. Is there a way to add a
MysqlReadModelPartRepository
or that does not make sense at all. And why it is not present in the brodway package?:https://github.com/qandidate-labs/broadway/tree/master/src/Broadway/ReadModel
I have seen other PHP CQRS libraries which use MySQL for read models like this one:
https://github.com/prooph/proophessor-do/blob/master/src/Projection/User/UserProjector.php
I have read that ElasticSearch is better for projections but maybe MySQL could be a good options for some projects where you want to use CQRS but you do not want to add anther one more service in you infrastructure.