Client source upgrade - more than just a new look

PkHonor's work in progress and future updates will be posted here.
User avatar
Swing set
Premium Donator
Posts: 1001
Joined: Tue Apr 16, 2013 9:22 pm

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

Post by Swing set » Sun Sep 11, 2016 3:34 am

It's a good think you don't need to work on client startup time. :jiggly:

Image
Image

Hayden
Elite
Posts: 14260
Joined: Fri Aug 16, 2013 7:20 am
Location: Canada

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

Post by Hayden » Sun Sep 11, 2016 3:42 am

what's gonna happen to all the old glitches that have been reported? will they still need to be fixed?

User avatar
Mike
Programmer
Posts: 6346
Joined: Sun Nov 01, 2009 8:00 pm
Location: PkHonor HQ

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

Post by Mike » Sun Sep 11, 2016 8:11 am

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.

User avatar
Rapsey
Sysadmin
Posts: 5505
Joined: Tue Dec 01, 2009 8:00 am
Location: Belgium

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

Post by Rapsey » Sun Sep 11, 2016 11:55 am

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. ;)

User avatar
Skiller
Developer
Posts: 2030
Joined: Fri Jun 05, 2015 11:50 pm
Location: Generally ::skilling

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

Post by Skiller » Sun Sep 11, 2016 4:54 pm

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
Image

Donderstone2
Programmer
Posts: 852
Joined: Tue Apr 02, 2013 1:01 pm

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

Post by Donderstone2 » Mon Sep 12, 2016 7:55 am

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.

User avatar
Ryuui
Wise One
Posts: 966
Joined: Wed Dec 04, 2013 4:35 pm

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

Post by Ryuui » Mon Sep 12, 2016 4:35 pm

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
Image

User avatar
Skiller
Developer
Posts: 2030
Joined: Fri Jun 05, 2015 11:50 pm
Location: Generally ::skilling

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

Post by Skiller » Mon Sep 12, 2016 5:33 pm

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.
Image

User avatar
Rapsey
Sysadmin
Posts: 5505
Joined: Tue Dec 01, 2009 8:00 am
Location: Belgium

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

Post by Rapsey » Mon Sep 12, 2016 7:32 pm

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.

User avatar
Skiller
Developer
Posts: 2030
Joined: Fri Jun 05, 2015 11:50 pm
Location: Generally ::skilling

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

Post by Skiller » Mon Sep 12, 2016 9:16 pm

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 :)
Image

Locked