Code Monkey home page Code Monkey logo

condenserdotnet's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

condenserdotnet's Issues

Naming of CondenserDotNet.Service

This naming is confusing as it is not really a service but the "Core" functions of the two (Server and Client) libraries.

I propose we rename to CondenserDotNet.Core

@deanshackley what do you think?

Is it possible to use WindowsAuthentication middleware without ListenOptions?

I keep my URL/port number in hosting.json like this:

{
"urls": "http://*:8075"
}

i would like to build my host like this:

        var config = new ConfigurationBuilder()
             .AddJsonFile("hosting.json", optional: false)
             .Build();

        var builder = WebHost.CreateDefaultBuilder(args)
            .CaptureStartupErrors(true)
            .UseSetting(WebHostDefaults.DetailedErrorsKey, "true")
            .UseKestrel()
            .UseConfiguration(config)  //Will read "urls" key from hosting.json
            .UseStartup<Startup>();

Then in Startup.cs, in Configure(), I would add the middleware like this:

        app.UseWindowsAuthentication();

I then get this error: You need the connection filter installed to use windows authentication

The unit test shows that you need to add WindowsAuthentication middleware to ListenOptions in UseKestrel but that method also requires a URL/port number.

Any way to make it work while storing URL/port number in config file?

Support any tags without prefix

now I can only use properties
serviceManager.ProtocolSchemeTag = " protocolScheme-tag";
serviceManager.SupportedUrls.Add("urlprefix-tag");
and I want to use
serviceManager.Tags.Add("myTag");

Replace JObject.Load by JToken.Load in JsonKeyValueParser.Parse(KeyValue)

Actually the only way to provide configuration to Condenser is as a Json Object like

{
      "Key": "Value"
}

if i try to create a config object which is an array:

[
    {
         "key":"value1"
    },
    {
          "key":"value2"
    }
]

I get an exception like: Current JsonReader item is not an object: StartArray. Path '', line 1, position 2.

I have changed behavior of the JsonKeyValueParser in the Function Parse:

diff --git a/src/CondenserDotNet.Client/Configuration/JsonKeyValueParser.cs b/src/CondenserDotNet.Client/Configuration/JsonKeyValueParser.cs
index 4b4935d..d528995 100644
--- a/src/CondenserDotNet.Client/Configuration/JsonKeyValueParser.cs
+++ b/src/CondenserDotNet.Client/Configuration/JsonKeyValueParser.cs
@@ -30,10 +30,10 @@ namespace CondenserDotNet.Client.Configuration
             {
                 DateParseHandling = DateParseHandling.None
             };
+            
+            var jsonConfig = JToken.Load(_reader);
 
-            var jsonConfig = JObject.Load(_reader);
-
-            VisitJObject(jsonConfig);
+            VisitToken(jsonConfig);
 
             foreach (var kv in _data)
                 yield return new KeyValue

Now everything is OK

(Sorry i am lazy to make a PR :) )

Add ILogger to the Client

This will require a clean up of the ServiceManager's constructor as currently it is getting a little to "busy".

Rename the "Service" in the routing Trie

Currently there are a couple of names to do with Routing that makes it confusing.

  1. The "Service" that is put into the child containers in the trie, it is currently 50% per instance 50% per service. We need to make it's role clear and if it is an instance container it should be called "ServiceInstance"
  2. The ChildContainer should be an interface and the instance should be called something like "RandomServiceContainer". Then we can have a "RoundRobinServiceContainer" and other strategies.

Add IConsulAclProvider support in ConsulRegistry

Hi

I need to build a Configuration object from Consul with a specific token. But looks like IConsulAclProvider is only available for the ServiceRegistry, not for the ConfigurationRegistry.
Can we update it ?

Thks
Julien

Upgrade to .net 6?

I know this project hasn't been worked on in a while and I assume that's because it meets your goals / needs.
I wondered if you had any plans target .net 6 in future?
I also had a general observation as a newbie trying to figure out what this project does - the docs were helpful, but I didn't really understand from them the following:-

  1. The "Service Registration" page didn't actually show how services were registered with consul - i.e do you have to call some method to register a service and when should you do that?
  2. The "reverse proxy" aspect - is there any documentation on this - i,e what it does and how to consume / use it? I have used traefik, which provides a single ingress point and routes traffic to other docker containers,, does this library provide something similar?

Many thanks!

Add configuration support

Should be able to load key/value pairs from a list of paths, including overloading and providing it in the new .net Core configuration object

Support fail over to another dc

When finding available services we should fail over to other datacenters if no healthy service instance is available in this DC

Add Method to deregister Service from Consul

Hello,

First: this is a Great work! Thanks for this.

I am actually playing around with consul and this library. And I often start the app in a container.
And also shutdown it. And start it again, multiple times with multiple instances.
This leaves stale service registrations on consul. And I have to deregister them manually.

It would be nice to have a method to deregister the service via code.
After ServiceManager.RegisteredService exist.

Thanks.

KeepLeadership can swallow exceptions

If using the leader function we find that there is a problem with the failover.

If have a single instance of service which has aquired the leadership lock, but then kill consul on that server. When subsequently we restart consul the service should reaquire the leadership lock (assuming there was no other instance of the service running which had aquired the lock). However it does not re-aquire the leadership lock.

Similary if have a second instance of the service running which aquires the lock when consul is killed on the server where the instance had originally aquired the lock - then thre is no log message to say the original instance lost the lock.

I believe the issue that needs to be fixe is that any exception in the KeepLeadership loop in LeaderWatcher is swallower and the loop stops. It may need to have try catch similar tot he the watcherLoop in ServiceWatcher.

Thanks Derek

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.