• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Suggestion] Dynamically loading / unloading plugins
#1
Hi,

not sure if this is already on your suggestion(s) list but would be nice to be able to (un)load plugins on the fly while the server is running.
  Reply
#2
This is possible, but might require a workaround for older plugns that are not written to be hot reloaded (some have memory leakes). Either that or they would need to be re-written/re-compiled with fixes.



It's really a question of whether older plugin should be supported for hot reload.
Remember to always refer to J0sh as `J0sh...`



@ Networks/Servers

San Andreas Gaming Network (Owner/Founder)

San Andreas Gaming (Owner/Founder)

Grand Theft Cop's n Robber's (Owner)

Britannia Roleplay (Owner/Founder) [Retired]

Alpine RP (Owner/Founder)

Aluminium Network (Maintainer) [Disbanded]

AlphaDM (Tech Support) [Disbanded]



# Services

forum.open.mp (Forum Manager) (Formerly Burgershot.gg

open.mp (Member)



~ Languages/Frameworks

Pawn, C, C, C#, Javascript, Typescript, Lua, Python, Go, Rust, PHP, SQL,

Angular, React, Vue, Svelte, Laravel, Rocket
  Reply
#3
I see no point in this feature being a thing. Why would you even want to hot swap plugins?
  Reply
#4
Yeah I don't see a reason for this, other then for development of the plugin itself.
Remember to always refer to J0sh as `J0sh...`



@ Networks/Servers

San Andreas Gaming Network (Owner/Founder)

San Andreas Gaming (Owner/Founder)

Grand Theft Cop's n Robber's (Owner)

Britannia Roleplay (Owner/Founder) [Retired]

Alpine RP (Owner/Founder)

Aluminium Network (Maintainer) [Disbanded]

AlphaDM (Tech Support) [Disbanded]



# Services

forum.open.mp (Forum Manager) (Formerly Burgershot.gg

open.mp (Member)



~ Languages/Frameworks

Pawn, C, C, C#, Javascript, Typescript, Lua, Python, Go, Rust, PHP, SQL,

Angular, React, Vue, Svelte, Laravel, Rocket
  Reply
#5
Faster plugin development by not having to reload the whole server is already a great feature. Also big server will probably thank live security plugin updates, or even live open.mp server updates.
  Reply
#6
Hot loading can come handy in case you want to load a certain thing without restarting your serve - this might be more work but should be added, this can come handy in a way that you can load all your plugins depending on the includes you've in your script, you can just do a small define to check whether the library is included or not and then load the respective plugin for it. This is just an idea, because I really hate to set up SA-MP servers.
  Reply
#7
(2019-05-25, 11:56 PM)ohmios Wrote: Faster plugin development by not having to reload the whole server is already a great feature. Also big server will probably thank live security plugin updates, or even live open.mp server updates.



Plugin development would 90% of the time adding more natives. In which you would have to recompile your script and restart either way.

The other 10% are bug fixes, that would be useful to have for "hot swapping" but I don't think that's worth the time in my opinion.
  Reply
#8
(2019-05-26, 12:54 PM)Gravityfalls Wrote: Hot loading can come handy in case you want to load a certain thing without restarting your serve - this might be more work but should be added, this can come handy in a way that you can load all your plugins depending on the includes you've in your script, you can just do a small define to check whether the library is included or not and then load the respective plugin for it. This is just an idea, because I really hate to set up SA-MP servers.



The huge problem with this, is that a plugin could get updated and add/change natives and then your server wouldn't function correctly since it would be trying to call natives that no longer exists or have changed and give an unexpected output.



This would be seriously bad, and I don't recommend this approach at all.
Remember to always refer to J0sh as `J0sh...`



@ Networks/Servers

San Andreas Gaming Network (Owner/Founder)

San Andreas Gaming (Owner/Founder)

Grand Theft Cop's n Robber's (Owner)

Britannia Roleplay (Owner/Founder) [Retired]

Alpine RP (Owner/Founder)

Aluminium Network (Maintainer) [Disbanded]

AlphaDM (Tech Support) [Disbanded]



# Services

forum.open.mp (Forum Manager) (Formerly Burgershot.gg

open.mp (Member)



~ Languages/Frameworks

Pawn, C, C, C#, Javascript, Typescript, Lua, Python, Go, Rust, PHP, SQL,

Angular, React, Vue, Svelte, Laravel, Rocket
  Reply


Forum Jump: