Comments (10)
I renamed the package
VSoft.Extensions.Hosting.Halibut
I would welcome any feedback on this, will probably publish on nuget in the next few days.
from halibut.
I have made some progress on this, happy to submit a PR (It depends on my pr #71 ). Still some work to do and testing but it compile ;)
So to configure Halibut with the generic host, you would do this
static void Main(string[] args)
{
Log.Logger = new LoggerConfiguration()
.WriteTo.Console()
.MinimumLevel.Debug()
.CreateLogger();
var host = new HostBuilder()
.UseHalibut((options, services) =>
{
services.RegisterHalibutService<ICalculatorService, CalculatorService>();
options.Mode = HalibutServerMode.Listening;
options.CertificateFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "HalibutServer.pfx");
//Listening
options.Listen.EndPoint = new IPEndPoint(IPAddress.IPv6Any, 8433);
options.Trust.Add("911B7F9E102486C4E1B299FA8D528FE30F129158");
//Polling
//options.Polling.BaseUri = "https://localhost:8433";
//options.Polling.Subscription = "SQ-TENTAPOLL";
//options.Polling.RemoteThumbPrint = "ABC.....";
//WS Polling
//options.Polling.BaseUri = "wss://localhost:8433/Halibut";
//options.Polling.Subscription = "SQ-TENTAPOLL";
//options.Polling.RemoteThumbPrint = "ABC..";
//proxy
//options.ProxyDetails = new ProxyDetails("myproxy", 9433, Transport.Proxy.ProxyType.HTTP);
})
.UseConsoleLifetime()
.Build();
Console.WriteLine("Servier is running, Ctrl+C to stop");
host.RunAsync();
}
Of course in a real application you would do more here, but the halibut config is simple and neat.
from halibut.
I have pushed a working version to my fork - comments welcome.
from halibut.
I grew impatient (need to get on with migrating from wcf to halibut) so I created a separate project for it, not quite as neat without the ITrustProvider PR but will work all the same. I haven't published a nuget package just yet (will wait to see a response here).
from halibut.
This is awesome
I was also thinking of using the ASP.NET core pipeline to manage the WebSockets, so in essence, remove the transport from Halibut, and that is handled by eg Kestrel ( https://docs.microsoft.com/en-us/aspnet/core/fundamentals/websockets?view=aspnetcore-2.2#how-to-use-websockets )
from halibut.
Thanks. I really does keep everything nice and neat and it made it absolutely trivial for us to replace wcf with halibut (I won't miss wcf!). We're using halibut for coms between the build server and the build agents (Continua CI). We're migrating from .net 4.7.2 to .net core 3.0 and I was dreading the wcf change but in the end it turned out to be pretty simple (migrating mvc though is death by a thousand cuts!).
So should I submit a PR for this?
from halibut.
Well given this is a completely new project, is there really a need to include it in this repo?
from halibut.
Up to you guys, but it seems like everything is going this way now so it would make sense for it to be part of the halibut repo. It is pretty small, but does need to be a separate nuget package due to it's dependencies differing from halibut (Microsoft.Extensions.Hosting which halibut itself doesn't need).
It really should be named Halibut.Extensions.Hosting but I didn't do that in case you decided to create your own package.
from halibut.
Seems like there are two conventions for the package names
https://www.nuget.org/packages?q=Extensions.Hosting
Company.Extensions.Hosting.Product
or
Extensions.Hosting.Product
from halibut.
Published to nuget
https://www.nuget.org/packages/VSoft.Extensions.Hosting.Halibut/
I'll close this now since it's done.
from halibut.
Related Issues (20)
- Unhandled exception logged
- [Feature] Routing HOT 1
- Strange issue when using WebSockets HOT 3
- Exceptions in the DataStream writer causes the receiver to block with 100% CPU load.
- PR #144 to add buffered stream appears to cause timeout issues.
- messageEnvelope is null HOT 1
- Support WebSockets on .NET Core HOT 1
- Exception with message "The archive entry was compressed using an unsupported compression method." is raised occasionally.
- [Question] TcpListener report progress
- HalibutRuntime extension/inheritance
- Setting the InnerException of HalibutClientException on service errors HOT 2
- Upgrade all references to System.Drawing.Common
- Add support for testing a net6 client against a net48 service over websockets.
- DataStream.FromString does not pass the cancellation token, meaning we wont respect cancelled RPC calls.
- Enforce that HalibutProxyRequestOptions is provided on each RPC call, forcing callers to provide CancellationToken[s]
- Support keepalives on WebSockets
- Cancelling deployment to polling tentacle that is no longer there does not stop RPC retries HOT 2
- Extension of polymorphism in the TypeRegistry
- Strict 1 to 1 communication in polling mode
- Client Denied messages are creating noise in logs
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 halibut.