Wednesday, October 21, 2009

Dense Linear Algebra, Graph Algorithms, and Monte Carlo

I have never used any of these patterns. I also never heard of them specificity, but I knew of the ideas behind the first two patterns. The Linear Algebra pattern allows for the efficient calculation of matrix multiplication. It does this by using outer products and improves on spacial locality by splitting up the matrices into blocks. Which lends to the caveat of this pattern. In order to use it, the programmer needs to be able to control how the matrices are laid out in memory.

I am currently in the Algorithm course here and I have seen that lots of problems can be easily solved, as well as visualized, with the help of graphs. There are many ways in order to store graphs in memory depending on the type of graph and this paper does a pretty good job at explaining it.

The monte carol pattern is the one I never heard of before and its design is an interesting one, if not simplistic. How it works is that is runs many different independent experiments in parallel, then it computes the summary of all the results.

Monday, October 19, 2009

Armstrong Chapter 2

This chapter focus on fault tolerant systems with an emphasis on switching equipment. The paper says in order to be fault-tolerant, the systems needs to be fault-isolated, which means a failure in one part of the system will not effect the whole system. This is achieved in the paper by running each modules in separate processes and the communication between these processes is read-only. This way an error in one process will not infect another. There is a lot of overhead when this is done with OS processes.

I am reminded of the other paper in the book about fault-tolerant operating systems, Guardian. Guardian's system was about redundancy. It had duplicated hardware as well as software processes. This is more of trying to isolate systems as to not interfere with one another.

Map Reduce & EBII

Map Reduce & Event Based Implicit Invocation

Is map reduce related to any previous patterns we've read? How are they the same, how are they different?

It is similar to the Java Fork/Join Framework. A problem can be split into smaller parts that can be done in parallel to improve efficiency. At the end they are combined to form the final answer. In the java fork/join framework the worker threads could also steal jobs from other workers in order to improve the efficiency even more.

How should failures and errors be handled? Should the framework handle errors, or the application developer?

I think it should be on the application developer to handle the errors. Just like how the application developer uses the simple framework to define a map and reduce function, they should also add error handling.

Are there any interesting uses of map reduce anybody has come across?
I only first heard about Map reduce last year and have never seen it used in my day to day job.


Event-based implicit invocation

How is this pattern related to the well-documented observer pattern and publisher/subscriber patterns? Are they the same? How are they different?

This pattern is very similar to the observer pattern. They both have a list of “listeners” that will get called when a certain event happens. In this implementation, it is possible that the announcer can call a component directly when an event happens, but that component should have the ability to ignore the message. In the pure form of this pattern, the announcer does not know exactly if anyone is listening to the event.

Are there any good real world examples of this pattern, besides what the authors mention?
The new google wave probably will use a pattern similar to this. Google wave is "a personal communication and collaboration tool” that will merge email, IM, wiki, and social networks together. I am currently waiting to try out the beta. (Crosses Fingers)

Wednesday, October 14, 2009

Chess

Am I the only one who thought this paper was on a chess architecture? Even though it wasn't about that, I still enjoyed this paper. I, like many others, have come across these “Heisenbugs” and have tried my hardest to debug them. Just recently I have fixing a bug that I had to run 30 min of the same test over and over again to reproduce it. I definitely could of have used a system like this to help me out. However Chess itself could not help me since the program was in Java. Since this was developed by Microsoft, it is only usable on Win32, .Net, and the Singularity research platform. It would be interesting to see this sort of technique used in other platforms like Java.

It was also interesting to read about the search algorithm used to determine the next state to check. Sine a thread could potentially be preempted at anytime, the number of thread interleaving can be quite large, if not infinite. It turns out however that most bugs can be reproduced with only a few threads and that the preempting doesn't factor in as much as some people think it would.

Tuesday, October 13, 2009

BA Chapter 14

I never used smalltalk until last semester. Once I got over the hurdle of the syntax I could see that this was a powerful language. Since I already knew smalltalk before reading this chapter, I didn't get anything out of the parts that talked about the syntax of smalltalk. I see a little benefit of discussing the syntax in the context of the structure of the language, but it seems to me that this part would be better off in a section to teach smalltalk. The paper just did too much on this part.
One of the main things about Smalltalk is that everything is an object and they just send messages to each other to communicate. Java also uses this line of thinking but does not go to the extent that Smalltalk does. Java does have primitive types that are not objects, but those primitives can be encapsulated into Objects (Integer holding a primitive int for example).

BA Chapter 13

I have hardly worked with a functional language before so I liked how this paper laid out both with examples of each. It made it easy to compare what I already know about the OO approach and see how it differs from the functional approach.

What types of problems lend themselves to an Object-Oriented Solution?
If you want to simulate objects and their relationships to one another, then the OO solution is the way to go.

What types of problems lend themselves to a Functional Solution?
A problem of the mathematical verity lends itself well to the functional solution. These problems will calculate a result and return it and they also don't care about the global state.

BA Chapter 12

I would like to make a comment about something the author said about the social and coordinative aspects of Free Software, “Communication is key, and it is hampered by time zones, cultural barriers, more or less reflected preferences and prejudices, and also simply by physical distance”. While I agree that these are problems, I don't think these are limited to Free/Open source software. I have run into these problems at my job since at one point we had to communicated with a team in India. I am sure that they are more of a problem in the Free/Open environment, but they do exist in the corporate world.

I also found the KDE motto of “those who do the work decide” to be a interesting one. There can still be arguments/disagreements of what direction the program should go, but I feel that developers will have a better time doing work they believe in and not work they were told to do.