Richard Conn introduced the Academic Relations Program – where Microsoft attempts to establish a relationship with various universities around the country. Pretty much what this means is discounted Visual Studio and Office licenses for universities and university students. Microsoft has even started to reach into the high schools, with 20 high schools in Atlanta alone participating. If you have a high school student or college student interested in the computer sciences, Microsoft offers some excellent internships and scholarships. Another interesting facet of the ARM program is its tie to Microsoft Research and a curriculum available to all for teaching Microsoft technologies.
David Chappell introduced himself by making sure that everyone knew he isn’t Dave Chappelle. Nor is he Dave Chappell from Sonic Software (who ironically also writes books and give technical presentations on enterprise messaging). After some fun at his own expense, David jumped into his presentation by postulating that there is always some kind of application architecture for enterprise systems. This started with mainframes, moved on to client/server systems, and then on to multi-tiered architectures. We may now be on the verge of shifting into the fourth evolution of enterprise systems, service-oriented architecture. The reason this shift is possible now and not before is due to the global vendor agreement on how to consume web services. Service-oriented business logic needs to rest on a foundation that is standard and ubiquitous. On Windows, this platform will be Indigo.
In the simplest sense, Indigo is a bunch of C# classes that extend the .Net framework with a new namespace. Indigo communicates through SOAP messages, functioning as an über SOAP stack. This unifies existing MS technologies (ASMX, .NET Remoting, Enterprise Services, WSE, MSMQ) for distributed applications. It also provides interoperability between .Net apps and others (EJB and WebSphere). Finally, Indigo offers the idea of explicitly building service oriented applications.
An important note is that Indigo is not backwards compatible with existing .Net distributed technologies. . Indigo actually implements much of the functionality of the existing technologies, including SOAP over networking channels and many of the WS-* standards. Once Indigo is release, Microsoft will no longer be enhancing the existing technologies. Indigo will not replace the existing technologies, and will not prevent those technologies from working.
Service-Oriented Applications are generally abstracted into Data (relations), Logic (objects), and Presentation (GUIs). Indigo fits into this picture between the logic and presentation and can be thought of as Access to Services. In the past, the link between Data and Logic has been the mapping of tables to object hierarchies and of SQL types to Java/CLR types. When the object-oriented Religion hit the world, OODBMS systems hit the market, only to fail. It turns out that mapping between the relations and objects is easier. Similarly, when the object religion hit the relationship between Logic and Presentation, Microsoft introduce a way to expose object interfaces –> COM and DCOM. That turned out to be very painful. Indigo goes back to the concept of mapping between services.
Having covered the basics of Indigo’s intentions, we now looked at code.
To create an Indigo service, you must implement a service class – the methods the services provides. You must select a host – the app domain and process the service runs in. Finally you must specify one or more endpoints in which to access the services. You have 2 methods for implementing a service class – mark a class with the ServiceContract attribute. Or mark an interface with the ServiceContract attribute then create a class that implements the interface. A caution – Indigo attributes (OperationContract) and C# modifiers (public, private) are completely separate – you can tag a private method with an OperationContract, thus exposing it to applications OUTSIDE the AppDomain. However, that same method is private within the application. David tried to convince us that this is actually a good idea by explaining that you can create a facade of classes which invoke internal methods and expose their methods as services. However, the facade of classes are not supposed to be called from within the application. The group seemed leery of this – much grumbling about a new “method type” was heard. My personal impression is that this seems to be an attempt to encourage good design (i.e. – the Facade pattern) on future projects.
Additional options in Indigo development: One way calls adds a modifier to the OperationContract (IsOneWay=true) for events. Duplex contracts for both the client and service invoking operations in the other. Message contracts allow working directly with the SOAP messages. all data sent and received by operations must be serialized and de-serialized. The way that they are serialized is based on the data contract. To create and pass your own types or enums, you must define a data contract (more attributes).
A quick aside: SVCUTIL can be used to generate a skeleton service class from WSDL contracts if you want to design your interface contracts before writing code, or contract first development. By contrast, writing the code first and adding the ServiceContract and OperationContract attributes as needed is called code first development.
When defining a host, you can host a service in an arbitrary process (exe, NT service and winform/avalon processes) or host a service in IIS or the Windows Activation Service (WAS) – a lite webhost for machines not running IIS. An app or service would use the ServiceHost generic type. IIS/WAS require virtual directories and a .svc file. Just like ASMX, an instance of the service class will be created when a client request arrives.
Finally, you must specify an endpoint – every client connects to a specific endpoint. Every endpoint has 3 things: an address (where to find it), a binding (how to communicate), and a contract (what can it do). Addresses are usually URIs. Bindings wrap together may aspects of communication such as protocols for conveying SOAP messages (HTTP, TCP, etc) security options, support for wS-* specs, and more. Several predefined bindings will ship with Indigo but custom bindings can be created. An example of a predefined binding is BasicProfileBinding which conforms to WS-I Basic Profile 1.0. WS ProfileBinding supports WS-ReliableMessaging, WS-Security, WS-AtomicTransaction, and other WS-* specs. NetProfileTCPBinding sends binary encoded SOAP with support for reliable messaging, security, and transactions directly over TCP (Indigo to Indigo only). One service can expose separate endpoints, each with a different binding for different clients. Contracts are the name of the class that the endpoint exposes (service class or interface). Endpoints are likely to be defined in config files, but they can also be added directly within the code assembly.
To create an Indigo client, create a channel to a service (typically hidden by a proxy which has been created by SVCUTIL or Visual Studio). Clients also specify a specific endpoint that they will communicate with. That’s about it – nothing very complex.
Services built on Indigo can be reliable, secure, transactional, and queued. Indigo also offers reliable messaging; raw SOAP doesn’t guarantee reliable message transfer but some of the Indigo bindings such as WsHttpBinding, support WS-ReliableMessaging. However, WS-ReliableMessaging doesn’t directly support message queuing – this is still an area where the vendors can’t agree on a standard. Since that the world in general and Microsoft in particular has caught the Security Religion, Indigo allows for security configuration via authentication, message integrity, and message confidentiality. Indigo also uses the .Net security model and the PrinciplePermission concepts. Indigo transactions are built on the new 2.0 System.Transactions namespace. Now transactions are separate from state management (different from Enterprise Services, COM+, and MTS). Indigo apps can use System.Transactions explicitly or can use OperationBehavior attributes (which use System.Transactions under the covers). Indigo supports queuing by running on MSMQ as the transport. This means queuing only works on the Windows platform. There are predefined binding choices which wrap queuing.
When considering upgrading to Indigo services, keep in mind that all existing apps will continue to work. However, if you do decide to upgrade, keep in mind the following questions. Will my Indigo app and apps built with existing technologies be interoperable and will my apps be portable? The Indigo team says yes to both questions for ASMX. Remoting will not be interoperable. Enterprise Services interfaces can be wrapped with an Indigo-supplied tool. ES clients will communicate use an Indigo moniker. WSE 1.0 and 2.0 are not interoperable or portable. WSE 3.0 will be interoperable AND portable, but it hasn’t been released yet. MSMQ is interoperable using MsmqIntegrationBinding, but portability is not a simple task.
Indigo vs Biztalk. Indigo is a platform for building services on .Net. Biztalk is an integration tool which maps between various heterogeneous environments. Biztalk already has adapters for technologies like MSMQ and SQL. Expect an Indigo adapter in Biztalk soon.
There is a March CAP currently available for Indigo and we expect the Beta 1 of Indigo in a matter of weeks.
Questions from the audience included:
Indigo talks to a service, what do I get back, a Dataset? Actually you get XML (SOAP), but the data in the message is some kind of serialized object. So it could be Dataset or objects.
What about the rich type support of Remoting? Indigo can serialize any .Net type when talking to other Indigo services. However, when interacting with other environments, use contract first development to ensure data type interoperability
How will Indigo handle big objects like Datasets? Indigo serializes an object sent to it and drops it on the wire.
MSMQ has a max message size, how does Indigo use MSMQ to transmit larger objects? MSMQ is a transport mechanism like TCP – large files are broken up and sent across the wire in discrete chunks.
Does Indigo require full trust to run on a machine like .Net Remoting does? David Chappell wasn’t, but Doug Turnure doesn’t think so. Research is required.
Can you serialize custom types? Yes with a data contract. Alternatively you can drop in your own seralizer.
I ran across this link a while ago in my RSS aggregator and thought I’d post it here as it’s extremely pertinent: Don Box’s Five Minute Indigo Challenge.
— Matt Ranlett
posted with BlogJet