Presentation is loading. Please wait.

Presentation is loading. Please wait.

© Donald F. Ferguson, 2014. All rights reserved. Topics in Modern Internet Application Development: Iteration, REST, Composite Applications, Pub/Sub Dr.

Similar presentations


Presentation on theme: "© Donald F. Ferguson, 2014. All rights reserved. Topics in Modern Internet Application Development: Iteration, REST, Composite Applications, Pub/Sub Dr."— Presentation transcript:

1 © Donald F. Ferguson, 2014. All rights reserved. Topics in Modern Internet Application Development: Iteration, REST, Composite Applications, Pub/Sub Dr. Donald F. Ferguson Donald.Ferguson@software.dell.com

2 2 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Agenda

3 3 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Agenda Questions, discussions on assignments. Follow on topics from last week –Iteration and pagination. –Asynchronous operations. –Composite applications and future projects. REST –Overview, review –Simple example –3 rd Project –Some example REST calls and observations. Pub/Sub, Notification: Introduction Next step in project

4 4 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Follow-Up from Last Week

5 5 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Cursors, Iterators, Pagination Last week, –I used SQL database cursors to explain REST pagination –The show of hands indicated lack of awareness of cursors The basic syntax is something like –DECLARE email_cursor CURSOR FOR SELECT email FROM employees; –OPEN email_cursor; –CRUD the row currently pointed to by the cursor, –FETCH email_cursor INTO v_email; –UDATE …; –DELETE … –CLOSE email_cursor; A lot of this happens automatically –The database engine uses defaults and the cursor is implicit –The database connection/driver package handles this for you.

6 6 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Why Cursors? Do something “complicated” with each row, e.g. –avgPrice = r.cartValue / r.noOfItems. –tax = taxes[r.cartZipcode] –If (avgPrice > 10.) { tax = tax/2.0 } –r.totalPrice = r.cartValue * (1 + tax); That is not easy to express in an SQL statement. Basically, the same reason you would use –An index into an array –Iterator in Java

7 7 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Cursors Define Isolation We have talked about ACID transactions –Atomic: A set of writes all occur or none occur. –Durable: The data “does not disappear,” e.g. write to disk. –Consistent: My applications move the database between consistent states, e.g. the transfer function works correctly. Isolation –Determines what happens when two or more threads are manipulating the data at the same time. –And is defined relative to where cursors are and what they have touched. –Because the cursor movement determines what you are reading or have read.

8 8 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications What does this have to do with REST? DB access is statefull, with connection state –Connection open/close –Begin/end transaction –Explicit or implicit cursor position REST achieves scalability by disallowing connections and connection state Your REST API has to document what happens if –A GETs X, B DELETEs X, A PUTs X –A GETs X, B GETs X, A PUTs X, B PUTs X –etc. –And this can get freaky if results are sets that allow insert, reorder, … And remember, the REST server application cannot “remember” what values of X it gave to A and B or in which order.

9 9 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Composite Applications “In computing, a composite application is a software application built by combining multiple existing functions into a new application. … … However, composite applications use business sources (e.g., existing modules or even Web services ) of information, … Anything you write with either combine (use) existing function or be used by someone else. You need to design and code for reuse (composite, component)

10 10 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Can be very complex sets of functions

11 11 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications We are going to build a composite app Evolve the simple CRM service –Implementation using new functions, e.g. notification, workflow, rules/policy, new database types, reports, … –“Portal” for on the glass integration of multiple sites. Use a SaaS, web callable product, price, billing, … API Build a very simple, multi-tenant web commerce application (catalog, cart, …) CRM Service Multi-Tenant Commerce Service SaaS Account/ Billing API Cloud Infrastructure APIs S3 SQS OpenID …

12 12 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Why Asynchronous Operations? A logically simple operation like “create customer” in the commerce system may need to –Perform basic validation, e.g. telephone no is not “canary.” –Check to see if the customer record already exists in the CRM system. –Call the postal service API to validate the address. –etc. This can take a while, which means that the request is –Tying up threads in the server –Holding open an incoming and outgoing connection –etc. This approach is fragile (connections break) and limits scalability.

13 13 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Building the composite app explains why … I asked you to write “code” that calls the REST API, e.g. –Code in commerce calls CRM and Account Management –And using a shell with CURL is probably not the way to go I asked you to understand how to use message queues –Creating a customer in the CRM system –Needs to create a customer in Commerce and Account Management –But this does not have to be immediate –And the only requirement is eventual consistency Think about Application Objects –Transfer customer from one agent to another –Has to manipulate multiple “entities” in the local and remote applications –And the code cannot “logically” reside on customer or agent, because it sort of manipulates both and you do not want the code on both “objects.”

