Thread: Player xferring

Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 36
  1. #21  
    Registered Member
    Join Date
    Dec 2013
    Posts
    318
    Thanks given
    109
    Thanks received
    72
    Rep Power
    309
    Quote Originally Posted by Fire Cape View Post
    Storing data is not the same as managing it. Json is good for read-only configuration files. For data that is managed constantly (think about constant read-write operations of players loading and saving files) you should use a database. I don't know what crap databases you are using because they are portable and easier is no reason to prefer an inferior technical approach, it would be easier to use IO than NIO but all modern servers use NIO because of performance.
    Players are not constantly being saved and updated. They are loaded on login and then saved on logout. The duration between this time could be ages.

    I'm not using any "crap" databases. If you used Oracle SQL and want to migrate to MariaDB you can't just simply export your table and expect it to magically work. Even if you could, you can't easily move your database to another host entirely without exporting the entire thing and then importing it into the new systems. That's just how a database is. Next up security; databases are way more vulnerable especially if you have remote access. Performance; opening a connection to a database and running queries is far more expensive than just editing a json file. Your database is also locked until the connection is released.

    An addition to your point; Adobe often store their program data in JSON formats. Adobe Animations entire project file can be saved as a JSON (I think it's Animation, may be wrong, or one of their products).

    I do agree that SQL is a better approach for player saving but there's no way we can say that JSON is a bad idea or inferior.
    Look at how XML is used in the real world.
    Reply With Quote  
     

  2. #22  
    Registered Member

    Join Date
    Feb 2010
    Posts
    3,187
    Thanks given
    1,124
    Thanks received
    834
    Discord
    View profile
    Rep Power
    1514
    Quote Originally Posted by Kiissmyswagb View Post
    Players are not constantly being saved and updated. They are loaded on login and then saved on logout. The duration between this time could be ages.

    I'm not using any "crap" databases. If you used Oracle SQL and want to migrate to MariaDB you can't just simply export your table and expect it to magically work. Even if you could, you can't easily move your database to another host entirely without exporting the entire thing and then importing it into the new systems. That's just how a database is. Next up security; databases are way more vulnerable especially if you have remote access. Performance; opening a connection to a database and running queries is far more expensive than just editing a json file. Your database is also locked until the connection is released.

    An addition to your point; Adobe often store their program data in JSON formats. Adobe Animations entire project file can be saved as a JSON (I think it's Animation, may be wrong, or one of their products).

    I do agree that SQL is a better approach for player saving but there's no way we can say that JSON is a bad idea or inferior.
    Look at how XML is used in the real world.
    You might not be saving and loading individual players but you are possibly saving and loading players at the same time.

    I don't really understand your point about migrating from Oracle SQL to MariaDB. That's like saying my JSON doesn't work because it isn't XML. In the ordinary meaning of the word 'portability' as in platform-independence, SQL is as portable as the implementation, and there are portable options.

    Yes databases can be unsecure, as can storing data via JSON. You still require remote access (the data needs to be sent either way).

    I also don't see your point about 'opening a connection to a database and running queries is far more expensive than editing a json file'. This is not about editing the file (though I have never had any problems, with ORM you barely have to deal with the SQL directly anyway), and retrieval via SQL is by no means slow.

    I also don't see why you say JSON is more secure and then point out that SQL has database locking. This is a security measure.

    I'm sure Adobe use JSON for a lot, as do many professional companies. I use it myself, just not for player saving.
    Reply With Quote  
     

  3. #23  
    Registered Member
    Join Date
    Dec 2013
    Posts
    318
    Thanks given
    109
    Thanks received
    72
    Rep Power
    309
    Quote Originally Posted by Fire Cape View Post
    You might not be saving and loading individual players but you are possibly saving and loading players at the same time.

    I don't really understand your point about migrating from Oracle SQL to MariaDB. That's like saying my JSON doesn't work because it isn't XML. In the ordinary meaning of the word 'portability' as in platform-independence, SQL is as portable as the implementation, and there are portable options.

    Yes databases can be unsecure, as can storing data via JSON. You still require remote access (the data needs to be sent either way).

    I also don't see your point about 'opening a connection to a database and running queries is far more expensive than editing a json file'. This is not about editing the file (though I have never had any problems, with ORM you barely have to deal with the SQL directly anyway), and retrieval via SQL is by no means slow.

    I also don't see why you say JSON is more secure and then point out that SQL has database locking. This is a security measure.

    I'm sure Adobe use JSON for a lot, as do many professional companies. I use it myself, just not for player saving.
    The Oracle to Maria DB was a comparison to how JSON can easily be converted to XML (for example) and with minimal effort.

    JSON is an offline file format so I don't understand the remote access. If you're calling it via a REST API, SSL could solve most your problems.

    You still have to write your select query's with ORM.

    Running a query is slower than opening a file.

    But like I said, although SQL is a better approach, there's no need to deny JSON or the recommendations.
    Reply With Quote  
     

  4. #24  
    Registered Member

    Join Date
    Feb 2010
    Posts
    3,187
    Thanks given
    1,124
    Thanks received
    834
    Discord
    View profile
    Rep Power
    1514
    Quote Originally Posted by Kiissmyswagb View Post
    The Oracle to Maria DB was a comparison to how JSON can easily be converted to XML (for example) and with minimal effort.

    JSON is an offline file format so I don't understand the remote access. If you're calling it via a REST API, SSL could solve most your problems.

    You still have to write your select query's with ORM.

    Running a query is slower than opening a file.

    But like I said, although SQL is a better approach, there's no need to deny JSON or the recommendations.
    Yes but why do you need to convert from Oracle SQL to Maria DB? To me that is like saying Java is bad because it is hard to convert it to C#. Why are we even migrating in the first place?

    There are still security implications of storing data in JSON format. This is client-server after all.

    Indeed you do.

    My big question to you is why you even need to edit player files manually? That sounds like bad design. That is the main reason I would use SQL over JSON. I use JSON for configuration that I am likely to change manually.
    Reply With Quote  
     

  5. #25  
    Registered Member
    Join Date
    Dec 2013
    Posts
    318
    Thanks given
    109
    Thanks received
    72
    Rep Power
    309
    Quote Originally Posted by Fire Cape View Post
    Yes but why do you need to convert from Oracle SQL to Maria DB? To me that is like saying Java is bad because it is hard to convert it to C#. Why are we even migrating in the first place?
    I had to do that recently Oracle SQL was free to use (old old version) and when Oracle slapped the licensing stuff we didn't wanna pay. So we switch to an open source db, MariaDB.

    It's not client server. The files won't be transferred and most likely always will be local.

    You don't need to change the player files manually however if the OP has no SQL knowledge, it'll be a learning curve.
    Reply With Quote  
     

  6. #26  
    Registered Member

    Join Date
    Feb 2010
    Posts
    3,187
    Thanks given
    1,124
    Thanks received
    834
    Discord
    View profile
    Rep Power
    1514
    Quote Originally Posted by Kiissmyswagb View Post
    I had to do that recently Oracle SQL was free to use (old old version) and when Oracle slapped the licensing stuff we didn't wanna pay. So we switch to an open source db, MariaDB.

    It's not client server. The files won't be transferred and most likely always will be local.

    You don't need to change the player files manually however if the OP has no SQL knowledge, it'll be a learning curve.
    Fair enough but that could happen with anything. I remember the scares about Java when acquired by Oracle.

    Likely is the operative word. We know in reality that servers here get compromised anyway, if your database can get compromised your server probably can to. The files may not need to be directly exchanged client-server but some of the data will, if you have shit security someone can retrieve this data (how many servers are using rsa / isaac properly in 2021?). In other words this is a limit of the person not choosing to be proactive when considering security and not any inherent disadvantage to SQL.

    It will be a learning curve but that doesn't mean it isn't better.
    Reply With Quote  
     

  7. Thankful user:


  8. #27  
    Contributor

    clem585's Avatar
    Join Date
    Sep 2013
    Posts
    3,556
    Thanks given
    654
    Thanks received
    640
    Rep Power
    358
    Quote Originally Posted by Fire Cape View Post
    Fair enough but that could happen with anything. I remember the scares about Java when acquired by Oracle.

    Likely is the operative word. We know in reality that servers here get compromised anyway, if your database can get compromised your server probably can to. The files may not need to be directly exchanged client-server but some of the data will, if you have shit security someone can retrieve this data (how many servers are using rsa / isaac properly in 2021?). In other words this is a limit of the person not choosing to be proactive when considering security and not any inherent disadvantage to SQL.

    It will be a learning curve but that doesn't mean it isn't better.
    I'm not too informed about hibernate, but wouldn't it get kind of difficult to maintain for a big RSPS with alot of data to store? You would end up with like 50+ tables. Wouldn't it be easier to use an object-oriented DB for player saves?
    Project thread
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  9. #28  
    Registered Member

    Join Date
    Feb 2010
    Posts
    3,187
    Thanks given
    1,124
    Thanks received
    834
    Discord
    View profile
    Rep Power
    1514
    Quote Originally Posted by clem585 View Post
    I'm not too informed about hibernate, but wouldn't it get kind of difficult to maintain for a big RSPS with alot of data to store? You would end up with like 50+ tables. Wouldn't it be easier to use an object-oriented DB for player saves?
    It is object-oriented. It's ORM (object-relational mapping).
    Reply With Quote  
     

  10. #29  
    Registered Member
    Join Date
    Dec 2013
    Posts
    318
    Thanks given
    109
    Thanks received
    72
    Rep Power
    309
    Quote Originally Posted by clem585 View Post
    I'm not too informed about hibernate, but wouldn't it get kind of difficult to maintain for a big RSPS with alot of data to store? You would end up with like 50+ tables. Wouldn't it be easier to use an object-oriented DB for player saves?
    Why do you think you would end up with 50+ tables?
    Reply With Quote  
     

  11. #30  
    Contributor

    clem585's Avatar
    Join Date
    Sep 2013
    Posts
    3,556
    Thanks given
    654
    Thanks received
    640
    Rep Power
    358
    Quote Originally Posted by Kiissmyswagb View Post
    Why do you think you would end up with 50+ tables?
    I'm not sure how complex types are handled. Let's say you have:

    Code:
    public class Player extends Entity {
    
    private Inventory inventory;
    
    }
    How does this get mapped internally in the DB with hibernate? Wouldn't it be 2 tables?
    Project thread
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

Page 3 of 4 FirstFirst 1234 LastLast

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. Are YOU a Player Mod for RuneScape?
    By ιаυяа in forum Voting
    Replies: 156
    Last Post: 06-23-2008, 11:03 PM
  2. Custom Player Title's
    By Dune in forum Tutorials
    Replies: 43
    Last Post: 09-03-2007, 11:34 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •