SCEA/OCMJEA Assignment

This post has been moved to http://srinichekuri.com/2013/06/04/sceaocmjea-assignment/

**********************************************************************

Today I got the magical email that I have passed assignment with a score of 146/160. Needless to say, I was very happy. I am blogging my experience with the hope that future aspirants will benefit from this.

I have submitted Assignment about 10 days before voucher expires.To start I have downloaded the assignment almost immediately after my Step-1 which started my clock(for people who don’t know Step 2 and Step 3 should be done within six months after the assignment is downloaded). Well if the question is did it actually take six month to complete this project, the answer is a big NO. I have started working on it for few hours everyday for 2 weeks. When I understood the assignment well and designed the system, I also drew class diagrams, sequence diagrams on scrap papers and then I stopped. I guess I was thinking that the challenging part is complete and I had to take care of the boring part( documenting it).
When I took up the project again after 5 months, I realized that it was a mistake due to following reasons:

  • The break wiped out project from my memory and I had to start all over again. Ofcourse my design that I scrapped on paper really helped me to get it all back.
  • I have under estimated deployment diagram. I never had to decide on hardware profile before and this turned out to be quite challenging.
  • UML took good chunk of time. By UML I mean deciding on the tool, planning on how you project your diagrams to make evaluation easy and actually drawing them took some time.
  • Documenting did take some time.

The project that was assigned to me was a web application with peak usage of 200 users. The domain diagram had 11 classes.
I have worked on UML diagrams in following order:
Class Diagram:
I have decided to divide my class diagrams into 2 parts by separating out domain classes. Although I started out with a thought to accommodate all the classes into one diagram, I thought that domain classes can be shown separately just to avoid clutter. This worked out pretty well for me. I have used various patterns like MVC, Factory, Business Delegate, Proxy Pattern, Data Access Object, Value Object, Transfer Object and Domain store. I have used following technologies/frameworks:

  •     Struts 2.0 for presentation layer.
  •     EJB 3.0 enterprise beans for session and transaction management.
  •     JPA for persistence.
  •     Java Mail API for email notification.
  •     Spring 3.0 for Authentication and Authorization.
  •     Spring 3.0 for dependency injection, aspect-oriented programming.
  •     Log4j for logging.
  •     WebServices.
  •     Ehcache for Caching (Out of box with Spring 3.0).

My class diagram also included few classes and jsps for user scenarios that were not mentioned in the requirement. For Eg: Maintenance module was not mentioned in my assignment, I have included that after adding proper assumptions.
In all I had 9 jsps, 25 classes and 11 domain objects.
Although I mentioned class names for value objects and transfer Objects, I didn’t show them in my class diagram.

Sequence Diagram:
I had six sequence diagrams in my project. I made sure all the use cases that are mentioned in assignment are addressed here. I had to do some reading for this as I found that UML 2 had good features to represent our views. I have used two opts.

Component Diagram:
I have done this after I was almost done with class diagram and know what to be done in sequence diagrams. This helped me with all the components that would go under various tiers.

Deployment Diagram:
This was a very good learning experience in whole of the project. Having worked for multinational companies all through my career, I never go to involve myself in hardware discussions. I did however have experience working on a projects where I had to make decisions on over all architecture (Firewalls, load balancer, server clustering, hot backups etc). This was the strategy that I have followed before deciding on the hardware profile and the vendor that would host my application

  • In-house hosting costs vs Outsourcing hosting costs
  • Privacy compromises for in-house vs outsourcing.
  • Licensing costs
  • Resource costs for maintenance

For my project, privacy was not a concern (added this to assumption as well) and the cost of hosting in house by buying a server was too high (Eg: Cost of IBM Power 710 Server, 4 core 4.2 Ghz with 8GB RAM, Rack mount 2 x 146 GB SFF Harddisk (IBM AIX 5.3 operating system) is $6255 without other licensing costs and resource costs). I have decided to outsource hosting for my application. The advantage in my case for outsourcing was that maintenance costs(possibly licensing costs) were included in hosting costs.

For Outsourcing I have looked at two options

  • Rent Physical Server: I have looked into multiple providers but the cheapest option was provided by rackspace.com. It costs $262.80/month for box with 4GB RAM, 2 core 160 GB disk space (Linux operating system)
  • Cloud Solution: Again there were multiple that provided cloud solutions but I best I found was Amazon Elastic Compute Cloud (Amazon EC2) service. The price for ‘3 year upfront option’ for ‘M1 Large Instance’ $384.

I have decided to go for Amazon Ec2 as it had other advantages.