14 14 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications REST

15 15 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Overview Review

16 16 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Representational State Transfer (REST) People confuse –Various forms of RPC/messaging over HTTP –With REST REST has six core tenets –Client/server –Stateless –Caching –Uniform Interface –Layered System –Code on Demand Today we will discuss (Briefly) One perspective to “code on demand” A broader interpretation of uniform intf.

17 17 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications REST Tenets Client/Server (Obvious) Stateless is a bit confusing –The server/service maintains resource state, e.g. Customer and Agent info. –The conversation is stateless. The client provides all conversation state needed for an API invocation. For example, –customerCursor.next(10) requires the server to remember the client’s position in the iteration through the set. –A stateless call is customerCollection.next(“Bob”, 10). Basically, the client passes the cursor position to the server. Caching –The web has significant caching (in browser, CDNs, …) –The resource provider must –Consider caching policies in application design. –Explicitly set control fields to tell clients and intermediaries what to cache/when. Motivation for the concepts of explicit/implicit cursors and pagination.

18 18 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications REST Tenets Uniform Interface –Identify/locate resources using URIs/URLs –A fixed set of “methods” on resources –myResource.deposit(21.13) is not allowed –The calls are –Get –Post –Put –Delete –Self-defining MIME types (Text, JSON, XML, …) –Default web application for using the API –URL/URI for relationship/association Layered System: Client cannot tell if connected to the server or an intermediary performing value added functions, e.g. –Load balancing –Security –Idempotency Code on Demand (optional): Resource Get can deliver helper code, e.g. –JavaScript –Applets The way I would have done the assignment enables this concept, but in an odd way.

19 19 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications SSOL Page

20 20 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Anatomy of a URL SSOL for the Classlist https://ssol.columbia.edu/cgi- bin/ssol/DhbtiwfsFOMOeFQaDwqxAh/?p%.5Fr%.5Fid=k0F2vZ4ccAhzbcAg0Ql K4h&p%.5Ft%.5Fid=1&tran%.5B1%.5D%.5Fentry=student&tran%.5B1%.5D%. 5Fterm%.5Fid=20143&tran%.5B1%.5D%.5Fcid=COMSE6998&tran%.5B1%.5 D%.5Fsecid=005&tran%.5B1%.5D%.5Fsch=&tran%.5B1%.5D%.5Fdpt=&tran %.5B1%.5D%.5Fback=&tran%.5B1%.5D%.5Ftran%.5Fname=scrs This is –Not REST –This is some form of Hogwarts spell –This is even bad for a web page

21 21 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Anatomy of a URL HTTP://www.somedomain.edu/...The “server” containerHTTP://www.somedomain.edu/ …/ssol/…The module/component …/listManagerThe Application Object or …/Class/COMSE6998-01Entity Class (“Extent”) and ID.../WaitingList/…Contained Resource GET, POST, … on URLfor CRUD Some details –…/WaitlingList/dff9/IQPath navigation into resources –…/WaitlingList?op=“Approve”?CUID=“dff9”Method

22 22 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications A Well-Designed REST Interface is not a Shallow Mapping of A Good Conceptual Model. You need an adaptor

23 23 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications A Simple Example

24 24 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications App Structure Simple Valves Mapping to Adaptors, which delegate onto application logic. But this is not the way I would do it.

25 25 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Simple Example Adaptor code 1.Process HTTP Req 2.Delegate onto app logic 3.Produce HTTP RSP Enables reuse of business logic for Local calls Message handler if running “in” the app Other channels, e.g. SMS, …

26 26 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Headers This is also not a good idea. You want helper functions that know how to set headers, etc. Otherwise, you are going to have header aware code everywhere. Which is “icky” if you add/remove/change headers

27 27 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Headers (in Handler Valve)

28 28 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications How I Would Have Done the Assignment Core concepts –Define a component –Deploy in a runtime container An example –Runtime container is Node.js –Node.js initialization reads a property files –Name of URL to listen on. –Mapping of URL  request adaptor. –.js file that implements the adaptor –A special REST call/web page for dynamically adding mappings –Which provides flexibility for “code on demand,” which is useful in some scenarios.

29 29 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications An Example: Internet-of-Things Internet-of-Things have three (or four) types of system –Central “control panel” in the sky –“Chirpers,” e.g. thermostat, smoke detector, … –“Burpers,” which are local controllers (app servers) that –Aggregate and burp chirps up to the control panel in the sky –But also receive messages from the control panel in the sky and perform ops. –And may talk to other burpers, e.g. “Do you smell smoke too?” Code on demand is a useful pattern for burpers, but should not require modifying the core code.

30 30 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications An Complex Example

