8000 Search function · Issue #2 · RoyDefined/WebDoomer · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Search function #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
R3V3N93 opened this issue Apr 9, 2024 · 2 comments
Open

Search function #2

R3V3N93 opened this issue Apr 9, 2024 · 2 comments
Assignees
Labels
area-frontend The issue is related to the frontend of the application type-feature The issue is a feature proposal

Comments

@R3V3N93
Copy link
R3V3N93 commented Apr 9, 2024

Is your feature request related to a problem? Please describe.

  • Lack of ability to find the server I desire to play at proficiently may cause wasting time.

Describe the solution you'd like
image

UI side
  • placing search box on right top side of the screen should work.
Technical side
  • I wonder if parsing every possible server including the desired keyword to find will be explensive.

Describe alternatives you've considered

  • Filter system, so that you can find your server by confining the list of servers
  • Possible filter options : PWads(I remember you said filtering via string input was difficult, but not sure how), engine, gamemode, IWAD, and so on.
@R3V3N93 R3V3N93 added the type-feature The issue is a feature proposal label Apr 9, 2024
@RoyDefined RoyDefined changed the title [FEATURE] Search function Search function Apr 10, 2024
@RoyDefined
Copy link
Owner

Probably a good idea to start with this and eventually create a general search system allowing for multiple filters such as searching by wads and such.
The main challenge with this is how I would fetch the actual servers that meet whatever criteria is being searched for.

To give an idea, the current system fetches a list of SQIDs that can be decoded into an IP and port:

public readonly getServerIds = this.effect((trigger$) =>

Then a list of servers is requested based on how many servers are visible in the virtual list that are unfetched:

public readonly updateListedServersByRangeAndDirection = this.effect((data$: Observable<{ range: ListRange; direction: 'up' | 'down' }>) =>

Finally the servers are patched with their new data and the list can show properly. You also got another step when you open the server details but this is unrelated.

I want to fetch as little data as possible in order to keep loading time at a minimum. What I could do is send a search criteria to the server, have the server filter the servers in memory, and then return just the SQID from these servers. Then the frontend can update the virtual list, which in turn triggers and asks for the list of servers which is now updated to show only the servers that meet the criteria.

I believe the fetching of servers works fine even if part of these servers are already fetched. The main thing I need to implement is a way to indicate what servers should actually shown and which ones are fetched/unfetched. Currently I just have a single list of fetched/unfetched servers and I use this for both the fetching of new servers and showing the servers. I can't use this because there would be no way to properly indicate what servers to show without throwing away the whole list.

@RoyDefined RoyDefined added the area-frontend The issue is related to the frontend of the application label Apr 11, 2024
@RoyDefined
Copy link
Owner

With 42eb7f9 stage 1 of the search feature has now been properly implemented.
To comment on my previous comment here; I have decided to put this out in stages and not implement the second list as this is purely for improving the data size returned and this is already very little by itself. The rest of the system works exactly as specified, where search queries return a list of SQIDs and the virtual list will then fetch the servers it expects to show. In the second stage I can look into implementing this second list and possibly also introduce more filter features if fitting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-frontend The issue is related to the frontend of the application type-feature The issue is a feature proposal
Projects
None yet
Development

No branches or pull requests

2 participants
0