Tuesday, July 31, 2012

I have decided to post some of my papers from class in hopes that my knowledge can be passed on to those of you looking to learn more about the world I am a part of.  This...is my passion ~Geek



Design Patterns
Abstract
            The purpose of this paper is to define, compare and contrast three software architecture design patterns, considering how or when they could be implemented, and why one method might be favored over another.  The Adapter, Factory Method, and Façade will be reviewed.  Before discussing these design patterns, structural patterns and creational patterns must be defined for clarity.

Structural Patterns
            Structural patterns define the make up of objects and manage access control to subsystems of objects.  In contrast to the architectural patterns that define an entire solution of subsystem, there are usually a number of structural-design patterns in a single framework (Hofstader, 2006).

Creational Patterns
            Creational patterns are concerned with the instantiation of objects.  The creational patterns focus on the composition of complex objects and the encapsulation of creational behavior (Hofstader, 2006).

Adapter
            The Adapter, a structural design pattern, converts the interface of a class into another interface clients expect ("Adapter Design Pattern In C# And Vb .net", 2012).  Functionally, the Adapter acts as the bridge for classes with incompatible interfaces to work together.  The four participants in this pattern are, the Target defines the domain-specific interface that Client uses, the Adapter which adapts the interface Adaptee to the Target interface, the Adaptee defines a existing interface that needs adapting, and the Client which collaborates with objects confirming to the Target interface.  The brilliance behind the Adapter pattern is that it can take incompatible classes from different libraries or frameworks and act as a translator between the two, morphing the data so it can be manipulated by the Client.  The Adapter design pattern could be an ideal solution when connecting legacy databases to newly created objects, such as in the aerospace industry where databases may be decades old and the data has to be accessed through a modern workstation.  The Adapter acts as the translator between the two frameworks so the Client can interact with the data and manipulate as necessary. 

Factory Method
            The Factory Method, a creational design pattern, defines an interface for creating an object, but let subclasses decide which class to instantiate.  Factory method lets a class defer instantiation to subclasses ("Factory Design Method Pattern In C# And Vb .net", 2012).    This pattern attempts to standardize the architectural model for a range of applications by creating a superclass, and delegating details to subclasses that are Client supplied, such as the case with assigning values to variables by way of user prompts ("Factory Method Design Pattern", n.d.).   According to "Factory Design Method Pattern In C# And Vb .net" (2012), there are four participating classes and/or objects participating in this pattern; the Product defines the interface of objects the factory method creates; the ConcreteProduct implements the Product interface; the Creator declares the factory method, which returns an object of type Product; and the ConcreteCreator which overrides the factory method to return an instance of a ConcreteProduct.  The Factory method can aid in design customization with minimal increase in complexity to the overall product.  Where other design patterns require new classes, the Factory Method only requires a new operation to introduce the new subclass into the superclass.  The Factory Method design pattern could be used to offer flexibility in creating documents of different classes but with the same basic properties as all documents.  The default template offered in word processing programs is an example of this superclass ideal where elements such as margins and fonts are predefined, which the user can further classify into a report or letter based on the values input into the subclass interfaces

Façade
The Façade Method, another structural design pattern, provides a unified interface to a set of interfaces in a subsystem.  Façade defines a higher-level interface that makes the subsystem easier to use ("Facade Design Pattern In C# And Vb .net", 2012).  This pattern attempts to provide a simple and uniform interface to a large subsystem of classes.  According to "Factory Design Method Pattern In C# And Vb .net" (2012), there are two participants in this pattern; the Façade knows which subsystem classes are responsible for a request and delegates client requests to the appropriate subsystem objects, and the Subsystem classes which implement subsystem functionality, handle work assigned by the Façade object, and have no knowledge of the façade and keep no reference to it.  An interface designed to access random segments of a complex subsystem, such as a relational database, could be created using the Façade Method to bring together all the details that need to be viewed in a singular interface, such as with an automobile manufacturer.  The factory floor must bring together the thousands of dissimilar components to construct a vehicle and developing a unified interface for all workers to access can make managing the production process, as well as the quality assurance process, easier because each subsystem (factory worker or robot in this case) can see what components have already been assembled to determine which subsystem is next in the manufacturing processes.  Accessing subsystems through a remote server could also lend itself to the Façade Method since there are a number of subsystems being utilized in the background that the user is unaware of.