31 31 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Uniform Interface – 3 Levels REST’s Uniform Interface is uniform for all resources, e.g. –URL –Fixed operations, e.g. GET, PUT, POST, … –Fixed protocol HTTP (and headers) A REST application needs to augment the basics with –A Uniform approach to format and protocol –Security –Idempotency –etc. –A uniform pattern (kind of a base interface) for –Pagination –Asynch operations –Ad hoc queries –etc.

32 32 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Example Considerations Service Endpoint –Endpoint –Endpoint Encryption Requests and Authentication –Request Headers –Request Timestamps –Request Authentication –Response Headers Resources –Resource Requests –Resource Representation –Resource Methods –Synchronous Operations –Asynchronous Operations –Success Response Codes –Failure Response Codes Resource Data Types –Atomic Types –Complex Type - Object or Structure –Resource Relationships –Resource References Pagination –Through HTTP Link Header –Syntax and Example of Pagination Link Header –Consistency Across Page Requests Versioning –Version Header –Version URI Saying “REST is not enough You have to define a set of patterns/ conventions of URLs, headers, …

33 33 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Endpoint /a/b/c?x=7&y=21 is a pretty straightforward concept, but … –How do I get info about customer “Ferguson?” –…/Customer/Ferguson/Donald –…/Customer?lastName=“Ferguson”&firstName=“Donald” –??? –Do I really want to –Find info about Don using …/Customer/Ferguson/Donald –Find info about agent using …/Agents?id=“21” –How does it work if I can find customer by name or phone number? –How do I set a relationship between customer and agent? –PUT …/Relationship/AgentFor?agent=“21”&”Customer=“Ferguson” –Or two PUTS, one on Customer and one on Agent? In the same way you have to define a framework for your application, you have to define a shape/pattern in your REST API model.

34 34 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Headers – Some Choices We Made HTTP Request HeaderValueMandatory auth-timestamp:The current POSIX time.Yes auth-key: The user or client’s unique API KEY. Yes auth-signature: The HMAC-SHA256 digest for the request. Yes api-version:(Optional) API version stringNo Accept: (Optional) application/xml or application/json No Nonce:One time UUID to enable idempotency/duplicate detection

35 35 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Response Codes OperationHTTP RequestHTTP Response Codes Supported READGET 200 - OK with message body 204 - OK no message body 206 - OK with partial message body CREATEPOST 201 - Resource created (Operation Complete) 202 - Resource accepted (Operation Pending) UPDATEPUT 202 - Accepted (Operation Pending) 204 - Success (Operation Complete) DELETE 202 - Accepted (Operation Pending) 204 - Success (Operation Complete) Examples of Link Headers in HTTP response: Link: ;rel=monitor;title="update profile" Link: ;rel=summary;title=”access report” 202 means Your request went asynch. The HTTP header Link is where to poll for rsp.

36 36 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Failure Response Code ErrorResponse Code Invalid Parameter400 - Invalid parameter Authentication401 - Authentication failure Permission Denied403 - Permission denied Not Found404 - Resource not found Invalid Request Method405 - Invalid request method Internal Server Error500 - Internal Server Error Service Unavailable503 - Service Unavailable

37 37 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Design Pattern Choices Resource Requests Collectionhttps://ENDPOINT/NAMESPACE/RESOURCE[?QUERY_PARAMETERS] Resourcehttps://ENDPOINT/NAMESPACE/RESOURCE/RESOURCE_ID[?QUERY_PARAMETERS] Collection OperationHTTP Request Get all items in the collection GET /collection Should also return the URI of the collection itself. Get an particular item in the collectionGET /collection/itemId Get items match certain criteriaGET /collection?property1=’value’ Add a new item to the collection POST /collection contents of new item … Get items starting at 100 with page size=25 GET /collection?start=100&pageSize=25 Support for Map Array Collection

