Comments (4)
Hi @pvanroos, thanks man. I wish I had kept it a little more maintained ;).
It's possible through remote functions. When you dispose the app domain context, the library should, in theory, go out of context. If that doesn't work let me know and I'll give it a look.
from appdomaintoolkit.
This is actually something I implemented a couple of years ago but never got back to updating this library with those changes. (bad contributor!) I'll try to find time this week to dig thay up and work it in.
from appdomaintoolkit.
I eventually came up with a solution. It's not ideal but I think it will work for now. I have a single 5-node ServiceFabric cluster running on Azure. I have 4 services I distribute across the cluster. One service processes the job queue (service bus) and another service processes the actual job type that was added to the queue. The job processing service, at startup, loads plugins from a blob storage account--by streaming in the DLL byte arrays and loads them directly into, here's the key, the current domain (not a new separate app domain). Once loaded, I use job configuration information to instantiate and call the types needed to execute the job using reflection. I realize this has potential problems but when I want to make an update to any plugin, I update the DLLs in blob storage and submit a RestartReplica call to the job processing service in the cluster. This will cause the cluster to reload the replicas and reload the plugins (assemblies). I'm leaving out some details for simplicity sake but you get my drift.
Future iterations could use an Azure function that triggers when an update is made to a plugin in storage and notifies the job processing service to reload the updated plugin's assembly(s). If I could make AppDomains work, I could load each plugin into a separate AppDomain and unload the AppDomain when updates are needed without a need to restart the replicas.
from appdomaintoolkit.
@pvanroos After reading your question a second time I believe I did exactly what you want in my masters project implementation, which is WinBert. In that project I dynamically execute a set of fuzzed randoop tests on two different instances of the code that is built by Visual Studio. Start here:
https://github.com/jduv/WinBert/blob/master/Arktos.WinBert/Testing/TestManager.cs
Follow executeStack
through.
from appdomaintoolkit.
Related Issues (16)
- Assembly deep references HOT 1
- IDisposable usage is not intuitive HOT 4
- Unable to see how this can work when the assemblies being loaded are not known to the host at compile time HOT 4
- Cannot build downloaded ZIP HOT 4
- Serialization failure using RemoteFunc.Invoke HOT 5
- getting "could not load file or assembly" HOT 1
- Accessing types from loaded assemblies HOT 8
- AppDomain requests unrestricted access upon creation HOT 10
- Ability to use Assembly.Load(byte[]) HOT 1
- Appdomain is sometimes loading dlls from Parent directory of PrivateBinPath and sometimes from PrivateBinPath HOT 4
- How to persist an AppDomain and manually unload assembly? HOT 3
- Is there a way to get a direct reference to the Assembly object in the AppDomainContext? HOT 2
- Test FindByCodeBase_NoRefAssembly_LoadFrom fails when project is part of another solution HOT 7
- Issue with Resolve event HOT 7
- nuget package request HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from appdomaintoolkit.