What is really the difference between ASP.NET web service and WCF service?
Before we jump in too detail, few important things to remember about the service architecture
Web Service (.asmx) relies on XMLSeralizer object to transform data back and forth.
Only Public types and properties can be transformed using Web Service
it supports classes that implements IEnumerable interface and do not support classes that implements IDictionary object Such as HashTable.
WCF on the other hand uses DataContractSerializer, it uses DataContractAttribute and DataMemberAttribute to translate .Net Types to XML. DataContractSerializer can transform IDictionary obejct.
The main contracts that makes WCF powerful are
DataContract : Defines the structure of data included in the payloads of the messages flowing in and out of the service
Service Contract : Defines which operations the service makes available to be invoked as request messages are sent to the service from the client
Message Contract: Enables you to control the headers that appear in the messages and how the messages are structured
Fault Contract : Service methods communicate processing using SOAP fault messages. SOAP faults are message types that are included in the metadata for a service operation and these exceptions can be handled via Fault contract.
Creating Proxy Object for Client Consumption of the service:
WSDL.EXE tool is used by consuming application to create Web services proxy object or class..
SVCUTIL.EXE is used by consuming application to create WCF proxy object or class.
Wednesday, October 27, 2010
Tuesday, October 26, 2010
Data Replication Architecture
I'm currently working on an infrastructure challenge on data replication and thought of updating my learning in my blog:
There are several things to consider while working on server farms, where servers are located in multiple sites across the globe.
Peer to peer replication and Transaction Replications are few options that are available and are commonly used. This require not only configuration changes on the server but also require development consideration.Peer to peer replication are available only in SQL server 2008
The servers on the farm should have identical O/S version, SQL server version, including the patches that are applied.
Database Schema should be identical
Identity column do not work in replication (atleast from SQL 2005)
Primary key with alpha-numeric or composite key will help resolve idenity column
Thursday, July 29, 2010
WCF Channel Error
When you consume WCF service and hit the service frequently sometime you get Channel exception, this can be avioded by closing the channelfactory properly on your client.
client.ChannelFactory.Close();
Monday, July 19, 2010
Cloud Computing
I'm trying to understand myself
about cloud computing and the fundamental principles behind the new technology
and like to add it to my blog as a reference
Cloud computing is simply a set of services that are provided by some third
party companies or within an enterprise as a centralized service. There are
lots of advantages and I listed some of them below:
1. Separation of Hardware from the
development team - Developers job is to develop the application based on the
business requirement and not worrying about the hardware availability, space,
licenses, software’s/tools, etc... Provider of this service will be responsible
for all these services. In short no licensing or server expenses, development
team simply register their services with the provider.
2. Maintenance: The provider of
these services handles the traffic, security, network, etc... and it reduces
the maintenance cost as well as the resource cost.
3. The cost incurred for these
services are truly based on the usage, rather than paying for the complete
hardware, network, etc...
The services that are provided by
the industry are classified as three different services
1.
Software as
a service (SaaS)
othis
service provides you an application package or a piece of software that allows
you to do some tasks that you normally do at work
oe.g.:
MS-Office 360, Google Docs, Drop box, Sales Force, Skype, Workday, Custom application,
etc...
2.
Platform
as a service (PaaS)
othis
service provides a platform with the tools that allows to develop and deploy
application on the cloud
oe.g.:
MS-Visual Studio, Ruby on Rails, Java, LAMP, Python, etc...
3.
Infrastructure
as a service (IaaS)
othis
service provides you a physical/virtual hardware like servers, storage and
networking related hardware that you can leverage for infrastructure needs
Cloud service
providers (I listed few that I'm aware of):
Microsoft introduced Cloud computing
called 'AZURE' in two platforms, one as a Development platform and other one as
a Delivery platform. They provide all the above three services (SaaS, PaaS,
IaaS). We can completely outsource the application service on Microsoft Azure
platform or we can buy the complete package that includes the hardware, Azure
service, SQL Azure Service, etc... as a bundle that can be housed in the
enterprise.
Amazon introduce Cloud Computing
called 'Amazon EC2/AWS' and they provide all the above three services (SaaS,
PaaS, IaaS) and support wide range of development platform. It supports wide
range of database from SQL Server, Oracle, MySQL to some open source database.
Amazon also supports the Hadoop technology on their platform.
Other Cloud providers like VMWare,
Rackspace, Red Hat, they generally provide IaaS and PaaS service.
The Future of Cloud Computing: though cloud computing seems like a brand new concept, this
has been in the market for quite few years and some of these providers already
worked on the private cloud model for some time. Some of the companies already
started consuming these services, especially the new ventures are all targeting
towards the cloud technology.
Risks: though the cloud services providers
offers a great level of security and SLA, still there are some risk that needs
to be considered before choosing the service/s. Sometime the external factor
also plays a role not to choose the cloud option like Compliance, legal and
other regulatory needs, also when the organization heavily rely on the vendor applications
as well as application that are heavily dependent on frequent configuration
changes.
Characteristics of Cloud: there are several characteristics cloud computing provides
but I would like to pick the key important characteristics that I believe cloud
computing offers
- Self-Servicing
- Consumers can provision or de-provision on the fly, you can increase the storage capacity, bandwidth capacity, load balancing, etc...
- Elasticity and Scalability
- As the name implies, cloud is all about elasticity, you can stretch and shrink based on your need at given point of time.
- You can scale your application by increasing or decreasing the capacity
- Standardization
- It provides a standard interface, once you are familiar with couple of application on the cloud network; it follows the same mechanism for the rest (in most cases).
- You can define the standardized security mechanism for your business.
- Pay as per usage
- Pay for what you use. Cloud service is more like our electricity meter, pay for the service you consumed and you can turn on or off when needed.
- Resource management:
- A cloud service provides a great deal of cost saving especially resource management, since most of critical tasks are managed by the cloud providers.
Deployment Models: Cloud services can be deployed and consumed in different
ways
- Public Cloud - in this model the entire service (IaaS, SaaS, PaaS) are hosted externally
- Private Cloud- in this model the entire services are setup internally or sometime by utilizing the appliances provided by the Cloud Service providers.
- Hybrid Cloud - in this model the services are in mix mode, some part of the cloud sits in public loud and some are internally hosted e.g.: Database can be managed internally and the application that consumes the database sits on the cloud.
Subscribe to:
Posts (Atom)