Giter Site home page Giter Site logo

Service hot update about magiconion HOT 5 CLOSED

cysharp avatar cysharp commented on May 7, 2024
Service hot update

from magiconion.

Comments (5)

neuecc avatar neuecc commented on May 7, 2024

Thank you! and very interesting.

Maybe, it is related to Grpc.Core.Server.
I can only think of the following way.
server.Kill -> new Server(MagicOnionServiceDefinition) -> server.Start

from magiconion.

parkycai avatar parkycai commented on May 7, 2024

Kill the server will cause a disconnection to the client. Or will the client automatically restore the connect, even the stream connection won't notice the disconnection (logic level)?
Anyway, I guess I have to dive into Grpc Server to find out a way to replace logic assemble during runtime. Thanks!

from magiconion.

parkycai avatar parkycai commented on May 7, 2024

Hi, I took some time this weekend and dig out the approach. I used some reflections so no need to modify the grpc source.
image

Note:

  1. Assemblies can be loaded from raw binary dll files, so it can be overwritten in runtime.
  2. Remember to clean up old assemblies after the update.

from magiconion.

aidapsibr avatar aidapsibr commented on May 7, 2024

@parkycai Problem you will run into is unloading assemblies is only supported through unloading entire AppDomains. It is a Framework only feature (not core) and very complicated.

from magiconion.

parkycai avatar parkycai commented on May 7, 2024

@psibernetic agreed. By "clean up old assemblies" I means dispose any resources used by the assemblies. So this is a comprimise, that I don't need to make any inter-appdomain communication but only waste acceptable amount of memory.

from magiconion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.