Thread: Cache Updating

Results 1 to 9 of 9
  1. #1 Cache Updating 
    Registered Member
    Join Date
    May 2017
    Posts
    77
    Thanks given
    18
    Thanks received
    28
    Rep Power
    51
    I've got a question. How does RuneScape request a cache download? Does it check the sizes of the indices, then update those specific indices? Does it just check for revision of the cache and then request an update? I'm wanting to know how this works if anyone has knowledge over it.
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Nov 2014
    Posts
    40
    Thanks given
    17
    Thanks received
    32
    Rep Power
    120
    Basically the cache/filesystem updating consists of a few steps. First, the client requests the checksum table, which is requested through archive 255, file 255. This file contains checksums of all the reference tables. Each index has it's own reference table. The reference table contains metadata about the index and the archives in the index. Such as the names of the archives (if applicable), but also the archive versions.

    It's something like this:
    1. Request checksum table
    2. Compare local reference tables to the checksum table
    3. If any reference tables are outdated, request the updated tables
    4. Diff archives to the reference table, if any archive is outdated, update
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Registered Member
    Join Date
    May 2017
    Posts
    77
    Thanks given
    18
    Thanks received
    28
    Rep Power
    51
    Quote Originally Posted by techdaan View Post
    Basically the cache/filesystem updating consists of a few steps. First, the client requests the checksum table, which is requested through archive 255, file 255. This file contains checksums of all the reference tables. Each index has it's own reference table. The reference table contains metadata about the index and the archives in the index. Such as the names of the archives (if applicable), but also the archive versions.

    It's something like this:
    1. Request checksum table
    2. Compare local reference tables to the checksum table
    3. If any reference tables are outdated, request the updated tables
    4. Diff archives to the reference table, if any archive is outdated, update
    Okay, that makes complete sense. All I needed, thanks!
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  5. #4  
    Chemist

    Advocatus's Avatar
    Join Date
    Dec 2009
    Age
    28
    Posts
    2,527
    Thanks given
    192
    Thanks received
    747
    Rep Power
    1315
    The following link is applicable as an overview for post 400 revisions (including OSRS).
    [Only registered and activated users can see links. ]

    Prior to that they used either http or jaggrab to fetch the contents of index (0) which contained the crc/versioning information for the other indexes. They then would request the files.
    Quote Originally Posted by blakeman8192 View Post
    Quitting is the only true failure.
    Reply With Quote  
     

  6. Thankful user:


  7. #5  
    Registered Member
    Join Date
    May 2017
    Posts
    77
    Thanks given
    18
    Thanks received
    28
    Rep Power
    51
    Both very helpful.
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  8. #6  
    Registered Member

    Join Date
    Feb 2010
    Posts
    3,155
    Thanks given
    1,112
    Thanks received
    812
    Rep Power
    1401
    specifically the crcs for the other indexes on the old version are in what the client calls a versionlist or update list (jagex use both), by the time it gets these it would already have the crcs for idx0
    Reply With Quote  
     

  9. #7  
    Registered Member

    Join Date
    Nov 2014
    Posts
    40
    Thanks given
    17
    Thanks received
    32
    Rep Power
    120
    On another note, I'd highly recommend you to figure out which version your client is, and using the information in this thread + linked threads, fully understand the protocol your client uses. It's very useful to know exactly what your server does, and why it does what it does. Refactoring the client can get you a lot of useful information As you can see some of the specifics of the protocol change over time (in fact in RS3#916 they changed some of the js5 protocol).
    Reply With Quote  
     

  10. #8  
    Registered Member
    Join Date
    May 2017
    Posts
    77
    Thanks given
    18
    Thanks received
    28
    Rep Power
    51
    Actually, I've got another question. So, you can't send but a limited amount of bytes over the pipeline at a time, so how is the data that is over let's say..2048 bytes sent over? For example, file 17 from index 3 is requested, but the size of it is 100,000 bytes. How is that segmented through the pipeline?

    This particular question isn't necessarily runescape related.
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  11. #9  
    Programmer, Veteran and Respected Member



    Join Date
    Mar 2007
    Posts
    5,052
    Thanks given
    2,615
    Thanks received
    3,506
    Rep Power
    5000
    Quote Originally Posted by Dragonsevery View Post
    So, you can't send but a limited amount of bytes over the pipeline at a time
    RuneScape uses TCP. You can send as much as you like over a TCP stream at a time, the TCP stacks on each end of the connection will ensure the sender slows down if the receiver can't cope - if you're using blocking I/O, the write() calls will start blocking. If you're using non-blocking I/O, you'll stop receiving write readiness notifications from mechanisms like epoll (and in non-blocking code you need to start thinking about backpressure yourself - see [Only registered and activated users can see links. ]). The actual amount of traffic you have in-flight at once will depend on the size of buffers (on each end as well as in intermediate network devices) and the bandwidth/latency of the connection.

    Quote Originally Posted by Dragonsevery View Post
    so how is the data that is over let's say..2048 bytes sent over? For example, file 17 from index 3 is requested, but the size of it is 100,000 bytes. How is that segmented through the pipeline?
    In JS5, the file is split into 511 byte blocks, with each one prefixed by a 0xFF byte. I believe later versions of JS5 used by RS3 have a much larger block size.

    However, as stated above, you can attempt to send as much data as you like at once. There's no fixed limit and the TCP stack will ensure you slow down such that the data is fed in at an appropriate rate to avoid overloading the network.
    .
    Reply With Quote  
     

  12. Thankful users:



Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Requesting Cache Updates via Web.
    By dont frunt in forum Help
    Replies: 0
    Last Post: 05-23-2009, 05:11 AM
  2. Replies: 26
    Last Post: 02-07-2009, 05:02 AM
  3. Newer 508 cache update keys
    By Graham in forum Configuration
    Replies: 8
    Last Post: 08-31-2008, 08:29 AM
  4. I Need a client cache updater
    By Pride in forum Requests
    Replies: 0
    Last Post: 07-01-2008, 09:44 AM
  5. Replies: 27
    Last Post: 06-02-2008, 08:31 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •