DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Enterprise AI Trend Report: Gain insights on ethical AI, MLOps, generative AI, large language models, and much more.

MongoDB: Learn the fundamentals of working with the document-oriented NoSQL database; you'll find step-by-step guidance — even sample code!

2024 Cloud survey: Share your insights on microservices, containers, K8s, CI/CD, and DevOps (+ enter a $750 raffle!) for our Trend Reports.

PostgreSQL: Learn about the open-source RDBMS' advanced capabilities, core components, common commands and functions, and general DBA tasks.

DZone Spotlight

Saturday, April 6 View All Articles »
Introduction to Generative AI: Empowering Enterprises Through Disruptive Innovation

Introduction to Generative AI: Empowering Enterprises Through Disruptive Innovation

By Tuhin Chattopadhyay DZone Core CORE
Editor's Note: The following is an article written for and published in DZone's 2024 Trend Report, Enterprise AI: The Emerging Landscape of Knowledge Engineering. Generative AI, a subset of artificial intelligence (AI), stands as a transformative technology. Leveraging deep learning models, it exhibits a unique ability to interpret inputs spanning text, image, audio, video, or code and seamlessly generate novel content across various modalities. This innovation has broad applications, ranging from turning textual inputs into visual representations to transforming videos into textual narratives. Its proficiency lies in its capacity to generate high-quality and contextually relevant outputs, a testament to its potential in reshaping content creation. An example of this is found in Figure 1, which shows an application of generative AI where text prompts have been converted to an image. Figure 1. DALL·E 2 generates an image from text prompt Journey of Generative AI The fascinating journey of AI started a couple of centuries back, and Table 1 below highlights the key milestones in the evolution of generative AI, covering significant launches and advancements over the years: Table 1. Key milestones in the evolution of generative AI Major Launches 1805: First neural network (NN)/linear regression 1997: Introduction of LSTM 1925: First recurrent neural network (RNN) architecture 2014: Variational autoencoder, GAN, GRU 1958: Multi-layer perceptron — no deep learning 2017: Transformers 1965: First deep learning 2018: GPT, BERT 1972: Published artificial RNNs 2021: DALL·E 1980: Release of autoencoders 2022: Latent diffusion, DALL·E 2, Midjourney, Stable Diffusion, ChatGPT, AudioLM 1986: Invention of backpropagation 2023: GPT-4, Falcon, Bard, MusicGen, AutoGPT, LongNet, Voicebox, LLaMA 1990: Introduction of GAN/Curiosity 2024: Sora, Stable Cascade 1995: Release of LeNet-5 Generative AI Across Modalities Generative AI spans various modalities, as enlisted in Table 2 below, showcasing its versatile capabilities: Table 2. Generative AI modalities and major open-source tools Modality Tools Text OpenAI GPT, Transformer models (TensorFlow, PyTorch), BERT (Google) Code CodeT5, PolyCoder Image StyleGAN (NVlabs), DALL·E (OpenAI), CycleGAN (junyanz), BigGAN (Google), Stable Diffusion, StableStudio, Waifu Diffusion Audio WaveNet (DeepMind), Tacotron 2 (Google), MelGAN (descriptinc) 3D object 3D-GANs, PyTorch3D Video Video Generation with GANs, Temporal Generative Adversarial Nets (TGANs) How Does Generative AI Work? Generative AI leverages the pathbreaking models like transformer models, generative adversarial networks, and variational autoencoders to leverage its full potential. The Transformer Model The transformer architecture relies on a self-attention mechanism, discarding sequential processing constraints found in recurrent neural networks. The model's attention mechanism allows it to weigh input tokens differently, enabling the capture of long-range dependencies and improving parallelization during training. Transformers consist of an encoder-decoder structure, with multiple layers of self-attention and feedforward sub-layers. Models like OpenAI's GPT series utilize transformer architectures for autoregressive language modeling, where each token is generated based on the preceding context. The bidirectional nature of self-attention, coupled with the ability to handle context dependencies effectively, results in the creation of coherent and contextually relevant sequences, making transformers a cornerstone in the development of large language models (LLMs) for diverse generative applications like machine translation, text summarization, question answering, and text generation. Figure 2. Transformer architecture Generative Adversarial Networks Comprising two neural networks, namely the discriminator and the generator, generative adversarial networks (GANs) operate through adversarial training to achieve unparalleled results in unsupervised learning. The generator, driven by random noise, endeavors to deceive the discriminator, which, in turn, aims to accurately distinguish between genuine and artificially produced data. This competitive interaction propels both networks toward continuous improvement, generating realistic and high-quality samples. GANs find versatility in a myriad of applications, notably in image synthesis, style transfer, and text-to-image synthesis. Variational Autoencoders Variational autoencoders (VAEs) are designed to capture and learn the underlying probability distribution of input data, enabling them to generate new samples that share similar characteristics. The architecture of a VAE consists of an encoder network, responsible for mapping input data to a latent space, and a decoder network, which reconstructs the input data from the latent space representation. A key feature of VAEs lies in their ability to model the uncertainty inherent in the data by learning a probabilistic distribution in the latent space. This is achieved through the introduction of a variational inference framework, which incorporates a probabilistic sampling process during training. Their applications span various domains, including image and text generation, and data representation learning in complex high-dimensional spaces. Figure 3. Q/A generation from image The State of the Art Generative AI, with its disruptive innovation, leaves a profound impact across the industry. Generative Use Cases and Applications Generative AI exhibits a broad range of applications across various industries, revolutionizing processes and fostering innovation. Table 3 showcases how it is reshaping various industries: Table 3. Applications of generative AI across industries Sector Applications Healthcare Medical image generation and analysis, drug discovery, personalized treatment plans Finance Personalized risk assessment and financial advice, compliance monitoring Marketing Content creation, ad copy generation, personalized marketing campaigns Manufacturing 3D model generation for product design Retail Personalized product recommendations, virtual try-on experiences Education Adaptive learning materials, content generation for e-learning platforms Legal Document summarization, contract drafting, legal research assistance Entertainment Scriptwriting assistance, video game content generation, music composition Human resources Employee training content generation The Business Benefits Generative AI offers a myriad of business benefits, including the amplification of creative capabilities, empowering enterprises to autonomously produce expansive and innovative content. It creates significant time and cost efficiencies by automating tasks that previously required human intervention. Hyper-personalized experiences are achieved through customer data, generating recommendations and offers tailored to individual preferences. Furthermore, generative AI enhances operational efficiency by automating intricate processes, optimizing workflows, and facilitating realistic simulations for training and entertainment. The technology's adaptive learning capabilities allow continuous improvement based on feedback and new data, culminating in refined performance over time. Lastly, generative AI elevates customer interaction with dynamic AI agents capable of providing responses that mimic human conversation, contributing to an enhanced customer experience. Managing the Risks of Generative AI Effectively managing the risks associated with the widespread adoption of generative AI is crucial as this technology transforms various business aspects. Ethical guidelines focused on accuracy, safety, honesty, empowerment, and sustainability provide a framework for responsible AI development. Integrating generative AI requires using reliable data, ensuring transparency, and maintaining a human-in-the-loop approach. Ongoing testing, oversight, and feedback mechanisms are essential to prevent unintended consequences. Generative AI for Enterprises This section delves into the key methodologies for enterprises to make a transformative leap in innovation and productivity. Build Foundation Models Foundation models (FMs) like BERT and GPT are trained on extensive, generalized, and unlabeled datasets, enabling them to excel in diverse tasks, including language understanding, text and image generation, and natural language conversation. These FMs serve as base models for specialized downstream applications, evolving over a decade to handle increasingly complex tasks. The ability to continually learn from data inputs during inference enhances their effectiveness, supporting tasks like language processing, visual comprehension, code generation, human-centered engagement, and speech-to-text applications. Figure 4. Foundation model Bring your own model (BYOM) is a commitment to amplifying the platform's versatility, fostering a collaborative environment, and propelling a new era of AI innovation. BYOM's promise lies in the freedom to innovate, offering a personalized approach to AI solutions that align with individual visions. Improving an existing model involves a multifaceted approach, encompassing fine-tuning, dataset augmentation, and architectural enhancements. Fine-Tuning While pre-trained language models offer the advantage of being trained on massive datasets and generating text akin to human language, they may not always deliver optimal performance in specific applications or domains. Fine-tuning involves updating pre-trained models with new information or data, allowing them to adapt to tasks or domains. Fine-tuning pre-trained models is crucial for achieving high accuracy and relevance in generating outputs, especially when dealing with specific and nuanced tasks within various domains. Reinforcement Learning From Human Feedback The primary objective of reinforcement learning from human feedback (RLHF) is to leverage human feedback to enhance the efficiency and accuracy of ML models, specifically those employing reinforcement learning methodologies to maximize rewards. The RLHF process involves stages such as data collection, supervised fine-tuning of a language model, building a separate reward model, and optimizing the language model with the reward-based model. Retrieval Augmented Generation LLMs are instrumental in tasks like question-answering and language translation. However, inherent challenges, such as potential inaccuracies and the static nature of training data, can impact reliability and user trust. Retrieval-augmented generation (RAG) addresses these issues by seamlessly integrating domain-specific or organizational knowledge into LLMs, enhancing their relevance, accuracy, and utility without necessitating retraining. Figure 5. Retrieval-augmented generation The Tech Stack The LLMOps tech stack encompasses five key areas. The table below exhibits the key components of the five tech stack areas: Table 4. LLMOps tech stack components Stack Area Key Components Data management Data storage and retrieval Data processing Quality control Data distribution Model management Hosting the model Model testing Version control and model tracking Model training and fine tuning Model deployment Frameworks Event-driven architecture Prompt engineering and optimization Prompt development and testing Prompt analysis Prompt versioning Prompt chaining and orchestration Monitoring and logging Performance monitoring Logging Performance Evaluation Quantitative methods offer objective metrics, utilizing scores like inception score, Fréchet inception distance, or precision and recall for distributions to quantitatively measure the alignment between generated and real data distributions. Qualitative methods delve into visual and auditory inspection, employing techniques like visual inspection, pairwise comparison, or preference ranking to gauge the realism, coherence, and appeal of generated data. Hybrid methods integrate both quantitative and qualitative approaches like human-in-the-loop evaluation, adversarial evaluation, or Turing tests. What's Next? The Future of Generative AI Looking at the future of generative AI, three transformative avenues stand prominently on the horizon. The Genesis of Artificial General Intelligence The advent of artificial general intelligence (AGI) heralds a transformative era. AGI aims to surpass current AI limitations, allowing systems to excel in tasks beyond predefined domains. It distinguishes itself through autonomous self-control, self-understanding, and the ability to acquire new skills akin to human problem-solving capacities. This juncture marks a critical moment in the pursuit of AGI, envisioning a future where AI systems possess generalized human cognitive abilities and transcend current technological limitations. Integrating Perceptual Systems Through Human Senses Sensory AI stands at the forefront of generative AI evolution. Beyond computer vision, sensory AI encompasses touch, smell, and taste, aiming for a nuanced, human-like understanding of the world. The emphasis on diverse sensory inputs, including tactile sensing, olfactory, and gustatory AI, signifies a move toward human-like interaction and recognition capabilities. Computational Consciousness Modeling Focused on attributes like fairness, empathy, and transparency, computational consciousness modeling (CoCoMo) employs consciousness modeling, reinforcement learning, and prompt template formulation to instill knowledge and compassion in AI agents. CoCoMo guides generative AI toward a future where ethical and emotional dimensions seamlessly coexist with computational capabilities, fostering responsible and empathetic AI agents. Parting Thoughts This article discussed the foundational concepts to diverse applications across modalities and delved into the mechanisms, highlighting the power of the transformer model and the creativity of GANs and VAEs. The journey encompassed business benefits, risk management, and a forward-looking perspective on unprecedented advancements and the potential emergence of AGI, sensory AI, and artificial consciousness. Finally, it is encouraged to contemplate the future implications and ethical dimensions of generative AI, acknowledging the transformative journey that presents both opportunities and responsibilities in integrating generative AI into our daily lives. Repositories: A curated list of modern Generative Artificial Intelligence projects and services Home of CodeT5: Open Code LLMs for Code Understanding and Generation StableStudio GAN-based Mel-Spectrogram Inversion Network for Text-to-Speech Synthesis This is an excerpt from DZone's 2024 Trend Report,Enterprise AI: The Emerging Landscape of Knowledge Engineering.Read the Free Report More
Three Reasons Why You Should Attend PlatformCon 2024

