This question is to answer some confusion in direction I was given regarding where my WCF pub sub service should reside in relationship to a website that will be utilizing it. Basically, I'm developing a WCF Pub Sub service as an API to coincide with a SAAS solution. The site will actually utilize it's own API for the large majority of functionality. There is to me connectors installed on client local LANS for integration with local software systems to their networks, so these will also use the API (hence the pub sub, for real-time updates pushed down from the api)... I was told that I should have the WCF service reside in my site, meaning:
http://saassolution.com/api/wcfservice.svc ... the reasoning I was given, was that utilizing the service via javascript would become incredibly cumbersome if it wasn't a part of the project.
I would think the WCF service should reside at a location like so: http://api.saasolution.com/wcfservice.svc
The ladder is how sites like twitter, and linkedin do this, so I'm confused at the direction I was given. Can anyone provide some insight as to the pros and cons of each approach... or if there is really a difference at all... or a recommendation?
Thank you.
The only assumption one could make for putting the wcf api within the site application could be the issue with cross domain xhr.