Design Strategy - Distributed Systems Part 2 New Architectures CSIS3600 Systems Analysis and Design New Architectures • Module/Component Based – Smaller applications that link to other applications and resources to complete a task – Model is based on ‘consuming’ resources – Idea is that software now provides a service to other apps as well • Primary development platforms that support these models are J2EE and .Net (IBM has Websphere which is the same idea) Component Architecture • Component Architecture is considered one of the most flexible architectural model. • Component Object Model (COM) is a general architecture for component software. COM is associated with Microsoft. However it is not an implementation but a standard. • Components allow for partitioning business logic out of the front-end and back-end applications and into its own set of components. Component Architecture – the Last Rendition • ActiveX is Microsoft’s physical implementation of COM and DCOM. • DCOM is a protocol that enables applications to make object-oriented remote procedure calls. • Javabeans is Java’s component architecture. Component Development • • • • • Middleware COM, DCOM, ActiveX CORBA, SOAP XML Sun’s Java™ 2 Platform, Enterprise Edition • Microsoft’s .NET Components and Services Model Services Model Services Layer Architecture • Logical way to group components. The Services model is often referred to as a layer approach. • Components can request services from fellow components in their current tier and any tier below or above a component tier. Services Layer Approach continued • Requests cannot skip tiers. User services components cannot communicate directly with components in the data services tier and vice versa. • The typical use of the term layer refers to a process in which one layer must speak to the next layer and move from top to bottom and then back up. New View of Development J2EE and .NET • The idea is to make it easier to deploy applications that use distributed resources • Practical use of these platforms will be for large application deployment – Too expensive for small or even medium size needs – Not here yet but it’s coming Intro to J2EE • JavaTM 2 Platform, Enterprise Edition (J2EETM) provides a component-based approach to the design, development, assembly, and deployment of enterprise applications What is J2EE • J2EE was designed to simplify complex problems with the development, deployment, and management of multi-tier enterprise solutions. J2EE is an industry standard, and is the result of a large industry initiative led by Sun Microsystems. • J2EE is a standard, not a product. You cannot "download" J2EE. Rather you download a set of files which describe agreements between applications and the containers in which they run. – So long as both sides obey the J2EE contracts, applications can be deployed in a variety of container environments. J2EE Platform The J2EE platform uses a multi-tiered distributed application model. – This means application logic is divided into components according to function – Various application components are combined into a J2EE application – Each component, its related files such as GIF and HTML files or server-side utility classes, and a deployment descriptor (DD), are assembled into a module and added to the J2EE application J2EE Applications – J2EE applications are installed on different machines depending on which tier the application component belongs. – J2EE applications are ‘served’ on a J2EE server which is not usually maintained in-house – The J2EE server is responsible for the software to hardware relationship which is the most difficult for organizations to understand, manage and maintain Microsoft’s .NET Microsoft’s answer to J2EE • The focus is to make computing easier • Microsoft will retain all .NET servers • .Net is a little bit of everything – Next-generation development environment – Based on Visual Studio – New programming language C# – Data exchange and messaging – XML and SOAP What is .Net? • Microsoft.NET is product suite that enables organizations to build smart, enterpriseclass web services. – Note the important difference: .NET is a product strategy, whereas J2EE is a standard to which products are written. • Not revolutionary – evolution of existing technologies (COM, etc.) .NET BlueprintYour Internal Services Visual Studio.NET Applications Using Your Service Smart Clients .NET FW Windows Smart Devices .NET FW Simple Browsers Sales Data Service Corporate Fullfilment Service Your application and web service .NET Framework Windows CE, XP, 2000, .NET Open Internet Protocols XML, XSLT, XSD, SOAP, DISCO, UDDI, XHTML, HTTP, SSL, WAP .NET Enterprise Servers SQL Server BizTalk Server Application Center Commerce Server Host Integration Server Internet Security and Acceleration Exchange Server .NET FW Windows Building Block Services Passport – Identity Service Calendaring Service … [myServices] 3rd Party Web Services Geographic Mapping Service Credit Card Statement Service … [ActiveX Paradigm] Assemblies and Manifests • Resources are collected into Assemblies described by Manifests (ie Application described by DD) • Simplify Deployment And Management – The functional unit of sharing for deployment, versioning, and security • Zero-impact install – Applications and components can be shared or private • Side-by-side execution – Multiple versions of the same component can co-exist, even in the same process Microsoft Intermediate Language (MSIL) • CPU-independent set of instructions – Provides machine-code abstraction • instructions for loading, storing, initializing, arithmetic and logical operations, control flow, direct memory access, and exception handling – Can be JIT compiled to native code very efficiently – All code in Visual Studio .Net is written into MSIL – The idea is that various programming languages can be used because the original code will be written to MSIL – Converters for currently used languages are underway Common Language Runtime (CLR) • Manages running code – The glue that binds .NET together! – It’s the .NET Execution Engine • Completely replaces COM plumbing – No registration, GUIDs, .IDL files, HRESULTs, IUnknown, AddRef/Release, CoCreateInstance, etc. • Object/Component Oriented to the core – Even across languages! • Seamless integration with COM CLR Execution Model VB C# Install time Code Gen Script ... Assembly: MSIL + Metadata Development Deployment Common Language Runtime JIT Code Gen Native Code J2EE vs .NET .NET J2EE Programming language Dynamic Internet access Interoperability with different programming platforms C# (Preferred) ASP .Net Java (basically necessary) JSP MSIL Common Language Routine Java Virtual Machine and CORBA Application Development Environment Visual Studio .Net Forte System and component integration ADO.Net, SOAP and XML JDBC, EJB, XML, SOAP Web Services • Web services are now defined as interoperable service components that can be accessed as necessary • Frequently cited examples include third-party services for instant messaging, auctions, electronic payments and online purchasing systems. Existing credit card authorization and content-syndication systems also fall within the Web services realm Definition of Web Services • Web services are characterized by the ability to dynamically create and discover services and the delivery of those services over the Internet • Web services are software components that are created by wrapping a traditional service inside a Web service interface eliminating the need for translation • They communicate over Internet standard technologies (private or public) and are invoked or delivered through Web service interfaces The Technologies • Web services encompass a wide array of technology standards. • Simply put they are defined using WSDL (Web Services Description Language), are accessible using SOAP (Simple Object Access Protocol) and are registered using UDDI (Universal Description, Discovery and Integration) • XML is the foundational technology of Web Services XML • XML is an extensible language for describing other languages so businesses can design their own customized markup language • XML is far more flexible and extensible than traditional messaging and middleware communications. With XML, applications can send information across the Internet using HTTP and support much "looser" connections How Web Services Work • Discovery – How an application finds a web service • Description – Explains nature of the service and the company that offers it • Invocation – Calling procedure or method provided by a software component Discovery - UDDI • Universal Description, Discovery and Integration is an XML-based registry that lets businesses locate one another on the Internet • The UDDI standard outlines a framework for a registry of companies and a warehouse of their Web services • http://www-3.ibm.com/services/uddi/find Description • WDSL • WSDL is the de facto description mechanism in the current Web Services SOAP/WSDL/UDDI trinity (or quaternity if you assume HTTP as the default transport mechanism) WSDL • Web Services Description Language describes an organization's services and lets other organizations access them • WSDL is becoming the de facto standard for describing Web services in XML format • WSDL is extensible to allow the description of end points and their messages, regardless of what message formats or network protocols are used to communicate Sample WDSL Code http://www.capescience.com/tutorials/# SOAP • Simple Object Access Protocol is a way for programs to communicate regardless of operating system • SOAP defines a protocol for Remote Procedure Call, an application-to-application communication that hides underlying network complexities, across the Internet using HTTP and XML. • It is a relatively simple way to exchange information in a decentralized, distributed environment because it allows end points to connect via the Web and request the use of services Try Some Out • Adobe Systems Inc. has a Web service that translates HTML, graphics and Microsoft Office files into Portable Document Format files. It can be found at https://createpdf.adobe.com • Another Web service (http://webservices.eraserver.net/zipcoderesolver/) will look up the ZIP code of any U.S. address • Global Weather http://live.capescience.com/AirportWeather/index.html