Lecture 14 -- Revisiting Web architecture; data persistence

I will finish grading HWs 2 & 3 this weekend sometime.

Projects: my bad. not enough weeks in the term/I'm badly organized...

Finals week: pizza/etc? Survey & course review, like last year?

HW out on Thursday -> next Thursday.

Office hours tomorrow.

---

...Look at HW #10. Examples will be posted tonight. If you want comments on your HW #10, please drop me a note and I will look at it tonight. (You should know if you got it all working, right?)

---

Revisit blocks-and-arrows stuff:

---

Demo Selenium, Selenium IDE again. Your tests go in

html/tests/<some file>.html

e.g. 'TestGo.html'

and a link to them needs to be put in TestSuite.html.

Then you can access them as /tests/TestSuite.html from within Selenium.

---

Data persistence in message board.

What needs to be done?

Term for basic functionality needed: "CRUD" - create, read, update, delete.

Discuss strategies for persistence: what strategies can people come up with?

Larger needs of persistence (banks as well as message boards)

Concept of ACID databases: atomic, consistent, isolated, and durable.

Think in the context of a bank transaction:

When people talk about "real databases" they generally mean one that is ACID compliant.

Consider storing things in files:

How hard is this to achieve? Remember, it's built on files ;).

So it's pretty difficult to make work (do they cover this in db course??) but there are many available so you can just pick one. So you should choose an ACID database from the start and then you never have to worry about this stuff.

What do you gain from ACID? Consider making meeplib persistent:

Python comes with at least one ACID-compliant database, sqlite3, and (depending on version) has two -- bsddb. You may use either one (or MySQL) for the last homework. (Neither specifies particularly useful consistency policies. SQLite supports atomicity through transactions, and bsddb does not. But both are ACID within their policies. We'll look at them on Thursday.)