Amazon Elastic Compute Cloud (Amazon EC2) services seem to be secure, reliable and have scalability options for increased traffic in future.

  • Load Balancing: This service provides elastic load balancing which automatically distributes incoming application traffic across multiple Amazon EC2 instances. This has capability to detect unhealthy instances within a pool and automatically reroute traffic to healthy instances.
  • Hardware/Software Application Server – Primary: I chose ‘M1 Large Instance’ option which provides 7.5 GB of memory, 4 EC2 Compute units (2 Virtual cores with 2 EC2 compute units each, 850 GB of disk space, 64-bit platform). Operating System is Red Hat Enterprise Linux. Application Server is IBM Websphere.
  • Application Server – Backup:  I chose ‘M1 Medium Instance’ option which provides 3.75 GB of memory, 2 EC2 Compute Units (1 Virtual core with 2 EC2 Compute units each, 410 GB of disk space, 64 bit platform). Operating System is Red Hat Enterprise Linux. Application Server is IBM Websphere.
  • Database (Primary/Backup): The package selected above comes with local installation of database. Following were chosen for this application:
    • Microsoft SQL Server-Standard
    • Windows 2008 R2 6.1 (Operating System)
  • Scalability: Amazon EC2 services provide auto scaling which scales up automatically to maintain performance in case of spikes.
  • Pricing:
    • Application Server+Database(primary) – 3 year upfront option for $384 (Amazon EC2 offers various options but this is the cheapest)
    • Application Server+Database(Backup) – 3 year upfront option for $192
    • Projected operating budget for hardware/software for 3 years = $384 + $192= $576

Assumptions:
I had about 10 assumptions. I have put all assumptions that effected my design/hardware/software decisions.

Risks and Mitigation Plan:
I had about 12-15 risks and mitigations strategies listed. I have sorted the risks in the order of their importance so that the top risk is shown at the top.

Documentation:
I have provided some extensive write-up for each section. I wanted to make sure that all my thoughts were put in there as my main motto was to make sure that evaluator understands everything that I had in mind. A lot of documentation was done as I was doing UML diagrams to diversify my work.

Creating Jar file:
I have zipped all my files and changed the extension to .jar. (We can as well create a jar from command prompt – google it).

SCEA blogs:

Reference Material:

Questions I had and how I addressed them:

  • How detail should class diagram be?
    Pretty detail, but make sure that details like patterns, methods, method parameters are visible. I advice to not include any classes that would add clutter (DTO, Transfer objects, Value Objects etc.). Don’t compromise on quality of class diagram for other factors like restricting class diagram to one page.
  • Do I have to show jsps in class diagram?
    Yes.
  • Should I show DTO/Transfer Objects/Value Objects ?
    You have to decide if this makes any sense to show them. I didn’t show any DTO, Transfer Objects and Value Objects. I just mentioned them as parameters in methods and I did mention them in my write up for class diagram.
  • Should getter/setter methods in a class be shown?
    No.
  • What tool did I use for UML diagrams?
    MS Visio 2010
  • What format of images did I use for UML diagrams?
    I have converted all my UML diagrams to PNG format. I found this format to be more compact in size without any compromise in quality.
  • How did I convert UML diagrams to images?
    I have used SnagIt. SnagIt has settings to capture a scrolling page and later I have cut the unwanted area and saved the image in PNG format.

My other posts related to SCEA: SCEA/OCMJEA Experience (Step-1), SCEA/OCMJEA Essay

Advertisements

14 thoughts on “SCEA/OCMJEA Assignment

    • I am glad that you liked my post. You are welcome to post your questions and I will help you as much as I can.

  1. Thank you very much for post,
    i have question about sequence diagram:
    i have use case – choosing a bid (like in Cade’s example), in reality,
    actor should go to listrequests page, the select one request with its bids (selecting request and bids from db) and only then select one bid. full sequence diagram is very big. is it normal to write all this path, or i can begin my diagram from selecting a bid?

    • Hi Vusal,
      Glad you liked the post.
      First I would like to advice you that sequence diagrams need not be in depth unless the scenario is particularly mentioned in use case requirements. In your case if sequence diagram is getting too big then divide it into two sequences. First can show how user selects a bid and second can show how selection process works. Also put appropriate notes in each sequence diagram.

      Articulate your scenario as much as possible and don’t leave anything for imagination. Think that your evaluator is a dumb guy (not the case in real world) and present your solution.

      Hope this helps!!!

    • My understanding is that alternative block is not meant to show external system. I had a DAO for all systems and thats the extent I showed in sequence diagrams. Name the DAOs to make it self explanatory that it is meant for a system. Eg: I
      f you are connecting to Mail server you can name the DAO MailDAO.

  2. Dear Srinivas,
    i have one question again,
    i have only 3 patterns and 2 of them comes from framework i used.
    i feel its not enough because many masters says that they are used a lot of patterns, however my slution looks like Cades solution. How do you think is it enough?

    • Hi Vusal,
      Number of patterns you are using should depend on the architecture you have chosen for your test case. Make sure that you mention trivial patterns like Value Objects and Data Transfer Objects. If there is a UI and communicates to an external service, I would say you are missing out mentioning some patterns (you should have more than 3 patterns).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s