going to use prisma + mongodb for data layer, and ...
# orm-help
w
going to use prisma + mongodb for data layer, and I need to sync some documents from mongodb into elasticsearch 6.5. what is the best way to do this? p.s. I can just synchronously write to prisma, then write to elasticsearch, but eventually, if one of storages fails, I will get inconsistencies, so this is not the case.
m
The best way currently would be to tail the op log of MongoDB in order to react to writes. Forward the changes in the op log handler to ES.
We want to make this usecase more straightforward in the future but we don’t have it yet.
w
okay, thanks. going to try https://github.com/rwynn/monstache to tail oplog to es for now (in case if anyone else in community is interested)