Git Product home page Git Product logo

Comments (7)

sarabveer avatar sarabveer commented on June 3, 2024

Only the :query is required, if you need to specifiy something specific then you use the additional options.

from api-public.

bogas04 avatar bogas04 commented on June 3, 2024

I think you misunderstood the point.

Say I only want lineno & Gurmukhi for any route, then API could accept some more params to trim response based on the fields asked by the user. This will help small and large applications to spend less time on HTTP requests.

Something like

/shabad/123?only=lineno,gurmukhi
this gives only gurmukhi and lineno in response

/shabad/123?ignore=shabadid,gurmukhi
this gives everything except shabadid & gurmukhi

from api-public.

sarabveer avatar sarabveer commented on June 3, 2024

In the modern world, reducing that much data wont do much. My API is behind cloudflare which caches the results in its CDNs all over the world.

from api-public.

bogas04 avatar bogas04 commented on June 3, 2024

It does matter when you have a lot of requests, in cases like search or angs with a lot of lines.

For example search results page would only want to show gurmukhi and english translation.

Do remember that third world countries still have 2G as their average speed and it too is flaky at times.

from api-public.

sarabveer avatar sarabveer commented on June 3, 2024

My API is behind cloudflare which caches the results in its CDNs all over the world. The requests don't directly come from my server in New York City.

from api-public.

bogas04 avatar bogas04 commented on June 3, 2024

That only solves the load on server and not on client.

Note that data is one part (might not be an issue for west), but processing that data is also an issue. Cheap-ass android phones with slow browsers still need to deal with arrays of huge strings.

I insist to re-consider only & ignore params, not to be implemented immediately but at least in future.

from api-public.

sarabveer avatar sarabveer commented on June 3, 2024

Continued on #19

from api-public.

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.