sipcapture / homer-api

HOMER 5: Back-End (API) DEPRICATED - use sipcapture/homer-app
http://sipcapture.org
27 stars 67 forks source link

System DNS resolver instead of or additionaly to DB host aliases #18

Closed kvishnivetsky closed 8 years ago

kvishnivetsky commented 9 years ago

Hi, Guys!

I suggest 2 variants of this feature implementation:

  1. Use DNS resolver at data read time (have performance impact, because we will do resolution for every API query every time), it is fast, but it will be done every time we handle a query.
  2. Use DNS resolver at write time. We resolve once, then use plain flat(without JOINs) SELECT queries on read API quries. Much better performance and changes independency (now we have host named XXXX, and in all system logs it named at the same manner, but tomorrow it will be named YYYYY, but in all logs already written to storage it will be still named as XXXXX).
adubovikov commented 9 years ago

for now we can use JOIN, but this can impact performance on big results sets, special on ORDER by. maybe better use internal hashmap and apply aliases on results...

kvishnivetsky commented 9 years ago

Hashmap on cilent(browser) side have an advantage -> we make substitute operations only for displayed results (not more then 75 at a time).

kvishnivetsky commented 9 years ago

BTW: we may operate with large results, storing them on server side(in PHP session var or use SQL LIMIT with range). It will reduce traffic and client memory usage. And client will request "result pages" by "page number argument", being sent to API RPC.

adubovikov commented 8 years ago

we close since all done.