Archive | September, 2008

Java System Architecture Resources – Links

Memory Management

One strength of the Java™ 2 Platform, Standard Edition (J2SE™) is that it performs automatic memory
management, thereby shielding the developer from the complexity of explicit memory management. However, it doesn’t mean that there will not be any memory leak. So, I decide to give a summary on some key areas in this topics. They are:

  1. How garbage collector works?
  2. How memory leak still shows up?
  3. What is weak reference?
  4. What stores in heap and stack?

If you want to understand this topic in detail, you can read the this article from Sun. The key points are summarized below:

  1. Without automatic memory management – GC, we may face 2 common issues: dangling reference (deallocate a object while others are still referencing it) and space leak (some objects are not referenced but not been deallocated either). GC is great but it doesn’t solve all the memory allocation problem. For example, you can have object list keep growing until it uses up all the free memory.
  2. Garbage collection takes time and resource to do it and sometimes it is not acceptable for the real-time mission critical system.
  3. The task of fulfilling an allocation request, which involves finding a block of unused memory of a certain size in
    the heap
    , is a difficult one. The main problem for most dynamic memory allocation algorithms is to avoid
    fragmentation
    , while keeping both allocation and deallocation efficient. One approach to eliminating fragmentation is called compaction.
  4. It is also desirable that a garbage collector operate efficiently, without introducing long pauses during which the
    application is not running.

 

Leave a comment Continue Reading →

Amazon Web Service Solutions

When we talk about SOA, I would think of Amazon. It is the company that takes SOA to the next level, proving to the world that it is a viable solution for us. Great! I decide to put sometime to learn from Amazon via reviewing the web services it provides, reading the related interviews and blogs, studying how to build an application on top of its infrastructure, develop an application to consume data provided from its Web Services. Anyway, I believe the best way to learn SOA is to get a taste of the services provided from a company that relies greatly on this to scale its business. Before I delve deeper, I need to clarify one thing. Many people use the term SOA and Web Service interchangeably. Be honest, I was among one of them. However, in definition, they are not the same. SOA is about design; Web services are a specific technology set that supports distributed computing. Web services make it easier to create a service-based system, but only if your developers are using SOA design principles, where functions are packaged into modular, shareable, distributable services that can be used and reused by multiple consumers. In Amazon, each service is independent and encapsulates 3 things: data, business logic and public service interface. Each service owns its data and is never been directly accessed by other services. According to its CTO, this is the core architecture that scales Amazon.
 

 

Video Presentation

Jinesh Varia - an evangelist from Amazon. In his presentation, he will show you how to build a regular-expression based search engine called “GrepTheWeb” on top of the Amazon infrastructure – SQS, SimpleDB, EC2 and S3. The most interesting thing he mentioned in this presentation is the on-demand architecture powered by Hadoop and Amazon infrastructure. “At time t0, you have no infrastructure. At time t1, when regular expression comes in, the system reaches the execution phase and the whole infrastructure is ready for it. At time t2, the request is fulfilled, the whole infrastructure is gone…” This gives me a taste of cloud computing and how powerful it can be.

 

Web Resource

High Scalability posts an article about Amazon architecture. The author follows up with different resources and consolidates key information he found.

 

Leave a comment Continue Reading →