Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot open.mp Questions and Suggestions [Suggestion] Dynamically loading / unloading plugins

 
  • 0 Vote(s) - 0 Average
Suggestion Dynamically loading / unloading plugins
XeroX
Offline

Burgershot Member
Posts: 12
Threads: 3
Joined: Apr 2019
Reputation: 0
Location: Germany
#1
2019-05-25, 11:15 PM
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.
JustMichael
Offline

Forum Manager

Posts: 189
Threads: 3
Joined: Feb 2019
Reputation: 17
Location: England
#2
2019-05-25, 11:20 PM
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)
Alpine RP (Owner/Founder)
Aluminium Network (Maintainer)
AlphaDM (Tech Support)

# Services
Burgershot.gg (Forum Manager)
open.mp (Member)

~ Languages/Frameworks
Pawn, C, C++, C#, Javascript, Typescript, Lua, Python, Go, Rust, PHP, SQL,
Angular, React, Vue, Svelte, Laravel, Rocket
Josh
Offline

Administrator

Posts: 129
Threads: 1
Joined: Feb 2019
Reputation: 20
#3
2019-05-25, 11:28 PM
I see no point in this feature being a thing. Why would you even want to hot swap plugins?
JustMichael
Offline

Forum Manager

Posts: 189
Threads: 3
Joined: Feb 2019
Reputation: 17
Location: England
#4
2019-05-25, 11:29 PM
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)
Alpine RP (Owner/Founder)
Aluminium Network (Maintainer)
AlphaDM (Tech Support)

# Services
Burgershot.gg (Forum Manager)
open.mp (Member)

~ Languages/Frameworks
Pawn, C, C++, C#, Javascript, Typescript, Lua, Python, Go, Rust, PHP, SQL,
Angular, React, Vue, Svelte, Laravel, Rocket
ohmios
Offline

Burgershot Member
Posts: 34
Threads: 2
Joined: Apr 2019
Reputation: 1
#5
2019-05-25, 11:56 PM
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.
Gravityfalls
Offline

Burgershot Member
Posts: 105
Threads: 7
Joined: Apr 2019
Reputation: 2
#6
2019-05-26, 12:54 PM
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.
Josh
Offline

Administrator

Posts: 129
Threads: 1
Joined: Feb 2019
Reputation: 20
#7
2019-05-26, 12:55 PM
(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.
JustMichael
Offline

Forum Manager

Posts: 189
Threads: 3
Joined: Feb 2019
Reputation: 17
Location: England
#8
2019-05-26, 12:56 PM
(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)
Alpine RP (Owner/Founder)
Aluminium Network (Maintainer)
AlphaDM (Tech Support)

# Services
Burgershot.gg (Forum Manager)
open.mp (Member)

~ Languages/Frameworks
Pawn, C, C++, C#, Javascript, Typescript, Lua, Python, Go, Rust, PHP, SQL,
Angular, React, Vue, Svelte, Laravel, Rocket
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode