Let’s say I have an event. the event can have multiple users.
I think the best way to map this relationship is to do it in a relational database, as the writes on this relationship should not be that frequent, but it’s important that the relationship is retrieved in a short time both ways.
Now, event properties are stored in a non-relational database, as users can customize related infos(still uncertain about whether to store the mandatory properties (such as dates and title) on the relational db, but whatever).
At the end of the event, all the users upload their images in a concurrent way.
Uploading the image consists in saving its hash to the database and uploading the file to another blob storage.
Then, all the other users are notified and their frontends retrieve the hashes(from the backend) and then retrieves the corresponding images(from the blob storage)
So, at the same time, I have a lot of writes(adding the images) and reads(reading the updated event).
Which are the best practices in these cases? Which is the most efficent way to handle this?
Is the non-relational database the best way to do so? should I save the new image hash as a field in the non relational object, or just as a touple eventId-imageHash, for better parallel writing?
Are there some technologies that can help me with this(maybe kafka)?