We have large data model and we are taking a performance hit due to marshaling and unmarshaling data. We are running rules service in the same IIS as the calling application but as a separate WCF service with TCP binding.
Of course. Simply include the service implementation, and all its dependencies, in your calling application, and you will build the rule service into your application. Add bootstrap code to your DI configuration, service locator etc (i.e. instantiate the rule server). You only need one rule server instance per application domain.
You obviously need to modify the code invoking the decision services that you invoke a method on a (process-) local service instead of a WCF service.
That said: You should make sure that marshalling is your actual performance bottleneck, and that it happens where you think. Internalising a decision service should not be your first/only fix for performance problems
If you also mark your question as answered, you close the thread and other users will see what the solution was more easily.
Retrieving data ...