Exam Flashcards

1
Q

What is the conceptual layers in Information Systems?

A

There are 3 layers:

  • Presentation layer: accepts request (input) and present information to user (output). UI, reports, etc.
  • Application logic: implementation of services supported by the system (retrieve/modify data)
  • Resource management: source of data. DB, files, “external” providers (other IS encapsulated).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are distributed information systems?

A

Distributed Information Systems are composed by subsystems working together in a coordinated fashion. It may involve multiple resource managers.

We go distributed to reduce costs (vs mainframe), to have organizational separation, provide integration of existing components, increase performance and scalability.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Four variants of distribution?

A

We have four alternatives:

ALTERNATIVE 1: unity of distribution = transaction

ALTERNATIVE 2: unit of distribution = application component (program) (class or library)

ALTERNATIVE 3: unit of distribution = DB operation

ALTERNATIVE 4: distribution handled entirely by DB/RM

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are tiers?

A

Layers define a logical separation of functionality. Tiers correspond to the actual implementation architecture.

Adding tiers improve flexibility, functionality, distribution and scalability. However, decreases performance and add complex management.

Evolution from 1-tier to 2-tiers forced the definition of application logic APIs. Evolution from 2-tiers to 3-tiers forced the creation of resource management APIs (ODBC/JDBC). Evolution to N-tiers try to link different systems adding connectivity through the Internet.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Pros and cons of distribution alternative 2 (client/server) versus alternative 3 (DB operation)?

A

DB operation adds more flexibility, but has a bigger communication overhead.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Approaches of Web-based Information systems?

A

Web scenario introduces the separation of presentation layer:

Client-side: browser.
Server-side: web server, HTML filter.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How to maintain session state in Web-based IS?

A

The problem is: HTTP is stateless. Context of client must be managed across interactions (session ID + user ID). Approaches:

Form variables: universal browser support, but forces dynamic HTML for inserting values (also not persistent).

URL encoding: session ID given in URL. IDs separate from HTML, but complex realization (translation of URL/ unfriendly URL).

HTTP cookies: stored on client, independent of web page (disadvantage: may be disabled).

HTTP authentication: user registration and login (automatically supported by browser + server, but registration mandatory).

In all approaches, choosing a timeout is a problem.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the purpose of DB gateways?

A

Uniform data access to heterogeneous data sources (encapsulate/hide vendor specific aspects).

Access multiple DBs through separate (simultaneous) heterogeneous DB connections (driver manager). Access the same or different DBs, within the same distributed transaction.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What options are there to a DB speak with a programming language?

A

There are two main options:

Embedded: queries are embedded and integrated into standard programming language (but vendor specific). Two possibilities:

  • Static: can perform early compilation (checks and optimization)
  • Dynamic: char sequences interpreted as queries

Call Level Interface (CLI): standard library functions used through an API (dynamic approach).

  • Portable and vendor independent
  • But late compilation (no optimization, no error checking) and not so direct integrated into programming language.

CLI requires:
- Uniform database access (SQL, metadata, API), portability (application binaries), dynamic and late binding to DB (flexibility X performance, but queries can be prepared and just executed later).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is X/OPEN DTP?

A

Specification for distributed transaction processing (DTP). Describes the interface between the global TA manager and the local resource manager.

