Docsity

Enterprise Applications: CMSC 838p Lecture Notes - Prof. William Pugh, Study notes of Computer Science

Toggle sidebar
bg1
1
Enterprise Applications
CMSC 838p
Logistics
•Check with me if you aren’t officially
registered
–need a mailing list
•homework 1 due Wednesday
–in class; bring a print-out
Grading
•Homeworks 20%
–simply stuff to keep you on your toes
•Class participation 30%
•Projects 30%
•Exams 20%
Class organization
•Small class
•I expect activate participation and help in
developing course material
•SnipSnap page is a group effort
–I expect you to provide content
pf3
pf4
pf5

Partial preview of the text

Download Enterprise Applications: CMSC 838p Lecture Notes - Prof. William Pugh and more Study notes Computer Science in PDF only on Docsity!

Enterprise Applications

CMSC 838p

Logistics

• Check with me if you aren’t officially

registered

– need a mailing list

• homework 1 due Wednesday

– in class; bring a print-out

Grading

• Homeworks 20%

– simply stuff to keep you on your toes

• Class participation 30%

• Projects 30%

• Exams 20%

Class organization

• Small class

• I expect activate participation and help in

developing course material

• SnipSnap page is a group effort

– I expect you to provide content

Infrastructure

• mysql database on verve

  • temporary measure

• 4 dual-processor x86 linux boxes

  • 2 have arrived, 2 more expected next week
  • just for our class

• Other resources available:

  • 24-processor, 24 gigabyte Sun SMP
  • various larger clusters

• Access to prerelease builds of Java 1.

Projects

• Creating and evaluating real projects

– might bring some customers in

• Looking at standard examples and

benchmarks

– Pet Store

– Spec JAppServer

What is an enterprise

application?

Enterprise applications

• E-bay

• Amazon

• Campus course registration system

Persistent Objects

• It is a pain to have to use SQL queries

whenever you want to touch persistent state

• Better to have objects that reflect persistent

state

– and can check integrity rules and other business

logic

Persistent Object solutions

• EJB (Enterprise Java Beans)

– BMP - Beans managed persistence

– CMP - Container managed persistence

  • AppServer provides mapping between beans and database

• Java Data Objects

– Good for small stuff

Databases in one lecture

Transactions

• Atomicity - indivisible set of actions

• Consistency - respects database invariants

  • typically domain specific

• Isolation - ignorant of other, uncommitted

transactions

• Durability - persistent, even in case of system

failure

A song database

• Album:

albumID

title

category

year

• Artist:

artistID

name

• Song:

songID

albumID

title

length

• Performance:

songID

artistID

Relational databases

• Normalized form

– 1st: All attributes are single valued

– 2nd: non-key entries are functionally dependent

on primary key

– 3rd: No transitive dependencies exist

– Also 4th and 5th normal forms

Locking

• Transaction 1 reads current balance

  • sees $

• Transaction 2 reads current balance

  • sees $

• Transaction 2 adds $

  • sets current balance to $

• Transaction 1 adds $

  • sets current balance to $

How to handle

• In threads, we would just use locks

• In databases, can use pessimistic or

optimistic concurrency

– pessimistic concurrency similar to standard

locking

– optimistic: don’t lock

  • fail when committing if anyone else changed data you depended on