azchohfi / imageclassifiersample Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Forgive me if this is not the best place to put this question. I enjoyed your article on worker services, but I was curious about the current best approach to answering http requests from such a service. I see that worker services are now the cross-platform way to write what used to be windows services. If I have a windows service that exposes an http endpoint, what is now the correct way to add that to my cross-platform worker service?
In other words, if my worker service is:
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using App.WorkerService;
using IHost host = Host.CreateDefaultBuilder(args)
.ConfigureServices((hostContext, services) =>
{
services.AddHostedService<Worker>();
})
.Build();
await host.RunAsync();
Then, what is the correct way to add support for http requests? I see many options online:
Simple Http service through HttpListener (.NET 2.0+)
SelfHosting based on WCF stack
Use ASP.NET HttpSelfHost to host WebAPI services (.NET 4.0+)
Use ASP.NET OWIN to host WebAPI services (.NET4.5 recommended by Microsoft)
However, I also see that the OWIN option is considered deprecated. What is the present correct approach?
Again, thank you for your excellent article and for any help you can provide regarding my question.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.