Community DiscussionCan the live-serverlist be pimped?


08.08.2017, 20:29 - Dillmann - Administrator - 712 Posts
Cheers,

the output of the live-list, for example here, wake:
https://www.lost-soldiers.org/lgsl/?s=1
can that be pimped, so that you see the players instead in one block, sorted by score,
in 2 blocks (sorted by teams) and then sorted by score?

So for now, when i click this link i have to count the players on each side to know which side is underrated/has problems.
With 2 blocks it could easily be seen what is going on.


 
08.08.2017, 23:51 - S_h_a_r_k_93 - Administrator - 5351 Posts
Much like when you bring up the score tab in-game, basically? I don't know if we can customize those pages as we want actually. It should be possible but let's hear what 5tarLine says. Surely though I can tell you it'll be ranked low in the todo-list, in terms of priorities.

Staff Officer Italy S_h_a_r_k_93 

[url=https://shark.lost-soldiers.org#multimedia][bimg]https://i.imgur.com/iwPUBn7.png[/bimg][/url]   [size=4]All my contacts, social media and more!    [/size][size=5][url=https://shark.lost-soldiers.org]shark.lost-soldiers.org[/url][/size]

 
09.08.2017, 21:34 - Dillmann - Administrator - 712 Posts
S_h_a_r_k_93 wrote:

Much like when you bring up the score tab in-game, basically? I don't know if we can customize those pages as we want actually. It should be possible but let's hear what 5tarLine says. Surely though I can tell you it'll be ranked low in the todo-list, in terms of priorities.

Staff Officer Italy S_h_a_r_k_93 


For example, yes!
The function in this webproject delivers the (live-)information, if this is stored in a database the output could easily be sorted.
If it is not stored in a database -> than that should be the first step.


 
21.08.2017, 19:20 - StarLine - Administrator - 2085 Posts
Germany Dillmann - Firstly, It's great to see our Members taking an interest in ways the Website could be improved.

However, I'm afraid to inform you that this is not a new idea though, it has been on the to-do list since the beginning, I even started working on it sometime ago. smile

It sounds like you have a basic idea of some aspects of coding but in this case, you've gotten it a bit muddled up. When it comes to Live Information/Data it's senseless to store it in a Database because it's updating all of the time and that would simply generate an overhead of stress to the Backend/DB in terms of read requests and writes. You want Server Information to be accurate to within a few seconds of someone refreshing the page, not cached and stored in a DB to be updated every 5 or 10 minutes or whatever. Therefore, the data retrieved after the request is sent to a BF2 Server can simply be output live without the need of writing it to a DB.

For a long time, general consensus (if you Google around) would tell you that it was actually impossible to query certain information such as Kills from a Battlefield 2 Server in your browser. However, we now know that it is possible. It's unfortunately fairly complex code that I haven't fully gotten my head around or managed to achieve a working version of yet but it is something that is going to be done, no promises from me on an ETA currently though.

So in answer to your question, yes, the Live Server List can be 'pimped' and it will be OK

[ALIGN=center][nor]https://www.lost-soldiers.org/images/lsts.gif[/nor][/ALIGN]

 
22.08.2017, 16:44 - Dillmann - Administrator - 712 Posts
5tarLine wrote:

When it comes to Live Information/Data it's senseless to store it in a Database because it's updating all of the time and that would simply generate an overhead of stress to the Backend/DB in terms of read requests and writes. You want Server Information to be accurate to within a few seconds of someone refreshing the page, not cached and stored in a DB to be updated every 5 or 10 minutes or whatever. Therefore, the data retrieved after the request is sent to a BF2 Server can simply be output live without the need of writing it to a DB.


I think the data showed is 'live' by one request. I've seen no asynchronous calls there.
So how many request and visits does these pages have for example?
I don't think that
getData() -> storeDB() -> renderHTML()
would stresss the environment much at these times, whith this output.
If it comes to real 'live'-stats i am with you, but tbh i don't know the calls/output from that scripts that generate the page.

Thanks,
Dillmann

 
22.08.2017, 17:49 - StarLine - Administrator - 2085 Posts
Dillmann wrote:

I think the data showed is 'live' by one request. I've seen no asynchronous calls there.

You would be correct there and being tired when I wrote that I forgot to mention that it does have a small cache time currently, If I remember correctly I set it to 30 seconds, so it's not necessarily 'live' in the way that I mentioned would be best in my last post. A small Cache time is not such a bad thing either because it prevents someone using autopagerefreshers or anything else to Spam the BF2 Servers with requests. Basically, a request is sent to the Server's Query Ports and each response returned is a packet so yes, you are correct it is "one request", then the packet is parsed to extract the Data of course.

Dillmann wrote:

So how many request and visits does these pages have for example?

I can pull it up from the Stats, although we do get a fair bit of traffic (more than you may expect) it's probably negligible, especially with the cached data.

I'll revisit this and try and make some progress within the next month or so. You're more than welcome to help if you like mate. smile


[ALIGN=center][nor]https://www.lost-soldiers.org/images/lsts.gif[/nor][/ALIGN]