The user will install our application. At the time of installation, the user can supply a password for the WatchMan user. The WatchMan user will be created by the WatchMan server startup. If the user doesn’t exit.
The WatchMan user can create any new user with the help of API. WatchMan will supply a username and password while creating any new user.
Any user, including WatchMan can change his/her password.
Any user, including WatchMan can create events, schema, rules, etc.
Any consumer can send an event to the system by supplying an event-name, payload, configurations(rate-limit, sampling, etc) and API key for the event.
API key can be read only or write only
Name them publisher key and analyst key
The Event Will be pushed into Kafka
Kafka consumers will poll events validate their schema, and discard invalid events. Push valid events into another kafka topic to be pushed into ClickHouse.
As of now data has been pushed into click house, any user with valid API key can now query data.
Schema
User
user_id:string
password:string
Event
event_id:string // unique
user_id:string
event_name:string
sampling_percentage:number // sampling percentage
// SERVER | CLIENT | QUERY
// https://github.com/ats1999/WatchMan/issues/6
sampling_type:string | number(1,2,3, .. id of the type)
data_deletion_policy: number // amount of milliseconds
reporting_time_zone: PST // keep a enum type
Event Log
event_id:string
user_id:string
time_stamp:number
log:object
- country
- device
Work Flow
WatchMan
user. TheWatchMan
user will be created by theWatchMan
server startup. If the user doesn’t exit.WatchMan
user can create any new user with the help of API.WatchMan
will supply a username and password while creating any new user.WatchMan
can change his/her password.WatchMan
can create events, schema, rules, etc.event-name
,payload
,configurations(rate-limit, sampling, etc)
and API key for the event.Schema
User
Event
Event Log
Event API Key