Three Reasons Why You Should Attend PlatformCon 2024

By Caitlin Candelmo
DZone is proud to announce our media partnership with PlatformCon 2024, one of the world’s largest platform engineering events. PlatformCon runs from June 10-14, 2024, and is primarily a virtual event, but there will also be a large live event in London, as well as some satellite events in other major cities. This event brings together a vibrant community of the most influential practitioners in the platform engineering and DevOps space to discuss methodologies, recommendations, challenges, and everything in between to help you build the perfect platform. Need help convincing your manager (or yourself) that this is an indispensable conference to attend? You’ve come to the right place! Below are three key reasons why you should attend PlatformCon24. 1. Platform Engineering Is a Hot Topic in 2024 So, what is platform engineering? In his most recent article on DZone, Mirco Hering describes a platform engineer as someone who plays three roles: the technical architect, the community enabler, and the product manager. This multifaceted approach helps to better streamline development practices and take the load off of software engineers and allow for each team to be more in sync with their deployment cycles. In 2024, we’ve seen an increase in articles and conversations on DZone around platform engineering, how it relates to DevOps, and the top considerations when looking to better optimize your development processes. Developers want to know more about this, and this conference is a perfect place to learn from the experts, and connect with other like minded individuals in the space. 2. Learn From Platform Engineering and DevOps Experts Have you seen the lineup of speakers for PlatformCon this year?! Industry leaders will help you navigate this space and key conference themes, with prominent names including Kelsey Hightower, Gregor Hohpe, Charity Majors Manuel Pais, Nicki Watt, Brian Finster, Mallory Haigh, and more. At DZone, we value peer-to-peer knowledge sharing, and find that the best way for developers to learn about new tech initiatives, methodologies, and approaches to existing practices is through the experiences of their peers. And this is exactly what PlatformCon is all about! This conference also gives attendees unparalleled access to the speakers via Slack channels. What better way to navigate the evolving world of platform engineering than to learn from the experts who are leading the way? 3. Embark on a Custom DevOps + Platform Engineering Journey As we mentioned earlier, platform engineering is multifaceted, and with that, the approaches and practices are as well. The five conference tracks highlighted below are intended to allow you to tailor your experience and platform engineering journey. Stories: This track enables you to learn from the practitioners who are building platforms at their organizations and will provide you with adoption tips of your own. Culture: This track focuses on the relationships between all of the developers and teams involved in platform engineering — from DevOps and site reliability engineers to software architects and more. Toolbox: This track focuses on the technical components of developer platforms, and dives into what tools and technologies developers use to solve for specific problems. Conversations will focus around IaC, GitOps, Kubernetes, and more. Impact: This track is all about the business side of platform engineering. It will dive into the key metrics that C-suite executives measure and will offer advice on how to get leadership buy-in to build a developer platform. Blueprint: This track will give you the foundation to build your own developer platform, covering important reference architectures and key design considerations. Register Today to Perfect Your Platform Now that we’ve shared multiple reasons why you should attend PlatformCon 2024, we’ll leave you with one final motivation — it’s free to register and attend! This conference is the perfect opportunity to connect with like-minded people in the developer space, learn more about platform engineering, and help determine the best next steps in your developer platform journey. Learn more about how to register here. See you there! More

Trend Report

Enterprise AI

Artificial intelligence (AI) has continued to change the way the world views what is technologically possible. Moving from theoretical to implementable, the emergence of technologies like ChatGPT allowed users of all backgrounds to leverage the power of AI. Now, companies across the globe are taking a deeper dive into their own AI and machine learning (ML) capabilities; they’re measuring the modes of success needed to become truly AI-driven, moving beyond baseline business intelligence goals and expanding to more innovative uses in areas such as security, automation, and performance.In DZone’s Enterprise AI Trend Report, we take a pulse on the industry nearly a year after the ChatGPT phenomenon and evaluate where individuals and their organizations stand today. Through our original research that forms the “Key Research Findings” and articles written by technical experts in the DZone Community, readers will find insights on topics like ethical AI, MLOps, generative AI, large language models, and much more.

Enterprise AI

Refcard #395

Open Source Migration Practices and Patterns

By Nuwan Dias DZone Core CORE
Open Source Migration Practices and Patterns

Refcard #171

MongoDB Essentials

By Abhishek Gupta DZone Core CORE
MongoDB Essentials

More Articles

8 Ways Mobile Observability Is the Opposite of Backend Observability
8 Ways Mobile Observability Is the Opposite of Backend Observability

Using a hammer to pound a screw into the wall will work, but it's not really a great way to get the job done and probably will lead you with damage you wish hadn't occurred. Similarly, using monitoring tools initially designed for the observability of backend applications to monitor your mobile applications will leave you wishing you had reached for the screwdriver instead of the proverbial hammer. Often the observability challenges for mobile applications are pretty much the opposite of what they are for backend monitoring. Let's take a look at 8 examples where that is the case. To make this more concrete, we will use a typical e-commerce mobile application and the backend application that handles its requests as an example to illustrate these differences. However, the comparisons in these examples are broadly applicable to other types of mobile applications and backend systems that you are running. Duration of Interactions For high-traffic services in your backend application, you are looking to have requests that take milliseconds to run on average, and you want to scale to handle thousands of requests per second. You don't maintain a state between requests, and it's uncommon for prior requests to cause bugs in the current request. Some examples of service calls here include: Getting a list of specific products. Completing a purchase. Fetching a list of alternative products for a given product. The data needed to troubleshoot issues here is likely within the request or the supporting infrastructure. You can trace the individual calls and connected service calls, and then inspect them to look for failure points. However, in your e-commerce mobile app, a single session lasts from multiple seconds to minutes, or even hours. If you want to understand why purchases are failing, the problem could stem from many application and device factors: Did the user background the app between adding items to the cart and attempting to complete the purchase? Certain data might be lost during such app state transitions. Did the app run out of memory in a product list view due to excessive loading and retention of product images not appropriately scaled for the device? Did the app not complete the payment processing in a timely manner, so the user force quit the app? Did the device lose network connectivity and fail to gracefully recover? Did the app crash during the purchase flow, and the user decided to purchase elsewhere? Since mobile is such a dynamic environment, tracking down the root cause of a drop in purchases could have many root causes that fall outside of the actual service calls. The span over which errors can be introduced is far greater than in backend interactions. How you visualize and interpret data becomes very different when your expectation is that issues can evolve over minutes and not over milliseconds. Session Complexity When you envision what a complete session is for your backend application, it frequently boils down to responding to a request from the client. The external variables at play are mostly your infrastructure’s health and capacity. In your e-commerce mobile app, a complete user experience can span multiple sessions across varying lengths of time. The user could launch, background, and then launch the app again over multiple days to complete a single purchase. Key functionality can also take place while the app is backgrounded, such as sending push notifications and pulling fresh products and deals so that the user is always getting the most up-to-date data whenever they launch the app. Some challenges when troubleshooting apps with complex interactions include: Stitching together multiple app sessions to get the complete user experience context. Understanding how app performance is impacted by different launch conditions like cold starts versus reused app processes. Tracking problems with failed or outdated app states that were loaded far earlier than when the resulting error happened. App sessions also cannot be easily modeled as a series of traces, so there are data and visualization challenges when dealing with longer, more complex experiences. Uncontrolled Devices You control the infrastructure that your backend applications run on. As such, it would be a rookie mistake for a DevOps team to, for example, not be aware of servers that are about to run out of disk space, and most people would forgive the backend monitoring agent for not working as expected if a server ran out of disk space. That is not the case for your e-commerce mobile app that runs on devices that you have no control over. People buy devices with the least amount of storage they think they can get away with and promptly fill them up with apps and media. You have to build resilient SDKs that can gracefully handle these situations and still report as complete a picture as possible. You have to find the right balance between retaining relevant information on the device – you may not have network connectivity to send it right away – and making the lack of disk space worse by excessively adding to the data stored on the device. Heterogeneous Devices Not only do you have no control over devices, but also they are far from homogeneous. In a backend environment, you are likely to have a small set of different machine types. For an Android app, you will have it run on tens of thousands of device models, running a variety of OS versions, so you end up with more complicated variables when analyzing the collected data. Cardinality for certain dimensions will grow in ways that just would not be seen in backend applications. Some examples of device-specific issues include: Your developers and QA team have modern devices for testing, which can handle the size of the product images in a list view. However, many customer devices have less RAM and end up with an out-of-memory crash. A manufacturer introduced a bug in their custom Android version, so customers encounter a crash that only affects your app on specific OS version/manufacturer combinations. The UI stutters on some devices because they have old CPU and GPU chipsets that cannot handle the complexity of your application. With so many combinations of device variables, your engineering team needs deep insights into affected user segments to avoid costly issue investigations. Otherwise, they will spend time looking for root causes in code when seeing the holistic picture of impact would streamline their resolution efforts. Network Connectivity Your e-commerce backend application operates with the explicit assumption of constant connectivity. Failures frequently are a capacity problem, which can be alleviated by sizing your infrastructure to handle traffic spikes. Outright losing connectivity occurs mostly during cloud provider outages, which are exceedingly rare. However, constant network connectivity in mobile is never guaranteed. Maybe your app has a great network connection when it starts, then completely drops the network connection, and then gets it back but experiences significant lag and packet loss. Your mobile app observability solution needs to provide insight into how your app deals with these challenging conditions. Some examples of network connectivity issues include: The app cannot launch without connectivity because the download of critical data is required to enter the main application flow. The device loses connection as the user tries to make a purchase, but the user is not greeted with a prompt about the issue. To the user, it still looks like the app is attempting to complete the purchase. They get frustrated and force quit because they don’t know the source of the issue. The app does not effectively cache images, so customers in locales where bandwidth is a scarce resource stop using your application. Since problems can occur during connectivity switches, you need visibility into entire user experiences to track down problems. A great example is content refreshes or data synchronizations that are scheduled as background tasks. Understanding where failures happen under specific network conditions allows your engineering team to understand the root cause of network-related problems and introduce fixes that gracefully handle the loss of network connectivity. Data Delays Many backend observability tools will only accept data that is delayed by minutes or at most a few hours. This works fine for backend applications since the expectation is for the servers to not lose connectivity. The opposite is true in mobile, where the expectation is for connectivity to be lost intermittently and for a significant percentage of data to be delayed. As an example, your engineering team notices a spike in crashes, then launches an investigation and puts out a fix in a new version. You notice the crash rate go down, and everyone is happy. However, users on the previous version that crashed, who were too frustrated to immediately relaunch your app after it crashed, have decided to give it another go a day or two later. They launch the app, which sends a crash report from the device. If your observability tool marks those crashes as having just occurred, you might think the issue is still ongoing, even though you released a fix for it. Ecosystem Limitations When you build a backend application, you get to choose the environment that it runs in. The limitations on what you monitor and how you monitor it are largely dictated by the overhead it introduces and the time it takes to implement it. On mobile, you are operating in ecosystems defined by the device manufacturers or maintainers of the ecosystem, and there are restrictions that you need to find creative solutions to in order to get the data that you need. Certain metrics are forced upon you, such as the crash and Application Not Responding (ANR) rates that, in Android, impact your ranking and discoverability on the Google Play Store. The tricky part here is that the ecosystems have the ability to collect data from a system perspective, while you only have the ability to collect data from the perspective of your application. That means you have to get pretty inventive to find ways to collect the data that helps you solve certain problems, such as ANRs on Android. To provide a bit more color here, ANRs occur when an Android app has a prolonged app freeze that causes the OS to display a prompt that asks the user if they want to terminate your app. Effectively, the app freezes for so long that the user is forced to crash their current app session. From a data collection perspective, the Google Play Console treats ANRs exactly like a crash, capturing a single stack trace at the end of the session. However, app freezes are not deterministic and can stem from endless combinations of initial conditions that led to the main thread being blocked, including: Third-party SDKs (like ad vendors) conflicting with each other Loading heavy resources like large images or unoptimized ads Data synchronizations hitting slow backend service calls Heavy animations or UI work Slow responses to system broadcasts With so many variables at play, your best bet is to capture data as soon as the app freezes and then examine these code patterns across your users to find the most common causes. Backend observability solutions are simply not built for these types of nuanced mobile data capture. Deploying New Code If you discover an issue in your backend application, code can be consistently redeployed with all instances running new code. That means, if you spot an issue that’s preventing the system from completing purchases, the biggest delay is in tracking down the root cause and writing the code to fix it. In mobile, you can’t control when people upgrade their app version. There will be a long tail of old versions out in the wild. It is not unusual for a large, established application to have over a hundred different versions used in a single day. As such, it’s vital that you minimize the number of users who download bad app versions. Slow rollouts and real-time visibility into user experiences can help you proactively address issues before they become widespread. Your mobile observability solution should surface signals that allow for early issue detection for every type of broken experience, including: Performance issues like slow startups or purchase flows Stability issues like crash, error, or ANR spikes User frustration issues like abandons and force quits Device resource issues like excessive memory, CPU, and battery consumption Network issues like failing first and third-party endpoints Mobile is so complex that engineering teams frequently must add logs and release new versions to build enough context to uncover root causes. This approach is riddled with guesswork, resulting in additional releases – some of them which will introduce, rather than solve, problems – out in the wild. You want your mobile observability solution to provide complete visibility so that your engineering team can get to solutions faster and without sacrificing feature velocity. Closing Thoughts At first glance, the challenges of achieving observability in a mobile application may not seem all that different than doing so for a backend application – collect some data, store it in a database, visualize it in a dashboard – but, on closer inspection, the nuances of each of those steps is quite different for the two domains. Trying to use the same tool for monitoring your mobile application as you do for your backend application is better than having no visibility, but it will ultimately deprive you of the full clarity of what is happening in your mobile app. Your developers will take longer to figure out how to solve problems that exist if they can even detect that they are occurring. If you rely on a backend observability approach for your mobile applications, there are mobile-first approaches that can eliminate toil and guesswork while integrating across your existing tech stack for full stack visibility. In addition, given the different challenges in collecting data for mobile apps versus backend systems, open-source communities, and governing groups are actively working on what mobile telemetry standards should be in order to power the future of mobile observability.

