cacrespo / cacrespo/pytimeline

Should we retrieve data once or twice?

Open
#42 0 comments 0 reactions 0 assignees View on GitHub
question single player
Dominant language
Python
Stars
1
Forks
6
PR merge metrics
No merged PRs in 30d

Description

Currently, we access card information when the game class is instantiated. The selected ID order is passed to 'single_player_end' using the POST method. However, only the order is passed, and not the rest of the information (such as the correct order or the year values). With these IDs, we retrieve the database again to evaluate the game's result.
Is it a better option (in terms of good practices, security, costs, efficiency...) to make only one request with all the information and then proceed through all the steps?

Contributor guide

Open the contributing guide

Research direction

Start by tracing where card information is loaded during game-class instantiation and where the selected ID order reaches single_player_end through POST. Compare the data available at each step, including the database lookup and the security, cost, and efficiency trade-offs. Done requires a decided retrieval approach and an agreed scope for changing this flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend, database
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.