Host a REST webserver with template support
I have a modular software, one module must be a webserver that accept REST request in JSON format to be able to send operation request to process inside a cluster of applications.
In order to have the choice to enable or disable the module, I have discarded ASP.NET and IIS preferring some other web server implementation.
The module will support also razor template to create simple UI to access process data.
What 开发者_运维问答will be the best choice?
I take a look at Nancy, OpenRasta, Kayak ..
Nancy WCF hosting seems to work but I have big problems with web pages templating.
Web pages templating have problems looking at views as resource inside assembly: I have created a resource provider that mimic the default one in order to check why it return two results with the same view that throw an exception in Nancy.
Ideas?
I thoroughly recommend OpenRasta.
The application I am currently working on sounds similar to yours - we have clusters of 'agents' which perform long running calculations with a central orchestrator. All inter process communication is performed using ReST-ful HTTP with JSON as the message format.
OpenRasta is ideal since it also includes an HTTP listener which allows us to create our components as standalone Windows services without using IIS (we still use IIS to host the parts of the application which are completely stateless, e.g. the Web UI).
Finally, it is possible to use Razor with OpenRasta - see here.
精彩评论