Thread: Timed Task System

Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16
  1. #11  
    Registered Member
    Tyluur's Avatar
    Join Date
    Jun 2010
    Age
    26
    Posts
    5,103
    Thanks given
    1,818
    Thanks received
    1,767
    Rep Power
    2438
    Quote Originally Posted by Intrice Joe View Post
    garbage take. it is far too easy to store things in a readable format these days for someone to use serialization for something they will store locally. in what world would you want to work with binary blobs over something more readable. it will be a pain to refactor, and you will have binary blobs sitting there that are of no use to query/look at/graph whatever (well unless of course you make special tooling but then...). why in the world would you store things as serialized objects this is 2021 people are literally spoonfeeding you better ways.

    scenario: you need to refactor a timed task or remove a timed task type.
    Serialization doesnt imply binary blobs - it's often very well readable. Jackson is a good library you can use to better achieve this.

    This is code from 2018 guys can we not linger on this xd.
    Quote Originally Posted by blakeman8192 View Post
    Keep trying. Quitting is the only true failure.
    Spoiler for skrrrrr:

    Attached image
    Reply With Quote  
     

  2. #12  
    Registered Member

    Join Date
    Nov 2014
    Posts
    253
    Thanks given
    39
    Thanks received
    146
    Rep Power
    248
    Quote Originally Posted by Tyluur View Post
    Serialization doesnt imply binary blobs - it's often very well readable. Jackson is a good library you can use to better achieve this.

    This is code from 2018 guys can we not linger on this xd.
    okay, I editted my previous post with tips but I guess it doesn't matter if this is old. Jackson doesn't require you to implement serializable, so that wasn't really what the discussion was about.
    Reply With Quote  
     

  3. #13  
    Registered Member
    Tyluur's Avatar
    Join Date
    Jun 2010
    Age
    26
    Posts
    5,103
    Thanks given
    1,818
    Thanks received
    1,767
    Rep Power
    2438
    Quote Originally Posted by Intrice Joe View Post
    okay, I editted my previous post with tips but I guess it doesn't matter if this is old. Jackson doesn't require you to implement serializable, so that wasn't really what the discussion was about.
    I was using matrix when I wrote this fwiw.
    Quote Originally Posted by blakeman8192 View Post
    Keep trying. Quitting is the only true failure.
    Spoiler for skrrrrr:

    Attached image
    Reply With Quote  
     

  4. #14  
    Registered Member
    Join Date
    Dec 2013
    Posts
    419
    Thanks given
    127
    Thanks received
    85
    Rep Power
    349
    Quote Originally Posted by Intrice Joe View Post
    garbage take. it is far too easy to store things in a readable format these days for someone to use serialization for something they will store locally. in what world would you want to work with binary blobs over something more readable. it will be a pain to refactor, and you will have binary blobs sitting there that are of no use to query/look at/graph whatever (well unless of course you make special tooling but then...). why in the world would you store things as serialized objects this is 2021 people are literally spoonfeeding you better ways.

    scenario: you need to refactor a timed task or remove a timed task type.

    OT: Not the way I would do this. Not a fan of relying on package names? to determine which classes belong to which task type. You keep digging yourself deeper and deeper into a pigeonhole when this is supposed to be "abstract". What about a task that happens every 4 hours, or whatever? Why do I need to add a bunch of infrastructure changes to support that? Why is the abstract task forcing you to provide a list of items (I get you can override the giveRewards, but still, why am I forced to implement rewards()). Why not have AbstractTask (everything) -> ItemRewardTask (for convenience, base class for those item reward ones). Your enum also has item rewards... like why are item rewards so heavily integrated into this for no reason.

    I would reccomend you take a step back and think "what is the engine here". The answer is: something that will assign/do something to each player based on some "clock time". First make that and then worry about the task stuff secondarily. Right now that is already poorly written and making your life difficult.
    There's no requirement to save a timed task in RSPS and the time and resources it takes to setup something that's in a readable format is unnecessary when persistence isn't a requirement. The data we store isn't of importance and it generally will be okay to discard if we can't use it anymore. The idea that I was stating was that we can keep the state of an object for the live server and on any planned update, discard the data entirely. It's just one use case and there backing is built into Java so it's more of a "hey, we can serialise and maintain state because it's free albeit not being required".
    Reply With Quote  
     

  5. #15  
    Registered Member

    Join Date
    Nov 2014
    Posts
    253
    Thanks given
    39
    Thanks received
    146
    Rep Power
    248
    Quote Originally Posted by Kiissmyswagb View Post
    There's no requirement to save a timed task in RSPS and the time and resources it takes to setup something that's in a readable format is unnecessary when persistence isn't a requirement. The data we store isn't of importance and it generally will be okay to discard if we can't use it anymore. The idea that I was stating was that we can keep the state of an object for the live server and on any planned update, discard the data entirely. It's just one use case and there backing is built into Java so it's more of a "hey, we can serialise and maintain state because it's free albeit not being required".
    so we're okay with the player's daily/weekly task being removed. either we're saving it or we're not. there is pretty much no extra effort required considering today's libraries
    Reply With Quote  
     

  6. #16  
    Registered Member
    Join Date
    Dec 2013
    Posts
    419
    Thanks given
    127
    Thanks received
    85
    Rep Power
    349
    Quote Originally Posted by Intrice Joe View Post
    so we're okay with the player's daily/weekly task being removed. either we're saving it or we're not. there is pretty much no extra effort required considering today's libraries
    I though we're talking about serialising objects not a single date/time attribute
    Reply With Quote  
     

Page 2 of 2 FirstFirst 12

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. Buying Daily Tasks & New person task system
    By JAVA GURU #1023 in forum Buying
    Replies: 2
    Last Post: 03-19-2012, 12:37 AM
  2. My Task System Interface [VIEWS/COMMENTS?]
    By Rage in forum Show-off
    Replies: 4
    Last Post: 01-22-2012, 07:34 AM
  3. Task System.
    By Sir Tom in forum Snippets
    Replies: 7
    Last Post: 12-25-2011, 11:22 PM
  4. Task System Interface
    By Archspire in forum Snippets
    Replies: 23
    Last Post: 11-10-2011, 12:21 AM
  5. Slayer Task System.
    By Bando in forum Snippets
    Replies: 5
    Last Post: 08-17-2010, 07:36 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
  •