software-space / qiyana-api

Backend for Qiyanna
Apache License 2.0
1 stars 1 forks source link

Return basic information for summoner. #4

Open fastboyz opened 5 years ago

fastboyz commented 5 years ago

When we receive of request for a summoner's name, we should return some basic data concerning that summoner like:

Marcarrian commented 5 years ago

we should still be able to aggregate the matches of that summoner in the background

This is a design that we definitely have to talk about. When i call our API i expect a request to be made to our own database and not the Riot API (doesn't matter if it's through orianna or not).

However, there should be "update" functions for the controllers that only pull the data from the Riot API and save it into our database. This way we have the logic decoupled in a nice way.

In our own database we could also save an updateDate per summoner. Kind of like op.gg has it where you have to manually update.

fastboyz commented 5 years ago

we should still be able to aggregate the matches of that summoner in the background

This is a design that we definitely have to talk about. When i call our API i expect a request to be made to our own database and not the Riot API (doesn't matter if it's through orianna or not).

However, there should be "update" functions for the controllers that only pull the data from the Riot API and save it into our database. This way we have the logic decoupled in a nice way.

When a request is made to our API, if we use Orianna, in theory it should 1st check if what we are trying to query is in it's memory cache, if it is not there, then i will send a request to the Riot API. But I'm think that if the memory cache has expired, even if the data we are looking for in already in our database, it will still send the request to Riot. I will contact the Devs of Orianna to make sure.

As for the update function, I think it is different from the aggregation. The way I see it, the aggregation is a way to get a lot of data in the beginning in order to offer viable statistics. After we have passes a certain threshold, We should work only with an update just like you proposed. Also the aggregation only gathers old games form the moment of the request.

fastboyz commented 5 years ago

awnser

Here is the awnser from the Orianna dev.

Marcarrian commented 5 years ago

Okay I understand it better now. I'm gonna take some time to read the Orianna docs and that would clear some things too im sure

Marcarrian commented 5 years ago

I will start working on this.

Marcarrian commented 5 years ago

I updated the issue to not include the match history as we discussed.

fastboyz commented 5 years ago

Moving this issue to the backend