69
1 Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010

Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

1

Lecture 4: Architectural Patterns – Part 2SGN-5226 Content Sharing Technologies and Services

23.9.2010

Page 2: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

A detailed reference architecture for Web 2.0 Services

2

23.9.2010

Page 3: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Patterns we are going to study in detail

3

1. The Service-Oriented Architecture Pattern2. The Software as a Service (SaaS) Pattern3. The Participation-Collaboration Pattern4 The Asynchronous Particle Update Pattern4. The Asynchronous Particle Update Pattern5. The Mashup Pattern6. The Rich User Experience Pattern7. The Synchronized Web Patterny8. The Collaborative Tagging Pattern9. The Declarative Living and Tag Gardening Pattern10. The Semantic Web Grounding Pattern11. The Persistent Rights Management (PRM) Pattern12. The Structured Information Pattern

23.9.2010

Page 4: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

4

6. The Rich User Experience Pattern6. The Rich User Experience Pattern

23.9.2010

Page 5: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Business Problem

5

• Original websites were based on static content (e.g. Web pages, .pdf files), typically mapped to real world artifacts (e.g. Brochures)

• However in the real world those artifacts are only part of the wholeHowever, in the real world, those artifacts are only part of the whole interaction

• Stepping into a car dealer, gives to the user much more than simply a brochure (talking to the seller, touching the car, talking to other customers)

• Those interactions are difficult to bring to the electronic domain

• For the electronic interaction to match the human-to-human interaction, the application has to be dynamic, and contextually engage the user

• Amazon’s ”customers who bought this item also bought...”• Customize your own car...• Wow factor...

23.9.2010

Page 6: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Context

6

Usable anywhere that a users needs to interact richly with an application, optimizing visual information and information relevance

23.9.2010

Page 7: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Derived Requirements

7

• Contextually specialized experience• E.g. taking the user automatically to the corresponding national page• Centering a map to a user’s approximate location (based on IP address)

• Being able to render a variety of content/media, for rich user experience (RUE)

F t d i UI d i• Fast and responsive UI -> good experience• Mashing up capabilities at the client• Support both online and offline states• Easy to deploy on multiple platformsEasy to deploy on multiple platforms

23.9.2010

Page 8: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Static Structure and Dynamic Behavior

8

Developers should clearly identify the different states and interactions that might occur between the user and the system. Create a “story board”, map to different Graphical User Interface elements, etc.

Simple example: an application that is linked to a user account, potentially has the following states that need to be considered:

• Normal, Password Lost, Username Lost, Both Lost, Password Lost and email Changed Unregistered User Phishing Double User RegistrationChanged, Unregistered User, Phishing, Double User Registration…

• Now think more complicated scenarios…

• Advice: short forms to fill-in, validating forms, careful when to reset a whole form incorporating elements that prevent users from enteringwhole form, incorporating elements that prevent users from entering incorrect data, presenting all relevant data to the users in a given context, …

23.9.2010

Page 9: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Static Structure and Dynamic Behavior

9

Good example of RUE

23.9.2010

Page 10: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Implementation

10

Key issues to consider:• Team should model the whole system (use cases, views, sequence

diagrams, data models, etc)

• Try to consider the application also independent of technology• Technologies change, but business patterns are more stable

23.9.2010

Page 11: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Business Problem Resolved

11

The simple login example:• Normal, Password Lost, Username Lost, Both Lost, Password Lost and email

Changed, Unregistered User, Phishing, Double User Registration…

• Consider also OpenID, for “outsourcing” the complexity• We will study OpenID in a future lecture

• This was only a small example. RUE can be applied in a variety of otherThis was only a small example. RUE can be applied in a variety of other applications and scenarios

• iTunes• Customize my car• Decorate my house• Decorate my house• …

23.9.2010

Page 12: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Consequences

12

• Provide a positive feeling to the users

• Get users to come back, easily register, comment, contribute

• Viral marketing, get the people to suggest your site to others• Example: http://vimeo.com/4281939

23.9.2010

Page 13: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

13

7. The Synchronized Web Pattern7. The Synchronized Web Pattern

23.9.2010

Page 14: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Business Problem

14

Most web-based services are created for being accessed/experienced while having broadband connection

However users (e g mobile users) might not have always-on connectivityHowever, users (e.g. mobile users) might not have always on connectivity• Think flying by airplane, in a tunnel by train, ...

Also, user data is distributed (and duplicated) among different services, and not synchronized.

• User has to update his/her data in multiple places

23.9.2010

Page 15: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Context

15

Typically applies when an application has a desktop and a network (service) component

• Data needs to be synchronized

Variation of the Software As A Service pattern, but more focused on keeping state synchronized

Al li h th li ti i d t b d i ff li dAlso, applies when the application is supposed to be used in off-line mode

