Welcome!

Mobile IoT Authors: Liz McMillan, Zakia Bouachraoui, Elizabeth White, Yeshim Deniz, Dana Gardner

Related Topics: Mobile IoT, Java IoT, Open Source Cloud, @CloudExpo, @ThingsExpo, @DevOpsSummit

Mobile IoT: Blog Feed Post

Time to Upgrade to Java 8 By @AppDynamics | @ThingsExpo [#IoT]

The latest version had a growing buzz since it had been announced, and companies of all sizes were eager to upgrade

Why Now is the Perfect Time to Upgrade to Java 8

This past March, Oracle released their most anticipated version in almost decade, Java 8. The latest version had a growing buzz since it had been announced, and companies of all sizes were eager to upgrade. Our partner, Typesafe conducted a Java 8 adoption survey of 2,800 developers and found 65% of companies had already committed to adopting within the first 24 months of the release date.

Typesafe’s survey corroborated InfoQ’s survey of developers who stated 61% were devoted to adopting Java 8. Their handy heatmap below displays how excited developers were to get started with Java 8 and utilize the new features such as lambda expressions, date and time, and the Nashon JavaScript engine. In my opinion, the lambda expressions are by far the most exciting new Java 8 feature.

Screen Shot 2014-09-25 at 2.19.42 PM

So, why are folks so excited for Java 8?

Lambda Expressions and Stream Processing

What are they?

Lambda expressions are arguably the most exciting and interesting new feature with the Java 8 release. Not only is the feature itself exciting for engineers, the implications will have resounding effects on flexibility and productivity.

A lambda expression is essentially an anonymous function which can be invoked as a named function normally would, or passed as an argument to higher-order functions. The introduction of lambdas opens up aspects of functional programming to the predominantly object-oriented programming environment, enabling your code to be more concise and flexible.

Why is it useful?

Consider the task of parsing Twitter data from a given user’s home stream. Specifically, we’ll be creating a map of word length to a list of words of the same length from a user’s home stream.

For instance:

Screen Shot 2014-09-25 at 2.21.04 PM

Should yield:

{
  2=[so, an], 
  3=[are, for], 
  4=[wont, here, some, tips], 
  7=[extreme], 
  8=[programs, makeover], 
  9=[sometimes, uninstall], 
  11=[misbehaving, application]
}

And of course, for many tweets this data is aggregated.

Using traditional Java loop constructs, this could be solved as follows:

Screen Shot 2014-09-29 at 12.05.09 PM

Lets break down what’s happening step-by-step:

  • Fetch the Twitter home timeline
  • For each status
    • Extract text
    • Remove punctuation
    • Gather in one big list of words
  • For each word
    • Filter HTTP links and empty words
    • Add word to mapping of length to list of words of same length

Now, lets consider the solution using stream processing and lambdas:

Screen Shot 2014-09-29 at 12.05.20 PM

The lambda solution follows the same logic, and is significantly shorter. To boot, this solution can be very easily parallelized. Listed below is the next version performing the same processing in parallel below:

Screen Shot 2014-09-29 at 12.05.26 PM

Though a contrived example for purposes of illustration, the implications here are profound.

By adding lambda expressions, code can be developed faster, be clearer, and overall more flexible.

Flexible Code

As mentioned earlier, the implications of adding lambda expressions are huge. Flexible code is one of the biggest advantages of this feature. In today’s Agile and rapid-release engineering environment, it’s imperative for your code to be amenable to change. Java has finally begun to close the gap on other more nimble programming languages.

As another example, let’s consider an enhancement request for our Twitter processor. In abstract, we wish to procure a list of Twitter timeline statuses which are deemed “interesting”. Concretely, the retweet count is greater than 1 and the status text contains the word “awesome”. This rather straightforward to implement, as outlined below:

Screen Shot 2014-09-29 at 12.05.32 PM

Now, at some later point in time, suppose product management decides to change what it means for a tweet to be interesting. Specifically, we’ll need to provide a user interface where a user can indicate based on an available set of criteria how a Tweet is deemed interesting.

This poses an interesting set of challenges. First, a user interface should provide some representation of an available set of filter criteria. More importantly, that representation should manifest in the Twitter processor as a formal set of filter criteria applied in code. One approach, is to parameterize the filter such that calling code specifies that criteria. This strategy is illustrated as follows:

Screen Shot 2014-09-29 at 12.05.38 PM

This grants calling code the ability to specify arbitrary filter criteria, realized by the UI component.

By disambiguating how the timeline is filtered from what criteria is imposed, the code is now flexible enough to accept arbitrary filter criteria.

Full code details can be found at the following Github repository.

Summary

In short, lambda expressions in Java 8 enable development of clear, concise code while maximizing flexibility to remain responsive to future changes.

Engineers, and entire companies, work better when they can spend more time innovating on new products on features rather than focusing a majority of their time firefighting existing problems and squashing bugs. With AppDynamics Java 8 support, you’re finally able to gain some of time back, become more efficient, and starting innovating again.

After implementing AppDynamics throughout their Java environment, Giri Nathan, VP of Engineering at Priceline.com stated, “The AppDynamics APM solution increases our agility by letting us instrument any new code on the fly,” says Nathan. “We can monitor everything from servlets and Enterprise JavaBeans entry points to JDBC exit points, which gives us an end-to-end view of our transactions.”

Interested to see how you can get the most out of the new Java 8 features with AppDynamics? Start a FREE trial now!

The post Why Now is the Perfect Time to Upgrade to Java 8 written by appeared first on Application Performance Monitoring Blog from AppDynamics.

Read the original blog entry...

More Stories By AppDynamics Blog

In high-production environments where release cycles are measured in hours or minutes — not days or weeks — there's little room for mistakes and no room for confusion. Everyone has to understand what's happening, in real time, and have the means to do whatever is necessary to keep applications up and running optimally.

DevOps is a high-stakes world, but done well, it delivers the agility and performance to significantly impact business competitiveness.

IoT & Smart Cities Stories
The deluge of IoT sensor data collected from connected devices and the powerful AI required to make that data actionable are giving rise to a hybrid ecosystem in which cloud, on-prem and edge processes become interweaved. Attendees will learn how emerging composable infrastructure solutions deliver the adaptive architecture needed to manage this new data reality. Machine learning algorithms can better anticipate data storms and automate resources to support surges, including fully scalable GPU-c...
Machine learning has taken residence at our cities' cores and now we can finally have "smart cities." Cities are a collection of buildings made to provide the structure and safety necessary for people to function, create and survive. Buildings are a pool of ever-changing performance data from large automated systems such as heating and cooling to the people that live and work within them. Through machine learning, buildings can optimize performance, reduce costs, and improve occupant comfort by ...
The explosion of new web/cloud/IoT-based applications and the data they generate are transforming our world right before our eyes. In this rush to adopt these new technologies, organizations are often ignoring fundamental questions concerning who owns the data and failing to ask for permission to conduct invasive surveillance of their customers. Organizations that are not transparent about how their systems gather data telemetry without offering shared data ownership risk product rejection, regu...
René Bostic is the Technical VP of the IBM Cloud Unit in North America. Enjoying her career with IBM during the modern millennial technological era, she is an expert in cloud computing, DevOps and emerging cloud technologies such as Blockchain. Her strengths and core competencies include a proven record of accomplishments in consensus building at all levels to assess, plan, and implement enterprise and cloud computing solutions. René is a member of the Society of Women Engineers (SWE) and a m...
Poor data quality and analytics drive down business value. In fact, Gartner estimated that the average financial impact of poor data quality on organizations is $9.7 million per year. But bad data is much more than a cost center. By eroding trust in information, analytics and the business decisions based on these, it is a serious impediment to digital transformation.
Digital Transformation: Preparing Cloud & IoT Security for the Age of Artificial Intelligence. As automation and artificial intelligence (AI) power solution development and delivery, many businesses need to build backend cloud capabilities. Well-poised organizations, marketing smart devices with AI and BlockChain capabilities prepare to refine compliance and regulatory capabilities in 2018. Volumes of health, financial, technical and privacy data, along with tightening compliance requirements by...
Predicting the future has never been more challenging - not because of the lack of data but because of the flood of ungoverned and risk laden information. Microsoft states that 2.5 exabytes of data are created every day. Expectations and reliance on data are being pushed to the limits, as demands around hybrid options continue to grow.
Digital Transformation and Disruption, Amazon Style - What You Can Learn. Chris Kocher is a co-founder of Grey Heron, a management and strategic marketing consulting firm. He has 25+ years in both strategic and hands-on operating experience helping executives and investors build revenues and shareholder value. He has consulted with over 130 companies on innovating with new business models, product strategies and monetization. Chris has held management positions at HP and Symantec in addition to ...
Enterprises have taken advantage of IoT to achieve important revenue and cost advantages. What is less apparent is how incumbent enterprises operating at scale have, following success with IoT, built analytic, operations management and software development capabilities - ranging from autonomous vehicles to manageable robotics installations. They have embraced these capabilities as if they were Silicon Valley startups.
As IoT continues to increase momentum, so does the associated risk. Secure Device Lifecycle Management (DLM) is ranked as one of the most important technology areas of IoT. Driving this trend is the realization that secure support for IoT devices provides companies the ability to deliver high-quality, reliable, secure offerings faster, create new revenue streams, and reduce support costs, all while building a competitive advantage in their markets. In this session, we will use customer use cases...