Hi !

I'm new to the uwsgi community, but I'm implementing new features we
need in my team.

Currently, I'm working on a metric system supporting the creation of
metrics during the runtime and I would like to know how other uwsgi
developper would implement it.

The choice I made is to let the original metric system untouched, and
to make a new system with less features but supporting the creation at
runtime. It's an hard choice, but I don't know how to do better, since
creation of metrics cannot be added to the current system and I'm a
bit afraid of modifying the whole metric system to support creation.

I'm implenting a PoC using only files to store values. I think it will
be slower, but I didn't find many solutions for sharing data across
processes after the fork. I added an option to specify the directory
in which these dynamic metrics will be stored. I also use this option
to know if dynamic metrics are enabled. Since I want to keep the same
Python API (my team use Python, but I could implement other APIs later
on my free time if someone is interested), I always check if a
standard metric exist. If it does, I use it rather than creating a
(slower) dynamic metric. If it doesn't and if the dynamic metrics are
enabled, I use the new system I'm implementing.

Does anyone have a better idea on how to do it ? I'm still young in
the programming world so I could have missed some possible solutions.

Cheers,

-- 
Alexandre BONNETAIN
{EPITECH} 2019
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to