By Fredric Newberg
DZone's Cloud Native Research: Join Us for Our Survey (and $750 Raffle)!
DZone's Cloud Native Research: Join Us for Our Survey (and $750 Raffle)!

Hi, DZone Community — we'd love for you to join us for our Cloud Native Research Survey! This year, we're combining our annual cloud and Kubernetes research into one 12-minute survey that dives further into these topics as they relate to both one another and at the intersection of security, observability, AI, and more. Our 2024 cloud native research questions cover: Microservices, container orchestration, and tools/solutions Kubernetes use cases, pain points, and security measures Cloud infrastructure, costs, tech debt, and security threats AI for release management and monitoring/observability DZone members and readers just like you drive the research that we cover in our Trend Reports, and this is where we could use your anonymous perspectives! Oh, and don't forget to enter the $750 raffle at the end of the survey! Five random people will be selected to each receive a $150 e-gift card. We're asking for ~12 minutes of your time to share your experience. Participate in Our Research Over the coming months, we will compile and analyze data from hundreds of respondents, and our observations will be featured in the "Key Research Findings" of our Cloud Native (May) and Kubernetes in the Enterprise (September) Trend Reports. Stay tuned for each report's launch and see how your insights align with the larger DZone Community. Your responses help shape the narrative of our Trend Reports, so we truly cannot do this without you. We thank you in advance for your help!—The DZone Publications team

By Caitlin Candelmo
Integrating Spring Boot Microservices With MySQL Container Using Docker Desktop
Integrating Spring Boot Microservices With MySQL Container Using Docker Desktop

Docker has become an essential tool for developers, offering consistent and isolated environments without installing full-fledged products locally. The ideal setup for microservice development using Spring Boot with MySQL as the backend often involves a remotely hosted database. However, for rapid prototyping or local development, running a MySQL container through Docker offers a more streamlined approach. I encountered a couple of issues while attempting to set up this configuration with the help of Docker Desktop for a proof of concept. An online search revealed a lack of straightforward guides on integrating Spring Boot microservices with MySQL in Docker Desktop; most resources primarily focus on containerizing the Spring Boot application. Recognizing this gap, I decided to write this short article. Prerequisites Before diving in, we must have the following: A foundational understanding of Spring Boot and microservices architecture Familiarity with Docker containers Docker Desktop installed on our machine Docker Desktop Setup We can install Docker Desktop using this link. Installation is straightforward and includes steps that can be navigated efficiently, as illustrated in the accompanying screenshots. Configuring MySQL Container Once we have installed the Docker desktop when we launch, we will get through some standard questions, and we can skip the registration part. Once the desktop app is ready, then we need to search for the MySQL container, as shown below: We need to click Pull and then Run the container. Once you run the container, the settings dialog will pop up, as shown below. Please enter the settings as below: MYSQL_ROOT_PASSWORD: This environment variable specifies the password that will be set for the MySQL root superuser account. MYSQL_DATABASE: This environment variable allows us to specify the name of a database that will be created on image startup. If a user/password was supplied (see below), that user will be granted superuser access (corresponding to GRANT ALL) to this database. MYSQL_USER, MYSQL_PASSWORD: These variables are used to create a new user and set that user's password. This user will be granted superuser permissions for the database specified by the MYSQL_DATABASE variable. Upon running the container, Docker Desktop displays logs indicating the container's status. We can now connect to the MySQL instance using tools like MySQL Workbench to manage database objects. Spring Application Configuration In the Spring application, we can configure the configurations below in the application.properties. YAML spring.esign.datasource.jdbc-url=jdbc:mysql://localhost:3306/e-sign?allowPublicKeyRetrieval=true&useSSL=false spring.esign.datasource.username=e-sign spring.esign.datasource.password=Password1 We opted for a custom prefix spring.esign over the default spring.datasource for our database configuration within the Spring Boot application. This approach shines in scenarios where the application requires connections to multiple databases. To enable this custom configuration, we need to define the Spring Boot configuration class ESignDbConfig: Java @Configuration @EnableTransactionManagement @EnableJpaRepositories( entityManagerFactoryRef = "eSignEntityManagerFactory", transactionManagerRef = "eSignTransactionManager", basePackages ="com.icw.esign.repository") public class ESignDbConfig { @Bean("eSignDataSource") @ConfigurationProperties(prefix="spring.esign.datasource") public DataSource geteSignDataSource(){ return DataSourceBuilder.create().type(HikariDataSource.class).build(); } @Bean(name = "eSignEntityManagerFactory") public LocalContainerEntityManagerFactoryBean eSignEntityManagerFactory( EntityManagerFactoryBuilder builder, @Qualifier("eSignDataSource") DataSource dataSource) { return builder.dataSource(dataSource).packages("com.icw.esign.dao") .build(); } @Bean(name = "eSignTransactionManager") public PlatformTransactionManager eSignTransactionManager(@Qualifier("eSignEntityManagerFactory") EntityManagerFactory entityManagerFactory) { return new JpaTransactionManager(entityManagerFactory); } } @Bean("eSignDataSource"): This method defines a Spring bean for the eSign module's data source. The @ConfigurationProperties(prefix="spring.esign.datasource") annotation is used to automatically map and bind all configuration properties starting with spring.esign.datasource from the application's configuration files (like application.properties or application.yml) to this DataSource object. The method uses DataSourceBuilder to create and configure a HikariDataSource, a highly performant JDBC connection pool. This implies that the eSign module will use a dedicated database whose connection parameters are isolated from other modules or the main application database. @Bean(name = "eSignEntityManagerFactory"): This method creates a LocalContainerEntityManagerFactoryBean, which is responsible for creating the EntityManagerFactory. This factory is crucial for managing JPA entities specific to the eSign module. The EntityManagerFactory is configured to use the eSignDataSource for its database operations and to scan the package com.icw.esign.dao for entity classes. This means that only entities in this package or its subpackages will be managed by this EntityManagerFactory and thus, can access the eSign database. @Bean(name = "eSignTransactionManager"): This defines a PlatformTransactionManager specific way of managing transactions of the eSignmodule's EntityManagerFactory. This transaction manager ensures that all database operations performed by entities managed by the eSignEntityManagerFactory are wrapped in transactions. It enables the application to manage transaction boundaries, roll back operations on failures, and commit changes when operations succeed. Repository Now that we have defined configurations, we can create repository classes and build other objects required for the API endpoint. Java @Repository public class ESignDbRepository { private static final Logger logger = LoggerFactory.getLogger(ESignDbRepository.class); @Qualifier("eSignEntityManagerFactory") @Autowired private EntityManager entityManager; @Autowired ObjectMapper objectMapper; String P_GET_DOC_ESIGN_INFO = "p_get_doc_esign_info"; public List<DocESignMaster> getDocumentESignInfo(String docUUID) { StoredProcedureQuery proc = entityManager.createStoredProcedureQuery(P_GET_DOC_ESIGN_INFO, DocESignMaster.class); proc.registerStoredProcedureParameter("v_doc_uuid", String.class, ParameterMode.IN); proc.setParameter("v_doc_uuid", docUUID); try { return (List<DocESignMaster>) proc.getResultList(); } catch (PersistenceException ex) { logger.error("Error while fetching document eSign info for docUUID: {}", docUUID, ex); } return Collections.emptyList(); } } @Qualifier("eSignEntityManagerFactory"): Specifies which EntityManagerFactory should be used to create EntityManager, ensuring that the correct database configuration is used for eSign operations. Conclusion Integrating Spring Boot microservices with Docker Desktop streamlines microservice development and testing. This guide walks through the essential steps of setting up a Spring Boot application and ensuring seamless service communication with a MySQL container hosted on the Docker Desktop application. This quick setup guide is useful for proof of concept or setting up an isolated local development environment.

By Amol Gote DZone Core CORE
Node-RED Unleashed: Transforming Industrial IoT Development and Industry Collaboration With Hitachi
Node-RED Unleashed: Transforming Industrial IoT Development and Industry Collaboration With Hitachi

