[MC-Plugins] Redis or SQL

Redis or SQL

  • Redis

    Votes: 2 28.6%
  • SQL

    Votes: 5 71.4%

  • Total voters
    7
Status
This thread has been locked.

Superbility

Developer
Supreme
Feedback score
2
Posts
99
Reactions
30
Resources
0
Recently I've seen a lot on Minecraft servers switching from SQL to Redis as their preferred data storage. I was wondering if it would be beneficial to add Redis as a data type to my plugins
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

ghooslyDev

Transaction Restricted
Feedback score
2
Posts
132
Reactions
25
Resources
0
Actually, I using Redis for seperate something with network. Like bungee announce, /joinme command, /staffchat and more. If you ask me what is better, my answer is MongoDB. MongoDB is faster than SQL and atleast more easy to use.
 

Brandon

Developer
Premium
Feedback score
6
Posts
549
Reactions
313
Resources
0
Redis is primarily used for communication between servers, not necessarily data storage.
SQL is good for specific things (as long as you're using HikariCP data pooling for speed and efficiency) - although the downside of SQL is that it's mainly flatfile databases.
MongoDB is a good alternative, using json documents to store data.
 

ghooslyDev

Transaction Restricted
Feedback score
2
Posts
132
Reactions
25
Resources
0
Yessir
Redis is primarily used for communication between servers, not necessarily data storage.
SQL is good for specific things (as long as you're using HikariCP data pooling for speed and efficiency) - although the downside of SQL is that it's mainly flatfile databases.
MongoDB is a good alternative, using json documents to store data.
 

Great_Array

Feedback score
0
Posts
127
Reactions
59
Resources
0
Personally I stick to originals, so between Redis and SQL I prefer SQL, purely because I'm used to it from web development. But it does depend on you, if Redis suits your needs more use Redis, if MongoDb suits you more use it or if even MariaDb suits you use that. But if you're looking to ease the use for your plugins stick with SQL since as far as I know its the most widely used database system out there. Or if one day you just get sick of it all just say heck it and stuff it all in a .txt file!
 

mella

Feedback score
0
Posts
4
Reactions
1
Resources
0
I do prefer MongoDB, I have the feeling is easier to use, especially because its object oriented.
 

_Souper_

Feedback score
0
Posts
5
Reactions
1
Resources
0
You could use Redis to cache your query results from SQL/MongoDB. Redis has an automatic way to set an expiry so all you really have to do is check if a key exists, if it does return the value of it and if it doesn't do your expensive query, set your key and return the query result. So, i wouldn't personally really put them side by side in a poll.
 

Inviss

Management / Head of Development @ AkumaMC
Supreme
Feedback score
21
Posts
734
Reactions
267
Resources
3
MySQL should be used if you need to store data that is consistent, like the values of a profile of a player. This is the typical use case. This is because MySQL stores data in tables which contain different columns, which are pre-defined and can not be changed after creation. Although migrating to a different database to add more columns is possible, it's an absolute pain.

This sometimes makes MongoDB the preferred choice of database. Being a NoSQL database means that is you are able to store whatever information you need in each document inside of a collection (equivalent to a table in MySQL). This makes adding new features easy, a simple if database contains check.

Redis, on the other hand, does not store any persistent data. It is an in-memory key-value store. When the redis instance is shit down / the redis pool is closed, all data currently held in it is lost. It's used as it's a super quick and efficient way of syncing data across servers. Say for example you've got a JsonObject that contains a few different properties, and you want to store that JsonObject in a map/list on multiple server instances, you could use redis to "publish" that data, so that it's received by all servers and can be stored/used.

Hope that cleared it up a bit!
 
Status
This thread has been locked.
Top