Re: Client source upgrade - most than just a new look
Posted: Sun Sep 11, 2016 3:34 am
It's a good think you don't need to work on client startup time.
The community-driven RuneScape Private Server
https://forums.pkhonor.net/
Actually, I don't think that's even possible, because when someone is placing an offer (or searching through the current offers), the GE needs to have all active offers loaded into memory, not just the ones for that one player. Whenever a new offer is placed, it needs to search through all current offers to see if any of them match the item and price offer, right? Might as well do that on server startup then, especially since the amount of data is actually pretty small.Jeremy wrote:What I'm saying is load them when someone clicks on the grand exchange. if I click 'see buy offers', load it for me then. No need to load it before then, right?
If you think the change wouldn't be significant or enough to lazy load it, I'll trust you you've certainly got more experience than I lol
Depends whether they're client-or server-sided. Some client glitches might still persist (and a couple of new ones pop up) but I'm hoping this new client will have some glitches fixed already. As for the server-sided ones, unless I specifically included fixes in the release, those will still need to be taken care of.Hayden wrote:what's gonna happen to all the old glitches that have been reported? will they still need to be fixed?
I think he either meant load all the offers every time someone opens GE, or load only the relevant offers (e.g. someone searches for divine spirit shield, we load only the GE offers for that item). The reason we don't do it this way is because it requires interaction with the database, which is an external resource. Its performance is affected by other look-ups, database backups etc. To guarantee instant results for the player we do the GE interaction in server memory and synchronize the GE database in the background. That way we can also show instant search results with every letter you type.Mike wrote:Actually, I don't think that's even possible, because when someone is placing an offer (or searching through the current offers), the GE needs to have all active offers loaded into memory, not just the ones for that one player. Whenever a new offer is placed, it needs to search through all current offers to see if any of them match the item and price offer, right? Might as well do that on server startup then, especially since the amount of data is actually pretty small.Jeremy wrote:What I'm saying is load them when someone clicks on the grand exchange. if I click 'see buy offers', load it for me then. No need to load it before then, right?
If you think the change wouldn't be significant or enough to lazy load it, I'll trust you you've certainly got more experience than I lol
Or am I missing something?
Rapsey wrote:I think he either meant load all the offers every time someone opens GE, or load only the relevant offers (e.g. someone searches for divine spirit shield, we load only the GE offers for that item). The reason we don't do it this way is because it requires interaction with the database, which is an external resource. Its performance is affected by other look-ups, database backups etc. To guarantee instant results for the player we do the GE interaction in server memory and synchronize the GE database in the background. That way we can also show instant search results with every letter you type.Mike wrote:Actually, I don't think that's even possible, because when someone is placing an offer (or searching through the current offers), the GE needs to have all active offers loaded into memory, not just the ones for that one player. Whenever a new offer is placed, it needs to search through all current offers to see if any of them match the item and price offer, right? Might as well do that on server startup then, especially since the amount of data is actually pretty small.Jeremy wrote:What I'm saying is load them when someone clicks on the grand exchange. if I click 'see buy offers', load it for me then. No need to load it before then, right?
If you think the change wouldn't be significant or enough to lazy load it, I'll trust you you've certainly got more experience than I lol
Or am I missing something?
Tbh as a comp sci you should know that live searches should never be done with DB interaction (at least not always, perhaps only for a first time search) because that is quite the load you'll be having on your DB.Jeremy wrote:Rapsey gets me lol
Thanks for the explanation! Just was curious, the comp sci major in me :p
Donderstone2 wrote:Tbh as a comp sci you should know that live searches should never be done with DB interaction (at least not always, perhaps only for a first time search) because that is quite the load you'll be having on your DB.Jeremy wrote:Rapsey gets me lol
Thanks for the explanation! Just was curious, the comp sci major in me :p
See, the internship I had this summer taught me otherwise. Perhaps the scale here isn't large enough to handle it, but with thousands of users on the system I was using, lazy loading from the DB with web calls was not only expected but encouraged.Donderstone2 wrote:Tbh as a comp sci you should know that live searches should never be done with DB interaction (at least not always, perhaps only for a first time search) because that is quite the load you'll be having on your DB.Jeremy wrote:Rapsey gets me lol
Thanks for the explanation! Just was curious, the comp sci major in me :p
Good to know, thanks RapseyRapsey wrote:There's plenty of suitable scenarios for either approach, although in a game server lazy loading is usually not the way to go. You can pretty much load all the important data on login and it's not that much to keep in memory so there isn't much need for it anyway.