Comments (13)
There are a few options here I think.
-
We create a config section that contains a cdata element where we simply place the raw HOCON code.
-
Since HOCON supports substitutions. e.g. some.path = ${another.path.some.value}
I guess we could make a provider that reads standard key/value pairs from app/web.config and injects those as values that can be used in substitution. -
We create a config section where we simply place a file reference to a HOCON config file.
-
create a custom XML format for config. I really don't want to go down that route.
The whole point of HOCON is to avoid XML/other non readable formats.
But some sort of relation to the app/web.config would be nice so that one can use the standard config transforms on build.
from akka.net.
My thoughts:
I'm with you on saying "no" to option 4 - that sounds like a bad experience for all parties involved.
IMHO, I think we can combine option 1 and 3 into a flexible system that would address 99% of use cases. Create a configuration section that has an optional configSource
property - just like connectionStrings. If configSource
is populated, then we'll look for the HOCON configuration in an external file.
If not, we'll treat the root Pigeon configuration element in App.config as a CDATA field and just parse the contents enclosed inside the tags.
How does that sound?
from akka.net.
Sounds fine with me.
Can this be done w/o including references to System.Web?
I mean if the config is stored on disc and we use a configSource, are we forced to use System.Web to resolve the path?
from akka.net.
Shouldn't need System.Web - just System.Configuration.Management. If we use a configSource inside web.config the path will be resolved relative to web.config and we can use configuration transformations to load different environmental settings, but none of that will require System.Web necessarily.
from akka.net.
Ok, do you want to take this one?
from akka.net.
Sure, let's do it - actively integrating it into an ASP.NET MVC application anyway; going to need it sooner rather than later.
from akka.net.
You might want to look into the .WithFallback feature of the config also.
This allows you to use multiple configs, if we ask for a config path; e.g. "akka.actor.something.foo", and that path is missing in the config, it will try to resolve this path using the fallback config.
This can also be chained multiple times.
This is how we combine the reference config with the user config.
Not sure if this is useful for the above feature, but technically, it is possible to combine configs.
from akka.net.
Wanted to add an update to this - I will be working on this soon. Almost have the V1 of our first Pigeon-enabled service finished. Immediately after it passes QA I'm going to be starting work on deployment procedures for it, which is where I will start work on this. Should have some progress made against this over the weekend.
from akka.net.
Awesome, just out of interest, how big is the user base for the service?
from akka.net.
User base for the service - we handle connections from anywhere to 250,000 - 500,000 devices per day and tend to do between 4-20 requests per device.
@rtumaykin and I need to do some more testing with remote actors this week, but once we have them working we'll be starting work on adding configuration section support.
from akka.net.
I've built an initial implementation of this - still getting some runtime errors with it (Microsoft has changed this API like a dozen times...); should have a PR in next week.
from akka.net.
Looking through the Java docs right now and ConfigurationFactory.Load()
is the right place to initialize loading of the default config.
from akka.net.
@mmisztal1980 took care of this in his most recent PR. closing.
from akka.net.
Related Issues (20)
- Existing test cases started failing with timeout exception after upgrating from akka 1.4.31 to 1.5.13 HOT 4
- How to send message to Self from external callbacks? HOT 2
- Error while recovering snapshots for actors with particular format for PersistenceId HOT 1
- Akka Service Discovery heartbeat monitor is failing to find Azure Table resource HOT 1
- Is the page "Use-Case and Deployment Scenarios" still up to date? HOT 1
- Docs: old links to API Change documentation don't forward to the correct place
- Akka.Tests.Delivery.ReliableDeliveryRandomSpecs.ReliableDelivery_with_random_failures_must_work_with_flaky_network_without_resending failure HOT 1
- Akka.TestKit: `ImplicitSender` (`TestActor`) is lost inside `async` tests whenever synchronous methods are called
- [TestKit] SupervisorStrategy for TestActor is unused HOT 1
- Akka.TestKit: `Watch` and `Unwatch` are secretly asynchronous
- Akka.Cluster.Metrics mis-uses code-genned Protobuf objects for internal business logic HOT 1
- Sporadic failures of Watch/Ask with remote actors (e.g. Singleton)
- [Epic] Akka.NET .NET Aspire Support HOT 1
- Receiving message from Dead Letter actor instead of actual sender HOT 1
- ConsumerController is Deadlocked in WaitingForConfirmation Status HOT 2
- Update Sharding Custom Handoff Message documentation
- Akka.Streams: `DivertTo` requires `NotUsed` materialization value instead of being generic HOT 2
- Enable debug logging for ShardCoordinator/ShardRegion/Shard actors HOT 7
- Shard not receiving/handling EntityTerminated message after passivation HOT 7
- "Shutting down myself" caused by error occured in remote node. 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 akka.net.