Autumn 2014

TIES456 Introduction to SOA and Cloud Computing, 5 ECTS

TIES532 - Service oriented architectures and cloud computing for developers, 5 ECTS

Today

Review week 42 - overview - databases

Review week 42 - web servers

Review week 42 - caching

Review week 42 - caching

Review week 42 - caching

Review week 42 - caching

Review week 42 - caching

Review week 42 - caching

Review week 42 - caching

Review week 42 - caching - a problem can still occur

Review week 42 - caching

Review week 42 - caching

Review week 42 - caching

Thesis topics - caching

Review week 42 - caching - another problem

Discussion about reflective questions

  1. How would you implement a page which shows a list of contacts. See also List keys.
  2. Why would you ever use a set-up with virtual machines in a real (production) environment? Or would you not?
  3. Which of the optimizations made sense, which ones not?
  4. What should be improved in this exercise if it is given to students in the future?

Listing keys

I would probably just stream the keys to the client using the provided method. I’m not sure what would be the better way to do it though this definitely isn’t a smart thing to do as the amount of keys can be quite high.

According to the Riak documentation using List keys is not feasible in production environment, because it causes the database to go through all the entries in the database. This is slow and requires too much resources to be practical. One way to implement a page that shows a list of files could be to use Riak’s secondary indexes. Secondary indexes are keywords that the database can use to narrow down the search. In file listing’s case one could use for example the file type as a secondary index key. Secondary key utilities also support range searches and for example pagination which would be handy if the amount of files is large. Naturally, one should use the streaming capabilities of Riak to get the keys.

Virtual machines in production

Optimizations

CherryPy Bottle
HTTP PBC HTTP PBC
Cache No Cache Cache No Cache Cache No Cache Cache No Cache
Netem delay (1000ms, 5% pckg loss) 2,9/sec 0,59/sec 4,7/sec 0,99/sec 1,2/sec 0,2/sec 2,0/sec 0,33/sec
No Netem delay 81,7/sec 59,0/sec 81,9/sec 72,5/sec 83,0/sec 53,7/sec 83,7/sec 57,0/sec

Improvements

Disagreement

There’s a possibility for SQL injection when giving the key and value values (add and search) but we trust that Riak is created in such a smart manner that they are dealt with internally (since we don’t input actual SQL).

The database is not published online and only able to touch on the localhost and with the other virtual machine. It’s not really practicle.

Next week - Cloud computing - Cloud Services

Advanced assignments [TIES532]

This week