Conclusion
            Design patterns exist to attempt to simplify the architecture process and assist developers in creating architectures that are easy to maintain or adapt.  The three methods discussed here are useful in their own way, and could all be used within the scope of a larger, more complex solution to achieve a cohesive system that can dynamically respond to users’ needs while minimizing administrative overhead and system complexity.  To say that one design method is preferred over another is a paradox because any design method could arguably be used in most situations, or they could all be used in certain situations and if implemented intelligently could result in a stable system architecture.


 References
Adapter Design Pattern in C# and VB .NET. (2012). Retrieved from http://www.dofactory.com/Patterns/PatternAdapter.aspx#inten
Facade Design Pattern in C# and VB .NET. (2012). Retrieved from http://www.dofactory.com/Patterns/PatternFacade.aspx#intent
Factory Design Method Pattern in C# and VB .NET. (2012). Retrieved from http://www.dofactory.com/Patterns/PatternFactory.aspx
Factory Method Design Pattern. (n.d.). Retrieved from http://sourcemaking.com/design_patterns/factory_method
Hofstader, J. (2006). Using Patterns to Define a Software Solution. Retrieved from http://msdn.microsoft.com/en-us/library/bb190165.aspx#sysptrn_topic2
instantiation. (n.d.). The Free On-line Dictionary of Computing. Retrieved May 28, 2012, from Dictionary.com website: http://dictionary.reference.com/browse/instantiation

...more to come...


Tuesday, April 24, 2012

Are throughput and capacity determining factors for effectiveness of a system more so than processor speed?

Simply yes, throughput and capacity are more a determining factor than processor speed on measuring the effectiveness of any system. The main reason is the processor is not usually the bottleneck in a system, its the I/O devices and BUS speeds that are the main culprits. This is why the focus in recent months across the industry have been the shift to using Solid State Drives (SSD) versus the hard disk drives (HDD) we all use presently. Secondary storage devices are generally the slowest I/O within a system so any improvements here trickle down to the rest of the system as a whole, making for more effective execution of processes and a more positive user experience. The actual throughput on a SSD versus a HDD is significantly higher, and access times are exponentially faster as well, which lead to faster response times and more efficient use of the processor. On the system board, the BUS speeds over the past few years have increased almost to the point that the BUS speed between the CPU and the primary storage is almost matched, which is a good thing. Once the speeds of the main memory BUS matches that of the CPU there is no latency experienced when swapping process states, which results in higher efficiency within the system, and better response to the users requests. At this point, the bottle neck goes back to the I/O devices. The issue with SSD right now is its expense, it has a much higher per byte cost than a traditional HDD, so dive capacities are lower. For example, (as of this post) a major online retailer sells a 500GB 7200rpm SATAIII HDD for $80, and on the same site a 512GB SATAIII SSD is $585. Plus, even with 6Gbps throughput, secondary storage still does not function at the same speed as the processor so again, the CPU ends up sitting idle more than it should, but less with an SSD. Modern multi-core processors can carry the general users through the next couple generations of innovation, and SSD's have already started improving those same users experienced with reduced latency and large performance gains. The next stage is to reduce costs so that SSD capacities increase while the price goes down, much like HDD has done over the past few decades.

Unless you are a systems engineer, gamer, or a hardcore Geek, most people do not consider the system throughput to be a potential bottleneck because all they hear or see are buzz words like "gigahertz", "multi-core", "terabytes", "BluRay", and "HD" or "3D" graphics. What most do not understand is that the throughput between the main memory, CPU, North & South bridges, and Video Processors should be as fast as possible and ideally match. For example, if the CPU core speed is rated at 2.0GHz, then in theory the memory clock speed should also be 2.0GHz, and the BUS pathways between the Bridges and Video processors should also be 2.0GHz, and so on. This produces an optimal operating environment at the hardware level, but is not usually the case because all hardware is made to function at different speeds with different capacities to appeal to different price point from cheap but functional, to expensive but really good. Once you bring I/O devices into the mix, the processor usually ends up in the idle state more often than while awaiting interrupts.

With SSD, durability is an important aspect. Since there are no moving parts, any shock given to the drive is less likely to cause severe data loss or even worse, drive damage. This is why our smartphones are able to be dropped from a couple to a few feet off the ground and usually survive without more than some cosmetic damage, because of solid state memory. If it had moving parts, those would surely get damaged on the first drop, even if only from inches above the ground. Longevity concerns is what made companies like OtterBox release ballistic shock resistant cases for mobile devices. People get attached to their devices, and it is more economical to spend $30-$50 to protect the expensive devices with a case like these, rather than have to deal with the hassle and expense of obtaining a new replacement at retail and migrating data.

