crewpvp / skcrew

Skript addon contains favorite addons and something more
https://skcrew.crewpvp.xyz/en
GNU General Public License v3.0
15 stars 1 forks source link

[Feature] Network Variables with MySQL #7

Open Lennord opened 7 months ago

Lennord commented 7 months ago

Good evening,

It would be nice to set up a variable system with mysql and a configuration system for mysql in the plugin config on the bungeecord

Do you think this could be an addition in the future?

Lotzyprod commented 7 months ago

Maybe, but why, when you can make queries directly to the database?

Lennord commented 7 months ago

Maybe, but why, when you can make queries directly to the database?

In fact, it's simpler to use skript variables for mysql in bungeecord on your plugin than to make queries.

Lotzyprod commented 7 months ago

This will not be particularly effective until Skript adds a new 'return api', because asynchronous operations will not allow the use of network variables inside functions, and synchronous operations to the database will block the main thread. So we have to wait

Lennord commented 7 months ago

Afterwards, the time to have this functionality on the skript API, you can store the network variables on the bungee like skungee, I think that this system could be good

Lotzyprod commented 7 months ago

if you like syntax like as

get network {variable} and store in {variable}

then its possible, in other way we need have copy of all network variables on each all servers, but with good syntax like

set {variable} to network {variable}

but then we will not be able to be sure that the variable was not changed at the time it was received

Lennord commented 7 months ago

if you like syntax like as

get network {variable} and store in {variable}

then its possible, in other way we need have copy of all network variables on each all servers, but with good syntax like

set {variable} to network {variable}

but then we will not be able to be sure that the variable was not changed at the time it was received

Yeah we could also create/delete/list/add/remove the network variables?

Lotzyprod commented 7 months ago

idk about lists in second case, because we not able to sure that the list variable do not changed. But this is not the main problem. The main thing is that you will need to have a copy of the variables on each server, which will not allow you to store any large amount of data in global variables. In the first case, we simply get a non-standard shitty syntax for all get operations , and we get a double delay in the speed of receiving data (request to the proxy, request from the proxy to the database, returning result to the proxy, returning the result to the server) or setting/updating data, but we will be able to store any data, in any quantity.

Lennord commented 6 months ago

idk about lists in second case, because we not able to sure that the list variable do not changed. But this is not the main problem. The main thing is that you will need to have a copy of the variables on each server, which will not allow you to store any large amount of data in global variables. In the first case, we simply get a non-standard shitty syntax for all get operations , and we get a double delay in the speed of receiving data (request to the proxy, request from the proxy to the database, returning result to the proxy, returning the result to the server) or setting/updating data, but we will be able to store any data, in any quantity.

ok but why not use the code with the authorization of the creator of the ZulfBungee plugin which uses network variables with or without MySQL with the correction of the problems that ZulfBungee encounters?

Lotzyprod commented 6 months ago

there's no problem with the implementation, it's just why it's necessary if it involves problems in ANY case I've described. In addition, Skript is now bringing back the ability to store variables inside mysql

Lennord commented 6 months ago

there's no problem with the implementation, it's just why it's necessary if it involves problems in ANY case I've described. In addition, Skript is now bringing back the ability to store variables inside mysql

I also think that it's not a problem but the network variables of Zulfbungee work perfectly but have a latency with the socket suddenly if you correct it and well quite simply we can do Mysql or H2 requests (bungeecord) to have it instantly without problem and Skript has problems concerning the "Commit Changes" configuration which makes errors, which I reported to the developers of skriptLang so it would be temporary while he fixes it, what do you think?

Lotzyprod commented 6 months ago

how correct socket latency , its based on network connection speed

Lennord commented 6 months ago

how correct socket latency , its based on network connection speed

I don't know because I have a VPS on a very well-known French host called "InovaPerf" and so I tested the network variables, they are not instantly but 1 by 1 with the socket and therefore in localhost it is done instantly, I find It's weird and maybe it's a problem that you can fix? however it is not the host because I have 1 Gbps network

Lennord commented 1 month ago

Hello, do you have any news regarding this feature?

Lotzyprod commented 1 month ago

For now there are more priority goals than variables in the DB