Node-RED is an open-source, flow-based development tool designed for programming Internet of Things (IoT) applications with ease, and is a part of the OpenJS Foundation. It provides a browser-based editor where users can wire together devices, APIs, and online services by dragging and dropping nodes into a flow. This visual approach to programming makes it accessible for users of all skill levels to create complex applications by connecting different elements without writing extensive code. Node-RED has been working on some great improvements lately, including the first beta release of Node-RED 4.0. Updates include auto-complete in flow/global/env inputs, timestamp formatting options, and better, faster, more compliant CSV node. More to come in the full release next month! Recently, the OpenJS Foundation talked with Kazuhito Yokoi (横井 一仁), Learning and Development Division, Hitachi Academy, to find out more about Node-RED and why it is becoming so popular in Industrial IoT applications. A browser-based low-code programming tool sounds great, but how often do users end up having to write code anyway? It depends on user skills and systems. If users such as factory engineers have no IT skills, they can create flow without coding. The two most common cases are data visualization and sending data to a cloud environment. In these cases, users can create their systems by connecting Node-RED nodes. If users have IT skills, they can more easily customize Node-RED flow. They need to know about SQL when they want to store sensor data. If they want external npm modules, they should understand how to call the function through JavaScript coding, but in both cases, the programming code of a Node-RED node is usually on a computer screen. Hitachi is using Generative AI based on a Hitachi LLM to support the use of low-code development. Do you personally use ChatGPT with Node-RED? Do you think it will increase efficiency in creating low-code Node-RED flows? Yes, I do use ChatGPT with Node-RED. Recently, I used ChatGPT to generate code to calculate location data. Calculating direction and distance from two points, including latitude and longitude, is difficult because it requires trigonometric functions. But ChatGPT can automatically generate the source code from the prompt text. In particular, the function-gpt node, developed by FlowFuse, can generate JavaScript code in the Node-RED-specific format within a few seconds. Users just type the prompt text on the Node-RED screen. It’s clear to me that using ChatGPT with Node-RED allows IT engineers to reduce their coding time, and it expands the capabilities of factory engineers because they can try to write code themselves. In addition to factory applications, there's a compelling use case in Japan that underscores the versatility of Node-RED, especially for individuals without an IT skill set. In Tokyo, the Tokyo Mystery Circus, an amusement building, utilizes Node-RED to control its displays and manage complex interactions. The developer behind this project lacked a traditional IT background but needed a way to handle sophisticated tasks, such as controlling various displays that display writing as part of the gameplay. By using Node-RED, along with ChatGPT for creating complex handling scripts, the developer was able to achieve this. Using these technologies in such a unique environment illustrates how accessible and powerful tools like Node-RED and ChatGPT can be for non-traditional programmers. This example, highlighted in Tokyo and extending to cities like Osaka and Nagoya, showcases the practical application of these technologies in a wide range of settings beyond traditional IT and engineering domains. For more details, the video below (in Japanese) provides insight into how Tokyo Mystery Circus uses Node-RED in its operations. Why is Node-RED popular for building Industrial IoT applications? Node-RED was developed in early 2013 as a side-project by Nick O'Leary and Dave Conway-Jones of IBM's Emerging Technology Services group and is particularly well-known for its support of IoT protocols like MQTT and HTTP. Because Node-RED has many functions in MQTT, it is ready for use in Industrial IoT. From MQTT, other protocols like OPC UA (cross-platform, open-source, IEC62541 standard for data exchange from sensors to cloud applications) and Modbus (client/server data communications protocol in the application layer) can be used in 3rd party nodes developed by the community. Because Node-RED can connect many types of devices, it is very popular in the Industrial IoT field. In addition, many industrial devices support Node-RED. Users can buy these devices and start using Node-RED quickly. Why have companies like Microsoft, Hitachi, Siemens, AWS, and others adopted Node-RED? Regarding Hitachi, Node-RED has emerged as a crucial communication tool bridging the gap between IT and factory engineers, effectively addressing the barriers that exist both in technology and interpersonal interactions. Within one company, IT and OT (Operational Technology) departments often operate like two distinct entities, which makes it challenging to communicate despite the critical importance of collaboration. To overcome this, Hitachi decided to adopt Node-RED as a primary communication tool in programming. Node-RED’s intuitive interface allows for the entire flow to be visible on the screen, facilitating discussions and collaborative efforts seamlessly. This approach was put into practice recently when I, as the only IT Engineer, visited a Hitachi factory. Initially, typing software code on my own, the factory engineers couldn't grasp the intricacies of the work. However, after developing a Node-RED flow, it became a focal point of interest, enabling other engineers to gather around and engage with the project actively. This shift towards a more inclusive and comprehensible method of collaboration underscores the value of Node-RED in demystifying IT for non-specialists. I believe Siemens operates under a similar paradigm, utilizing Node-RED to enhance communication between its IT and engineering departments. Moreover, major companies like Microsoft and AWS are also recognizing the potential of Node-RED. By integrating it within their IT environments, they aim to promote their cloud services more effectively. This wide adoption of Node-RED across different sectors, from industrial giants to cloud service providers, highlights its versatility and effectiveness as a tool for fostering understanding and cooperation across diverse technological landscapes. How important is Node-RED in the MING (MQTT, InfluxDB, Node-RED, Grafana) stack? Node-RED is an essential tool in the MING stack because it is a central component that facilitates the connection to other software. The MING stack is designed to facilitate data collection, storage, processing, and visualization, and it brings together the key open-source components of an IoT system. Its importance cannot be overstated as it connects various software components and represents the easiest way to store and manage data. This functionality underscores its crucial role in the integration and efficiency of the stack, highlighting its indispensability in achieving streamlined data processing and application development. Node-RED has introduced advanced features like Git Integration, Flow Debugger, and Flow Linter. What's next for improving the developer experience with Node-RED? The main focus of Node-RED development at the moment is to improve the collaboration tooling - working towards concurrent editing to make it easier for multiple users to work together. Another next step for the community is building a flow testing tool. Flow testing is needed to ensure stability. There's a request from the community for flow testing capabilities for Node-RED flows. In response, the Node-RED team, with significant contributions from Nick O'Leary (CTO and Founder, FlowFuse, and Node-RED Project Lead), is developing a flow testing tool, primarily as a plugin. A design document for this first implementation called node-red-flow-tester is available, allowing users to post issues and contribute feedback, which has been very useful. The tool aims to leverage REST API test frameworks for testing, although it's noted that some components cannot be tested in detail. If made available, this tool would simplify the process of upgrading Node-RED and its JavaScript version, ensuring compatibility with dependency modules.Simultaneously, my focus has been on documentation and organizing hands-on events related to advanced features such as Git integration. These features are vital, as, without them, users might face challenges in their development projects. On Medium, under the username kazuhitoyokoi, I have published 6 articles that delve into these advanced features. One article specifically focuses on Git integration and is also available in Japanese, indicating the effort to cater to a broader audience. Furthermore, I have been active on Qiita, a popular Japanese technical knowledge-sharing platform, where I organized the first hands-on event. The first event full video is available here. (In Japanese) The second event was held on March 18, 2024, and a third event is scheduled for April 26, 2024, showcasing the community's growing interest in these topics and the practical application of Node-RED in development projects. This multifaceted approach, combining tool development, documentation, and community engagement, aims to enhance the Node-RED ecosystem, making it more accessible and user-friendly for developers around the world. Contributions to the Node-RED community include source code, internationalization of the flow editor, bug reports, feature suggestions, participating in developer meetings, and more. What is the best way to get started contributing to Node-RED? If you are not a native English speaker, I recommend translating the Node-RED flow editor as a great way to start contributing. Currently, users can contribute to the Node-RED project by creating a JSON file that contains local language messages. If the user finds a bug, try inspecting the code. The Node-RED source code is very easy to understand. After trying the fix, the user can make a pull request. Conclusion The interview shows that Node-RED is an essential tool to improve collaboration between different professionals without technical barriers in the development of Industrial IoT applications. Discover the potential of Node-RED for your projects and contribute to the Node-RED project. The future of Node-RED is in our hands! Resources Node-Red main site To get an invite to the Node-RED Slack

By Jesse Casman DZone Core CORE
DevSecOps: It’s Time To Pay for Your Demand, Not Ingestion
DevSecOps: It’s Time To Pay for Your Demand, Not Ingestion

I remember back when mobile devices started to gain momentum and popularity. While I was excited about a way to stay in touch with friends and family, I was far less excited about limits being placed on call length minutes and the number of text messages I could utilize … before being forced to pay more. Believe it or not, the #646 (#MIN) and #674 (#MSG) contact entries were still lingering in my address book until a recent clean-up effort. At one time, those numbers provided a handy mechanism to determine how close I was to hitting the monthly limits enforced by my service provider. Along some very similar lines, I recently found myself in an interesting position as a software engineer – figuring out how to log less to avoid exceeding log ingestion limits set by our observability platform provider. I began to wonder how much longer this paradigm was going to last. The Toil of Evaluating Logs for Ingestion I remember the first time my project team was contacted because log ingestion thresholds were exceeding the expected limit with our observability partner. A collection of new RESTful services had recently been deployed in order to replace an aging monolith. From a supportability perspective, our team had made a conscious effort to provide the production support team with a great deal of logging – in the event the services did not perform as expected. There were more edge cases than there were regression test coverage, so we were expecting alternative flows to trigger results that would require additional debugging if they did not process as expected. Like most cases, the project had aggressive deadlines that could not be missed. When we were instructed to “log less” an unplanned effort became our priority. The problem was, we weren’t 100% certain how best to proceed. We didn’t know what components were in a better state of validation (to have their logs reduced), and we weren’t exactly sure how much logging we would need to remove to no longer exceed the threshold. To our team, this effort was a great example of what has become known as toil: “Toil is the kind of work that tends to be manual, repetitive, automatable, tactical, devoid of enduring value, and that scales linearly as a service grows.” – Eric Harvieux (Google Site Reliability Engineering) Every minute our team spent on reducing the amount of logs ingested into the observability platform came at the expense of delivering fewer features and functionality for our services. After all, this was our first of many planned releases. Seeking a “Log Whatever You Feel Necessary” Approach What our team really needed was a scenario where our observability partner was fully invested in the success of our project. In this case, it would translate to a “log whatever you feel necessary” approach. Those who have walked this path before will likely be thinking “this is where JV has finally lost his mind.” Stay with me here as I think I am on to something big. Unfortunately, the current expectation is that the observability platform can place limits on the amount of logs that can be ingested. The sad part of this approach is that, in doing so, observability platforms put their needs ahead of their customers – who are relying on and paying for their services. This is really no different from a time when I relied on the #MIN and #MSG contacts in my phone to make sure I lived within the limits placed on me by my mobile service provider. Eventually, my mobile carrier removed those limits, allowing me to use their services in a manner that made me successful. The bottom line here is that consumers leveraging observability platforms should be able to ingest whatever they feel is important to support their customers, products, and services. It’s up to the observability platforms to accommodate the associated challenges as customers desire to ingest more. This is just like how we engineer our services in a demand-driven world. I cannot imagine telling my customer, “Sorry, but you’ve given us too much to process this month.” Pay for Your Demand – Not Ingestion The better approach here is the concept of paying for insights and not limiting the actual log ingestion. After all, this is 2024 – a time when we all should be used to handling massive quantities of data. The “pay for your demand – not ingestion” concept has been considered a “miss” in the observability industry… until recently when I read that Sumo Logic has disrupted the DevSecOps world by removing limits on log ingestion. This market-disruptor approach embraces the concept of “log whatever you feel necessary” with a north star focused on eliminating silos of log data that were either disabled or skipped due to ingestion thresholds. Once ingested, AI/ML algorithms help identify and diagnose issues – even before they surface as incidents and service interruptions. Sumo Logic is taking on the burden of supporting additional data because they realize that customers are willing to pay a fair price for the insights gained from their approach. So what does this new strategy to observability cost expectations look like? It can be difficult to pinpoint exactly, but as an example, if your small-to-medium organization is producing an average of 25 MB of log data for ingestion per hour, this could translate into an immediate 10-20% savings (using Sumo Logic’s price estimator) on your observability bill. In taking this approach, every single log is available in a custom-built platform that scales along with an entity’s observability growth. As a result, AI/ML features can draw upon this information instantly to help diagnose problems – even before they surface with consumers. When I think about the project I mentioned above, I truly believe both my team and the production support team would have been able to detect anomalies faster than what we were forced to implement. Instead, we had to react to unexpected incidents that impacted the customer’s experience. Conclusion I was able to delete the #MIN and #MSG entries from my address book because my mobile provider eliminated those limits, providing a better experience for me, their customer. My readers may recall that I have been focused on the following mission statement, which I feel can apply to any IT professional: “Focus your time on delivering features/functionality that extends the value of your intellectual property. Leverage frameworks, products, and services for everything else.” – J. Vester In 2023, I also started thinking hard about toil and making a conscious effort to look for ways to avoid or eliminate this annoying productivity killer. The concept of “zero dollar ingest” has disrupted the observability market by taking a lead from the mobile service provider's playbook. Eliminating log ingestion thresholds puts customers in a better position to be successful with their own customers, products, and services (learn more about Sumo Logic’s project here). From my perspective, not only does this adhere to my mission statement, it provides a toil-free solution to the problem of log ingestion, data volume, and scale. Have a really great day!

By John Vester DZone Core CORE
Achieving Data Excellence: How Generative AI Revolutionizes Data Integration
Achieving Data Excellence: How Generative AI Revolutionizes Data Integration

