Tag: machine learning

  • LogicMonitor Embraces AIOps

    LogicMonitor Embraces AIOps

    LogicMonitor today announced the general availability of LM Intelligence, an extension of its monitoring platform that leverages machine learning algorithms to identify potential issues that are indicative of a major impending outage.

    Sarah Terry, manager of product management for LogicMonitor, said rather than acquiring a separate AIOps platform, it makes more sense to employ machine learning algorithms within the context of a tool that DevOps teams already are using to monitor their IT environment. Monitoring platforms collect the massive amount of data required to train those algorithms, but a separate AIOps platform has to find a way to collect that data, noted Terry.

    The LM Intelligence module created by LogicMonitor provides a root cause analysis (RCA) capability that automatically discovers infrastructure topology in both cloud and on-premises IT environments. Once an issue is discovered, LM Intelligence will aggregate all the alerts being generated into a single notification that pertains to the root cause of any potential issue. That capability will substantially reduce the amount of alert fatigue that today results in IT teams often disregarding what could be a critical alert that would have averted a system failure, said Terry.

    DevOps teams can also employ LM Intelligence to define expected performance ranges for IT resources based on historical trends. Any anomaly outside those ranges will generate a notification.

    As IT environments become more complex, thanks in part to the rise of multi-cloud computing and microservices-based applications based on containers, it won’t be feasible for the average IT team to identify all the relevant events that might be impacting that IT environment without help. There are simply too many parameters that need to be tracked. Tools such as LM Intelligence don’t replace the need for IT operations expertise as much as they augment the capabilities and expertise of the teams trying to manage complex IT environments, where there are large numbers of dependencies between systems. In effect, Terry said, tools such as LM Intelligence will enable DevOps teams to identify the signal in all the noise being generated within an IT environment.

    As IT management tools continue to evolve, DevOps teams should expect to see reliance on machine learning algorithms to become more pervasive. Rather than being a standalone platform, AIOps is quickly morphing into a feature that will become a capability embedded across a wide range of tools.

    Of course, each DevOps team will need to decide to what degree they want to trust any form of AI. However, the longer algorithms collect and analyze data, the more accurate they tend to become. That doesn’t mean DevOps teams should automate processes based on the recommendations of an AI engine; there are likely to be parameters that an AI engine may not have accounted for that could have an adverse impact. However, having the equivalent of a digital assistant that provides timely advice may soon prove indispensable.

    — Mike Vizard

  • AWS Applies Machine Learning to Optimize Cloud Deployments

    AWS Applies Machine Learning to Optimize Cloud Deployments

    Amazon Web Services (AWS) this week at its re:Invent 2019 conference unfurled two tools based on machine learning algorithms to optimize cloud application deployments.

    Amazon CodeGuru is a service available as a preview, through which the cloud service provider will inspect application code using machine learning algorithms to profile the code and then identify bottlenecks and what part of that code is the most expensive to run on the AWS cloud.

    AWS Compute Optimizer, meanwhile, identifies optimal Amazon EC2 instance types, including those that are a part of Auto Scaling groups, for specific types of workloads. It analyzes the configuration and resource utilization of a workload, including historical metrics, to identify dozens of characteristics to recommend optimal AWS compute resources. AWS Compute Optimizer is accessed via the AWS Management Console. Rather than rely on humans to optimize cloud platforms, AWS is making a case for reducing the time and effort required to determine which of dozens of instance types will deliver the highest performance at the lowest cost possible.

    Amazon CloudGuru can pull code from either GitHub or CodeCommit repositories, with support for other repositories planned. It requires developers to insert agent software developed by AWS into their code. Once a pull request is made, Amazon CodeGuru will automatically start evaluating the code using trained artificial intelligence (AI) models that AWS developed using data gathered from thousands of different open source software projects by AWS and its parent company.

    Once the analysis is completed, Amazon CodeGuru will generate a “flame graph” showing, for example, latency issues and CPU utilization rates alongside human-readable recommendations to surface specific issues and recommended remediations that include example code and links to relevant documentation for any line of code. Amazon CodeGuru can observe application runtimes and profile application code every five minutes.

    AWS CEO Andy Jassy told conference attendees that Amazon is already employing Amazon CodeGuru across 80,000 applications, which has resulted in increases in infrastructure utilization rates that have reached 325% in some cases.

    While machine learning algorithms have a clear role to play in terms of enabling DevOps teams to build and deploy more efficient code, it’s not clear to what degree DevOps teams will want to give AWS that level of access to what are often highly proprietary applications. Many DevOps teams may prefer to employ machine learning algorithms within the context of a continuous integration/continuous deployment (CI/CD) environment to drive code to multiple cloud computing platforms. Whatever the approach pursued, it’s clear machine learning algorithms are about to play a much larger role in DevOps. In fact, Jassy this week made it clear AWS will be applying machine learning algorithms broadly to enhance everything from enterprise search to identifying potential fraud.

    What is less clear is how best DevOps practices will need to evolve to account for machine learning algorithms. Many of the processes that make up a DevOps toolchain are increasingly being automated. That doesn’t eliminate the need for the toolchain, but it will sharply reduce the amount of time and effort required to build and optimally deploy applications.

    — Mike Vizard

  • Testim Adds SDK to AI-Based Testing Platform

    Testim Adds SDK to AI-Based Testing Platform

    Testim this week launched a beta release of a software development kit (SDK) consisting for a set of JavaScript application programming interfaces (APIs) that will enable DevOps teams to build tests that leverage machine learning algorithms from within their integrated development environment (IDE).

    Company CEO Oren Rubin said the Testim Development Kit makes it possible to call capabilities such as the ability to record user interface interactions via an application programming interface (API).

    The Testim approach to applying artificial intelligence (AI) testing differs from rivals in that Testim allows DevOps teams to fully inspect how algorithms construct a test, he noted. DevOps teams can also customize those algorithms to fit their own requirements, which is critical when it comes time for DevOps to explain how tests were conducted as part of a compliance audit.

    Testim will continue to provide access to its platform via a graphical user interface, but with the edition of the SDK, Rubin said his company expects to see an increase in the number of DevOps teams that will incorporate Testim within the context of continuous development/continuous deployment (CI/CD). Once that occurs, the number of tests those teams will be willing to run against software before it’s deployed in a production environment should also increase, especially as more developers leverage APIs to create their own tests, Rubin said. That doesn’t eliminate the need for another set of eyes to test an application, but it should reduce the number of common errors made before any piece of code is tested by someone else on the DevOps team.

    One of the most time-consuming elements of any DevOps process is the time it takes to create tests for each application. The Testim platform employs machine learning algorithms to discover the entire application environment and then begin creating appropriate tests. As DevOps teams modify those tests, the Testim platform continues to learn how to build tests the way the DevOps team prefers.

    The Testim platform doesn’t eliminate the need for testing expertise on the DevOps team, but it does enable organizations to scale their testing processes by augmenting whatever testing expertise they have on hand to reduce bottlenecks and improve overall software quality. Those algorithms also provide the added benefit of never taking a day off or quitting to take a more lucrative position elsewhere.

    When it comes to AI, there is naturally a lot of fear and loathing. On the one hand, IT professionals become concerned AI will replace them. On the other hand, they are often disappointed when machine learning algorithms don’t instantly automate a process to their satisfaction. It takes a significant amount of time for algorithms to learn how any IT environment operates, with each update to that environment requiring those algorithms to discover new functions. At this juncture, it’s not a question of whether AI will play a role in DevOps processes, but rather to what degree. Given the repetitive nature of testing, Testim is betting application testing will prove to be an area that lends itself to AI sooner than later.

    — Mike Vizard

  • Five Challenges of Machine Learning DevOps

    Five Challenges of Machine Learning DevOps

    As organizations add machine learning (ML) to their workflows, it’s tempting to try to squeeze model creation and deployment into the existing software development lifecycle (SDLC). However, ML is fundamentally different than traditional applications, and it’s important to account for that in a new, unique process called the machine learning development lifecycle.

    We have identified five challenges every organization should keep in mind as they begin to support ML development.

    Making Heterogeneity Work

    Machine learning is successful when the right tool is selected for a given job. Depending on the use case, a data scientist might choose Python, R, Scala or another language to build one model, and another language for a second model. Within a given programming language, there are numerous frameworks and toolkits available, adding complexity to versioning and consistency.

    For example, TensorFlow, PyTorch and Scikit-learn all work with Python, but each is tuned for specific types of operations, and each outputs a slightly different type of model.

    ML-enabled applications typically call on a pipeline of interconnected models, often written by different teams using different languages and frameworks.

    Figure 1: An ML pipeline that extracts text from scanned documents and analyzes its sentiment passing through several languages and frameworks.

    For example, a public relations firm looking to identify news and reports critical of one of its customers might use the following pipeline:

    1. Extract all text from hundreds of scanned documents with an Optical Character Recognition (OCR) model.
    2. Identify the languages of that text with a language-identification model.
    3. Translate the text to English.
    4. Prepare the text for sentiment analysis with a vectorization model that turns English text to numbers.
    5. Use a sentiment analysis model to score the text.

    Planning for ML Iterating

    In machine learning, your code is only part of a larger ecosystem—the interaction of models with live, often unstructured or unpredictable, data. Interactions with new data can introduce model drift and affect accuracy, requiring constant model evaluating, tuning and retraining.

    Figure 2: The continuous ML Lifecycle with iterations.

    As a result, ML iterations are faster and more frequent than traditional app development workflows. This places greater demands on versioning and other operational processes and requires a greater degree of agility from DevOps processes, tools and staff.

    Organizations interested in adopting ML-enabled applications need to be prepared to handle the burden of iteration without breaking the budget or introducing needless infrastructure tasks.

    Developing the Right Infrastructure

    The model training process typically involves multiple instances of the following:

    • A long and intensive compute cycle.
    • A fixed, inelastic load.
    • A single user.
    • Concurrent experiments on a single model.

    After deployment, models from multiple teams enter a shared production phase characterized by:

    • Short, unpredictable compute bursts.
    • Elastic scaling.
    • Many users consuming many models.

    Operations teams must be able to support both the training and deployment environments on an ongoing basis, because it’s a continuous lifecycle. Selecting the right infrastructure for that job is complicated by a rapidly evolving tech stack, from the increasing variety of processors available for ML workloads to advances in cloud-specific scaling and management, to a never-ending stream of new data science tooling.

    It’s important to future-proof your ML program to ensure a tool or framework you use today does not lead to lock-in or worse—obsolescence—down the road.

    How Will You Scale?

    To address the unpredictability of ML workloads and the premium on low latency, organizations must build compute capacity to support substantial bursts.

    There are three typical architectural approaches, each with benefits and drawbacks:

    Traditional Capacity Planning: In a traditional architecture, operations reserve compute resources capable of scaling to maximum anticipated demand.

     

    Pros:

    • Reserved capacity is always available
    • Easy to administer

     

    Cons:

    • Extreme waste and cost
    • Unanticipated demand can exceed the capacity

     

    Elastic Scaling: Standard elastic scaling designs for a local maximum, scaling machines up and down based on step functions.

     

    Pros:

    • Cost improvements over traditional architecture

     

    Cons:

    • Inefficient hardware utilization
    • Difficult to manage heterogeneous workloads on the same hardware
    • Slightly more management overhead than traditional architecture

    Serverless: Serverless architecture approaches spin up models as requests come in.

     

    Pros:

    • Significantly improved hardware utilization
    • Dramatically lower costs
    • Easier to run and scale different types of workloads on the same machines

    Cons:

    • Substantial administrative overhead for custom-built, on-prem solutions
    • Some third-party services without extensive APIs and reporting provide limited explainability
    • Performance tuning to meet latency

    Architects can implement any of the three approaches in the cloud or in a physical datacenter, though elastic scaling or serverless approaches requires far more effort to manage in-house.

    Trusting the Results with Auditability and Governance

    Explainability—understanding why models make given predictions or classifications—is an essential part of ML infrastructure and the lifecycle. Equally important and often overlooked, however, are the related topics of model auditability and governance—understanding and managing access to models, data and related assets.

    Figure 3: An audit trail can help inform decisions.

    To make sense of complex pipelines, a multitude of users and rapid model and data iteration, deployment systems should attempt to identify:

    • Who called which version of which model.
    • At what time a model was called.
    • Which data the model used.
    • What result was produced.

    Thinking about and planning for these five challenges before beginning a machine learning initiative is a good place to start to ensure a valuable return from your investment.

    To learn more about containerized infrastructure and cloud native technologies, consider coming to KubeCon + CloudNativeCon NA, November 18-21 in San Diego.

    — Diego Oppenheimer

  • AIOps: The Path to Greater Resilience and Uptime

    AIOps: The Path to Greater Resilience and Uptime

    Large organizations with complex IT infrastructures are facing a significant challenge when it comes to data. The complexity is such that many IT operations teams are struggling to detect, or predict, the complex failure conditions and circumstances that can adversely impact resilience and uptime.

    Monitoring a multitude of systems is a complex task, as the data generated by any system can be vast and far too overwhelming for manual IT operations processes, particularly in relation to analyzing, correlating and prioritizing alerts and remediation.

    Companies have much to gain from a better understanding of the data being created from monitoring tools and practices: increasing the resilience of systems, and the speed of remediation cycles delivers significant cost and time savings. Harnessing advanced technologies to deliver more intelligence to teams in charge of performance monitoring is becoming increasingly important, which is where AIOps can deliver significant value on top of existing monitoring and automation tools.

    Cutting Through the Noise

    Telemetry tools deliver staggering amounts of data. The Microsoft Azure telemetry platform, for example, records 10 petabytes of data per day. When dealing with this volume, the ability to intelligently decipher the severity of alerts becomes vital, especially as many of them may be duplicates or not meaningful in any way. Yet it is IT operations teams that are tasked with understanding how systems are performing, and where resources should be diverted to ensure services are always up and running. To do this effectively, the root causes of alerts must be identified quickly and correctly.

    AIOps is increasingly becoming the go-to solution to the problems inherent in dealing with big data. By applying data collection, data modeling and data analytics techniques and using machine learning algorithms to establish patterns, the noise of the data is reduced as operations teams gain more intelligent insights into alerts. So, providing more context to issues flagged within systems is the goal. Eventually, somebody has to take action when an alert is created, so the more intelligence engineers have, the easier it will be to remediate.

    The less context delivered with alerts, the more time engineers will need to resolve the issue, as the manual remediation process will likely involve interaction with other teams. Take application performance monitoring as an example. In my experience, operations teams do not have an end-to-end understanding of the applications that are live in the production environment. If an alert is created, the ops team will typically seek assistance from a member of the developer team who built it, or another colleague with a deeper understanding of the application, which of course extends the lead time of the remediation process.

    Key Considerations for Deploying AIOps

    By establishing data patterns through machine learning and other advanced analytics technologies, the following key drivers for alerts assessment using AIOps can be established:

    Frequency: Discovering how regularly alerts are created and whether it warrants automation for analysis, correlation, prioritization and remediation.

    Coverage: Telemetry is of course vital to AIOps, as the machine learning algorithms will only be as good as the data they ingest. Putting in place the right telemetry tools is therefore vital to ensure the right data is being gathered. Failing to do so increases the risk of missing critical issues.

    Impact: Not all problems require equal energy and resources. Certain issues might only occur every few months and may not be critical. In such situations, it is not prudent to invest significant amounts of time and money into developing the machine learning algorithms that will identify where and when an alert will be created. Again, cutting through the noise of the telemetry will help to identify high-priority alerts.

    Probability: What is the likelihood of certain issues recurring? Can automation tools, informed by the machine learning algorithms, be implemented to deal with these, i.e. learn where and when they are likely to occur so they can be dealt with by the AIOps platform autonomously?

    Take, for example, the issue of CPU or memory going beyond a certain threshold. Rather than manually contacting customers when an issue is flagged to inform them that services are about to go down before being spun up again, an AIOps platform can automate this process, so remediation happens seamlessly.

    Latency: Automation of the remediation process for an alert deemed critical requires increased investment in AIOps. Getting good data from the early stages of AIOps processes will reduce the amount of time taken to both flag and deal with a problem. Containerized microservices, for example, take very little time to recover, so very little investment is needed when applying AIOps tools that automate remediation. Database recovery, however, is a more complex process, the automation of which would require significant investment.

    What’s the Customer Value?

    For service providers, AIOps is essential if they are to attain the highest levels of resilience, the measure of which all comes down to the Service Level Agreement (SLA). The SLA is measured by a percentage that corresponds to the time systems and are up and running over a year. So, 99.99% uptime is good, 99.999% is great, but 99.9999% is where service providers want to be. To put this into context, downtime for an entire year in the latter scenario amounts to just 32 seconds.

    Increased automation is the only way to achieve optimal SLA. To do this, service providers are increasingly turning to AIOps solutions.

    Operations teams are in charge of the IT strategies that align with business objectives. For service providers, a key part of this is, of course, ensuring maximum availability and optimal performance of the customer-facing environment. Understanding when and where faults appear, and improving resilience against them, is the best way to ensure this. That is where AIOps truly adds value.

    — Prashant Jain

  • Building Your Data Science Team from Within

    Building Your Data Science Team from Within

    The global machine learning (ML) industry is increasing at a compound annual growth rate of 42% and will be worth $9 billion toward the end of 2022. Despite this figure, there are many cases of data science teams’ failure to deploy a reliable artificial intelligence (AI) product or service.

    Part of the failings and shortcomings of AI concern the ramp or process for getting there. For an AI project to succeed, it is critical to have your data fully deployed, available, structured and cleaned. You also must have some algorithms (ML/deep learning/natural language processing) ready to pull the insights and focused data, effectively putting the intelligence into AI.

    This requires a very specific skill set and talent pool.

    Empower Your Data Analysts

    With so many different technology fields colliding, machine learning is a difficult area to master. Deep reinforcement learning (DRL), natural language processing (NLP), AutoML tools, ML Ops, neural networks and model-based reinforcement learning are just some of the subjects required to master ML.

    With a shortage of talent and shortfall of data scientists, this is easier said than done. Part of this is because the demand far outweighs the supply, with Bloomberg estimating job postings for data scientists rose 75% from 2015 to 2018. Almost every organization shares this same urgent need.

    When faced with a skills gap in their teams and stiff competition in recruiting, how can organizations effectively build a data science team?

    One way is to start by looking at your data analysts. They are often swimming in disparate, federated data sources, operating on legacy databases, working with mixed data sources and using Excel to do things it was never intended to do. There is an enormous opportunity to empower data analysts to become data scientists.

    From Data Analyst to Data Scientist

    Companies looking to hire data scientists from within need to think about how to upskill, reskill or preskill their data analysts to perform the roles needed to implement AI and ML fully. I’m a believer that if you provide prescriptive and progressive curricula around the essential topics a budding data scientist needs, you can equip them with the skills and knowledge to make a difference and move them forward in the organization.

    However, it’s not enough to simply equip these employees with a curriculum; the program should have numerous twists and turns. Why? When thinking about how you can train the prototypical ML expert of the future, you must consider all the deep tech skills needed. You also want the business and social skills that are required to attain the expert moniker. A well-rounded ML architect will see the business imperatives, understand how to communicate with engineering and business, and have the tech skills to deploy ML models that benefit your business and customers.

    When organizations take roles commonly found in the workplace, such as data analysts, provide them with a sequenced path of instruction that moves them toward an aspirational role, they’ll be well-positioned to realize the full potential of AI and ML.

    — Mike Hendrickson

  • IBM Zones in on DevOps for AI

    IBM Zones in on DevOps for AI

    IBM this week revealed it has added a drift detection capability to the Watson OpenScale platform to govern artificial intelligence (AI) models that will become a foundational piece of IBM’s approach to defining best DevOps practices for building AI-infused applications.

    Rohan Vaidyanathan, program director for IBM Watson OpenScale, said one of the biggest AI issues organizations face today is determining when to update or replace an AI model. Announced at the IBM Data and AI Forum event, the drift detection software added to Watson OpenScale provides a continuous monitoring capability that detects how far an AI model has moved from its original parameters, Vaidyanathan said.

    Drift in AI models usually occurs over time, especially as use cases change in ways that are unexpected. Once that drift is detected, organizations eventually want to either retrain that AI model or replace it with a new one. The process challenge organizations face when building AI applications is first assembling the right data to train the model and then integrating that model within an application as part of a continuous integration pipeline.

    With each interaction with an AI model, the result returned to the application might be different as the machine learning algorithms embedded in the AI model continually learn about the process the application abstracts.

    As it turns out, Vaidyanathan said, only one in 20 of the AI models being built make it into production applications, largely because organizations have not bridged the divide between DevOps teams and data scientists effectively. The drift detection capability IBM has developed is a “missing link” that will enable those two teams to begin collaborating more closely, he said.

    IBM has already defined a set of best practices for building AI models as part of its Watson Anywhere initiative, which seeks to drive adoption of the various elements of the Watson platform on multiple clouds. Rather than forcing organizations to load data into an IBM Cloud to use Watson, IBM is working to bring the various engines and application programming interfaces (APIs) to wherever data resides.

    Naturally, IBM would prefer organizations employ the opinionated DevOps and DataOps processes it defines as best practices for building AI models using its tools. However, Vaidyanathan acknowledged there is likely to be plenty of instances in which organizations will prefer to define their own DevOps processes. The hope is those organizations will still access Watson services and metrics using the APIs that IBM has exposed.

    The challenge IBM is encountering in terms of driving AI adoption are manifold. In addition to trying to get data scientists to appreciate DevOps, IBM recognizes AI models are only as good as the data employed to train them. Unfortunately, many organizations have been lax when it comes to data management. As a result, many of them are now revisiting broken DataOps processes. IBM Watson OpenScale and IBM Cloud Paks for Data, a set of portable data virtualization and management tools deployed as microservices, are part of an effort to bring both explainability and order to the building of AI models.

    Obviously, it will take some time for organizations to extend best DevOps practices to incorporate AI models. But at this juncture, it’s more a matter of when rather than if that goal will be achieved.

    — Mike Vizard

  • Kong Employs Machine Learning to Extend Services Control

    Kong Employs Machine Learning to Extend Services Control

    At the Kong Summit 2019 conference, Kong today announced it has acquired Insomnia, an open source testing tool for application programming interfaces (APIs). In addition, it has added support for REST, Kafka Streams, gRPC, GraphQL and plugins written in Go to its service control platform.

    Kong also added more capabilities based on machine learning algorithms in the form of a visual service map a Kong Immunity module that detects anomalies across services spanning multiple platforms.

    Additionally, the company is delivering Kong Studio, a suite of tools to design, build and maintain APIs for REST and GraphQL endpoints based on the API testing and debugging tool Insomnia, which then can be published to Kong Gateway, proxy software for deploying and managing distributed APIs. The 2.0 release of Kong Gateway separates the data and control plane for the platform and provides the ability to write plugins in Go via Kong’s Plugin Development Kit.

    Kong CTO Marco Palladino said collectively, this approach makes it easier to address a raft of potential API issues at design time rather than after an API has been pushed into a production environment.

    Finally, Kong also updated Kuma, an open source control plane for a service mesh based on Envoy proxy software developed under the auspices of the Cloud Native Computing Foundation (CNCF).

    Kong has been making the case for a service control plane dubbed Kong Brain, which spans both cloud-native and legacy monolithic environments and makes extensive use of machine learning algorithms. Palladino said as more services proliferate across existing monolithic and cloud-native application environments, there is no way IT organizations will be able to keep pace without relying more on machine learning algorithms to manage events and processes occurring within milliseconds of one another across the much more complex IT environment.

    In fact, Palladino noted that rather than expecting one environment to supplant the other, IT organizations should expect to see services proliferate across both monolithic and cloud-native application environments. Managing all those different classes of services will require a service control platform capable of spanning multiple environments, he said.

    Over time, machine learning algorithms will enable service control platforms to become smarter as IT environments transition to managing services end to end versus continuing to focus on individual applications. Naturally, there’s a high correlation between organizations that have made that transition and those that have embraced DevOps to build, deploy and manage those services, said Palladino, noting the most successful organizations employ DevOps to deploy and update APIs as if they were a standalone application rather than a set of add-on capabilities that tend to be forgotten over time.

    It remains to be seen how the confluence of APIs and DevOps ultimately will change how IT is managed. The only thing that is for certain is the days when applications were managed in isolation are finally coming to a much-needed close.

    — Mike Vizard

  • How AI and Microservices Create a Reliable Enterprise of the Future

    How AI and Microservices Create a Reliable Enterprise of the Future

    The Rise of Microservices

    Enterprise adoption of microservices is continuing to rise. Its popularity is so strong that 86% of development professionals internationally expect microservices to become the default application architecture within the next five years. Looking out even longer, nearly all professionals see microservices becoming their company’s default application architecture.

    At its core, a microservice approach centers on the idea of breaking up complex enterprise software into smaller, more manageable pieces, containing everything from the operating system to the platform to the framework to run time and dependencies, packaged as one unit of execution.

    By dividing an application into smaller stand-alone services, each performing a single function and communicating over the network to work together, microservices offer increased modularity and make applications easier to scale and faster to develop. In a world of ever-increasing apps, websites and digital experiences, there are immense benefits to deploying microservices.

    However, the use of microservices is no silver bullet and, for all their benefits, they have their own limitations and challenges. When it comes to deploying microservices, scale, complexity and constant change are the new realities. Microservices architecture introduces complexity with respect to network latency, network communication, load balancing, fault tolerance and message formats. With great flexibility also comes a higher risk of something slipping through the cracks. Managing many services requires understanding deep structures, dependency graphs and more.

    Process scalability is another challenge. An enterprise can run one cloud-based service with relative ease, but simultaneously running dozens of services across multiple clouds quickly becomes a complicated juggling act. In fact, with all the moving parts that come with microservices, it is becoming increasingly difficult to manage these processes manually.

    No wonder that, along with the rise of microservices, we have seen the emergence of auto-remediation/self-healing capabilities. To the untrained eye, the terms auto-remediation and self-healing would seem to be the answer, but don’t be fooled. Many of these features, although making the management of microservices easier, use static thresholds for data points such as waiting time, throughput, message queue size and more. When the thresholds are passed, the system will correct or self-heal as necessary. Although helpful, they’re not necessarily smart or intelligent—and that is where AI can help.

    Advanced Self-Healing and Self-Defense

    AI can help solve some of the hardest problems facing microservices today. Below are a few achievements we’re already seeing AI accomplish:

    • Load Prediction: Understanding the load on the system and acting on it before it happens will allow systems to provision more resources before they’re needed. Provision of resources is not just limited to the network and number of tasks running; AI can trigger customer support representatives to be on hand when—and only when—needed.
    • Decay Detection: Anomaly detection is built into a lot of monitoring services and is efficient at detecting spikes, loads and abnormal behaviors; however, detecting a service decay, even gradual or subtle, is difficult. AI can help systems recognize whether services are reacting differently over time and what the reasons are for this decay. It also has the potential to be more effective in identifying bugs based on studying clusters of microservices having continuous issues.
    • Resource Planning: As the scale and complexity of microservices grows, so does the use of the cloud. The ability to plan ahead using smart resource management could save significant costs while maintaining a stable and robust service.
    • Security: Security is already leveraging AI in many places by discovering attack patterns based on known behaviors. Leveraging these capabilities at the network and database level can improve security for actions done by an authorized person. If you can understand the usage patterns and act on them, you can define a more secure system for all users.

    Benefits aside, using AI is not without pitfalls. For example, despite all its potential, the so-called state-of-the-art AI models are still quite primitive when compared to what they have the potential to achieve. Another issue is how to manage the possibility of bias creeping into AI models to avoid unintended consequences. Technology professionals are already working on ways to solve these complications. However, it will take time to develop the right models, data sets and algorithms.

    The Future

    If the future of application architecture is truly to be dominated by the ever-increasing use of microservices, then those architectures will need to also be dominated by AI. The reality is microservices are simply becoming far too complex for humans to manage on their own effectively. Because of the dynamic nature of their structure, their complex dependencies and their sheer scale, machine learning must be applied to assist with monitoring and management tasks. AI is best suited to meet this challenge and tackle it head on.

    — Martin Henley

  • Aspects of Machine Learning on the Edge

    Aspects of Machine Learning on the Edge

    Machine learning (ML) is hard. Making it work within the confined environment of an embedded device can easily become a quagmire unless we consider, and frequently revisit, the design and deployment aspects crucially affected by ML requirements. A bit of upfront planning makes the difference between project success and failure.

    For this article, our focus is on building commercial-grade applications with significant, or even dominant, ML components. Edge devices, especially ML enabled ones, don’t operate in isolation; they form just one element of a complex automated pipeline.

    You have a device, or better yet, an idea for one which will perform complex analytics, usually in something close to real time and deliver results as network traffic, user data displays, machine control or all three. The earlier you are in the design process, the better positioned you’ll be to adjust your hardware and software stack to match the ML requirements. The available tools (especially at the edge) are neither mature, nor general purpose. The more flexible you are, the better your odds of building a viable product.

    Let’s start by describing a hypothetical device and we’ll work through some ML considerations of the design. As we discuss the design, we’ll visit and revisit DevOps automations that go hand in hand with these other engineering processes.

    A Smart Security Camera

    For our design, let’s look at a networked security camera. As an IoT device, it’s continually connected to the internet. We’ll assume our device will have at least 4GB of SDRAM, a 64-bit ARM CPU and run an embedded Linux that supports an Anaconda Python distribution, OpenCV, DLIB and TensorFlow.

    Our ML related goals are first, recording and labeling interesting frames, and second, alerting security personnel to suspicious activity. We are constrained by various physical, environmental and cost factors. To make the best use of the available data, we’ll need to use ML to examine and classify multiple objects from every image frame. We’ll use a cloud service to handle the second goal, so here, ML on the edge concerns image recognition. How should we proceed?

    Process the Images in the Cloud?

    We’ll need to recognize various objects in the frames, such as people, faces, vehicles, etc. Each object set requires execution (inference) of an ML model, which produces a set of bounded, labeled objects. A typical camera will record about 30 frames per second. Couldn’t our camera just send that data to a cloud provider? Ignoring other considerations, this is about 2.5 million images/day; even at a deep discount this would be billed at about $1000 a day, and that’s for each recognition model applied. Clearly, we’ll need to make other choices.

    Let’s start by examining the raw input stream. Each raw 720p (standard HD 1280x720px) frame uses about 5MB, so if we were to send 30 frames/sec over the network we would need an incredible 1.5Gbps connection (about a terabyte every two hours). For full HD and higher, multiply this by four to 10 times. We will not be sending raw, uncompressed video. Our problem is our ML models will only work against individual image frames. Where should we make our trade-offs?

    Video produces vast amounts of data, but very little information in a given frame is new; this is why various compression techniques work extremely well, and raw data reductions of 100-1000x is typical. These reduced rates of 15 down to 1.5 Mbps is fairly reasonable, so perhaps we can do our ML inference using cloud services, as long as we host our own machine instances rather than paying for ML services. Depending on our workloads, we can expect to process 24×7 video for between $50 and $200 per month.

    Having decided to host our ML models in the cloud, we now need to manage a corresponding set of DevOps considerations. Do we have enough compute power to manage the service? How will we scale the workload as the number of edge machines increases? What are the storage and data retention policies? And of course, since we’re dealing with images of people, how will we manage privacy concerns and the associated legal and political ramifications.

    What should bias us toward more cloud processing?

    • Our initial development budget is more limited.
    • Our ML models have not been proven effective in limited processing/memory environments.
    • We need the flexibility to rapidly change the models we use for processing.
    • We know the network connectivity is robust and offline operation is not required.
    • Our budget for cloud services can significantly exceed the cost of our edge hardware.

    The choice between processing in the cloud, or on the edge is not a binary one. Designs can massively benefit from even limited edge computing; in some cases, simple detections (motion/vehicle/human/face) can be implemented on the edge to reduce cloud workloads by orders of magnitude with no loss in utility.

    Can We Do Most of the Work on the Edge?

    If we’re using Python with C library acceleration on our quad core ARM, simple ML models such as face detection (not recognition) may handle 10 to 20 frames/second, but 30/fps on anything like a full sized image will not be possible. Deeper, more complex models won’t fit into our limited RAM, and if they did fit, we could see inference times exceed a second per frame. We’re now faced with the realities of life on the edge: trade-offs.

    Once we’ve committed to placing our models into the edge device, we’ll need continuous integration (CI) and deployment services to support our product. These will let us train and retrain our models in the cloud, automate the process of validating improvements and produce the embedded code that updates the models in our target devices.

    Since we initially used models well suited to GPU based servers, can we just add a GPU to our device? In a word, yes, but with some very real costs. Adopting an alternate SoM with GPU support will provide a magnitude of improvement in inference performance, but will double or treble the unit cost and power consumption will increase. Such changes may incur significant non-recurring engineering as adjustments, rewrites or retraining of the model will be required to take advantage of the new hardware. Non-recurring engineering is a one shot cost associated with a change to a part, assembly or system.

    In some cases we can plug an Intel Movidius Neural Compute Stick (NCS) into a spare USB port and see 5x to 10x boost in per image rates. These are supported by the Intel OpenVINO toolkit, but there will be some development time to get things running and not every model can be made to work.

    The next tool in the box is Field Programmable Gate Arrays (FPGA) development. It’s a chore to incorporate these into our board design, but performance can be equal or better than GPUs (on some models), and power consumption is lower. The Intel OpenVINO Toolkit supports Arria and Stratix FPGAs for DNNs. Pricing can be prohibitive.

    Finally, if our device will be produced in large quantities, it can be worth a few million dollars of NRE to build an Application Specific Integrated Circuit (ASIC). The sunk cost of ASIC design can be huge, but the lower unit costs will make up for it. We’ll go this route only once our design has been proven, locked down and we are sure the market can take the volume needed to break even on these engineering costs. I should note architectural improvements in dataflow processing of DNNs in ASICs, such as Vivienne Sze’s work, show promise for dramatic improvements in weight, power consumption and cost. If you are planning for a longer term, don’t rule out these developments.

    What would make our edge processing easier?

    • Start with low footprint models such as TinyYOLO, MobileNet or SqueezeNet.
    • Accept lower frame rates for image processing in our design.
    • Evaluate the ML models with the hardware specifics and tool sets in mind, up front.
    • Provide automated DevOps services to update models in your devices.

    Building our ML models to run on edge devices will involve significant development costs. Tool chains do not install seamlessly, and it’s common to spend days to weeks tweaking the environments. Development and testing on these platforms tend to be slower and involve more manual steps than we’re used to in our DevOps environments.

    Running models on the edge will increase our DevOps complexity. Our cloud workload will be lower, but now we’ll include cross compilation, embedded code builds, download management of larger images and various additional test and validation stages. These will be on top of the training, load balancing, data retention, privacy and security issues we need to address for a cloud-only system.

    Conclusions

    What else will affect our choices here? The nature of the inputs can really matter. If our camera visualizes traffic on a busy roadway, or people in an airport terminal, we can expect almost every frame will contain something of interest; if we’re monitoring the bottom floor of a parking garage–not so much.

    To recap:

    • Cloud services for video rate ML are cost prohibitive.
    • Integrate DevOps early to complete your product support system.
    • Understand and characterize your input data by volume, scale and importance.
    • Recognize not every model can execute on edge hardware.
    • You have more choices in edge hardware than you thought.

    Although there are still challenges to building more intelligence into devices, it’s important to realize every year these constraints are fewer, the tools get better and the devices become more powerful. A compelling argument can be made that most data processing should occur as close to its source as possible.

    — John Fogarty