13.07.2015 Views

Software Engineering for Internet Applications - Student Community

Software Engineering for Internet Applications - Student Community

Software Engineering for Internet Applications - Student Community

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

user. There are 86,400 seconds in a day. Thus we're talking roughlyabout enough work to keep a 3-CPU multiprocessor machine busy<strong>for</strong> an entire day. What if 500 documents are uploaded every day?We'll need 1500 CPUs to compute personalization scores.4.5 User/User MapRelationships among users become increasingly important ascommunities grow. Someone who is in a discussion <strong>for</strong>um with 100others may wish to say "I am offended by User #45's perspective; Iwant the system to suppress his contributions in pages served to meor email alerts sent to me". The technical term <strong>for</strong> this is bozofiltration and it dates back at least to the early 1980s and theUSENET (Netnews) distributed discussion <strong>for</strong>um system. Someonewho is in a discussion <strong>for</strong>um with 100,000 others may wish to say "Iam overwhelmed; I never want to see anything more from this <strong>for</strong>umunless User #67329 has contributed to a thread."Grouping of users is the most fundamental operation within theUser/User database. In a collaborative medical records system, youneed to be able say "All of these users work at the same hospital andcan have access to records <strong>for</strong> patients at that hospital." In acorporate knowledge sharing system you need to be able to say "Allof these users work in the same department and there<strong>for</strong>e shouldhave access to private departmental documents, a private discussion<strong>for</strong>um devoted to departmental issues, and should receive emailnotifications of departmental events."Let's move on from the core data model to some tips <strong>for</strong> the softwarethat you're soon to be building on top of the database...4.6 Send SQL to the Database's SQL Parser, NotDataIn the Basics chapter you might have written scripts that took userinput combined them with bits of SQL and sent a final single stringcommand to the relational database management system (RDBMS).Here's a C# example stolen from one of our students:string cmd = "Insert into quotations(author_name,category, quote) values ('" +txtAuthor.Text.Replace("'", "''") +"', '" + ctg.Replace("'", "''") +"', '" +6615.12 Exercise 8: Explain the Concurrency Problemin Exercise 7Given an implementation of object-view-one that does its loggingon the server's time, explain the concurrency problem that arises inExercise 7 and talk about ways to address it.Write up your solutions to these non-coding exercises either in yourkm module overview document or in a file named metadataexercisesin the same directory.15.13 Exercise 9: Do a Little Per<strong>for</strong>mance TuningCreate an index on km_object_views that will make the code inExercises 6 and 7 go fast.15.14 Exercise 10: Display StatisticsBuild a summary page, e.g., at /km/admin/statistics to show,by day, the number of objects viewed and reused. This report shouldbe broken down by object type and all the statistics should be links to"drill-down" pages where the underlying data are exposed, e.g.,which actual users viewed or reused knowledge and when.15.15 Exercise 11: Think About Full-text IndexingWrite up a strategy <strong>for</strong> adding the objects authored in this system tothe site-wide full-text index.15.16 Exercise 12: Think About Unifying with YourContent TablesWrite up a strategy <strong>for</strong> unifying your pre-existing content tables withthe system that you built in this chapter. Discuss the pros and cons ofusing new tables <strong>for</strong> the knowledge management module orextending old ones.15.17 Feel Free to Hand-editSuppose that an autogenerated application is more or less completeand functional but you can see some room <strong>for</strong> improvement. Is itacceptable practice to pull some of the generated code into a texteditor and change it by hand? Absolutely! The point of usingmetadata is to tackle extreme requirements and get a prototype infront of real users as quickly as possible. Don't feel like a failurebecause you haven't solved the 50-year-old research problem ofautomating programming altogether.283

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!