Editor's Note: The following is an article written for and published in DZone's 2024 Trend Report, Enterprise AI: The Emerging Landscape of Knowledge Engineering. In today's digital age, data has become the cornerstone of decision-making across various domains, from business and healthcare to education and government. The ability to collect, analyze, and derive insights from data has transformed how organizations operate, offering unprecedented opportunities for innovation, efficiency, and growth. What Is a Data-Driven Approach? A data-driven approach is a methodology that relies on data analysis and interpretation to guide decision-making and strategy development. This approach encompasses a range of techniques, including data collection, storage, analysis, visualization, and interpretation, all aimed at harnessing the power of data to drive organizational success. Key principles include: Data collection – Gathering relevant data from diverse sources is foundational to ensuring its quality and relevance for subsequent analysis. Data analysis – Processing and analyzing collected data using statistical and machine learning (ML) techniques reveal valuable insights for informed decision-making. Data visualization – Representing insights visually through charts and graphs facilitates understanding and aids decision-makers in recognizing trends and patterns. Data-driven decision-making – Integrating data insights into decision-making processes across all levels of an organization enhances risk management and process optimization. Continuous improvement – Embracing a culture of ongoing data collection, analysis, and action fosters innovation and adaptation to changing environments. Data Integration Strategies Using AI Data integration combines data from various sources for a unified view. Artificial intelligence (AI) improves integration by automating tasks, boosting accuracy, and managing diverse data volumes. Here are the top four data integration strategies/patterns using AI: Automated data matching and merging – AI algorithms, such as ML and natural language processing (NLP), can match and automatically merge data from disparate sources. Real-time data integration – AI technologies, such as stream processing and event-driven architectures, can facilitate real-time data integration by continuously ingesting, processing, and integrating data as it becomes available. Schema mapping and transformation – AI-driven tools can automate the process of mapping and transforming data schemas from different formats or structures. This includes converting data between relational databases, NoSQL databases, and other data formats — plus handling schema evolution over time. Knowledge graphs and graph-based integration – AI can build and query knowledge graphs representing relationships between entities and concepts. Knowledge graphs enable flexible and semantic-driven data integration by capturing rich contextual information and supporting complex queries across heterogeneous data sources. Data integration is the backbone of modern data management strategies, which are pivotal in providing organizations with a comprehensive understanding of their data landscape. Data integration ensures a cohesive and unified view of organizational data assets by seamlessly combining data from disparate sources, such as databases, applications, and systems. One of the primary benefits of data integration is its ability to enhance data quality. By consolidating data from multiple sources, organizations can identify and rectify inconsistencies, errors, and redundancies, thus improving their data's accuracy and reliability. This, in turn, empowers decision-makers to make informed choices based on trustworthy information. Let's look closely at how we can utilize generative AI for data-related processes. Exploring the Impact of Generative AI on Data-Related Processes Generative AI has revolutionized various industries and data-related processes in recent years. Generative AI encompasses a wide array of methodologies, spanning generative adversarial networks (GANs) and variational autoencoders (VAEs) to transformer-based models such as GPT (generative pre-trained transformer). These algorithms showcase impressive abilities in producing lifelike images, text, audio, and even videos, which closely emulate human creativity through generating fresh data samples. Using Generative AI for Enhanced Data Integration Now, we've come to the practical part of the role of generative AI in enhanced data integration. Below, I've provided some real-world scenarios. This will bring more clarity to AI's role in data integration. Table 1. Real-world use cases Industry/Application Example Healthcare/image recognition Generating synthetic medical images for data augmentation in deep learning models Using GANs to create realistic medical images Supplementing limited training data Enhancing the performance of image recognition algorithms Facilitating tasks like disease diagnosis and medical imaging analysis E-commerce Automating schema mapping and transformation for product catalog integration Leveraging generative AI techniques Automatically aligning product attributes and specifications from various vendors Creating a unified schema Facilitating seamless integration of product catalogs Enhancing the shopping experience for customers on e-commerce platforms Social media Utilizing NLP models to extract metadata from user-generated content Analyzing text-based content, including social media posts or comments Extracting valuable metadata such as sentiment, topic, and user preferences Integrating extracted metadata into recommendation systems Personalizing content delivery based on user preferences Enhancing user engagement on social media platforms through personalized recommendations Cybersecurity Using generative AI to detect network traffic anomalies Training on synthetic data resembling real-world patterns Enhancing cybersecurity against threats Improving intrusion detection and response Financial services Integrating diverse market data in real time Using generative AI to aggregate data from various sources Enabling informed decisions and trade execution Continuously updating strategies for changing market conditions Improving investment outcomes and risk management Ensuring Data Accuracy and Consistency Using AI and ML Organizations struggle to maintain accurate and reliable data in today's data-driven world. AI and ML help detect anomalies, identify errors, and automate cleaning processes. Let's look into those patterns a bit closer. Validation and Data Cleansing Data validation and cleansing are often laborious tasks, requiring significant time and resources. AI-powered tools streamline and speed up these processes. ML algorithms learn from past data to automatically identify and fix common quality issues. They can standardize formats, fill in missing values, and reconcile inconsistencies. Automating these tasks reduces errors and speeds up data preparation. Uncovering Patterns and Insights AI and ML algorithms can uncover hidden patterns, trends, and correlations within datasets. By analyzing vast amounts of data, these algorithms can identify relationships that may not be apparent to human analysts. AI and ML can also understand the underlying causes of data quality issues and develop strategies to address them. For example, ML algorithms can identify common errors or patterns contributing to data inconsistencies. Organizations can then implement new processes to improve data collection, enhance data entry guidelines, or identify employee training needs. Anomalies in Data AI and ML algorithms reveal hidden patterns, trends, and correlations in datasets, analyzing vast amounts of data to uncover insights not readily apparent to humans. They also understand the root causes of data quality issues, identifying common errors or patterns causing inconsistencies. This enables organizations to implement new processes, such as refining data collection methods or enhancing employee training, to address these issues. Detecting Anomalies in Data ML models excel at detecting patterns, including deviations from norms. With ML, organizations can analyze large volumes of data, compare them against established patterns, and flag potential issues. Organizations can then identify anomalies and determine how to correct, update, or augment their data to ensure its integrity. Let's have a look at services that can validate data and detect anomalies. Detecting Anomalies Using Stream Analytics Azure Stream Analytics, AWS Kinesis, and Google Cloud Dataflow are examples of tools that provide built-in anomaly detection capabilities, both in the cloud and at the edge, enabling vendor-neutral solutions. These platforms offer various functions and operators for anomaly detection, allowing users to monitor anomalies, including temporary and persistent ones. For example, based on my experience building validation using Stream Analytics, here are several key actions to consider following: The model's accuracy improves with more data in the sliding window, treating it as expected within the timeframe. It focuses on event history in the window to spot anomalies, discarding old values as it moves. Functions establish a baseline normal by comparing past data and identifying outliers within a confidence level. Set the window size based on the minimum events needed for practical training. Response time increases with history size, so include only necessary events for better performance. Based on ML, you can monitor temporary anomalies like spikes and dips in a time series event stream using the AnomalyDetection_SpikeAndDip operator. If a second spike within the same sliding window is smaller than the first, its score might not be significant enough compared to the first spike within the specified confidence level. To address this, consider adjusting the model's confidence level. However, if you receive too many alerts, use a higher confidence interval. Leveraging Generative AI for Data Transformation and Augmentation Generative AI helps with data augmentation and transformation, which are also part of the data validation process. Generative models can generate synthetic data that resembles actual data samples. This can be particularly useful when the available dataset is small or needs more diversity. Generative models can also be trained to translate data from one domain to another, or to transform data while preserving its underlying characteristics. For example, sequence-to-sequence models like transformers can be used in NLP for tasks such as language translation or text summarization, effectively transforming the input data into a different representation. Also, the data transformation process can be used to solve problems in legacy systems based on an old codebase. Organizations can unlock numerous benefits by transitioning to modern programming languages. For instance, legacy systems are built on outdated programming languages such as Cobol, Lisp, and Fortran. To modernize and enhance their performance, we must migrate or rewrite them using the latest high-performance and sophisticated programming languages like Python, C#, or Go. Let's look at the diagram below to see how generative AI can be used to facilitate this migration process: Figure 1. Using generative AI to rewrite legacy code The architecture above is based on the following components and workflow: Azure Data Factory is the main ETL (extract, transform, load) for data orchestration and transformation. It connects to the source repo Git repositories. Alternatively, we can use AWS Glue for data integration and Google Cloud Data Fusion for ETL data operation. OpenAI is the generative AI service used to transform Cobol and C++ to Python, C#, and Golang (or any other language). The OpenAI service is connected to Data Factory. Alternatives to OpenAI are Amazon SageMaker or Google Cloud AI Platform. Azure Logic Apps and Google Cloud Functions are utility services that provide data mapping and file management capabilities. DevOps CI/CD provides pipelines to validate, compile, and interpret generated code. Data Validation and AI: Chatbot Call Center Use Case An automated call center setup is a great use case to demonstrate data validation. The following example provides an automation and database solution for call centers: Figure 2. Call center chatbot architecture The automation and database solution extracts data from the speech bot deployed in call centers or from interactions with real people. It then stores, analyzes, and validates this data using OpenAI's ChatGPT and an AI sentiment analysis service. Subsequently, the analyzed data is visualized using business intelligence (BI) dashboards for comprehensive insights. The processed information is also integrated into the customer relationship management (CRM) systems for human validation and further action. The solution ensures accurate understanding and interpretation of customer interactions by leveraging ChatGPT, an advanced NLP model. Using BI dashboards offers intuitive and interactive data visualization capabilities, allowing stakeholders to gain actionable insights at a glance. Integrating the analyzed data into CRM systems enables seamless collaboration between automated analysis and human validation. Conclusion In the ever-evolving landscape of enterprise AI, achieving data excellence is crucial. Data and generative AI services that provide data analysis, ETL, and NLP enable robust integration strategies for unlocking the full potential of data assets. By combining data-driven approaches and advanced technologies, businesses can pave the way for enhanced decision-making, productivity, and innovation through these AI and data services. This is an excerpt from DZone's 2024 Trend Report,Enterprise AI: The Emerging Landscape of Knowledge Engineering.Read the Free Report

By Boris Zaikin DZone Core CORE
MLOps Architectural Models: An Advanced Guide to MLOps in Practice
MLOps Architectural Models: An Advanced Guide to MLOps in Practice

