anna-rx / anna Goto Github PK
View Code? Open in Web Editor NEWEvent-driven http server library with ReactiveExtensions inspired in node.js and nancy
License: MIT License
Event-driven http server library with ReactiveExtensions inspired in node.js and nancy
License: MIT License
If I try and use a path like "/wildcarded-*/" I get the exception:
System.FormatException : The UriTemplate '/wildcarded-*' is not valid; the wildcard ('*') cannot appear in a variable name or literal, unless as a construct for a wildcard segment. Note that a wildcard segment, either a literal or a variable, is valid only as the last path segment in the template; the wildcard can appear only once. See the documentation for UriTemplate for more details.
at System.UriTemplateLiteralPathSegment.CreateFromUriTemplate(String segment, UriTemplate template)
at System.UriTemplatePathSegment.CreateFromUriTemplate(String segment, UriTemplate template)
at System.UriTemplate..ctor(String template, Boolean ignoreTrailingSlash, IDictionary\`2 additionalDefaults)
at System.UriTemplate..ctor(String template)
at Anna.HttpServer.OnUriAndMethod(String uri, String method)
I can't see a way of escaping the '*' in the UrlTemplate documentation. Does anybody know how to do it?
e.g. changing the code to this:
WriteStream(listenerResponse.OutputStream)
.Subscribe(s =>
{
try
{
s.Close();
throw new System.Net.Sockets.SocketException();
will cause the entire app to exit. Would be nice to pass any exceptions back up the chain for handling via the app itself.
In the verge of the recent move in the project, a friend of mine mentioned if Anna could potentially be turned into an OWIN middleware. Considering the grim future of System.Web from which Anna currently depends on, I think this could be a good move in the near future.
I know that NancyFx can act as an OWIN middleware, but they do not rely on Rx like Anna. I do not have enough knowledge of Katana or the OWIN specification to say how the Rx pipeline would fit inside a middleware without breaking the chain and how Rx scheduling would come into play.
Any ideas on how this could be accomplished?
Hey guys-
I am curious what you guys' thoughts are on the future of Anna? It seems like it would make for a great base for a Microservice framework (haven't seen many in the .NET world). I'm debating on whether I should fork and create my own based on Anna or contribute here... let me know what you think.
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.