1. Is there any way that oxide can be made to update without requiring a server restart?
     
  2. Wulf

    Wulf Community Admin

    It's not easily done, as Oxide modifies the main DLL for Rust. I may be wrong though, but I did discuss it with others not too long ago. It may be possible to replace it, but I'm not sure that the system will see the changes until it has been unloaded and loaded via a restart.
     
  3. maybe it can be done by cleaning the dll data, and inject a new one on the fly
     
  4. Its simple actually :)
    There is AppDomains for control assemblies.
    If all DLLs load in a domain, it can be unload (maybe needs same cleaning too but not that much) and reload with same load function/s.
    Code:
    var exampleDomain = AppDomain.CreateDomain("exampleDomain", AppDomain.CurrentDomain.Evidence, new AppDomainSetup { ApplicationBase = "dll directory" });
    exampleDomain.Load("assemblyName");
    AppDomain.Unload(exampleDomain);
     
  5. Wulf

    Wulf Community Admin

    That doesn't cover the entire Oxide bundle including the compiler, all DLLs, dependencies, etc. Also make sure it refreshes the server's console to reflect the correct information and changes made to Oxide. In the event that someone tries to update a server between protocols, make sure that Rust handles this as well somehow without messing up the map and everything else involved between Rust updates.

    AppDomains are also are not suitable for high performance software, they require serialization and a IPC for communication with other AppDomains which introduces a massive amount of overhead. It's not always as simple as what StackOverflow shows. ;)

    We will be adding automatic updating support eventually, but it would best to handle it before starting the server. There are other priorities right now though.
     
  6. Actually I didn't check the source of Oxide and its just my opinion for help. Please keep it in mind while you read this., there is some guessings about Oxide's do. And what do you mean with "It's not always as simple as what StackOverflow shows."? It's my knownledge about c# and reflection library. Don't be heartbreaker.

    There is no need for IPC becouse you will need only one AppDomain.
    And what is the point of serialization for it? No need again.
    AppDomains are equal with your current domain and its just a "pool" as current one which means there is no performance issues. And also there is no changes between AppDomains and current domain except breaking the communication with current one. But you will use a simple communication already like before do. Want or not, Microsoft already forcing you to use it and you have a default AppDomain pool already.
     
  7. Wulf

    Wulf Community Admin

    No worries, it just isn't likely to happen without a restart/shutdown. Trying to update while the server is running will most likely open up numerous other issues. It'd be better and easier to handle any updating when the server is offline.
     
  8. Restart/shutdown is better way to do this of course :)