Skip to content
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

Add new Palworld query implementation #556

Closed
wants to merge 1 commit into from

Conversation

CosminPerRam
Copy link
Member

@CosminPerRam CosminPerRam commented Mar 8, 2024

(This is WIP, not done)

Closes #555.

In 0.1.5, Palworld has seemingly stopped using EOS for the servers list, instead option for an in-house solution, api endpoint here.

As of writing this message, we don't have any documentation regarding this endpoint, although we know that:

  • There is also a /search endpoint (e.g. /server/search?q=MyServer) but it doesn't also look in the address/port fields.
  • The list is paginated (fixed 500 entries per page).

Our initial solution could be:
As the user provides the ip and port, we can query for the first page of the list, look through it and return the data if present there, if not, just repeat until there is not pages left.

This is very bad to do as its an O(n) solution, where every operation is a HTTP request and takes a considerable amount of time and it comes down to luck whether your server is at the top or bottom of the list.

A potential thing that could help here is to also pass a name field that would be passed to the search endpoint, further narrowing down the list.

Would be glad to hear opinions on this or possible improvements/news.

@CosminPerRam
Copy link
Member Author

I have also emailed them regarding this matter.

@xstar97
Copy link

xstar97 commented Mar 9, 2024

The /server/search endpoint currently restricts additional query parameters directly at the route level, focusing solely on the name field. However, once the response is received, further filtering is possible using additional query params on the response instead of the route.

i have an example in my go code on how this done; https://github.com/xstar97/palworld-query-api/blob/main/internal/routes/api.go

@dkoz
Copy link

dkoz commented Mar 9, 2024

Maybe they would be so kind to add IP filtering too.

@jonathanprl
Copy link
Contributor

It's also possible to get server information from the API via the world GUID, which is found in a file after the server runs for the first time. Not really ideal either but at least it doesn't require searching by name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Palworld broken after update
4 participants