What do you think? Am I on point here?

~Geek

What security issues must be resolved now which cannot wait for the next version of Windows® to arrive?

A recent discussion in my Operating Systems class prompted an interesting response on my part to what the main security issues afflicting Microsoft's systems are. Here's my 2 cents:

The most common threats to Microsoft systems on the consumer and business side is through Internet Explorer and Microsoft Office vulnerabilities. When reviewing this months Microsoft Security Bulletin, there are critical updates to patch various vulnerabilities across all releases of the Windows OS for Internet Explorer versions 6 through 9, and Microsoft Office version 2003 through 2010 SP1. The not-so-seen critical updates are for the .NET Framework, which supports interactive sessions with users through browser windows, are related to the Internet Explorer issues of an attacker being able to execute remote code by having a user visit a spoofed website and/or clicking on a link/banner that contains the malformed code. What I find interesting in this months report is that the majority of the notices that Microsoft put out have to do with the same vulnerability, namely the ability to allow an attacker to remotely execute code through a browser session. As many other of my classmates have mentioned in their posts this week, this is part of the evolution of operating system software in particular. Microsoft spends millions of dollars and thousands of man hours developing, and hardening, their kernels. With a user-base of Microsoft software reported at over 1 billion users world-wide, there are only so many scenarios that can be built into software testing labs making it impossible to correct every problem before the product is released to manufacture. Plus, many of these users have advanced knowledge of systems and software who can find vulnerabilities under scenarios impossible to test for under lab conditions. A lot of these users report those vulnerabilities to the development team so a patch can be created and released to the masses, others are not found out until a virus or some malware is put into the wild to exploit them. Security companies like Symantec and McAfee use intuitive software to track these attacks and inform the developers of the issues while generating their own patch, or cure as it were, to the impeding exploit. In the cases of major global attacks, Microsoft works with the security companies, and government entities, to create a cohesive solution to not only cure infected systems, but also protect unexposed systems from future exploitation.

With the great investment it takes to create a major operating system release, patching makes the best sense for providing important updates to a system, without disrupting the flow of user adoption and education on best practices. In some instances, such as when a system issue deals with deadlocked processes, a workaround could be implemented, such as adding a forced delay in processing time with processes competing for the same resource. This is why some of the Windows Updates sent out are related to changing registry values or adding a batch file to affect a process workaround while the development team evaluates whether this is an isolated or potentially wide-spread issue. If they determine that the issues can be replicated over a majority of the systems, then they will create a patch to permanently change the process and resolve the condition, otherwise they will leave the workaround in place for the limited cases that do come up under unusual scenarios.

What do you think? Am I on point, or way off base?

~Geek

Monday, August 15, 2011

New Trends - The Cloud Platform and SQL Server

While discussing data trends in the marketplace and Microsoft’s corresponding initiatives to keep their products up-to-date in a recent class discussion, this is what I contributed to the conversation.
----------------------
The most important trend I see is the Cloud - platform creation, integration, management, and cross compatibility between systems and devices, hosted and supported by the World Wide Web.  Enabling this on their product offerings is a large step for Microsoft.  Microsoft has released various versions of SQL Server in an effort to remain competitive and to unify database connectivity between the varying devices and access methods used today, whether using a PC, Mac, Unix/Linux, or a mobile device.  Microsoft had a history of not playing well with others in their early years, however in the post dot-com boom era, and following 9/11, they realized that they needed to embrace (or buy outright) their competitors if they wanted to remain the dominant powerhouse they became, or at least begin healthy coopetition to unify the industry.  Releasing different, "lite" versions of SQL server not only enables home users and mobile users to have basic database functionality and connectivity, but also lends itself to cross platform development and use on compact devices like tablets, netbooks, and smartphones.  Further to that, being able to also connect these same systems and devices to Enterprise databases in the office further enables a companies most valuable asset (its workers) to generate and maintain business like never before, and keep the system updated in real time.  In 2011 the world is moving at a faster pace than ever anticipated and businesses are the cornerstone of this flux because they have to supply what consumers demand.  Being able to design, build, and administer a DBMS on the fly from any locale and on any device is extremely valuable to any business, especially medium to large sized business, because it allows them to better manage their data streams to generate revenue.  Additionally, making these various editions affordable (some being free) brings small businesses into the fold as well because they too can benefit greatly from the added capabilities and security of SQL Server within their smaller infrastructures.  Since a lot of Windows-based hosting providers already use SQL Server in their back office, allowing their customers to lease their hardware to create and manage their own databases is proving quite valuable.  The Cloud trend is directly related to cross platform creation, integration, and management in that the data made available in the Cloud is warehoused in RDBMS's that are maintained in large server farms and replicated across the globe.  With the increase in independent developers and programmers over the past few years, connecting to complex back office databases is, for the user, as easy as installing a new app on their devices in most cases.  The developers have taken responsibility to code the proper connectors within the program and the user needs only to enter server and login details to access the data, if the database is not integrated with the program itself.