38 38 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Relationships {“membership”: { “URI” : “http://dell.com/memberships/m12356”,http://dell.com/memberships/m12356 “created” : “2013-08-01T12:00:00.0Z”, “owner” : “user123456”, “expire” : “never”, “group” : { “ref” : “http://dell.com/groups/g123456” },http://dell.com/groups/g123456 “server” : { “ref” : “http://dell.com/servers/s123456”}http://dell.com/servers/s123456 } "link": { "href": "http://dell.com/api/resource1",http://dell.com/api/resource1 "rel": "self", “title” : “server-s123456” } Relationship as a resource Relationship as a field in resource

39 39 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Navigating Through Result Set GET on collections, maps, … needs pagination and cursors –Limit: What is the maximum number of elements you want? –QueryID: A tag for the query that produced the original result set –Offset references a specific element in a “page.” There is a standard for linking resources in logical sets, e.g. –Link: ; rel="previous"; title="previous chapter“> –Indicates that "chapter2" is previous to this resource in a logical navigation path. Your API/framework can use this for result sets –Example 1 –GET /api/customers?status=“Gold” returns some number of “Gold” customers and –Link Header for “next page” is Link: ; rel="next last“ –Which is the URL for the “cursor.next set,” which has 50 elements and is also “last” –Example 2 –Get returns the “next” from example 1 –With Link Link: ; rel="prev first" –Allowing you to go backwards to the previous “page.”

40 40 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications An Example

41 41 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Next Assignment Data Access Service CustomerDS AgentDS ContactDS Business Service CRM Services Customer Facade Agent Facade V V V Q UI Controller REST API Web UI Controller may be on server or in browser (e.g. Angular) Standalone App Amazon SQS SQS Adaptor

42 42 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Some Thoughts My URL would start with something like …/CRM/v1.01/ I would then add sub-trees for –/agent/ …Operations and data the agent can see –/customer/…Operations and data the customer can see –The sub-trees would “hide” some resources and fields in resources Three top-level spaces –/servicerequests/… for things like “transfer” that manipulate multiple entities –/queries/… for GETs that return data from a “join” of multiple entity types –/entities/customer for performing operations directly on resources Define a simple query encoding for GETs like –All customers in state = MA with last name beginning with “Fer*” –Customers with last name beginning with “Fer*” in state = {MA, NH} –There are several ways to think about this –Something simple –Something like Xquery –Something like JSON template matching (ala Mongo)

43 43 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Next Assignment

44 44 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Next Assignment – Some Wrinkles Your REST API/implementation must support –Duplicate request detection and discard. –Pagination, e.g. ability to iterate through large result sets. –Support requests that go “asynch” and require polling for the result. There is a way to write your API in a way that –Works for any “application objects” and “entity objects” –Driven by metadata/config info –That works for all “classes” without new code. Implement the following three “rules” in your application objects 1.Agents in the USA, except those in TX and NY can have at most 5 customers. 2.A customer can only update their contact information once/week, unless their agent is in MN or CT. 3.Assigning a new agent to a customer is only allowed if there are no “contact records” less than 72 hours old.

45 45 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Backup

46 46 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Amazon SQS (III)

47 47 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Amazon SQS (IV)

48 48 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Amazon SQS (V)

49 49 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Amazon SQS (VI)

50 50 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Composites Start with Components – What did this mean?

51 51 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Overall Structure Conceptual Framework Your “Classes” REST Facade Message Facade Q “Valve pattern” to Check security Reject duplicates … Browser REST Client

52 52 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Assignment 2 – Two Parts Refactor the implementation in 1a –Define and implement a base framework. –Choose a set of design patterns. –You may reuse and extend existing implementations/frameworks. –Map code to “modules” with remotely callable interfaces. –Document and explain your design. Remotely callable? You will provide support in your application for at least two of your “Application Objects” for two of –Web Services (WSDL, SOAP) –REST –Message Queue (AWS SQS) The remainder of this lecture will provide insight into what REST, Web Services and Message Queues are.

53 53 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Assignment 2 – Two Parts Refactor the implementation in 1a –Define and implement a base framework. –Choose a set of design patterns. –You may reuse and extend existing implementations/frameworks. –Map code to “modules” with remotely callable interfaces. –Document and explain your design. Remotely callable? You will provide support in your application for at least two of your “Application Objects” for two of –Web Services (WSDL, SOAP) –REST –Message Queue (AWS SQS) The remainder of this lecture will provide insight into what REST, Web Services and Message Queues are. Optional. Do what you can. Optional. Many of you already design apps this way. Core of assignment.

54 54 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications How I Would Have Done the Assignment Remember This?

55 55 © Donald F. Ferguson, 2014. All rights reserved.Modern Internet App Development – Lecture 4: Project 1,2 Discussion, Message Queuing, REST, Composite Applications Why Would I have Done Assignment 2 In this Strange Way? Last two weeks’ discussions of patterns, object models and datamodel –Might indicate that there is no task so simple that –I cannot make it complicated. Some other reasons –I can write one relatively small piece of code –That works for –New applications and partners using the queue with their own JSON formats. –Supporting “old” JSON message formats when I update my formats. –Add additional queues and REST APIs without writing new code. –Moving CRM endpoints to new addresses without modifying code. –… … This is a very simple example of message driven processing.


Download ppt "© Donald F. Ferguson, 2014. All rights reserved. Topics in Modern Internet Application Development: Iteration, REST, Composite Applications, Pub/Sub Dr."

Similar presentations


Ads by Google