Page 3 of 4

Re: Client source upgrade - most than just a new look

Posted: Sun Sep 11, 2016 3:34 am
by Swing set
It's a good think you don't need to work on client startup time. :jiggly:

Image

Re: Client source upgrade - most than just a new look

Posted: Sun Sep 11, 2016 3:42 am
by Hayden
what's gonna happen to all the old glitches that have been reported? will they still need to be fixed?

Re: Client source upgrade - most than just a new look

Posted: Sun Sep 11, 2016 8:11 am
by Mike
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
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.



Or am I missing something? :P

Hayden wrote:what's gonna happen to all the old glitches that have been reported? will they still need to be fixed?
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.

Re: Client source upgrade - most than just a new look

Posted: Sun Sep 11, 2016 11:55 am
by Rapsey
Mike wrote:
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
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.



Or am I missing something? :P
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. ;)

Re: Client source upgrade - most than just a new look

Posted: Sun Sep 11, 2016 4:54 pm
by Skiller
Rapsey wrote:
Mike wrote:
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
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.



Or am I missing something? :P
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. ;)

Rapsey gets me lol

Thanks for the explanation! Just was curious, the comp sci major in me :p

Re: Client source upgrade - most than just a new look

Posted: Mon Sep 12, 2016 7:55 am
by Donderstone2
Jeremy wrote:Rapsey gets me lol

Thanks for the explanation! Just was curious, the comp sci major in me :p
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.

Re: Client source upgrade - most than just a new look

Posted: Mon Sep 12, 2016 4:35 pm
by Ryuui
Donderstone2 wrote:
Jeremy wrote:Rapsey gets me lol

Thanks for the explanation! Just was curious, the comp sci major in me :p
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.
Image

Re: Client source upgrade - most than just a new look

Posted: Mon Sep 12, 2016 5:33 pm
by Skiller
Donderstone2 wrote:
Jeremy wrote:Rapsey gets me lol

Thanks for the explanation! Just was curious, the comp sci major in me :p
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.
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.

Re: Client source upgrade - most than just a new look

Posted: Mon Sep 12, 2016 7:32 pm
by Rapsey
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.

Re: Client source upgrade - most than just a new look

Posted: Mon Sep 12, 2016 9:16 pm
by Skiller
Rapsey 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.
Good to know, thanks Rapsey :)