Goal: allow multiple resources (DBs, app servers, message queue, etc. to be accessed within the same TA, thereby preserving the ACID properties across applications.

Uses 2-Phase Commit (2PC) protocol to ensure that all resource either commit or roll any particular TA consistently.

ACID transactions are a key feature in DB, but typically databases only provide the ACID guarantees for activities that happen inside a single database.

XA coordination allows many resources (again, often DBs) to participate in a single, coordinated, atomic update operation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

X/OPEN standard in local scenario

A

1 - APP > TM: begin
2 - TM > RM: start
3 - APP > RM: request (SQL)
4 - APP > TM: commit (or rollback)

EOT. TM will interact with RMs to complete the transaction using 2PC (TM = coordinator; RMs = agent).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

X/OPEN standard - distributed extension

A

Just like local X/OPEN until a remote request (TRPC) is issued by AP. Adds communication manager to the picture.

1 - APP > CM: TRPC
2 - CM > TM: outgoing TA
3 - CM > CM': request 
4 - CM' > TM': incoming
5 - CM' > Server: TRPC
6 - Server > RM: request

When commit happens (APP > TM: EOT): because previous outgoing message from CM to TM, TM knows it must perform Hierarchical-2PC.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

In DB-gateways, how transactions work?

A

Transactional-oriented methods for local TAs (begin is implicit): commit( ), rollback( ).

Scope of transaction is a SINGLE connection.

Support for distributed transactions requires additional extensions, interactions with a TM-manager.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Explain SQLJ programming model

A

SQL code embedded in Java, generates JDBC with preprocessor:
Translator (profile) + Customizer (Vendor DB) > binary portability.

Context object is referred in SQL code (contains conn)
Input and results are placed in Java variables
Static authorization
Combines advantages of embedded with CLI

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Types of persistence?

A

Orthogonal: all objects can be persisted independent of type.

Transient: whole tree of referenced objects is automatically persisted. Choose ROOT and objects referenced will be persisted.

Transparent: code that handle persisted and transient objects is almost the same.

  • Client side: automatic/implicit interactions performed by infrastructure with data stored
  • Server side: no special code to implement persistence.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is EJB?

A

Enterprise Java Beans. Server-side components encapsulating business logic.

Provide standard way to implement the back-end business code typically found in enterprise applications.

Handle persistence, transactions, security, cache, load balancing, pooling, authorization.

EJB container as runtime environment providing services and execution context. Separated from infrastructure code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What EJB container consists of?

A

Class implementing business logic
Remote interface (accessed by clients)
Home interface (additional life-cycle logic)
Primary-key class (for persistence)
Deployment descriptors: includes desired properties of beans, which can be implemented by the developer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What varieties of beans exist in EJB?

A

Session beans

  • handle session with client.
  • Statefull: maintain state of a conversation with client (shopping cart)
  • Stateless: do not maintain any state, thus can be reused for different clients.

Entity beans

  • Live beyond a session with a client
  • Multiple clients may use the same entity instance (concurrency, transactions) -> shared objects.
  • Have state (stored in a DB or persisted - by itself (SQL) or automatically (object handled by container)).

Message-driven beans

  • Asynchronous interaction with clients
  • Act as clients to a JMS message bus.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Persistence in EJB

A

All and only entity beans are persisted (tight to the concept of entity). On the client side, the persistence is transparent: operation are hidden from client.

The persistence logic is separated from business logic, even if automatically generated.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Persistence in EJB - Container Managed Persistence (CMP)

A

EJB container handles all database storage and retrieval calls. Container manages the relationships between the entity beans.

You don’t have to code the database access calls in the entity bean. Instead, you specify settings in the bean’s deployment descriptor.

Not only does this approach save you time, but also it makes the bean portable across various database servers.

Persistence related code is generated automatically.
Fields manipulated through setter and getters - more flexibility, but lazy loading of attributes.

Server-side:
1 - defines abstract persistent schema. WHAT
2 - mapping to specific DB in deployment phase. HOW

Object state handled by container

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Persistence in EJB - Bean Managed Persistence (BMP)

A

you must write the code for the database access calls. Although writing this code is an additional responsibility, you will have more control over how the entity bean accesses a database.

Explicit DB-access methods operations are defined in callback methods. Used in complex mappings or to integrate legacy applications.

22
Q

JDO: Java Data Objects

A

Standard for Java-based persistence. Orthogonal, transitive persistence of native java objects (+ inheritance).

Abstract schema and mapping with XML

Semi dynamic persistence (designated classes may have instances persisted).

Complete transparent from client-side.

Benefits:
Ease of use
Portability
Database independence
High performance
Integration with EJB
23
Q

Alternatives of object persistence in Java

A

JDO, direct file I/O, serialization, JDBC, Enterprise JavaBeans (EJB), Bean-Managed Persistence (BMP) or Container-Managed Persistence (CMP) entity beans, and the Java Persistence API.

24
Q

JDO: Java Data Objects - Persistent Manager

A

Manages all aspects related to persistence and lifecycle of object, as well as querying and transaction support. Created by PersistenManagerFactory. Other classes:

Extent: represent all instances of a class (automatic “collection” that gives access to all persisted instances).
Query and transaction interfaces: retrieved via PM.

Programming Model: take normal object, pass it to PM.makePersistent(obj). Retrieve using object ID or query. Can be used inside JDO transaction.

25
Q

JPA: Java Persistence API

A

EJB “reaction” to JDO: simplified programming model, standardized object relational mapping, inheritance/polymorphism, enhanced query.

Scope not restricted to EJB/app server: support third-party persistent engines.

Entity is a lightweight Java class whose state is typically persisted to a table in a DB.

  • mark objects as entities with annotation/deployment descriptor
  • object state is encapsulated: access only through methods
  • Full flexibility for inheritance aspects and abstract classes
26
Q

JPA: Java Persistence API - what a object need to be persisted?

A

Primary key (possible compound) defined at obj root, one per class hierarchy (not modifiable).

Public empty constructor, no final stuff, top level class.

Access to entity state: protected variables or getter/setter (choose one and be consistent).

27
Q

Overview of query languages over persistent objects

A

Access through primary key or navigation over relationships

OQL

  • shield the developer from data store & mapping details
  • requires persistent framework to transform object queries into corresponding data store queries
  • based on the object-to-relational mapping
28
Q

Web-based Information Systems: Server Approaches

A

Web server executes processing, communicating with DB or app. server. Required resource (response) generated dynamically. Approaches:

CGI: separate process to process requests (not scalable)

Server API: improves CGI (no process) by providing server application functions (SAF) on Web Server

Java Servlets: java version of servlet API (portable, dynamic class loading -> binding)

SSI: directives inside HTML, dynamically evaluated by a Web Server.

JSP: Java SSI-scripting elements (java code) directives, actions (more powerful than SSI)

29
Q

Major types of application server middleware?

A

RPC/RMI: basic approach for development and execution (location transparency)

TP Monitor: focus on transaction processing (TRPC). Support the execution of distributed TAs. First only single tier, but also evolved to more modular SW in client/server and 3-tier.

Object Broker: CORBA. Extend RPC paradigm to OOP world. Distributed object computing, some additions to RMI model.

Object Transaction Monitor: TP monitor + object broker. Most often a TP monitor with object-oriented (broker) capabilities (broker could not compete with TP monitor performance)

Component Transaction Monitor: TP monitor + object broker + server-side components. Further separation of application logic from infrastructure, automating many server-side tasks.

30
Q

TP Monitor

A

Transaction Processing Monitor

Program that monitors a transaction as it passes from one stage in a process to another. Focuses on transaction processing and process management.

Purpose: ensure that the transaction processes completely or, if an error occurs, to take appropriate actions

Especially important in 3-tiers architectures that employ load balancing because a transaction may be forwarded to any of several servers.

TA-manager: transactional control
TP-monitor: TA-oriented scheduling and resource management

31
Q

CORBA

A

Object-broker class of middleware

Functionality similar to RMI, but platform- & language-independent and additional services.

Facilitates the communication of heterogeneous systems that are deployed on diverse platforms

ORB: ~ RMI. Manages stubs on the client side and mapping to objects adapter on the server side.

POA: generates object references. Handles mapping of RMI to server object.

32
Q

Roles of CORBA Transactional Service

A

Transaction service: based on X/OPEN DTP. Usually just flat transactions (nested = optional). Transaction service (OTS) is the TA-manager of X/OPEN.

Transactional Client (~ X/OPEN Application): demarcation of transactions using “current” interface provided by OTS

Transactional Server (~ X/OPEN Server): does not manage resources, but propagates transaction context. May use current to signalize error and cause roll backs (limited TA participation).

Recoverable Server (~ X/OPEN Resource Manager)

33
Q

Is EJB portable?

A

Yes, portable and server-independent.

Properties (mapping bean to DB, TA behavior, security) are specified using

  • source code annotations
  • XML deploy descriptor

During deployment, glue-code is generated based on component properties, classes & interfaces are shown, and environment/context variables are set.

34
Q

Is CORBA portable?

A

Portable Object Adapter (POA) realizes portability in CORBA. It generates object references, maps RMI to server objects and activates/deactivates/registers server objects.

35
Q

Wherein the component-based approach (such as EJB) differs from CORBA?

A

CORBA programming model is too complex - a lot of infra code must be implemented. No standard programming server-side objects.

In component model, many functions are only defined at deployment time, and programmers can concentrate on application logic more.

  • Contracts between component and component-server (load balancing, pooling, performance, life cycle, persistence, …. )
  • Simpler programming model + portable components
36
Q

Option when loading / writing the persistent objects?

A

Loading
- Lazy: allows the fetching of a relationship to be differed until it is accessed. Avoid DB access & cost of building object not needed.

  • Eager: retrieve and build object and its references at first need.

Writing: can be explicit (method to store, load, etc…), automatic (immediate or differed) or a combination of both.

37
Q

Why it is important that the transaction manager be notified by the communication manager about a outgoing TA?

A

CM notifies that a transaction context is leaving local environment - outgoing.

When the commit happens, the APP will send EOT to TM. Bacause of previous outgoing message from CM, TM knows it must perform Hierarchical-2PC.

CM acts as agent, relaying 2PC messages to and from remote TM (local & remote CM).

38
Q

2PC - 2 Phase Commit

A

First phase:
TM receives EOT from app
Sends “prepare” message to all agents
Wait for “failed” or “ready” response

Second phase:
If all agents replied “ready”, send “commit” message to all of them
Else, send “abort” message.
Agents reply with “ack”

Every state change is logged on both coordinator and agent. This guarantees recoverability of changes.
Perform changes and release resources.

39
Q

Hierarchical-2PC

A

For trees of requests. Each agent communicates only with direct ancestor and direct successors.

Intermediate nodes: coordinator for successors, agent from its ancestor’s point of view.

PREPARE message go to all successors, wait for their commit votes

Then commit decision for entire subtree

40
Q

What is the difference between statefull and stateless beans?

A
  • Statefull: maintain state of a conversation with client (shopping cart)
  • Stateless: do not maintain any state, thus can be reused for different clients.
41
Q

What are WebServices?

A

Software application identified by a URI, whose interfaces and bindings are capable of being defined, described and discovered as XML artifacts.

A web-service support direct interaction with other software agents using XML-based messages exchanged via Internet-based protocols.

Sophisticated wrappers over conventional MDW platforms. Additional tier that allows MDW services to ve invoked as WebServices.

Internal architecture define its connection with the local information systems.

External architecture define how WS discover and interact with each other. Cross organizational interactions across the Internet, often without centralized control. Make use of Standards!

42
Q

What is SOAP?

A

Simple Object Access Protocol

SOAP is used to transfer data - way to communicate.

Underlies all interactions among WS. Defines how to organize information using XML in a structured and types manner so that is can be exchanged between peers.

Specification of protocol wrapper: purpose is to provide a standardized way to encode different interactions mechanisms into XML documents.

43
Q

What is WSDL?

A

Web Services Description Language

Used for describing the services available. ~ IDL on conventional MDW.

Specifications are XML documents that describe WebServices and service interfaces.

Specify the operations offered by a service and mechanisms to access the services.

Two parts:

  • Abstract: types, messages, operations, part types.
  • Concrete: binding (specific protocol & format implementing an interface) and service & ports (endpoints associated to bindings).
44
Q

What is UDDI?

A

Universal Description Discovery and Integration

Used for listing what services are available. Specification of a framework for describing and discovering Web Services.

“Business Registry”: sophisticated naming and directory service. API for publishing & querying.

45
Q

What is WS-Coordination?

A

Create a framework for supporting coordination protocols.

Coordinators and participants

  • all talk to the same coordinator (central coord.)
  • each participant can talk to its own coord. (distributed coord.).

Interactions between them are described in terms of

  • Protocol: (eg, 2PC)
  • Type: set of related/combined coordination protocols
  • Context: involves identification (mark) of conversation, used to exchange coord. information. Placed within messages (SOAP header) and also contains coord. type.
46
Q

What are WS-atomic transactions?

A

Built on top of WS-Coordination

Defines commit protocols

Basically defines standards for implementing Phase 0/ 2PC and similars in Web Services

47
Q

What are the goals of WS Business Activites?

A

Support long-running, workflow kind of transactions, with different recovery semantics. Goal: define protocols that wrap proprietary BA mechanisms to achieve interoperability.

48
Q

Compensation concept within WS Business Activities?

A

Additional action performed to undo effects of another action (semantic recovery)

Relaxing ACID properties…

Involves real world actions
Focus on logical recovery, not physical (DB)
Depends on context (state that was reached by TA)
Old state usually cannot be recovered/recreated
Compensation is an action that may also fail

49
Q

SOA graphs and relation ships

A

Service Provider bind Service Requestor find Service Registry publish Service Provider.

Service Requestor

  • Finds required service via Service Discovery
  • Binds to Service Provider

Service Provider

  • Provides e-business services
  • Publishes availability of these services

Service Registry

  • Registry (publishing/locating services)
  • Service index, P2P discovery
50
Q

What is the difference of WSDL against CORBA’s IDL?

A

In addition to specifying the operations offered by a service, WSDL also needs to define mechanisms to access the service.

IDL are only concerned with description of the services interface (name, signature). The rest is implicit, as the access mechanisms are identical for all services available on the MDW platform.

In WSDL context, each service can be made available using different protocols, and it is crucial that such information is provided as part of the service description.