Overview:
System that implement support-chat - agent queuing.
Entities:
- Agent - people who communicate with end-customer to provide support
- Channel - place of communication between end-customer and agent
- End-customer - people who have some question to resolve.
Task:
- Implement 2 micro-services. "Channel-Svc" and "Agent-Svc".
Channel-Svc
maintain the channels and assign/unassigning participants to it.Agent-Svc
maintaining agents - Agent (part of
Agent-Svc
) schema:{ id: String, firstName: String, lastName: String, workingHours: {start: String, end: String} }
Agent-Svc
Api:- Create Agent: HTTP(POST)
- Update Agent: HTTP(PUT)
- Get list of Agents: HTTP(GET)/RabbitMQ
- Get agent by ID: HTTP(GET)/RabbitMQ
- Channel schema (part of
channel-Svc
):{ id: String, channelName: String, travelerId: ?String, agentId: ?String, isActive: Boolean }
- Channel-SVC API:
- Create new channel
params:
travelerId
api: HTTP(POST) description: Creates new channel and assigning an agent to this channel. Agent with minimum number of active channels and appropriate working hours should be used. If there are some active channels with same travelerId they should be closed (isActive
->false
) - Close Channel. HTTP(POST).
- Create new channel
params:
- Each hour channel service should check agents that assigned to active channels and if they out of office should try to assign another agent
- If there is no agent for channel because of working hours agentId should be null (but still each hour channel-svc should try to find someone)
- All communications between
channel-svc
andagent-svc
should be done through rabbitMQ
Technologies:
- Express
- Mongo db
- RabbitMQ
- Docker/Docker-compose
- *NIX terminal (Linux bash, zsh, WSL)
- Docker
Step 1. Go to project dir:
cd /path/to/project
Step 2. Install dependencies (OPTIONAL):
make install
Step 3. Start services:
make up