Friday, February 24, 2012

EnterpriseIntegration-Camel


The purpose of a "patterns" book is not to advocate new techniques that the authors have invented, but rather to document existing best practices within a particular field. By doing this, the authors of a patterns book hope to spread knowledge of best practices and promote a vocabulary for discussing architectural designs. One of the most famous patterns books is Design Patterns: Elements of Reusable Object-oriented Software by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides, commonly known as the "Gang of Four" (GoF) book.

Since the publication of Design Patterns, many other pattern books, of varying quality, have been written. One famous patterns book is called Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions by Gregor Hohpe and Bobby Woolf. It is common for people to refer to this book by its initials EIP. As the subtitle of EIP suggests, the book focuses on design patterns for asynchronous messaging systems. The book discusses 65 patterns. Each pattern is given a textual name and most are also given a graphical symbol, intended to be used in architectural diagrams.


Apache come up with Camel Project, which is an open-source, Java-based project that helps the user implement many of the design patterns in the EIP book. Because Camel implements many of the design patterns in the EIP book, it would be a good idea for people who work with Camel to have the EIP book as a reference.


Camel empowers you to define routing and mediation rules in a variety of domain-specific languages, including a Java-based Fluent API, Spring or Blueprint XML Configuration files, and a Scala DSL. This means you get smart completion of routing rules in your IDE, whether in a Java, Scala or XML editor. Apache Camel uses URIs to work directly with any kind of Transport or messaging model such as HTTP, ActiveMQ, JMS, JBI, SCA, MINA or CXF, as well as pluggable Components and Data Format options.

Tuesday, February 14, 2012

Mobile Computing Trend


We are already shifted into a new era of mobile computing, one that promises greater variety in applications, highly improved usability, and speedier networking. The iPhone era from Apple is the poster child for this trend, but there are plenty of other developmentsthat point in this direction. Google-led Android phone offers a compelling open-source alternative to Apple's device.

While the current 3G is an improvement on data speeds, the upcoming 4G networks will be even faster and more reliable through sending data as IP packets. Western countries are already in 4G mobile. Heavy mobile data users are likely to trip to one billion by 2013.

56% of enterprises use a wireless LAN, 36% are evaluating or piloting. It shows the significant increase wireless access. Emerging 4G wireless networks offer increased wireless speed.

Android, Apple's iOS, Windows Phone 7, and other smartphones will continue to become more advanced. Example: The new Google Nexus S is one of the first smartphones to support Near-Field Communication (NFC), which lets the phone communicate wirelessly with other NFC objects within 4 inches. Though barely in use today, NFC will enable smartphone users to easily make payments in stores or receive information about a local business via an NFC window sticker.

Smartphones will get smarter!!!

Thursday, February 2, 2012

IBM 5 in 5 years


Recently, I read an interesting article by IBM. The firm predicts that
over the next five years technology innovations will change the way we
work, live and play in the new ways. Few interesting points are:
· In Energy section, people power will come to life.


· In security, multifactor biometrics plays a vital role that will
never need a password again.


· Mind reading: IBM scientists are researching how to link your brain
to your devices, such as a computer or a smart phone, so you only
have to think about calling someone and it happens.


· In mobile technology, mobile commerce and remote healthcare are key
focus areas.


· In data analytics, new app uses analytics and sense-making to
integrate data into applications that present only the information
you want.


Ref:http://www.ibm.com/smarterplanet/us/en/ibm_predictions_for_future/ideas/index.html

Sunday, January 29, 2012

Tech Trend 2012


Happy New Year 2012. Hope, most of the financial turmoil impacts will be resolved in this year.

To start with, it is good to take few minutes to analyze the trend in past and present years.BusinessDictionary defines trend as 'pattern of gradual change in a condition, output, or process, or an average or general tendency of a series of data points to move in a certain direction over time, represented by a line or curve on a graph.' In simple term, swim your life in the flow of waves to survive.

On interesting analysis, it has been found that Top 3 Technology Innovations of 2011 are:
  • Cloud Storage

  • Mobility

  • Social Media


In cloud space, Top 5 Cloud Providers (Source: SearchCloudComputing) are:
  • NephoScale

  • Verizon Terramark

  • IBM

  • Salesforce

  • Google


Interestingly, top most position are ruled by SVS (Silicon Valley Startups). Point to understand is that the customer ranked the products based on robustness, cost, performance and availability; not on branding alone.

In CIO.com, Top 3 Promising Open Source Products for 2012 are Nginix, Stig and Gluster.