Editor's Note: The following is an article written for and published in DZone's 2024 Trend Report, Enterprise AI: The Emerging Landscape of Knowledge Engineering. AI continues to transform businesses, but this leads to enterprises facing new challenges in terms of digital transformation and organizational changes. Based on a 2023 Forbes report, those challenges can be summarized as follows: Companies whose analytical tech stacks are built around analytical/batch workloads need to start adapting to real-time data processing (Forbes). This change affects not only the way the data is collected, but it also leads to the need for new data processing and data analytics architectural models. AI regulations need to be considered as part of AI/ML architectural models. According to Forbes, "Gartner predicts that by 2025, regulations will force companies to focus on AI ethics, transparency, and privacy." Hence, those platforms will need to comply with upcoming standards. Specialized AI teams must be built, and they should be capable of not only building and maintaining AI platforms but also collaborating with other teams to support models' lifecycles through those platforms. The answer to these new challenges seems to be MLOps, or machine learning operations. MLOps builds on top of DevOps and DataOps as an attempt to facilitate machine learning (ML) applications and a way to better manage the complexity of ML systems. The goal of this article is to provide a systematic overview of MLOps architectural challenges and demonstrate ways to manage that complexity. MLOps Application: Setting Up the Use Case For this article, our example use case is a financial institution that has been conducting macroeconomic forecasting and investment risk management for years. Currently, the forecasting process is based on partially manual loading and postprocessing of external macroeconomic data, followed by statistical modeling using various tools and scripts based on personal preferences. However, according to the institution's management, this process is not acceptable due to recently announced banking regulations and security requirements. In addition, the delivery of calculated results is too slow and financially not acceptable compared to competitors in the market. Investment in a new digital solution requires a good understanding of the complexity and the expected cost. It should start with gathering requirements and subsequently building a minimum viable product. Requirements Gathering For solution architects, the design process starts with a specification of problems that the new architecture needs to solve — for example: Manual data collection is slow, error prone, and requires a lot of effort Real-time data processing is not part of the current data loading approach There is no data versioning and, hence, reproducibility is not supported over time The model's code is triggered manually on local machines and constantly updated without versioning Data and code sharing via a common platform is completely missing The forecasting process is not represented as a business process, all the steps are distributed and unsynchronized, and most of them require manual effort Experiments with the data and models are not reproducible and not auditable Scalability is not supported in case of increased memory consumptions or CPU-heavy operations Monitoring and auditing of the whole process are currently not supported The following diagram demonstrates the four main components of the new architecture: monitoring and auditing platform, model deployment platform, model development platform, and data management platform. Figure 1. MLOps architecture diagram Platform Design Decisions The two main strategies to consider when designing a MLOps platform are: Developing from scratch vs. selecting a platform Choosing between a cloud-based, on-premises, or hybrid model Developing From Scratch vs. Choosing a Fully Packaged MLOps Platform Building an MLOps platform from scratch is the most flexible solution. It would provide the possibility to solve any future needs of the company without depending on other companies and service providers. It would be a good choice if the company already has the required specialists and trained teams to design and build an ML platform. A prepackaged solution would be a good option to model a standard ML process that does not need many customizations. One option would even be to buy a pretrained model (e.g., model as a service), if available on the market, and build only the data loading, monitoring, and tracking modules around it. The disadvantage of this type of solution is that if new features need to be added, it might be hard to achieve those additions on time. Buying a platform as a black box often requires building additional components around it. An important criterion to consider when choosing a platform is the possibility to extend or customize it. Cloud-Based, On-Premises, or Hybrid Deployment Model Cloud-based solutions are already on the market, with popular options provided by AWS, Google, and Azure. In case of no strict data privacy requirements and regulations, cloud-based solutions are a good choice due to the unlimited infrastructural resources for model training and model serving. An on-premises solution would be acceptable for very strict security requirements or if the infrastructure is already available within the company. The hybrid solution is an option for companies that already have part of the systems built but want to extend them with additional services — e.g., to buy a pretrained model and integrate with the locally stored data or incorporate into an existing business process model. MLOps Architecture in Practice The financial institution from our use case does not have enough specialists to build a professional MLOps platform from scratch, but it also does not want to invest in an end-to-end managed MLOps platform due to regulations and additional financial restrictions. The institution's architectural board has decided to adopt an open-source approach and buy tools only when needed. The architectural concept is built around the idea of developing minimalistic components and a composable system. The general idea is built around microservices covering nonfunctional requirements like scalability and availability. Striving for maximal simplicity of the system, the following decisions for the system components were made. Data Management Platform The data collection process will be fully automated. There will be a separate data loading component for each data source due to the heterogeneity of external data providers. The database choice is crucial when it comes to writing real-time data and reading a large amount of data. Due to the time-based nature of the macroeconomic data and the institution's already available relational database specialists, they chose to use the open-source database, TimescaleDB. The possibility to provide a standard SQL-based API, perform data analytics, and conduct data transformations using standard relational database GUI clients will decrease the time to deliver a first prototype of the platform. Data versions and transformations can be tracked and saved into separate data versions or tables. Model Development Platform The model development process consists of four steps: Data reading and transformation Model training Model serialization Model packaging Once the model is trained, the parametrized and trained instance is usually stored as a packaged artifact. The most common solution for code storage and versioning is a Git. Furthermore, the financial institution is already equipped with a solution like GitHub, providing functionality to define pipelines for building, packaging, and publishing the code. The architecture of Git-based systems usually relies on a set of distributed worker machines executing the pipelines. That option will be used as part of the minimalistic MLOps architectural prototype to also train the model. After training a model, the next step is to store it in a model repository as a released and versioned artifact. Storing the model in a database as a binary file, a shared file system, or even an artifacts repository are all acceptable options at that stage. Later, a model registry or a blob storage service could be incorporated into the pipeline. A model's API microservice will expose the model's functionality for macroeconomic projections. Model Deployment Platform The decision to keep the MLOps prototype as simple as possible applies to the deployment phase as well. The deployment model is based on a microservices architecture. Each model can be deployed using a Docker container as a stateless service and be scaled on demand. That principle applies for the data loading components, too. Once that first deployment step is achieved and dependencies of all the microservices are clarified, a workflow engine might be needed for orchestrating the established business processes. Model Monitoring and Auditing Platform Traditional microservices architectures are already equipped with tools for gathering, storing, and monitoring log data. Tools like Prometheus, Kibana, and ElasticSearch are flexible enough for producing specific auditing and performance reports. Open-Source MLOps Platforms A minimalistic MLOps architecture is a good start for the initial digital transformation of a company. However, keeping track of available MLOps tools in parallel is crucial for the next design phase. The following table provides a summary of some of the most popular open-source tools. Table 1. Open-source MLOps tools for initial digital transformations Tool Description Functional Areas Kubeflow Makes deployments of ML workflows on Kubernetes simple, portable, and scalable Tracking and versioning, pipeline orchestration, and model deployment MLflow Is an open-source platform for managing the end-to-end ML lifecycle Tracking and versioning BentoML Is an open standard and SDK for AI apps and inference pipelines; provides features like auto-generation of API servers, REST APIs, gRPC, and long-running inference jobs; and offers auto-generation of Docker container images Tracking and versioning, pipeline orchestration, model development, and model deployment TensorFlow Extended (TFX) Is a production-ready platform; is designed for deploying and managing ML pipelines; and includes components for data validation, transformation, model analysis, and serving Model development, pipeline orchestration, and model deployment Apache Airflow, Apache Beam Is a flexible framework for defining and scheduling complex workflows — data workflows in particular, including ML Pipeline orchestration Summary MLOps is often called DevOps for machine learning, and it is essentially a set of architectural patterns for ML applications. However, despite the similarities with many well-known architectures, the MLOps approach brings some new challenges for MLOps architects. On one side, the focus must be on the compatibility and composition of MLOps services. On the other side, AI regulations will force existing systems and services to constantly adapt to new regulatory rules and standards. I suspect that as the MLOps field continues to evolve, a new type of service providing AI ethical and regulatory analytics will soon become the focus of businesses in the ML domain. This is an excerpt from DZone's 2024 Trend Report, Enterprise AI: The Emerging Landscape of Knowledge Engineering.Read the Free Report

By Daniela Kolarova DZone Core CORE
Empowering Developers: Navigating the AI Revolution in Software Engineering
Empowering Developers: Navigating the AI Revolution in Software Engineering

Editor's Note: The following is an article written for and published in DZone's 2024 Trend Report, Enterprise AI: The Emerging Landscape of Knowledge Engineering. Artificial intelligence (AI) has evolved from a futuristic idea into a fundamental aspect of contemporary software development. This evolution has introduced significant milestones, reshaping both our interactions with technology and the methodologies of software creation. This article delves into AI's impact on the realm of software development, highlighting how professionals can adapt to and thrive amidst these transformative changes. Positive Impacts of AI on Developers' Jobs AI excels in automating repetitive tasks, ranging from code generation to intricate testing and deployment procedures. Tools like Jenkins and Azure DevOps streamline deployments, enhancing reliability and efficiency, while AI-driven IDEs provide real-time code analysis and bug detection, elevating coding precision and speed. In addition, the advent of AI-assisted tools marks a significant advancement, improving not only coding but also project management. Negative Impacts of AI on Developers' Jobs Despite AI's benefits, there's apprehension over job displacement, with predictions suggesting a significant portion of programming roles may become automated. Additionally, the sophistication of AI systems introduces complexity and necessitates a higher level of expertise, potentially sidelining those without specialized knowledge in AI and machine learning (ML). Some AI tools are now capable of generating complex code structures, which may reduce the need for entry-level programming jobs. According to researchers from OpenAI and the University of Pennsylvania, it is predicted that 80% of the U.S. workforce could see an effect on at least 10% of their tasks. Furthermore, as AI systems become more sophisticated, the complexity in understanding and maintaining these systems increases. For example, the development and maintenance of AI models in platforms like Google's TensorFlow or OpenAI's GPT-3 require specialized knowledge in ML, which is a skill set not all developers possess. Lastly, a heavy reliance on AI tools can lead to a scenario where developers may lack a deep understanding of the underlying code, leading to challenges in troubleshooting and customization. The Challenge of Staying Up to Date The fast-paced nature of AI advancements means that tools and techniques can quickly become outdated. For instance, ML frameworks are continuously updated, requiring developers to constantly learn new methodologies. This was evident when TensorFlow 2.0 was released with significant changes from its predecessor, requiring developers to adapt quickly. The need for continuous learning can be overwhelming, especially for developers who are already managing a full workload. The pace of change can lead to skill gaps, as seen in industries like finance and healthcare, where the adoption of AI has outpaced the workforce's ability to keep up with new technologies. Balancing AI and Human Skills in Development While AI is unparalleled in its ability to sift through and analyze extensive datasets, it's the human element — creativity, intuition, and ethical foresight — that propels truly innovative solutions. The realm of video gaming serves as a prime example of innovation through creativity, where AI assists in crafting intricate environments and behaviors. Yet it's the human touch that weaves the captivating storylines, character arcs, and the overall design, reflecting a deep understanding of narrative and emotional engagement. Finding the balance for ethical considerations and decision-making is imperative. Particularly in healthcare, AI's capacity to sift through patient data and recommend treatments is revolutionary. However, it's the human practitioner's role to weigh these suggestions within an ethical framework and make the final call on patient care, ensuring that technology serves humanity's best interests. AI: A Collaborative Companion, Not a Competitor Viewing AI as an ally in the development process is crucial for leveraging its full potential without undermining the value of human expertise. For example: In cybersecurity, AI's efficiency in identifying threats is invaluable. Nonetheless, it's the human expert's critical thinking and contextual judgment that are irreplaceable in formulating an appropriate response to these threats. The advent of collaborative robots (cobots) in manufacturing illustrates the harmonious blend of AI's precision with human dexterity and adaptability, enhancing productivity and safety. The Symbiotic Relationship Between AI and Human Intelligence A collaboration between human intelligence and AI's capabilities offers a balanced approach to solving complex challenges, leveraging the strengths of both. In financial sectors, AI excels in processing and analyzing market data to unearth trends. Yet it's the nuanced interpretation and strategic decision-making by humans, considering broader economic and geopolitical factors, that drive impactful outcomes. Leading tech firms, including Google and IBM, underscore the necessity of human oversight in AI's evolution. This ensures that AI technologies not only advance in capabilities but also align with ethical standards and human values, fostering a tech ecosystem that respects and enhances human dignity and welfare. The integration of AI in software development is not about displacing human roles but enriching them. By valuing the unique contributions of human creativity, ethical judgment, and strategic thinking alongside AI's analytical prowess, we pave the way for a future where technology amplifies human potential, driving forward innovation in a manner that is both ethical and impactful. Leveraging AI for Innovation The role of AI in software development transcends mere efficiency improvements, acting as a pivotal force for innovation. AI empowers developers to extend the realms of feasibility, facilitating the creation of software solutions that are more advanced, intuitive, and impactful. AI-Driven Creative Problem-Solving AI's unparalleled data processing and analysis capabilities unlock novel approaches for creative problem-solving within software development. Take, for example, predictive analytics for enhanced consumer insights. In the e-commerce domain, AI algorithms predict consumer behavior, allowing businesses to customize their offerings. A notable illustration is Amazon's recommendation system, which leverages AI to analyze consumer interactions and tailor shopping experiences accordingly. Additionally, AI has significantly advanced natural language processing (NLP), enabling the development of user interfaces that mimic human conversation. Siri by Apple exemplifies this, utilizing NLP to interpret and respond to user inquiries in a conversational manner. Pioneering New Software Solutions With AI AI's application spans a diverse array of industries, driving the development of innovative software solutions. AI plays a crucial role in healthcare by enabling the early detection of diseases and personalizing medical treatments. Google's DeepMind, for instance, has developed algorithms capable of identifying eye diseases from retinal scans, marking a significant leap forward in medical diagnostics. In the fintech sector, AI-driven algorithms offer automated trading systems that meticulously analyze market data to execute trades strategically, optimizing financial outcomes. Illustrative Case Studies of AI in Action The integration of AI in real-world development projects showcases its potential to redefine industry standards. Table 1. Case studies of AI in action Sector Example Automotive Tesla's Autopilot system exemplifies AI's capacity to innovate, employing ML to interpret sensor data for autonomous driving decisions. This represents a harmonious blend of AI's analytical prowess with advanced software engineering techniques. Entertainment Netflix leverages AI for content recommendation and optimization, analyzing viewer preferences to personalize content and guide original production decisions. This not only enhances the user experience but also optimizes content creation strategies. Retail operations Walmart's application of AI in managing inventory and enhancing customer service demonstrates its transformative impact. AI enables Walmart to adjust stock levels dynamically and offer personalized shopping experiences, showcasing the broad applicability and potential of AI across different market segments. Overcoming Challenges in AI Adoption The journey toward integrating AI into software development is fraught with unique challenges. Addressing these effectively demands a strategic focus on education, skill acquisition, and adherence to ethical standards. Bridging the Skills Divide Through Education and Training The swift evolution of AI technologies has precipitated a notable skills gap within the industry, necessitating a concerted effort toward continuous education and specialized training. This commitment to education may encompass engaging in specialized online courses, participating in workshops, and becoming actively involved in AI development communities to stay abreast of the latest trends and tools. Giants like IBM and Microsoft have forged alliances with academic institutions, offering AI and machine learning courses and certifications. These initiatives aim to arm developers with the expertise needed to harness AI technologies effectively. Meanwhile, Google has set a precedent with its internal AI training programs, ensuring its workforce remains at the forefront of AI advancements by familiarizing them with the latest tools and methodologies. The future will demand developers to blend AI proficiency with a broad spectrum of skills, including ethical considerations in AI, data science, and specialized industry knowledge. This holistic skill set will enable developers to leverage AI effectively across various application domains. Simplifying AI Adoption Through Accessible Tools and Resources The intricacies of AI tools and frameworks present a significant hurdle, particularly for newcomers to the field. Mastery over these technologies necessitates a considerable investment of time and resources. Efforts by companies with platforms such as Amazon SageMaker exemplify the industry's move toward simplifying AI application development. These platforms streamline the process of building, training, and deploying machine learning models, making AI more accessible. The open-source ecosystem also plays a pivotal role in democratizing AI adoption. Tools like TensorFlow and PyTorch are bolstered by extensive documentation and a supportive community, facilitating a smoother learning curve for developers. Upholding Data Privacy and Security In an era where AI systems frequently handle sensitive data, ensuring privacy and security is imperative. Adhering to stringent regulations such as GDPR and HIPAA is non-negotiable. IBM's AI ethics guidelines offer a blueprint for crafting AI solutions that honor privacy and security principles. The healthcare industry exemplifies the critical importance of data privacy, too. Firms like Epic Systems have integrated AI into their offerings while strictly complying with patient privacy regulations, setting a standard for ethical AI deployment. Overcoming the hurdles associated with AI adoption in software development is an endeavor that extends beyond mere technical implementation. It encompasses a holistic approach involving educational outreach, simplification of technological complexities, and a steadfast commitment to ethical practices. By addressing these facets, the industry can pave the way for a future where AI augments development processes in a manner that is both responsible and inclusive. The Future of AI in Development The trajectory of AI in software development is set toward groundbreaking shifts, fueled by relentless technological advancements and broader AI integration across diverse sectors. This forward-looking perspective offers insights into potential developments and the opportunities they may unveil. Emerging AI Trends and Future Directions As AI becomes increasingly entrenched in software development, we stand on the cusp of significant innovations — innovations by AI platforms illustrate the future of AI in enhancing code quality. These tools are set to extend beyond mere error detection to offer actionable recommendations for optimization, potentially setting new standards for coding efficiency and robustness. And in an era of evolving cyber threats, AI's capacity to preemptively identify and mitigate security risks will be indispensable. Future AI systems are expected to proactively counteract threats, offering a dynamic shield against cyber vulnerabilities. The future of AI in software development is not merely an extension of its current state but a revolution in how we conceive, develop, and optimize software. As we look ahead, the integration of AI promises to not only streamline development processes but also to inspire innovations that were previously unimaginable. The key to thriving in this evolving landscape lies in embracing continuous learning and interdisciplinary expertise, ensuring developers remain at the forefront of this technological renaissance. Conclusion The integration of AI in software development marks a transformative era, bringing both unparalleled opportunities and significant challenges. As innovative, AI-driven solutions reshape the development landscape, it becomes imperative for developers to commit to continuous education in order to balance AI's advanced capabilities with the irreplaceable nuances of human creativity and ethical judgment. Embracing this AI-centric future means not just leveraging its power for efficiency and innovation, but also navigating its complexities with a focus on sustainable and responsible development. Ultimately, the synergy between human intellect and artificial intelligence will define the next frontier in software development, leading to a more efficient, creative, and ethically grounded technological future. This is an excerpt from DZone's 2024 Trend Report, Enterprise AI: The Emerging Landscape of Knowledge Engineering.Read the Free Report

