I have designed different part of social networking system using micro service and I have reached to the message part of the system. Messages can be private messages (maybe a separate module), the posts on the wall for each user which can be images, text, video (again maybe another module) and reply messages which is again can be a different module.
Now my problem here is that should I design separate modules (service) for each kind of message. Should I consider load of messages as part of this concept of separating modules?
From one view they are all messages that users use to interact with other users in the system.
How should I design micro service for the message part of this social network?
EDIT-1: Micro-service modules of my project for now:
- user
- authenticator
- notifications (email, push, etc)
Now my social network project has 3 parts for messages:
- users' posts
- users' private messages
- users' replies to other messages
These 3 categories can be 1 module that can manage all these logics. Or 3 different modules user posts
, user private messages
, user replies
.
The question is how should I separate them? One of my concerns is that each category would get more logic and it will lead to a bloated module.
My Final Question: Is it just the role of micro service that separate a module from another or should I take complexity of module into account for the separation?
NB: By messaging I don't mean micro-service module's inter communication, but user's messages in the ecosystem.
EDIT-1
part of the question? By message I mean user's posts not micro-service communication.