Closed soullivaneuh closed 8 years ago
@Soullivaneuh the code looks a lot better, but theres a problem about the http calls done by the listener. The hold implementation worked to minimize the number of http calls grouping them by precision.
For example if in a request lyfecicle one user is dispatching 20 http deferred events with the same precision, with this implementation 20 http requests will be fired. with the old only one.
@Algatux Okay I'll take a look. Any suggestion?
IMHO Similar to the old one we can use a service to store and merge the points by precision. (A service with a reusable interface to make future use of caches like memcached or redis will be good) This will be a statusfull service (not like it too mutch) if no cache is used
I would like to try something inside the listener.
Make a proposition
@Algatux Done. I also make this class internal as this should not be used manually.
I don't know if the service should be private or no...
Really really good work! Do you mean the listener ? if so yes
Did you think abut wrapping database.http and udp into a service that gives access to them. I was wondering if it will be more ordered avoiding direct access to the other two services
Do you mean the listener ? if so yes
Will do this.
Did you think abut wrapping database.http and udp into a service that gives access to them.
Something like this?
$container->get('algatux_influx_db.database')->getHttp();
Not sure about that, this will add more complexity.
I can't make the listener private:
The service "algatux_influx_db.events_listeners.influx_db_event_listener" must be public as event listeners are lazy-loaded.
So the PR is RTM for me. :+1:
Closes #17.
All deprecated class and method usages are replaced.