By Yifei Wang DZone Core CORE
Building Resilient Cybersecurity Into Supply Chain Operations: A Technical Approach
Building Resilient Cybersecurity Into Supply Chain Operations: A Technical Approach

In the age of digital transformation, businesses across the globe are increasingly relying on complex supply chain operations to streamline their processes, enhance productivity, and drive growth. However, as these supply chains become more interconnected and digitized, they also become more vulnerable to a myriad of cybersecurity threats. These threats can disrupt operations, compromise sensitive data, and ultimately, undermine business integrity and customer trust. The cybersecurity risks associated with supply chain operations are not just a concern for large corporations but also for small and medium-sized businesses. In fact, according to a report by the Ponemon Institute, 61% of U.S. companies experienced a data breach caused by a third-party vendor. This alarming statistic underscores the urgent need for businesses, developers, and cyber professionals to prioritize building resilient cybersecurity into their supply chain operations. This article aims to provide a comprehensive guide to understanding and addressing the unique cybersecurity challenges inherent in supply chain operations. By integrating cybersecurity measures into every facet of the supply chain, businesses can not only safeguard their operations and sensitive data but also gain a competitive edge in today's digital marketplace. We will explore the current state of supply chain cybersecurity, delve into the specific threats and challenges it presents, and present potential solutions and best practices. The goal is to equip businesses, developers, and cyber professionals with the knowledge and tools they need to fortify their supply chains against the ever-evolving landscape of cyber threats. Understanding Supply Chain Cybersecurity Supply chain cybersecurity is a critical aspect of risk management that focuses on protecting the supply chain from cyber threats. It involves securing all digital interactions and data exchanges that occur within the supply chain, from the initial sourcing of materials to the delivery of the final product to the customer. A supply chain is inherently complex, involving numerous entities such as suppliers, manufacturers, distributors, and retailers. Each of these entities represents a potential point of vulnerability that can be exploited by cybercriminals. Common types of cyber threats to supply chains include malware, phishing attacks, data breaches, and more sophisticated threats like Advanced Persistent Threats (APTs). One of the key challenges in supply chain cybersecurity is the interdependent nature of the supply chain. A single weak link in the chain can compromise the entire operation. For example, a cyberattack on a supplier could disrupt production, leading to delays, financial loss, and damage to the company's reputation. Moreover, the growing trend of digital transformation has led to an increase in the use of technologies such as Internet of Things (IoT) devices, cloud computing, and artificial intelligence in supply chain operations. While these technologies offer numerous benefits, they also increase the surface area for potential cyberattacks. Understanding the importance of supply chain cybersecurity and the unique threats it faces is the first step toward building a more secure and resilient supply chain. The next sections will delve deeper into the specific challenges of implementing cybersecurity in supply chain operations and discuss potential strategies and solutions. Challenges in Building Resilient Cybersecurity Into Supply Chain Operations Building resilient cybersecurity into supply chain operations presents a unique set of challenges due to the complex, interconnected nature of supply chains. These challenges can broadly be categorized into technical challenges, organizational challenges, and regulatory challenges. Technical Challenges The digital transformation of supply chains has led to the integration of various technologies such as IoT devices, cloud platforms, and AI-based systems. While these technologies have enhanced efficiency and productivity, they have also increased the complexity of the cybersecurity landscape. Ensuring the security of these diverse technologies, each with its own set of vulnerabilities, is a significant technical challenge. Organizational Challenges Supply chains involve multiple entities, including suppliers, manufacturers, distributors, and retailers. Each of these entities may have different cybersecurity protocols, making it difficult to implement consistent security measures across the entire supply chain. Additionally, there is often a lack of awareness and understanding of cybersecurity risks among these entities, particularly small and medium-sized businesses. Regulatory Challenges The regulatory environment for cybersecurity is rapidly evolving, with different countries and regions implementing their own set of rules and standards. Navigating this complex regulatory landscape and ensuring compliance can be a challenge, especially for global supply chains. Resource Constraints Many organizations, particularly small and medium-sized businesses, lack the resources necessary to implement robust cybersecurity measures. This includes financial resources, as well as human resources such as skilled cybersecurity professionals. Evolving Cyber Threats The nature of cyber threats is continually evolving, with cybercriminals employing increasingly sophisticated techniques. Keeping up with these threats and ensuring that cybersecurity measures are up-to-date is a constant challenge. Strategies for Building Resilient Cybersecurity Into Supply Chain Operations The rise of interconnected Internet of Things (IoT) devices and Industrial Control Systems (ICS) within supply chains has significantly expanded the attack surface for cyber adversaries. Vulnerabilities in software, hardware, or human behavior can be exploited to disrupt operations, steal intellectual property, or compromise critical infrastructure. To mitigate these risks and build resilient cybersecurity within supply chains, developers and security professionals must adopt a multi-layered, technically-focused approach. 1. Threat Intelligence Integration Proactive threat intelligence gathering and analysis are crucial in today's cyber landscape. Integrating threat intelligence feeds specific to the supply chain industry allows developers and security professionals to: Identify emerging threats: Identify and prioritize emerging threats before they are weaponized. This provides valuable time to develop patches, update security configurations, and implement mitigation strategies. Focus vulnerability assessments: Focus vulnerability assessments on the most relevant threats facing the supply chain. This ensures resources are allocated efficiently and critical vulnerabilities are addressed promptly. 2. Secure Coding Practices and SDLC Integration Building security into software from the outset is paramount. Here are key strategies for developers: Secure coding training: Implement mandatory secure coding training programs for developers. These programs should cover secure coding practices, common vulnerabilities, and coding standards specific to the supply chain industry. Static code analysis tools: Utilize static code analysis tools to identify potential vulnerabilities within code early in the development lifecycle. This allows for early remediation and reduces the risk of vulnerabilities being introduced into production systems. Secure Software Development Lifecycles (SDLCs): Integrate security considerations throughout the entire SDLC. This includes security requirements gathering, threat modeling, code reviews, and penetration testing to ensure the final product is secure and resilient. 3. Zero Trust Security Model Implementation Zero Trust security models assume no inherent trust within the network. This principle should be applied to all aspects of the supply chain: Least Privilege Access Control: Implement the principle of least privilege for all users, devices, and applications within the supply chain network. Grant access only to the minimum resources required for users to perform their designated tasks. Multi-Factor Authentication (MFA): Enforce strong authentication protocols, including multi-factor authentication (MFA), for all access attempts across the entire supply chain ecosystem. Continuous monitoring and microsegmentation: Implement continuous monitoring of network activity and system logs to detect suspicious behavior. Consider network segmentation and micro-segmentation strategies to limit the potential impact of a successful cyberattack. 4. Data Encryption in Transit and at Rest Data security is paramount within the supply chain. To ensure the confidentiality and integrity of sensitive data: Data encryption in transit: Encrypt all data in transit between systems and devices within the supply chain. This protects sensitive information from interception during network communication. Data encryption at rest: Encrypt all sensitive data at rest on storage devices and databases throughout the supply chain. This ensures that even if an attacker gains access to storage systems, the data will be unreadable. 5. Continuous Vulnerability Management Security vulnerabilities are constantly being discovered and exploited. A comprehensive vulnerability management program should be implemented: Vulnerability scanning and patch management: Regularly conduct vulnerability scans across all IT and ICS systems within the supply chain. Prioritize patching critical vulnerabilities identified during scans to minimize the window of exploitation. Penetration testing: Conduct regular penetration testing to identify exploitable weaknesses in security controls and configurations. This proactive approach simulates real-world attacks, helping to uncover vulnerabilities that may be missed by automated scans. 6. Secure Configuration Management Maintaining secure configurations of all systems across the supply chain is essential. This includes: Automated configuration management tools: Implement automated configuration management tools to ensure consistent and secure configurations across all devices and systems within the supply chain. Configuration baselines and change management: Establish security baselines for all system configurations and implement a robust change management process to track and review any modifications. 7. Security Awareness Training Human error is often a significant factor in successful cyberattacks. Ongoing security awareness training for all stakeholders within the supply chain is crucial: Educate employees on recognizing phishing scams and social engineering tactics commonly used by cybercriminals. Emphasize the importance of verifying sender legitimacy and avoiding suspicious links or attachments in emails. Secure coding practices: For developers, security awareness training should cover secure coding practices, common vulnerabilities in supply chain software, and the importance of secure coding throughout the SDLC. Supply chain-specific threats: Train all employees on the specific cyber threats relevant to the supply chain industry. This includes understanding the risks associated with IoT devices, ICS vulnerabilities, and data security best practices within the supply chain ecosystem. 8. Vendor Risk Management Building a secure supply chain requires extending security considerations beyond your organization's internal systems. Vendor Risk Management (VRM) is a critical practice for identifying and mitigating cybersecurity risks posed by third-party vendors throughout the supply chain ecosystem. VRM Best Practices Vendor assessment: Conduct thorough assessments of the cybersecurity posture of potential and existing vendors. This assessment should evaluate the vendor's: Security controls and incident response plans Patch management practices to ensure timely vulnerability remediation Data security measures like encryption and access controls Compliance with relevant security regulations (e.g., PCI DSS, HIPAA) Contractual security considerations: Integrate security expectations and accountability clauses within vendor contracts. This ensures clarity on: The vendor's responsibility for maintaining secure systems and data handling practices Reporting requirements for security incidents or vulnerabilities The right to conduct security audits of the vendor's systems Case Studies To illustrate the importance of building resilient cybersecurity into supply chain operations and how it can be achieved, let's consider two case studies: Case Study 1: Building Cybersecurity Resilience in a Global Pharmaceutical Supply Chain Company Acme Pharmaceuticals, a multinational pharmaceutical company with a complex global supply chain network Challenge Acme faced increasing concerns about cybersecurity threats targeting their supply chain. These threats included potential attacks on: Manufacturing facilities of third-party vendors Logistics and transportation systems used to deliver critical materials and finished products Intellectual property theft of proprietary drug formulas Strategies Implemented Vendor Risk Management: Acme implemented a rigorous VRM program. They assessed the cybersecurity posture of all major vendors, including raw material suppliers, contract manufacturers, and logistics providers. Security controls, data security practices, and incident response plans were evaluated. Contracts were updated to include security expectations and reporting requirements for vulnerabilities or breaches. Threat intelligence integration: Acme subscribed to a threat intelligence feed specializing in the pharmaceutical industry. This feed provided insights into emerging cyber threats targeting the healthcare sector. The intelligence was used to prioritize vendor assessments and identify potential weaknesses in their own security posture. Secure coding practices: Acme partnered with key vendors to promote secure coding practices within their software development lifecycles. This included training for vendor developers on secure coding principles and code review processes to identify and eliminate vulnerabilities. Data encryption in transit and at rest: Acme implemented data encryption for all sensitive data throughout the supply chain. This included encrypting data during transportation between facilities and at rest on storage devices and databases. Continuous monitoring and microsegmentation: Acme implemented continuous monitoring of their network and vendor systems. Network segmentation and micro-segmentation strategies were employed to limit the potential impact of a successful cyberattack. Results By implementing these strategies, Acme significantly improved the cybersecurity resilience of their supply chain. Vendor assessments identified and mitigated potential security risks. Threat intelligence provided early warnings of emerging threats. Secure coding practices within the vendor network reduced the likelihood of software vulnerabilities. Data encryption protected sensitive information, and continuous monitoring allowed for the rapid detection and response to suspicious activity. Case Study 2: Security of a Just-In-Time (JIT) Supply Chain for a Tech Startup Company NovaTech, a fast-growing tech startup that relies on a Just-in-Time (JIT) inventory management system for their electronics manufacturing Challenge NovaTech's JIT system minimized inventory storage costs but also increased reliance on a network of interconnected suppliers and manufacturers. This complex ecosystem presented a larger attack surface for potential cyberattacks. Security concerns included: Disruptions to production caused by cyberattacks on supplier IT systems Theft of intellectual property related to NovaTech's hardware designs Ransomware attacks on critical manufacturing equipment within the supply chain Strategies Implemented Zero Trust security model: NovaTech implemented a Zero Trust security model across their entire supply chain. This model assumed no inherent trust within the network and required continuous verification for all users, devices, and applications attempting to access resources. Secure configuration management: Automated configuration management tools were implemented to ensure consistent and secure configurations across all devices and systems within the supply chain. This included routers, switches, and manufacturing equipment used by NovaTech and their vendors. Security awareness training: NovaTech conducted comprehensive security awareness training programs for their employees and partnered with vendors to offer similar training for their workforce. This training emphasized best practices for secure password management, phishing email identification, and reporting suspicious activity. Penetration testing: NovaTech conducted regular penetration testing of their own systems and, when possible, collaborated with key vendors to conduct penetration testing of their critical infrastructure. This proactive approach helped identify and address potential vulnerabilities before they could be exploited by cybercriminals. Cybersecurity incident response plan: A comprehensive incident response plan was developed and tested to ensure a coordinated and rapid response in the event of a cyberattack. The plan outlined roles and responsibilities for NovaTech and their vendors during a security incident. Results NovaTech's commitment to cybersecurity throughout their JIT supply chain significantly reduced their risk of cyberattacks. The Zero Trust model ensured that only authorized users and devices could access critical resources. Secure configuration management minimized the risk of misconfigured systems creating vulnerabilities. Security awareness training empowered employees and vendors to identify and report suspicious activity. Penetration testing identified and addressed potential weaknesses in security posture. A well-defined incident response plan ensured a swift and coordinated response to security incidents. Conclusion In conclusion, building a resilient cybersecurity system within the supply chain is a continuous, collaborative effort that involves all stakeholders. The importance of proactive threat intelligence gathering and analysis cannot be overstated, as it provides crucial insights for prioritizing security measures. Additionally, extending security considerations to include Vendor Risk Management (VRM) and adopting a Zero Trust security model are key strategies for defending against evolving cyber threats, particularly in complex and interconnected systems like Just-In-Time (JIT) supply chains. Secure configuration management also plays a vital role in maintaining a consistent security posture. Ultimately, the commitment to continuous monitoring, layered security, and active participation from all stakeholders is what will safeguard an organization's operations, data, and reputation in the digital marketplace.