For the last decade,development had the Web server choice of either Apache or IIS. Third alternative is Nginix. It has 50 million different Internet domains, or about 10 percent of the entire Internet. It is designed to handle highly trafficked Web sites, such as Facebook, Zappos, Groupon, Hulu, Dropbox. It got $9 million including CEO Michael Dell. Amazon to streamline Nginx for the AWS (Amazon Web Service) cloud service.

Stig had been introduced during last September NoSQL conference. We can probably see Stig in 2012. By design, it is built on a distributed graph database and Haskell functional programming. It allows for inferential searching, allowing users and applications to look for highly scalable connections.

Gluster strategically enters the storage software market, which generates $4 billion in revenue annually. Red Hat revolutionize by acquisition. Over the past year, GlusterFS downloads increased by 300 percent of 40K.

Letz swift our gear to programming language trend which is the core area for IT developers. On observing the attached programming index, 1/3 rd of programming world is ruled by Java and C languages. As emerging languages, developers need to keep an eye on the significant deltal in C# and Objective C languages due to the power of C# 4.0 and iPad applications.

All the very best in 2012. Happy Coding!

Saturday, December 24, 2011

F# Grouping Pattern



As the pattern matches contain more and more rules, you might want to combine patterns. There are two ways to combine patterns. First is to use OR represented by a
vertical pipe | , which combines patterns together so the rule will fire if any of the grouped patterns match. Second is to use AND represented by an ampersand &, which combines patterns together so that the rule will fire only if all of the grouped patterns match.

let vowelTest c =
match c with
|'a'|'e'|'i'|'o'|'u'
-> true
-> false
|_

let describeNumbers x y =
match x,y with
| 1, _
| _, 1
-> "One of the numbers is one."
| (2,_) & (_,2)
-> "Both of the numbers is two."
-> "Other."


AND pattern has litte use in normal pattern matching, however itz invaluable when using active patterns.

Sunday, December 18, 2011

F# Pattern Matching


Pattern matching is logically similar to a switch statement in C#, Java, C++, etc; but itz much more powerful. A pattern match is a series of rules that will execute if the pattern matches the input. The pattern match expression then returns the result of the rule that was matched. So, all rules in a pattern match must return the same type.

In F#, you use match and with keywords with a series of pattern rules, followed by an arrow -> for pattern matching. Herez a sample F# pattern match code for Odd validation.


> let isOdd x = (x % 2 = 1)
let describeNumber x =
match isOdd x with
| true -> printfn “number is odd”
| false -> printfn “ number is even”;;

> describeNumber 4;;
number is even
val it : unit = ()


Truth Table
Letz take AND truth table example using type inference on pattern matches. Herez the code:


> let testAND x y =
match x, y with
| true, true -> true
| true, false -> false
| false, true -> false
| false, false -> true
> testAND true false;;
val it: bool = true


Match Failure
If no match is found during a pattern matching, an exception of type Microsoft.Fsharp.Core.MatchFailureException is raised. You can avoid this by making sure that all possible cases are coverd. Fortunately, F# compiler will issue a warning when it can determine that pattern match rules are incomplete.


> let testAND x y =
match x, y with
| true, true -> true
// Commented | true, false -> false
| false, true -> false
| false, false -> true
> testAND true false;;

Microsoft.Fsharp.Core.MatchFailureExcption: The match cases were incomplete at:....
Stopped due to error


Pattern matching rules are checked in the order they are declared.

Sunday, December 11, 2011

F# Symbolic Operator


Letz think of writing add 1 2 in the declarative way in stead of traditional way 1+2 everytime. Itz called as a symbolic operator. F# has not only built-in symbolic operators but also custom defined own symbolic operators. It helps the developers to write code in a cleaner and elegant way. In fact symbolic functions are not as form of operator overloading; rather functions whose names
are made out of symbols.

A symbolic operator can be made up of any sequence!@#$%^&*+-/<=>~| symbols. Herez the code defines a new function ! that computes the factorial of a given number

> let rec(!) x =
if x <= 1 then 1
else x * !(x-1);;

> !5;;
val it : int = 120

To have symbolic operators that come before their parameters are known as prefix notation. You must prefix the function with a tilde ~, exclamation point ! or question mark ? operator. In the below code, the function ~++ is prefixed with a tilde and thus to call it, you write ~++ 1 2 3 rather than 1 ~++ 2 3. This enables you to use symbolic operators that more naturally fit the style of function being defined as:

> let (~++) x y z = x + y + z;;

val (~++) : int-> int-> int-> int

> ~++ 1 2 3;;
val it : int = 6

In addition to allowing you to name functions that map more closely to mathematics, symbolic operators can also be passed around to higher order functions if you simply put parentheses around the symbol.