23.9.2010

Page 16: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Derived Requirements

16

• Need for replication and synchronization services• A local web application server and persistent data storage

• Set rules for the synchronization process, conflict handling, etc. (e.g.Set rules for the synchronization process, conflict handling, etc. (e.g. usage of timestamps)

23.9.2010

Page 17: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Static Structure

17

23.9.2010

Page 18: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Static Structure

18

23.9.2010

Page 19: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Static Structure

19

23.9.2010

Page 20: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Static Structure

20

AJAX has been used to build synchronization functionality into Rich Internal Application

Zimbra has been one of the first service to showcase a rich AJAX webZimbra has been one of the first service to showcase a rich AJAX web application synchronized

• http://www.youtube.com/watch?v=T8bvimEZPhU

G il ff liGmail off-line access• http://www.youtube.com/watch?v=cOAZaIaeIrI

23.9.2010

Page 21: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Business Problem Resolved

21

Richer user experience, as applications (desktop, mobile, etc.) and the web are synchronized

Software as a Service even more appealing as it can be used in off-lineSoftware as a Service even more appealing, as it can be used in off line situations

23.9.2010

Page 22: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Consequences

22

• Take web applications offline• Take client application online• Move between services, as data could be (theoretically) synchronized

• E g move everything from Gmail to Yahoo! main scenario• E.g. move everything from Gmail to Yahoo! main, scenario

• Data moving among services• When you do something in one service, it appears at others, so you don’t have

t t tito repeat actions

23.9.2010

Page 23: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Consequences

23

• Data moving among services• When you do something in one

service, it appears at others, so you don’t have to repeat actions

• Example:• Data from Dopplr appearing on

Facebook

23.9.2010

Page 24: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

24

8. The Collaborative Tagging Pattern8. The Collaborative Tagging Pattern

23.9.2010

Page 25: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Business Problem

25

Searching resources on the Internet, is typically based on search terms, which are compared against terms in a metadata index

Typically metadata index is built on resourced being tagged a small numberTypically metadata index is built on resourced being tagged a small number of people

• E.g. tags on a photo

Th ll h h h f i / i iThe smaller the group, the more chances of inaccurate tags / omissions

• Reminder: Tagging = apply/associate a label to an object, declaring what it representsp

23.9.2010

Page 26: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Context

26

Collaborative tagging adds natural language (from the community) to searching and indexing mechanisms

Allows better searching/results without the need to extensive hierarchicalAllows better searching/results without the need to extensive hierarchical metadata annotations

23.9.2010

Page 27: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Derived Requirements

27

• Resources must be associated with metadata, allowing people to extend them and rank their relevance

• Tags must have natural language to be meaningfulTags must have natural language, to be meaningful

23.9.2010

Page 28: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Static Structure

28

Resources (e.g. photos) are examined by people and according to their own interpretation of what they represent, they add tags

23.9.2010

Page 29: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Dynamic Behavior

29

23.9.2010

Page 30: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Business Problem Resolved

30

• The more users populating the tags, the more effective the search

• Google spell check works this way• Not based on a static dictionary but based on commonly searched terms• Not based on a static dictionary, but based on commonly searched terms

• Google Image Labeler is a great example of collaborative photo tagging• http://images.google.com/imagelabeler/

23.9.2010

Page 31: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Consequences

31

• Some people have argued that the tagging (folksonomy) approach are not to be trusted, due to the lack of formalized ontology (i.e. higher level formal logic)

• The “most relevant” approach, might be faulty, because you do not know for which other people it was most relevant to

H it t k fi It th t th tt f• However, it seems to work fine… It appears that there are patterns of use in the folksonomy approach that have consistent results, at large groups of people

23.9.2010

Page 32: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

32

9. The Declarative Living and Tag Gardening Pattern9. The Declarative Living and Tag Gardening Pattern

23.9.2010

Page 33: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Business Problem

33

As we discussed with tags, people can declare objects, state their opinion, etc.

Conclusions cab be drawn from the aggregation of those declarationsConclusions cab be drawn from the aggregation of those declarations

Until now, there was no way to collectively use those declarations

Specific services try to aggregate those user preferences, as tags, and provide rich semantic information (tag gardening)

23.9.2010

Page 34: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Context

34

Applies where declarations are harvested for some computer functionality• An artificial intelligence component helps to inference a conclusion

E.g. People blogging with their location -> declarative livingE.g. People blogging with their location declarative living

23.9.2010

Page 35: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Derived Requirements

35

• Need for mechanism/UI that lets the users make conscious declarations• E.g. Twitter, Delicious, Facebook status updates

• First collect data, then build tag gardeningFirst collect data, then build tag gardening• You cannot analyze the data, if there are no tags at first place

• How to split and aggregate data to and from multiple machines

• Performance

• ScalingScaling

23.9.2010

Page 36: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Static Structure

36

Declarative living: Very similar to Collaborative tagging, but specific to the human making the declarations (Collaborative tagging agnostic to the “actor”)

23.9.2010

Page 37: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Static Structure

37

Tag gardening

23.9.2010

Page 38: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Implementation

38

Many commonalities with Collaborative Tagging

In Tag Gardening, data can be visualized (e g to a tag cloud)(e.g. to a tag cloud)

Key issues to consider:Gi th f t th t t h ld t t k d l ti li i• Given the fact that a system should try to make declarative living as easy as possible (so that as much data as possible is gathered), related APIs should be as simple as possible

• SOAP is considered over-complex. Consider REST

23.9.2010

Page 39: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Business Problem Resolved

39

Declarative living allows more user data to be gathered at services. With the usage of microformats, Twitter manages to extract even more specific data from the user statements

23.9.2010

http://www.mentalfloss.com/blogs/archives/31487

Page 40: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Consequences

40

Minimizing complexity for tagging (at infrastructure and API) the declarative living and tag gardening will bring more users to the service

• More users = more attention = more chances for monetization

23.9.2010

Page 41: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

41

10. The Semantic Web Grounding Pattern10. The Semantic Web Grounding Pattern

23.9.2010

Page 42: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Business Problem

42

An organization has millions of data elements, aggregated from multiple sources.

Searching functionality is provided but due to the large amounts of dataSearching functionality is provided, but due to the large amounts of data, relevance is not always good

• Sorting and ranking helps, but slow and inefficient (due to the amount of data)

S f f ti d l ti b t th h l• Some form of semantic declaration about the resources can help• Declarations can come from a single or multiple sources

• With Semantic Web Grounding, an intermediate step helps in inspecting the claims (made about the resources) and compares them to real-world patterns of interaction with the resource

23.9.2010

Page 43: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Context

43

Can be applied where there is large number of resources, linked to some declarations about what they represent

Declarations are not based on some pre-agreed scemanticsDeclarations are not based on some pre agreed scemantics• Tags or lables

23.9.2010

Page 44: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Derived Requirements

44

Need for mechanism for allowing claims to be made about resources

Resources must be uniquely identified

There is a needed for a mechanism to get feedback about those claim-resource links, based on some real-world effects observations

Need for an adaptive mechanism that is influenced by the claims vs. the real-world observations

E g a search engine monitoring which of the provided links (which areE.g. a search engine monitoring which of the provided links (which are results to a search query) are clicked. And (using cookies) measuring if a user is coming back to the search page, once visiting an external link

23.9.2010

Page 45: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Static Structure

45

23.9.2010

Page 46: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Implementation

46

A simple word-tagging mechanism in which any interacting party (e.g. a user) can declare which tags are relevant to the resource

A post-processing analysis is using this data to recalculate the relevanceA post processing analysis is using this data to recalculate the relevance

More complicated example: The search engine that monitors the visitor interactions

23.9.2010

Page 47: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Business Problem Resolved

47

This pattern inserts an adaptive dynamic layer to the semantic web and behavior tracking, by grounding semantic claims in an real-world interaction observation

As the system is used more and more, the relevance of the results are increasing

23.9.2010

Page 48: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Consequences

48

Applications still rely on individual users

Issues: different cultures, language, etc.

Those systems work for the majority of the people, but there is always a minority that is not served well.

• Adding to the mechanism some knowledge about the individual (requesting) i ht i th ltuser, might improve the results

23.9.2010

Page 49: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

49

11. The Persistent Rights Management (PRM) Pattern11. The Persistent Rights Management (PRM) Pattern

23.9.2010

Page 50: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Business Problem

50

PRM wider than DRM (Digital Rights Management)

As digital assets are distributed on the Web, it is difficult to enforce policies to them as in the real world Things are more difficult when multipleto them, as in the real world. Things are more difficult when multiple copies exist

Examples• Somebody might be working with an older version of a digital asset,

because he is not aware that a newer version exists• Somebody released a document that needs to be recalled, erasing all

traces of its existence

Placing resources under a secure domain and requiring authentication is not a solution, as there is no control outside the secure domain

23.9.2010

Page 51: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Business Problem

51

23.9.2010

Page 52: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Context

52

Applies in an environment where the owner of the digital assents wants to keep and exercise post-distribution management rights of the data

23.9.2010

Page 53: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Derived Requirements

53

• Digital assets must be linked to a centralized control policy

• No application/client should be able to ignore/bypass the policy

• The applications should have the needed information and means of enforcing the policies

• E.g. if authentication of a user is needed via a corporate directory, the li ti h ld b bl t d tili itapplication should be able to access and utilize it

• The policies should be dynamically changeable by the asset owners

23.9.2010

Page 54: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Static Structure

54

Each digital asset needs to be “wrapped” with data that relays information about the policy information

• How was the asset encrypted• Where to obtain the decryption keysyp y• Where is the policy located• What data needs to be collected from the user• …

Policy Digital AssetPolicy Repository

Policy

Digital Asset

23.9.2010

Policy wrapper

Page 55: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Dynamic Behavior

55

23.9.2010

Page 56: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Implementation

56

Key issues to consider:• Link between the clients and policy server would be a potential attack

point

• Wrapper should be accessible, inspectable by the clients, even if actual asset is protected

• Strong encryption to protect against brute-force attacks

• Authentication of users should be typically linked to the policy server

• Asset owners should have a way of changing the policies of deployed assets

23.9.2010

Page 57: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Business Problem Resolved

57

• Encryption of core assets, and policy wrapper, allows protection of assets

• Dynamic asset management is possible, if supported by system

23.9.2010

Page 58: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Consequences

58

• Problem is an application is not aware of the system and does not “understand” the wrapper

• Issues with off-line access (as no link to policy server)Issues with off line access (as no link to policy server)

• Issues with searching (as assets are not accessible by search bots)• Consider core metadata outside the encrypted asset

23.9.2010

Page 59: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

59

12. The Structured Information Pattern12. The Structured Information Pattern

23.9.2010

Page 60: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Business Problem

60

• Most of the data on the Internet is unstructured content• Mainly in HTML• HTML includes information about the presentation, but not details on where to

find specific parts of information, within a page

• Scraping data is possible (e.g. parsing a document, and trying to “guess” the location of the data), but very fragile

• If the format of the document changes, the parsing might failIf the format of the document changes, the parsing might fail

• E.g. How do we take out of cnn.com page the main news title?

23.9.2010

Page 61: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Context

61

Data stored in HTML is difficult to reuse

Changing the existing HTML creation processes is also difficult

23.9.2010

Page 62: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Derived Requirements

62

• Authors need a language to markup (tag) various parts of their content, in such a way that applications can consistently retrieve the specific parts of the data

• I.e. allow creation of declarations at the inner structure of the document

• The declarations must have meaning also for the consumers

23.9.2010

Page 63: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Static Structure

63

23.9.2010

Page 64: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Dynamic Behavior

64

• Once author has prepared the content, it can be marked with microformats to allow addressing in fine-grained level

• Clients access the content (e g HTML) with the standard way (HTTPClients access the content (e.g. HTML) with the standard way (HTTP GET)

• As content is parsed, the special tags are identified, and the client is id d ith th ifi d t f f thprovided with the specific data, for further usage

• Example, once an <object> element is parsed, the browser is instructured to launch a plug-in (e.g. Flash player) to consume the relevant p g ( g p y )content/data

23.9.2010

Page 65: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Implementation

65

Key issues to consider:• Microformat tags should not conflict with main mark-up language

• Usage of namespaces is a solution

• Before creating a syntax, create a formal group that would support it

23.9.2010

Page 66: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Business Problem Resolved

66

Microformats allow direct access/referencing to specific segments of content

Allows other patterns (e g mashup) to be implemented in a commonAllows other patterns (e.g. mashup) to be implemented in a common manner

23.9.2010

Page 67: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Consequences

67

Carefully consider the forward compatibility, when embedding microformats in content

• E.g. future conflicts, collisions of syntax, etc/

Carefully consider level of granularity• E.g. an address can be split in many level (country, city, region, area, postal

code, street name, street direction, number…)• Consider future extension possibilitiesConsider future extension possibilities

23.9.2010

Page 68: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

Patterns

68

1. The Service-Oriented Architecture Pattern2. The Software as a Service (SaaS) Pattern3. The Participation-Collaboration Pattern4 The Asynchronous Particle Update Pattern4. The Asynchronous Particle Update Pattern5. The Mashup Pattern6. The Rich User Experience Pattern7. The Synchronized Web Patterny8. The Collaborative Tagging Pattern9. The Declarative Living and Tag Gardening Pattern10. The Semantic Web Grounding Pattern11. The Persistent Rights Management (PRM) Pattern12. The Structured Information Pattern

23.9.2010

Page 69: Lecture 4: Architectural Patterns – Part 2 · 2011-03-26 · Lecture 4: Architectural Patterns – Part 2 SGN-5226 Content Sharing Technologies and Services 23.9.2010. A detailed

References

69

This lecture has been based on material from :

• James Governor, Dion Hinchcliffe, Duane Nickull, “Web 2.0 Architectures”, O'Reilly Media May 2009O Reilly Media, May 2009.

http://oreilly.com/catalog/9780596514433

23.9.2010