In what tier should my web service references be? - web-services

I have the following structure in my web solution:
Domain
DataAccess
ApplicationServices
Web
Tests
I have some application services that I am using to abstract some web services that I am using. (Specifically, I am bundling some shipping web services together into a single application service.) Should my Application Services layer reference the web services I am consuming, and the other tiers remain ignorant, or should I reference the web services in the Web and Tests tiers and inject the web services into the application service?

I would use a Service Gateway pattern to work with Web Services, so I would have another project called ServiceGateway as an additional tier to my application and this will be referenced by ApplciationServices, as stated here..

Related

In SOA (Service Oriented Architecture) does individual services run as separate server?

Big banks follow Service Oriented Architecture for their functioning.
They may have more that 50 services so do they run individual services as separate server or they group services ?
Can anyone explain this in detail ?
According to SOA, each service should be able to serve the service independently and hence could be hosted on a separate server.
But all this servers should communicate between each other internally,so the system as a whole is aware of the services offered by each server and the outside world can hit a single endpoint while requesting a service. Internally a routing module will identify the server which offers the particular service and serve it.
It could be also possible that there could be more than one server serving the same request if the load expected is high.
Also the term server could mean a runtime, something like a JVM if the service is Java based or it could be a machine too.
according to wiki:
Every computer can run any number of services, and each service is
built in a way that ensures that the service can exchange information
with any other service in the network without human interaction and
without the need to make changes to the underlying program itself.
Normally similar nature services or services communicating with same code base or DB server or another application server etc are grouped together. While a high volume service or long running service could be served separately to speed up the system.
The whole purpose of Service Oriented Architecture (SOA) is to have flexibility for each module( exposed as service) to have it's freedom of deployment, implementation an expansion with least affecting other modules. So all these services either they could be hosted on single server with different ports or they could be on different server.
Usually at big banks, there would be a team owning each service.Each service is deployed on different server. In fact each service may be deployed on many servers for Scalability and fault tolerance.
Usually the services are hosted by an Enterprise Service Bus, a component which publishes the services to all information systems of the organization and also to the external B2B customers (via B2B gateway).
The services hosted on ESB may utilize services provided by backend systems. These services of backend system are considered as private and are only consumed via ESB. This approach eliminates the spaghetti mess which comes if everybody integrates with anybody.
Most of ESB systems I have come accross were high available solutions with a HA database, a cluster of application servers and a load balancer, all together creating a platform to ensure stability and performance of the services.
The number of services in an enterprise can be very large, I have been involved in projects with hundreds of services, largest corporations can run thousands of services.
I recommend to check wikipedia for more about ESB.

Can we connect an Azure mobile service to an on premise web service?

Does anyone know whether it is possible to route network traffic from an azure mobile service through a VPN to an on premise web service? None of the documentation I have read precludes that, but neither does it say we can. So far we have had no success though we can access the web service using a web browser VM in the same subscription. We can't run any new software at the site hosting the web service, so it would seem like Service Bus Relay cant be used and the web service can't have a publicly exposed ip address.
have a look at Mobile Services with an Azure Hybrid Connection. The walkthrough talks about exposing an on-premise database, but i think you can use the same steps to expose a different TCP port for your on-premise web service

Sharepoint 2013 auto-hosted app vs provider hosted app in Azure

What is the difference between an Auto-hosted app in Azure and a provider-hosted app in Azure.
Since both are hosted in Azure, can we say they are similar? Are there pros and cons?
The main difference is that with auto-hosted apps all Windows Azure and Windows Azure SQL Database components are provisioned for you when the app is installed and the Windows Azure Web Sites infrastructure handles load balancing and other important maintenance tasks for you. [1]
When using provider-hosted apps, you're responsible for provisioning what's necessary to support the app.
[1] http://msdn.microsoft.com/en-us/library/office/fp179887.aspx#Autohosted

WSO2 Application Server - REST Service, deploy as Application or Service?

If I have some functionality I want to expose via REST in the WSO2 Application Server and it seems that I have two main choices:
Deploy as a JAX-RS Application
Deploy as a Service
When deploying as a service, it appears that I have options for Quality of Service that don't appear to be available for Applications.
Question: If I am creating a REST based functionality from scratch, should I prefer to design as a service rather than as an application, because the service has more flexibility?
In WSO2 Application Server there are two approaches to create RESTfull services.
Create RESTfull service using Axis2, then you should deploy them as "service"
Create JAX-RS spec based service using CXF, then you should deploy them as "JAX-RS" applications.

WCF Project type differences

I'm working on few WCF tutorials and I would like to understand the difference between WCF Service Library, WCF Service Application and WCF Workflow Service Application.
Do you have any examples on when I should use service library and service application?
Thank you
WCF Service Application hosts the service directly in IIS.
WCF Service Library you have to handle the hosting yourself.
WCF Workflow Service Application does the same as the WCF Service Application except for Workflow services (WF).