Announcements - RIT

Transcription

AnnouncementsCloud discussion pros/cons- Teams to revisit individual findings andreportUpcoming R2API Specification – standardize and approve

APIs & Web ServicesSWEN-343

TodayNeed for APIsWebservicesTypesSOAP & RESTSOAMicroservices

API – (High-Level) DefinitionApplication Program Interface“A set of routines, protocols, and toolsfor building software applications. The APIspecifies how software components shouldinteract.”

API BenefitsEfficiency: Create the “functions” onceIntegration: Components can work togethermuch easier“Future Ready”: Faster & easier datamigrationWider Reach: Allow a more diverse audienceto use your tool/functionality

nteract/Estimate/Calculate Distance/Geocode

Service Definition Discrete unit of software functionality withthe purpose of reuse by different clients. Includes the policies, constraints andcapabilities of its use. Remote access is provided using aprescribed interface.

What is A Web Service“The term Web Services describes astandardized way of integrating Web-basedapplications using open standards over anInternet protocol backbone.”

Web ServiceA web service is different from aweb application A web application is for use byhumansSuch as http://www.weather.com A web service is for use byprogramsSuch as Twitter llowers/ids

Web ServiceProvides application components and interoperablemachine-to-machine interactionSelf-contained and self-described in a machineprocessable format (such as WSDL).Can be published, found, and used on the WebCommunicate using open protocols:SOAP messages using HTTP and XML/JSONserialization and other web-related standards.Cross platform compatible

Web Service BenefitsAllow different applications from different sources tocommunicate with each other Internal & externalNot tied to any one operating system or programminglanguage.Secure access to dataWeb services can tightly control access to the dataand services they make available to otherapplications.

WS Design PatternsFacadeProxyOthers .

WEB Service API (Styles and impls) RPC API Message API Resource API SOAP REST Microservices

SOAP & REST

ACIDACID (Atomicity, Consistency, Isolation, Durability)Atomicity. In a transaction involving two or more discrete pieces of information, either allof the pieces are committed or none are.Consistency. A transaction either creates a new and valid state of data, or, if any failureoccurs, returns all data to its state before the transaction was started.Isolation. A transaction in process and not yet committed must remain isolated from anyother transaction.Durability. Committed data is saved by the system such that, even in the event of afailure and system restart, the data is available in its correct state.

Durability?

Web Services: SOAP & RESTSOAP Protocol, REST ArchitectureSOAP:Heavier weightTightly coupled to serverSupports:ACID transactionsACID Ensure reliable transactionsAdds some security featuresREST:Lighter & SimplerNo UDDINot restricted to XML

Web Services: SOAP & RESTSOAP: Standards-based Web Services access protocolBeen around a whilePushed by MSRESTNot so “new” kid on the blockSimple method of accessing web servicesBoth use HTTP protocol

SOAP Based WS Components1. SOAP: XML-based protocol for exchanging informationbetween computers.2. WSDL: XML-based language for describing web servicesand how to access them.3. UDDI: XML-based standard for describing, publishing, andfinding web servicesa. UDDI UDDI (Universal Description, Discovery, and Integration) - XML based registry.i. Defines a way to publish and discover information about Web services.b. Now mostly used inside companies

SOAP Web Service Components

Simple Object Access Protocol (SOAP)Foundation layer of WS Protocol stackComponents:Envelope: Defines message structureEncoding rulesConvention for procedure calls & responses

Representational state transfer (REST)“An architectural style, and an approach tocommunications that is often used in thedevelopment of Web services.”

RESTful APIBreaks down transactions to create series ofsmall modules flexibilityPUT: Change state of or update resourceGET: Retrieve ResourcePATCHDELETE

Service Oriented Architecture

Service Oriented Architecture (SOA)An approach used to create an architecture based upon the useof services.Services (such as RESTful Web services) carry out some smallfunction, such as producing data, validating a customer, orproviding simple analytical services.A primary goal is loose couplingSOA Service: logically represents a business activity with a specified outcome.self-contained.is a black-box for its consumers.may consist of other underlying services.

SOADoes not necessarily require Web ServicesBuild a system from autonomous servicesIntegration is forethought, not afterthoughtMay combine different:LanguagesPlatformsSecurity modelsBusiness ProcessesAnd this is ok!

How SOA Works

insys/Architecture-FRONTeO-E-banking%20%20ColRev2 0.jpg

SOA meta-model, The Linthicum Group

SOA -Myths & FactsSOA is a technologySOA is a design philosophyindependent of any vendor, product,technology or industry trend.SOAs require Web ServicesSOAs may be realized via Webservices but Web services are notnecessarily required to implement SOASOA requires a complete technologyand business processes overhaulSOA should be incremental and builtupon your current investmentsWe need to build a SOASOA is a means, not an end

SOA - ReuseConnect into what is already there - Layer business processmanagement, collaborative workflows, and reporting on topof existing IT assets.Extract more value from what is already there - Enable existingapplications to be reused in new ways.Extend and evolve what we already have - Create IT supportfor new cross-functional business processes that extendbeyond the boundaries of what the existing applications weredesigned to do.

RecapWhat are the difference between SOAP &REST?Primary goals of SOAWhat technologies are used in SOA?

Activity: Investigate, summarize, submit, presentAPI Best Practices(each team choose two)OpenAPI & SwaggerMicroServices & Micro/TransactionsACID in RDBMSExternal API 3rd party services What is it the concept about? Where applicable , what are theProtocol/Routines/Tools/Policiesassociated with the concept? How might it be relevant to yourTeam or for our ERP? Should be usethis?

MicroservicesRead about Microservices [1], [2]UnderstandWhat are they?Benefits?Drawbacks?Where are they used?Could/should you use it in your project?Have/Will you use it in your project?

SOAP Based WS Components 1. SOAP: XML-based protocol for exchanging information between computers. 2. WSDL: XML-based language for describing web services and how to access them. 3. UDDI: XML-based standard for describing, publishing, and finding web services a. UDDI UDDI (Universal Description, Discovery, and Integration) - XML based registry.