What do you think?  

-Geek

Monday, April 4, 2011

How in the hell does Korea have 3x the bandwidth we do??? WTF!!!

In a recent class session, a classmate and I were engrossed in a discussion about broadband technologies and why the need for older connection methods such as dial-up are still required.  While there are many arguments about these topics, and even more opinions (f-bombs galor!), here's my 2-cents on what I see around the Inter-webs.

The main reason for US homes not having speeds like in Korea (over 30Mbps) today is the cost of the required optical infrastructure to support such systems to the house, however, that has been changing for years in many major cities and towns across our fine country.  Companies like Comcast and AT&T have been upgrading everything here in South Florida to optical fiber cables for at least the past 10 years.  Services like AT&T's U-verse and Comcast's Xfinity are providing speeds in excess of 20Mbps to the house, and popularity is spreading quickly among locals.  This is due to the Fiber To The Curb initiative started years ago which states that optical fiber cable is to be deployed within 1,000 feet of a home or business (http://goo.gl/OHRHc).  In many cases, as in my neighborhood, they are laying optical fiber cables under the main streets of newer housing developments and into sub-developments.  The US's average speed of just over 10mbps is up over the past number of years, you can see how everyone stacks up to the rest of the developed world here: http://www.netindex.com/download/allcountries/.


What most people do not know is that the optical connections between the data centers that make up the public Internet carry information at speeds in excess of 50Gbps around the globe.  Regardless of whether side of the fence you are one about the Internet's true available bandwidth being "unlimited," 50Gbps is something else. Comparing my super-fast 1.5mpbs connection to the US average of 10mpbs, and even Korea's whopping 34Mpbs+ to those speeds is borderline insulting.  With 4G rolling out nicely, users are already seeing speeds in excess of 12Mpbs to their mobile devices - almost 10x faster than what I run in my house.  And yet, the masses STILL complain about not having enough speed - heck, I complain too sometimes (I like my games damn it).

Someone else in the class asked why people still use dial-up in this high-speed era.  That is a simple answer, either they cannot afford broadband for whatever reason (more than likely this fantastic economic cycle we're experiencing), or their provider does not have the budget to implement the proper infrastructure to support broadband data transport in their area.  



I for one still use dial-up as a backup to my DSL connection when they have network outages.  While it seems foolish to even admit to using it, I still remember when it took 45 minutes to download a text based page on a remote server on a 300bps modem and how cool it was just to be able to communicate with another computer so many miles away.  We did not care how long it took to download things, it was just cool to be able to do it.  I have the same feeling with my mobile, handheld, and gaming devices today.  I play games and communicate with people on the other side of the world all the time, in real time, whenever I want to, through a piece of plastic and silicone, into a world that does not physically exist.  I just think that living that concept is cool, no matter how you get there.


What do you think?


-Geek




UPDATE 11/21/2011: Since changing to Comcast, my bandwidth now averages 50MBps down and 10MBps up.  With as expensive as DSL is for the low bandwidth, it seemed logical to change to Comcast because their prices are so low per megabit in comparison.  Do your research, services like still use DSL like AT&T's U-Verse while enticing has a lot of service issues in my area.  Most of the people I talk to regret every signing up for the service even though it offers increased speeds over standard DSL.  Hit me up if you want more details.

Sunday, February 13, 2011

Tablet PC's - Does the iPad really have competition?

(see the end of the article for updates)


I am a tablet junkie...here's my 2 cents on what's what for 2011.

The iPad/iPad2 are a glorified iPhone. Cool toy but that's about where it ends in my opinion.

If you are looking for a good tablet 'computer,' starting at the small form factor (and my personal favorite) you have the Samsung Galaxy Tab available on all networks. The best in show at the CES2011 was the Motorla Xoom which will give the Galaxy Tab some competition but only on the Verizon network. Also available in a small form factor is the Dell Streak exclusively from T-Mobile, the AOC Breeze (9"), Acer's Iconia Tab 4.8" & 7", ASUS Eee Pad Slider with Nvidia's Tegra 2, the ASUS Eee Pad MeMO (7"), the BlackBerry Playbook, and the Lenvov Slate (running a custom skinned Windows 7 OS).

Larger form factors include the ASUS Eee Pad Slate EP121 runs Windows 7 Home Premium and an Intel core i5 processor. Also you have the Motion CL900 running Windows 7, and Toshiba has a Tablet yet to be named that will be coming out sometime this year running Honeycomb. 

There are a bunch of other tablets coming out this year, most of them running Android Honeycomb (3.0), or at least Froyo (2.2), and a hand full of Windows 7 tablets. The general consensus from field testers is that Honeycomb will be the OS to beat on the tablet format and Window 7 has a long way to go still with its touch interface. 

Making a run at the touchscreen market once again is Palm, the pioneer of the PDA and the first true Smartphone. With their new webOS powered devices and partners like HP, they have some really good entries into the marketplace. Check them out in all their NEW glory here: http://www.palm.com/us/products/pads/touchpad/index.html

You can check out a slide show of some of the hottest ones from CES starting here: http://computershopper.com/slideshow/ces-2011/tablets-at-a-glance/aoc-breeze



Are you running one of this years hot tablets? What do you think?


-Geek




UPDATE 3/30/2011: I am excited to add to this post that Samsung announced that it will be releasing the successor to the Galaxy Tab on June 8th.  It will come in two flavors, the Tab 8.9 & the Tab 10.1 - both are powered with the latest dual core 1GHz Nvidia Tegra 2 Processors, Android Honeycomb (3.0), Dual Cameras, 1080p HD Video Playback, Flash support and a price that Apple is cringing about - the Tab 10.1 will have two flavors 16GB for $499 and 32GB for $599.  The Tab 8.9 will debut at $469 for 16GB model and $569 for the 32GB model.  The iPad 2 starts at $499 as well for the 16GB model, but that does not include 3G service and comes with a lower standard resolution as well.  


For details on the new Samsung Tab 8.9 & 10.1, visit a great review done by engadget http://goo.gl/eEM8J


To see how the iPad 2 stacks up, you can see those details on Apple's site here http://goo.gl/K5zWt

UPDATE 8/15/2011: I have owned the Samsung Galaxy Tab 10.1 since its release and let me tell you this thing can fly!  It lives up to every expectation.  I highly recommend you test one out yourself.


UPDATE 10/28/2011: HP Stopped producing their TouchPad due to stiff competition from Apple.  It may be resurrected in the future with a different brand and possibly the Android OS but that remains to be seen as of this writing.

Monday, November 15, 2010

Can Software Keep up With Today's Hardware? Maybe...maybe not...

I just reread an article in Redmond Magazine recently that said that developers are reacting to hardware evolution instead of driving hardware innovations like they used to.  I have also read that at one time hardware developers felt held back by software developers because their applications were not ready for the leaps in power.  What I recently learned from my professor is that software developers did not yet understand how to upgrade their code to better utilize this new power, and still don't in a lot of ways.  The hardware developers finally decided to continue innovating, with or without the software guys.  The thinking was that someone, somewhere would have to make the software to work with the new hardware.  The open-source community has been part of parallel programming initiatives since the beginning so there was no issues there.  The biggest issue, was with Microsoft who exists in 90% of the worlds computers.  They did and still do well on single threaded applications but, until Windows 7, struggled with efficient and effective multi-thread execution at the desktop.  Microsoft's server software has been multi-threaded for some time now, and they have continued to improve on that as technology advances.  What I see happening in the past few years at a hurried pace is developers coding in parallel languages for 64-bit multi-core architectures and creating ways to code for 128/256-bit many-core architectures, as already found in modern video cards, for the desktop.  CPUs with 80 and 100 cores already exist, for servers, now developers need to catch up to bring this power to users.

I found an article online that talks about a company that released a 100-core processor to compete with Intel and AMD at the server level, here's some information on the technology and its intended use: http://www.tilera.com/products/processors/TILE-Gx_Family



What do you think is holding development back now?  Is it just that developers need to catch up, or is it too little too late?


-Geek