FAST APIS WHICH CONNECT THE DOTS OF YOUR SOFTWARE

FAST APIS WHICH CONNECT THE DOTS OF YOUR SOFTWARE

SQL could definitely be considered one of the first APIs. 40 years of database design, implementation, and access has a lot to teach about how consumers request and use data. 

For whom we need to design fast API?

Yes, Users is the answer.

Remember that we Users are very impatient creatures. We all want things to happen immediately, and will seek out alternative API services if the performance is too bad.

First we should know Latency and Througput.

Latency means time waiting for the data and Throughput means amount of raw data.

Wonder How it works? check this out:

https://github.com/colin-scott/interactive_latencies

so, we know who is the winner? Yes u are right its the API with minimum latency. NANOSECONDS.

Can it be possible with SQL or NOSQL?

See am fan of both, but when I talk about consistency, simple and pattern I love NOSQL. We made the site 31bhog.com with NOSQL. Rather than being tied to a traditional structure of tables, NoSQL process structure data in a way which reflects how the user is accessing it. If the user is getting key/value pairs, a key/value store makes sense. Likewise, if the user is retrieving a bunch of graph data, use a data store that is able to easily handle graph data.

Here we go with my Tips:

  • Never make humans wait, be it the end-user or the developer. Prioritize latency over throughput.
  • Give consumers full access over what to fetch, and don’t tie them to pre-determined data fields. 
  • Emulate SQL’s EXPLAIN method & let users know how exactly the database will execute their query. Then they can see what may be slowing things down and correct it themselves.
  • If impossible to offer full access, optimize your API for common access patterns.
  • Make it easy for users to fetch all the data they need in one go, rather than looping multiple requests.
  • Design the API to cache data locally.
  • Design the API to study access logs and prefetch relevant data accordingly as this impacts the perceived speed of fetching without changing throughput.
  • Learnings from the NoSQL movement: model data structure on data access patterns; and that users want consistency more than the fastest (or the slowest) speeds possible


No alt text provided for this image






要查看或添加评论,请登录

Gaurav Sharma的更多文章

  • Great athletes don’t play for money or glory. They play for a feeling that is something beyond.

    Great athletes don’t play for money or glory. They play for a feeling that is something beyond.

    In my last article, I informed about Team Player character of Rahul Dravid. Interviewer: How do you prepare for a…

  • MY HERO: RAHUL DRAVID: DAY 1

    MY HERO: RAHUL DRAVID: DAY 1

    Good Morning !! Series on My Observation regarding Rahul Dravid. Day 1: ‘You have to become a team player before…

    1 条评论
  • Get Your Literacy rate Higher with this Android Article.

    Get Your Literacy rate Higher with this Android Article.

    What does API Level mean? How to use compileSdkVersion, minSdkVersion or targetSdkVersion? This is the must question…

  • Guru Gobind Singh Ji: Happy Birthday: REAL CEO

    Guru Gobind Singh Ji: Happy Birthday: REAL CEO

    “All progress is born of enquiry. Doubt is often better than over confidence for it leads to enquiry, and enquiry leads…

  • RECAP 2019: HOW MANY DOTS CONNECTED?

    RECAP 2019: HOW MANY DOTS CONNECTED?

    Amazing Year 2019!! Reasons are Many!! Connecting The Dots Existing clients doing Amazing Sales, New clients…

    4 条评论
  • Unlocking Product Value with API ERROR Management

    Unlocking Product Value with API ERROR Management

    When CTDWORLD.CO was working with Sikkim Chief Minister for their reputed Mobile Application the most Important thing…

  • API IS SOUL: PART 2

    API IS SOUL: PART 2

    Ecosystems will always win as it's harder to build but easier to change. It’s this flexibility that makes ecosystems so…

  • API IS SOUL: PART 1

    API IS SOUL: PART 1

    "The API should enable developers to do one thing really well. It’s not as easy as it sounds, and you want to be clear…

  • Android Developer

    Android Developer

    Hello All, I had spent 9 years in IT and worked with 44 companies of Fortune 500 and will tell you how fresher learn…

社区洞察

其他会员也浏览了