By Akanksha Pathak DZone Core CORE
Snowflake Micro-Partitioning: Technical Insights, Examples, and Advanced Developer Guide
Snowflake Micro-Partitioning: Technical Insights, Examples, and Advanced Developer Guide

Snowflake, the cloud-based data warehousing platform, has gained significant traction in recent years due to its innovative features and performance optimizations. One of these key features is micro-partitioning, which enhances storage and query performance. In this article, we will delve deeper into the technical aspects of Snowflake's micro-partitioning, discuss its advantages, and provide an advanced developer guide with examples. Understanding Micro-Partitioning at a Deeper Level Micro-partitioning in Snowflake can be better understood by examining its core components: Data Ingestion and Clustering Snowflake ingests data using the COPY command or Snowpipe, both of which automatically divide data into micro-partitions based on natural clustering patterns. Micro-partitions are created using a range-based clustering algorithm that sorts input data on one or more clustering keys. This process ensures that related data is co-located within the same micro-partition, reducing the amount of data scanned during query execution. Columnar Storage Snowflake stores each micro-partition in a columnar format, where values for a single column are stored together. This format enables efficient compression and encoding schemes, such as Run-Length Encoding (RLE) and Delta Encoding, which reduce storage costs and improve query performance. Metadata Management Snowflake maintains metadata about each micro-partition, including the minimum and maximum values for each column (known as min-max pruning), the number of distinct values (NDV), and the partition's size. The Query Optimizer leverages this metadata to prune irrelevant micro-partitions and minimize data scanned during query execution. Example: Consider a table with columns A, B, and C. If a user executes a query with a filter condition "WHERE A > 100", the Query Optimizer uses the metadata for column A to identify and prune micro-partitions where the maximum value of A is less than or equal to 100. This process significantly reduces the amount of data scanned and improves query performance. Advantages of Micro-Partitioning Improved query performance: Micro-partitioning enables Snowflake to optimize query performance by minimizing the amount of data scanned during execution. This is achieved through metadata-based pruning and the co-location of related data within micro-partitions. Scalability: Micro-partitioning allows Snowflake to distribute data across multiple nodes in a cluster, enabling horizontal scaling. As your data grows, you can add more compute resources to maintain optimal query performance. Storage efficiency: The columnar storage format within micro-partitions allows for efficient compression and encoding, reducing storage costs. Data protection: Snowflake's micro-partitioning architecture provides built-in data protection features, such as automatic replication and failover, ensuring high availability and durability for your data. Advanced Developer Guide to Micro-Partitioning Load data efficiently: To maximize the benefits of Snowflake's micro-partitioning, load data in large, sorted batches using the COPY command or Snowpipe. Sorting data on one or more clustering keys before ingestion will help Snowflake create well-clustered micro-partitions. Example: Use the following COPY command to load sorted data from a CSV file into a table: SQL COPY INTO my_table FROM '@my_stage/my_data.csv' FILE_FORMAT = (TYPE = 'CSV') FORCE = TRUE; Optimize queries: Leverage Snowflake's metadata to optimize your queries, using filter predicates and join conditions that take advantage of min-max pruning and NDV-based optimizations. Monitor clustering: Regularly monitor the clustering score for your tables using the following query: SQL SELECT SYSTEM$CLUSTERING_INFORMATION('my_table', '(clustering_key_1, clustering_key_2)'); A low clustering score indicates that your data is not well-clustered within micro-partitions, and you should consider re-clustering your data using the ALTER TABLE RECLUSTER command. Leverage time travel and data sharing: Utilize Snowflake's Time Travel feature to access historical data by specifying a time offset in your queries: SQL SELECT * FROM my_table AT(TIMESTAMP => TO_TIMESTAMP('2022-01-01 00:00:00')); Use Data Sharing to securely share data with other organizations by creating shares and granting access to specific objects: SQL CREATE SHARE my_share; GRANT USAGE ON DATABASE my_database TO SHARE my_share; GRANT SELECT ON TABLE my_table TO SHARE my_share; Conclusion By delving deeper into the technical aspects of Snowflake's micro-partitioning and following the advanced developer guide provided in this article, you can harness the full potential of this powerful feature to optimize your data warehousing and analysis processes. With improved query performance, scalability, storage efficiency, and data protection, Snowflake's micro-partitioning technology is a game-changer in the world of data management.

By Arun Pandey DZone Core CORE

Culture and Methodologies

Agile

Agile

Career Development

Career Development

Methodologies

Methodologies

Team Management

Team Management

Three Reasons Why You Should Attend PlatformCon 2024

April 3, 2024 by Caitlin Candelmo

Efficient Ticket Management Using LangChain and Large Language Models

April 3, 2024 by Rupali Kaushik

Operational Testing Tutorial: Comprehensive Guide With Best Practices

May 16, 2023 by Harshit Paul

Data Engineering

AI/ML

AI/ML

Big Data

Big Data

Databases

Databases

IoT

IoT

Decoding Synchronous and Asynchronous Communication in Cloud-Native Applications

April 5, 2024 by Gaurav Gaur DZone Core CORE

CAP Theorem for Distributed System

April 5, 2024 by Dhanushka Madushan DZone Core CORE

Explainable AI: Making the Black Box Transparent

May 16, 2023 by Yifei Wang DZone Core CORE

Software Design and Architecture

Cloud Architecture

Cloud Architecture

Integration

Integration

Microservices

Microservices

Performance

Performance

Decoding Synchronous and Asynchronous Communication in Cloud-Native Applications

April 5, 2024 by Gaurav Gaur DZone Core CORE

5 Reasons To Choose Django in 2024

April 5, 2024 by Craig Oda DZone Core CORE

Low Code vs. Traditional Development: A Comprehensive Comparison

May 16, 2023 by Tien Nguyen

Coding

Frameworks

Frameworks

Java

Java

JavaScript

JavaScript

Languages

Languages

Tools

Tools

5 Reasons To Choose Django in 2024

April 5, 2024 by Craig Oda DZone Core CORE

Understanding Polyglot Persistence

April 5, 2024 by Otavio Santana DZone Core CORE

Scaling Event-Driven Applications Made Easy With Sveltos Cross-Cluster Configuration

May 15, 2023 by Gianluca Mardente

Testing, Deployment, and Maintenance

Deployment

Deployment

DevOps and CI/CD

DevOps and CI/CD

Maintenance

Maintenance

Monitoring and Observability

Monitoring and Observability

Decoding Synchronous and Asynchronous Communication in Cloud-Native Applications

April 5, 2024 by Gaurav Gaur DZone Core CORE

Ansible Beyond Automation

April 4, 2024 by Vidyasagar (Sarath Chandra) Machupalli DZone Core CORE

Low Code vs. Traditional Development: A Comprehensive Comparison

May 16, 2023 by Tien Nguyen

Popular

AI/ML

AI/ML

Java

Java

JavaScript

JavaScript

Open Source

Open Source

Understanding Polyglot Persistence

April 5, 2024 by Otavio Santana DZone Core CORE

Game Theory in Blockchain: A Developer's Guide With Java Example

April 4, 2024 by Arun Pandey DZone Core CORE

Five IntelliJ Idea Plugins That Will Change the Way You Code

May 15, 2023 by Toxic Dev

ABOUT US

  • About DZone
  • Send feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: