Visual studio 2015 Update 2 provides a template for authoring owin based controller in the service fabric. The created structure shows you a stateless reliable service and the owin based controller as 2 different C# classes. This works. In this case, reliable service class simply registers a http listener and all the calls will be routed to controller class. In a way, stateless reliable service is out of the picture as soon as it is created and is only useful during startup of the service.
I was expecting to see reliable service and the owin based controller, one and the same. The current structure seems like a patch work.
If I were to change the stateless reliable service to stateful reliable service, I can not really do anything with the stateful service because my requests are routed to the controller. If I were to interact in my controller with state manager, then I have to get the reference to the stateful service and then do my stuff. Feels awkward.
Is there a cleaner way of doing this?