Giter VIP home page Giter VIP logo

Comments (5)

kvishnivetsky avatar kvishnivetsky commented on July 17, 2024

Another solution is to change DB design from "large, flat table with TEXT(call-id,tags,from/to users) searches on it", to a set of tables, reflecting possible search criteria. The purpose of this is to substitute "text search" with "integer JOINING" and subset of special, optimized, criteria dependent queries. It will make more complex WRITE operation, but will make "lighter" READing.

from homer-api.

adubovikov avatar adubovikov commented on July 17, 2024

yes, this can be bad for "NORMAL DB" operation, but here we are talking about calls/registrations transactions. So, how it works in the real life:

  1. NOC has a ticket: calls or registrations doesn't work.
    2.
    a. NOC checks calls OR registrations ( first logical sharding) + time range (second logical sharding)
    or
    b. NOC can search in all transactions(call, registrations, rest) for specific the time range (logical sharding) + user id (RURI, FROM, PAI) (index scope)

in the both cases the result will be smaller than this limit and will absolutely compatible with "NOC's logic"

create temporally mysql's table and do order/limit inside make for me no sense, because much quicker and better manipulate with results inside php: concatenate results and do sorting (we do usort already). This is also correct way for multiple DB nodes.

maximum that we can do, it's create special API call and do inside aggregation for each transaction with original limit, sort it and return limited data.

from homer-api.

kvishnivetsky avatar kvishnivetsky commented on July 17, 2024

Ok, thanks. Now I see and will assume "NOC logic" as a basement.
It seems to me, that I am to implement a solution with "aggregation and sorting inside of PHP scripts" to match user's expectations.

BTW: I think, it would be great to release a document with "NOC logic" description in git repo to prevent such questions in future. A simple "How to".

from homer-api.

adubovikov avatar adubovikov commented on July 17, 2024

sure, we will do it asap, please don't hesitate contact me in gtalk :-) we can also discuss there.

from homer-api.

kvishnivetsky avatar kvishnivetsky commented on July 17, 2024

Ok. See you there.

from homer-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.