<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: thirumald</title>
    <description>The latest articles on DEV Community by thirumald (@thirumald).</description>
    <link>https://dev.to/thirumald</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F884325%2Fed95228b-c039-42ec-9ae2-ebfd6289875b.png</url>
      <title>DEV Community: thirumald</title>
      <link>https://dev.to/thirumald</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/thirumald"/>
    <language>en</language>
    <item>
      <title>The Future of Tech</title>
      <dc:creator>thirumald</dc:creator>
      <pubDate>Wed, 17 Aug 2022 17:06:00 +0000</pubDate>
      <link>https://dev.to/thirumald/the-future-of-tech-39g5</link>
      <guid>https://dev.to/thirumald/the-future-of-tech-39g5</guid>
      <description>&lt;h2&gt;
  
  
  The Future of Tech
&lt;/h2&gt;

&lt;p&gt;We can never be certain about the future, we can just get an idea of what will happen in the future. We don't know if we'll find a cancer treatment, what the economic outlook will be, if we'll live in an algorithmic environment, or if our coworker will be replaced by a robot shortly.&lt;/p&gt;

&lt;p&gt;While futurists can offer some fascinating and even terrifying predictions for the future of technology and science, no future facts exist.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;What is the Role of Technology?&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Technology is there in your life from the moment you get up to the moment you go to sleep. According to the International Telecommunication Union (ITU), the internet is used by about half of the world's population, resulting in over 3.5 billion daily Google searches and over 570 new websites generated every minute. What's even more perplexing? In the previous few years, more than 90% of the world's data has been created.&lt;/p&gt;

&lt;p&gt;With data accumulating at a quicker rate than ever before, the future of technology will be even more fascinating than the present. We're only at the start of a revolution that will affect every industry and every person on the planet. By 2020, the cloud will handle at least a third of all data, and there will be more than 50 billion smart linked devices on the planet.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keeping up with the digital revolution
&lt;/h2&gt;

&lt;p&gt;Businesses of all sizes will be compelled to change how they function due to the rapid growth of data and our ability to analyse it. Businesses that digitally transition will be able to provide a smooth and frictionless experience to their customers, allowing them to claim a larger share of profit in their industries.&lt;/p&gt;

&lt;p&gt;Consider the financial services business, particularly banking. Previously, most banking was done at a local branch, but current statistics suggest that 40% of Americans had not visited a bank or credit union in the last six months, owing to the rise of online and mobile banking.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the future of technology?
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Planes powered by hydrogen
&lt;/h2&gt;

&lt;p&gt;Carbon emissions from commercial aeroplanes are a huge concern, but there is a potential solution that has received a lot of funding. As part of a £15 million UK programme, plans for a hydrogen-powered plane have been revealed. The project is called Fly Zero, and it is led by the Aerospace Technology Institute in partnership with the UK government.&lt;/p&gt;

&lt;p&gt;As part of the project, a proposal for a mid-size plane powered solely by liquid hydrogen has been developed. It would be capable of transporting 279 passengers without stopping halfway around the world.&lt;/p&gt;

&lt;h2&gt;
  
  
  Human-Computer Interfaces
&lt;/h2&gt;

&lt;p&gt;Wearable gadgets and technologies with human-computer interfaces can improve human physical and mental performance, allowing us to live healthier and more happy lives.&lt;/p&gt;

&lt;p&gt;Fitness tracker bands and smartwatches are two of the most popular types of wearables on the market today: small, easy-to-wear gadgets that monitor our activity and provide information that helps us live healthier, better, and more productive lives.&lt;/p&gt;

&lt;p&gt;Wearable technology, on the other hand, does not always refer to something you strap to your wrist or another part of your body; it can also refer to smart clothing, such as running shoes that track your gait and performance, robotic prosthetics, and robotic wearable technology used in industrial settings.&lt;/p&gt;

&lt;h2&gt;
  
  
  Universes of virtual reality
&lt;/h2&gt;

&lt;p&gt;After a massive rebranding, the company formerly known as Facebook changed its name to Meta. This is Zuckerberg's and his enormous team's first foray into the metaverse, which is an embodied internet accessed mostly through virtual and augmented reality. As part of this strategy, Meta will devote more time to technology that will allow them to enter this new reality, mostly through virtual reality.&lt;/p&gt;

&lt;h2&gt;
  
  
  Artificial eyes
&lt;/h2&gt;

&lt;p&gt;Bionic eyes have been a mainstay of science fiction for decades, but real-world research is now catching up with novelists who are farsighted. Thanks to a spate of new technology, people with various sorts of vision impairment will soon be able to see again.&lt;/p&gt;

&lt;h2&gt;
  
  
  Gene Technology
&lt;/h2&gt;

&lt;p&gt;Genomics is a part of biology that studies and manipulates the DNA and genomes of living organisms. Gene editing is a combination of technologies that allows living organisms' DNA and genetic structure to be genetically modified.&lt;/p&gt;

&lt;p&gt;Biotechnology has advanced to the point that it is now possible to alter the DNA encoded within a cell, affecting the characteristics or attributes of the cell's offspring&lt;/p&gt;

&lt;p&gt;In plants, this could alter the number of leaves or the color of the leaves, while in humans, it could affect height, eye color, or illness risk. This opens up an almost infinite number of possibilities, as it means that any living thing's inherited characteristics can theoretically be changed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Extended Reality
&lt;/h2&gt;

&lt;p&gt;The extended reality, abbreviated as XR, is the use of technology to create more immersive digital experiences. Virtual reality, augmented reality, and mixed reality are all part of it.&lt;/p&gt;

&lt;p&gt;In practice, XR is being utilised to promote brand engagement, allow customers to try before they buy, improve customer service, improve workplace learning effectiveness, and improve other organizational processes.&lt;/p&gt;

&lt;h2&gt;
  
  
  The blurry line between actual and virtual space
&lt;/h2&gt;

&lt;p&gt;One thing the current pandemic has shown is how important technology is for sustaining and facilitating contact, not just for work, but for developing genuine emotional ties.&lt;/p&gt;

&lt;p&gt;With AI technology meant to link humans on a human level and bring them closer together, even when they are physically separated, we may expect to see this breakthrough accelerate in the coming years. There will always be a blurry line between actual and virtual space.&lt;/p&gt;

&lt;h2&gt;
  
  
  Internet for everyone
&lt;/h2&gt;

&lt;p&gt;Even though we can't seem to live without it, only around half of the world's population has access to the internet. There are numerous reasons for this, including economic and societal concerns, but for other people, the internet is simply unavailable owing to a lack of connectivity.&lt;/p&gt;

&lt;p&gt;Google is steadily attempting to address the issue by using helium balloons to beam the internet to inaccessible regions, however, Facebook has abandoned plans to do the same using drones, implying that Hiber has beaten Google to the punch. They've tried a new approach, launching a network of shoebox-sized microsatellites into low-Earth orbit, where they wake up a modem connected to your computer or gadget and transfer your data when they fly by.&lt;/p&gt;

&lt;p&gt;Stopping forest fire with sound&lt;/p&gt;

&lt;p&gt;Drones that emit loud noises toward the trees below could be used to put out forest fires in the future. Sound can be used to distort the air around a fire, effectively cutting off the oxygen supply to the fuel.&lt;/p&gt;

&lt;p&gt;As researchers from George Mason University in Virginia demonstrated recently with their sonic extinguisher, the fire just dies out at the correct frequency. The most effective frequencies tend to be bass frequencies.&lt;/p&gt;

&lt;h2&gt;
  
  
  A new normal in managing cancer
&lt;/h2&gt;

&lt;p&gt;Technology is driven by data, knowledge is catalysed by data, and knowledge empowers individuals. In the future, cancer will be treated similarly to any other chronic health condition; we will be able to identify what we are up against and be equipped to defeat it.&lt;/p&gt;

&lt;p&gt;In other words, a new standard of cancer care will emerge. We will see more early and proactive screening with improved diagnostics innovation, such as better genome sequencing technology or liquid biopsy, which offers greater ease of testing, greater accuracy, and preferably at a reasonable cost.&lt;/p&gt;

&lt;p&gt;In common cancer forms, early detection and intervention will save lives while also minimising the financial and emotional costs of late detection.&lt;/p&gt;

&lt;h2&gt;
  
  
  Artificial Intelligence
&lt;/h2&gt;

&lt;p&gt;Machine learning and artificial intelligence are terms that refer to a machine's ability to learn and act intelligently, which implies it can make decisions, accomplish tasks, and even predict future outcomes based on data.&lt;/p&gt;

&lt;p&gt;There are serious dangers to society and human life as we know it, especially because certain countries are racing to develop AI-assisted autonomous weaponry. AI and machine learning are the foundations of many other technologies. We wouldn't have made great advances in the Internet of Things, virtual reality, chatbots, facial recognition, robotics, automation, or self-driving cars without AI, to name a few.&lt;/p&gt;

&lt;p&gt;Human jobs will also be transformed by AI. AI-enabled automation will have a particularly large impact, potentially displacing a large number of employees. But, rather than believing in a gloomy future in which all human jobs are replaced by robots. Some believe AI will improve our working life. Human work will be enhanced by AI, and new employees will be created to replace those that are lost.&lt;/p&gt;

&lt;p&gt;In terms of how we think about labour, leisure, and social benefit delivery, sophisticated civilizations are at a crossroads. If these economies require fewer workers to fulfil necessary activities, and benefits are mostly provided through full-time employment, many people may have difficulty accessing health care, pensions, and the income maintenance they require to live. This is especially concerning at a time when income inequality is high and economic distributions are severely skewed.&lt;/p&gt;

&lt;p&gt;The difference between our previous era of scarcity and the impending era of prosperity brought on by new technology necessitates that we pay attention to the social contract.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Process automation and virtualization
&lt;/h2&gt;

&lt;p&gt;Around half of all existing work activities could be automated in the next few decades, as next-level process automation and virtualization become more commonplace.&lt;/p&gt;

&lt;p&gt;“By 2025, more than 50 billion devices will be connected to the Industrial Internet of Things (IIoT),” McKinsey predicts. Robots, automation, 3D-printing, and more will generate around 79.4 zettabytes of data per year.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. The future of connectivity
&lt;/h2&gt;

&lt;p&gt;Faster digital connections, powered by 5G and the IoT, have the potential to unlock economic activity. So much so that implementing faster connections in “mobility, healthcare, manufacturing and retail could increase global GDP by $1.2 trillion to $2 trillion by 2030.” 5G and IoT will be one of the most-watched tech trends for the next decade.&lt;/p&gt;

&lt;p&gt;“Far-greater network availability and capability will drive broad shifts in the business landscape, from the digitization of manufacturing (through wireless control of mobile tools, machines and robots) to decentralized energy delivery and remote patient monitoring.”&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Distributed infrastructure
&lt;/h2&gt;

&lt;p&gt;By 2022, 70% of companies will be using hybrid-cloud or multi-cloud platforms as part of a distributed IT infrastructure. It will mean data and processing can be handled in the cloud but made accessible to devices faster.&lt;/p&gt;

&lt;p&gt;“This tech trend will help companies boost their speed and agility, reduce complexity, save costs and strengthen their cybersecurity defenses,” McKinsey says.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--acX_q65i--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/epwz681i9k3bds8nku9e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--acX_q65i--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/epwz681i9k3bds8nku9e.png" alt="McKinsey " width="880" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Next-generation computing
Next-generation computing will, McKinsey believes, “help find answers to problems that have bedeviled science and society for years, unlocking unprecedented capabilities for businesses”.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It includes a host of far-reaching developments, from quantum AI to fully autonomous vehicles, and as such won’t be an immediate concern for all organizations. “Preparing for next-generation computing requires identifying whether you’re in a first-wave industry (such as finance, travel, logistics, global energy and materials, and advanced industries),” McKinsey says, or “whether your business depends on trade secrets and other data that must be safeguarded during the shift from current to quantum cryptography.”&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Applied Artificial Intelligence (AI)
AI is one of the biggest tech trends. We are still only in the early days of the development of AI. As the technology becomes more sophisticated, it will be applied to further develop tech-based tools, such as training machines to recognize patterns, then act upon what it has detected.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;By 2024, AI-generated speech will be behind more than 50% of people’s interactions with computers. Companies are still searching for ways to use AI effectively though, the consultancy says: “While any company can get good value from AI if it’s applied effectively and in a repeatable way, less than one-quarter of respondents report significant bottom-line impact.”&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oZKIMh36--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3g0stpduye0w2xukf3pt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oZKIMh36--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3g0stpduye0w2xukf3pt.png" alt="AI" width="880" height="431"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Future of programming
Get ready for Software 2.0, where neural networks and machine learning write code and create new software. “This tech trend makes possible the rapid scaling and diffusion of new data-rich, AI-driven applications,” according to McKinsey.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In part, it could see the creation of software applications far more powerful and capable than anything available today. But it will also make it possible for existing software and coding processes to be standardized and automated.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Trust architecture
In 2019, more than 8.5 billion data records were compromised. Despite advances in cybersecurity, criminals continue to redouble their efforts. Being a growing tech trend, trust architectures will help in the fight against cybercrime.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;One approach to building a trust architecture is the use of distributed ledgers, such as blockchain. “In addition to lowering the risk of breaches, trust architectures reduce the cost of complying with security regulations, lower the operating and capital expenditures associated with cybersecurity, and enable more cost-efficient transactions, for instance, between buyers and sellers,” McKinsey notes.&lt;/p&gt;

&lt;p&gt;Main Article from `&lt;a href="https://www.weforum.org/agenda/2021/10/technology-trends-top-10-mckinsey/"&gt;https://www.weforum.org/agenda/2021/10/technology-trends-top-10-mckinsey/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;`&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Monitoring Windows Services with Grafana, InfluxDB and Telegraf</title>
      <dc:creator>thirumald</dc:creator>
      <pubDate>Mon, 15 Aug 2022 17:40:47 +0000</pubDate>
      <link>https://dev.to/thirumald/monitoring-windows-services-with-grafana-influxdb-and-telegraf-ba</link>
      <guid>https://dev.to/thirumald/monitoring-windows-services-with-grafana-influxdb-and-telegraf-ba</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu9pt4iwsdyuhsiskfsxg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu9pt4iwsdyuhsiskfsxg.png" alt="Grafana"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.influxdata.com/?utm_source=thenewstack&amp;amp;utm_medium=website&amp;amp;utm_campaign=platform" rel="noopener noreferrer"&gt;InfluxData &lt;/a&gt;sponsored this post.&lt;/p&gt;

&lt;p&gt;If you are a Windows Server administrator or a power user on Windows instances, you may have experienced the great sense of frustration that comes with services shutting down for no reason.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw93r8wk83pu9rj0jbx07.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw93r8wk83pu9rj0jbx07.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The worst of it comes when you happen to discover it way too late, leading to obvious useless costs for your team.&lt;/p&gt;

&lt;p&gt;The goal of this tutorial is to help you put an end to this maddening, yet ultimately, avoidable waste of resources. Among &lt;br&gt;
other things, we show how to build a  complete stack for DevOps engineers to monitor Windows services — and get alerts when one of them fails.&lt;/p&gt;

&lt;h2&gt;
  
  
  What You Will Learn
&lt;/h2&gt;

&lt;p&gt;Before jumping right into the technical implementation, here’s the list of everything that you are going to learn if you follow the tutorial until the end:&lt;/p&gt;

&lt;p&gt;Get a grasp of a “classic” monitoring architecture and how tools interact together;&lt;br&gt;
Installing state of the art DevOps tools like Grafana v6.1.4 (released in 2019), InfluxDB v1.7.3 and Telegraf 1.10.3;&lt;br&gt;
Get to know what Performance Counters are and how to interact with the Performance Monitor;&lt;br&gt;
Build a complete dashboard with the last features of Grafana such as the gauge panel;&lt;br&gt;
Learn how alerts work with Grafana.&lt;br&gt;
Now that you know the skills that you are going to acquire, let’s &lt;br&gt;
have first a quick introduction about performance counters on Windows machines.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Are Performance Counters?
&lt;/h2&gt;

&lt;p&gt;Performance Counters on Windows machines are native components that record and monitor data for a variety of tools on your machine such as: your CPU, your disks, processes, databases (if you are running some, like MySQL) and even ASP.NET applications.&lt;/p&gt;

&lt;p&gt;Windows exposes an API that any tool can query in order to retrieve statistics from performance counters. Visual tools are also provided for you to take a look at metrics in real-time. An example of a visual tool is the Performance Monitor, directly shipped on every Windows machine.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6hw1x5gfa5k6jiq43jwp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6hw1x5gfa5k6jiq43jwp.png" alt="Performance Monitor"&gt;&lt;/a&gt;&lt;br&gt;
If you open the performance monitor, you can navigate to Monitoring Tools &amp;gt; Performance Monitor on the left menu.&lt;/p&gt;

&lt;p&gt;There, by clicking on the green add button, you are exposed to a set of high-level metrics available on your computer.&lt;/p&gt;

&lt;p&gt;Process, PhysicalDisk, LogicalDisk and Databases are among the metrics that can be added to the graph that is refreshed periodically.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn6w1vf20pv0g9u2o5y8b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn6w1vf20pv0g9u2o5y8b.png" alt="Performance Monitor"&gt;&lt;/a&gt;&lt;br&gt;
Playing with the Performance Monitor is already a good way to get a sense of what one can monitor. Before jumping right into Telegraf, you may want to experiment a bit with the Performance Monitor.&lt;/p&gt;

&lt;p&gt;Now that you know a bit more about the Performance Counters, let’s have a look at how exactly we are going to build our monitoring architecture.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building a Classic Monitoring Architecture
&lt;/h2&gt;

&lt;p&gt;When building monitoring architectures for personal use, most of the time, you want to reunite three components:&lt;/p&gt;

&lt;p&gt;A monitoring agent: it can be Telegraf, CollectD, StatsD, Datadog or any tool that is able to gather metrics;&lt;br&gt;
A time series database: in this case InfluxDB but many others exist;&lt;br&gt;
A visualization tool: either Grafana or Chronograf.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqbksvw19apqfo5j7x3mh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqbksvw19apqfo5j7x3mh.png" alt="Performance Monitor"&gt;&lt;/a&gt;&lt;br&gt;
In this case, Telegraf will periodically query the Windows Performance Counters API and send the results to InfluxDB. Those results will be accessible and explorable in Grafana.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7bvs54sjf79ewf9qubqk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7bvs54sjf79ewf9qubqk.png" alt="Telegraf"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing the Different Tools
&lt;/h2&gt;

&lt;p&gt;Now that we know exactly what we are going to build, let’s install the different tools that we need.&lt;/p&gt;

&lt;h2&gt;
  
  
  A: Installing InfluxDB
&lt;/h2&gt;

&lt;p&gt;Before configuring any monitoring agent, it is important to have a time series database first.&lt;/p&gt;

&lt;p&gt;Launching Telegraf without InfluxDB would result in many error messages that won’t be very relevant.&lt;/p&gt;

&lt;p&gt;Installing InfluxDB is pretty straightforward, head over to the download page and save the resulting .zip somewhere on your computer.&lt;/p&gt;

&lt;p&gt;When saved, unzip the content wherever you want, launch a command line and navigate to the folder where you stored your binaries (in my case, directly in Program Files). Once there, you will be presented with a couple of files:&lt;/p&gt;

&lt;p&gt;exe: an CLI executable used to navigate in your databases and measurements easily;&lt;/p&gt;

&lt;p&gt;exe: used to launch an InfluxDB instance on your computer;&lt;br&gt;
exe: an executable used to run stress tests on your computer;&lt;br&gt;
influx_inspect: used to inspect InfluxDB disks and shards (not relevant in our case).&lt;br&gt;
In our case, you want to run the influxd executable. Immediately after, you should see your InfluxDB instance running.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpiv819jh2wsn4bh14r6m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpiv819jh2wsn4bh14r6m.png" alt="influx"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;InfluxDB does not ship as a service yet, even if it is completely doable to configure it as a user-defined service on Windows.&lt;/p&gt;

&lt;h2&gt;
  
  
  B: Installing Telegraf
&lt;/h2&gt;

&lt;p&gt;Telegraf installation on Windows can be a bit tricky.&lt;/p&gt;

&lt;p&gt;To download Telegraf, head over the InfluxDB downloads page and click on the latest version of Telegraf available.&lt;/p&gt;

&lt;p&gt;Telegraf installation should be done in the Program Files folder, in a folder named Telegraf.&lt;/p&gt;

&lt;p&gt;Launch a Powershell instance as an administrator. Head over to the Program Files folder and run:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

mkdir Telegraf


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Drop the executables downloaded here, and run:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

telegraf.exe –service install


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;As a consequence, Telegraf should be installed as a service and available in Windows services. Telegraf configuration file should be configured to retrieve metrics from your CPU and disk. To test it, run:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

net start telegraf{% raw %}`
```

To check it, head over to InfluxDB folder (where you dropped your executables) and run influx.exe.If everything is running okay, you should start seeing metrics aggregating in InfluxDB.

You should be presented with a CLI, where you’ll type your first IFQL queries.

```
&amp;amp;gt; show databases;
# You should see a list of your databases, including telegraf&amp;amp;gt; use telegraf;
# Navigating in your telegraf database&amp;amp;gt; show measurements;
# Getting the list of your measurements&amp;amp;gt; SELECT * FROM win_cpu
# Seeing your CPU metrics
```

If you are unfamiliar with basics of InfluxDB and what IFQL is, check my ultimate InfluxDB guide for beginners. It contains good explanations regarding everything that you need to know.

##C: Installing Grafana
For this tutorial, we are going to use the brand new Grafana v6.

Head over to Grafana download page, download the zip and unzip it wherever you want. Similarly to what you did with InfluxDB, head over to the folder where you stored your executables and run the Grafana server (grafana-server.exe in bin folder).

By default, Grafana will run on port 3000. Default credentials are admin/admin (you are prompted to modify them directly at boot time).

When you’re done, you’ll be asked to configure your data sources. By default, an InfluxDB instance runs on port 8086. The following configuration should do the trick:


![InfluxDB ](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kz4i0v6im5ihtarghd6b.png)
Now that all the tools are configured, it is time to start monitoring Windows services.

Configuring Telegraf
Before creating our awesome dashboard, we need to configure Telegraf in order for it to query the Performance Counters API we described in the first chapter.

This will be done by using the win_perf_counters plugin of Telegraf. The plugin needs to be declared in the inputs section of your configuration file. It looks like this:

```
[[inputs.win_perf_counters]]
[[inputs.win_perf_counters.object]]
# Processor usage, alternative to native, reports on a per core.
ObjectName = “Processor”
Instances = [“*”]
Counters = [“% Idle Time”, “% Interrupt Time”, “% Privileged Time”, “% User Time”]
Measurement = “win_cpu”
```

The ObjectName property expects the exact same name that you would find the Performance Monitor. When in doubt about what you can query on Windows, you can either:

![cpu](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sadec7r8regettcd7kll.png)
In our case, we want to monitor the Process object name, the ElapsedTime counter for the service we are interested in : postgres (for this example).

We can also add the % Processor Time metric in order to stop CPU-consuming resources.

The resulting Telegraf configuration will be:

```
[[inputs.win_perf_counters]]
[[inputs.win_perf_counters.object]]
# Processor usage, alternative to native, reports on a per core.
ObjectName = “Process”
Instances = [“*”]
Counters = [“Elapsed Time”, “% Processor Time”]
Measurement = “win_services”
```

Now that everything is configured, let’s head over to Grafana and build our dashboard.

Building an Awesome Dashboard
This is where the fun begins.

We are going to build our dashboard in Grafana v6.0.

As a reminder, this is the dashboard that we are going to build today.

![dashboard ](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gut9udx0cwvh1du4ooom.png)
In Grafana, create a new dashboard by clicking on the plus icon on the left menu.

We chose the “Elapsed Time” metric in order to measure if services are up or down.

However, we have to perform transformations on our data as the Elapsed Time function is theoretically a never-ending growing function.

(https://devconnected.com/monitoring-systemd-services-in-realtime-with-chronograf/?utm_source=thenewstack&amp;amp;utm_medium=website&amp;amp;utm_campaign=platform)services, I will give you the widget and the query for you to reproduce this dashboard.

![widget ](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jj3m2by4erw40cgevfnk.png)
If you want to exact same output for the gauge, head over to the Visualization Panel: in the “Value Panel,” show the “Last” value and select a “percent” unit.

![Visualization](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/96vkw24nr0z38jnlj6kv.png)
The key here is the difference operator.

It gives the graph a “heartbeat” look that avoids having a growing graph that rescales permanently.

If you want to have the exact same output, head over to the “Visualization” panel and click on the “Staircase” option.

The other boxes of this dashboard are just plain text panels with some CSS color, nothing special here.

You can, of course, tweak the examples to monitor the services you are interested in and/or modify the query to take an operator that you find more suitable to your needs.

Now that our visualization is ready, it is time to warn our DevOps team every time a service fails.

##Alerting the DevOps Team on Service Failure

Visualizing service failure is great but you don’t want to be staring at Grafana every second and wait for a service failure.

Ideally, you would want to be notified via Slack for example in order to take immediate action over the failure.

This is exactly what we are going to configure on Grafana: Slack alerts.

In Grafana, you’ll be able to create some alerts only for the graph panel. Two steps and we are done.

##A: Creating a Notification Channel
Before creating the actual alert, we have to create a notification channel. In the left menu, head over to the little bell icon, and click on “Notification Channels.”

When you’re there, you are presented with a couple of fields that you have to fill. As an example, I’ll give you my own configuration.

![configuration](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lrx0186j2rce47fu58jx.png)
##B: Creating the Alert
Now that our notification channel is created, it is time to build our final alert on the graph panel.

Head over to your dashboard, edit one of the graph panels and click on the little bell similar to the one on the left menu.

Again, I’ll provide a comprehensive screenshot on how I built my alerts.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rokmf6snc8f0xohb5awp.png)
This alert states that it will evaluate the last value provided by the query that you defined earlier for the last minute.

If it has no value, then an alert will be raised. The alert evaluation is done every 10 seconds.

You can reduce the “For” parameter too to 10s for your alert to be more reactive.

##C: Emulating a Service Shutdown
Let’s pretend for a second that your Telegraf service is shutting down for no reason (it never happens in real life, of course.)

```
net stop telegraf
```

Here’s the graphical result in Grafana, along with the alert raised in Slack:

![Slack](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gtlcxcatzf0aqw50e4zq.png)
Done! We finally got what the reward of this hard work. Congratulations!

Conclusion
With this tutorial, we learned many things: first, that Windows has an entire built-in API that we can leverage to our needs.

We saw how modern tools such as Telegraf, InfluxDB and Grafana can be used in order to setup a quick and efficient way to monitor applications.

In this tutorial, we took the concrete example of Windows services, but it can be applied to pretty much every performance counters that Windows exposes to its users.

IIS Monitoring, ASP.NET applications, Web Services, everything can be monitored with the Performance Counters and as a consequence implemented in Telegraf.

Knowing everything that you can now do, what metrics will you monitor on your system?

What value do you think it can bring to your company?

Leave a comment on this blog post and share your views on this project.

If you want to read more on the subject, make sure to read excellent posts written on InfluxData blog [here](https://www.influxdata.com/blog/category/usecase/devops/?utm_source=thenewstack&amp;amp;utm_medium=website&amp;amp;utm_campaign=platform).

They all contain valuable information for the DevOps industry.

Until then, have fun, as always.
[main article from thenewstack.io  by **_Antoine Solnichkin_**](https://thenewstack.io/monitoring-windows-services-with-grafana-influxdb-%E2%80%8Eand-telegraf/)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>grafana</category>
    </item>
    <item>
      <title>I Made a Python Bot to Send “Good Night” Texts to My FRIEND Here’s how you too can build it very easily.</title>
      <dc:creator>thirumald</dc:creator>
      <pubDate>Mon, 25 Jul 2022 07:06:00 +0000</pubDate>
      <link>https://dev.to/thirumald/i-made-a-python-bot-to-send-good-night-texts-to-my-friendheres-how-you-too-can-build-it-very-easily-m5g</link>
      <guid>https://dev.to/thirumald/i-made-a-python-bot-to-send-good-night-texts-to-my-friendheres-how-you-too-can-build-it-very-easily-m5g</guid>
      <description>&lt;p&gt;Having a functioning relationship is hard, especially when you’re a full-time coder. You have to take care of her and her needs all the time, and most importantly, if she is clingy, you have to send “Good night” texts every single night.&lt;/p&gt;

&lt;p&gt;But I sit down to code after dinner and honestly, opening WhatsApp to text someone after that is very distracting. I mean, I gotta take care of hundreds of methods and classes in 3 different windows. WhatsApp web works without having the internet-connected nowadays, but one more tab on Chrome is a big jab at my poor RAM.&lt;/p&gt;

&lt;p&gt;So, I thought about automating the whole process to give myself some relief. Yeah, I know, you’re going to call me a bad boyfriend, but I just made sending a boring good-night text so damn cool. I coded a bot to do it for me!&lt;/p&gt;

&lt;p&gt;So, let’s see how I did it. Thank me later (after reading this article, by buying me a coffee maybe).&lt;/p&gt;

&lt;p&gt;Backstory:&lt;br&gt;
I needed to send some promotional messages to some of my colleagues some months back. But sending the same text to everyone by copy-pasting in everyone’s chat is so tedious and time-consuming. Plus doing it for a thousand people is just obnoxiously repetitive.&lt;/p&gt;

&lt;p&gt;So, I coded a python package to automate the whole thing.&lt;/p&gt;

&lt;p&gt;Yes, there are other python packages to do similar things, but honestly, they suck. Every one of those packages opens up an ugly Chrome window and then does the job. If I minimize the window, the process fails. I wanted something that works in the background.&lt;/p&gt;

&lt;p&gt;So, I coded AutoWhatsPy, a package to automate your WhatsApp, that works in the background (opens no ugly window).&lt;/p&gt;

&lt;p&gt;You can just assign a task to a program written using the package, and it will work in the background. Technically it does open a browser window but it doesn’t open in the foreground. You can keep doing other things on your PC while it works in the background. Plus a headless firefox browser window&lt;/p&gt;

&lt;p&gt;Plus, it is completely safe to use. I made the whole project open-source so that you can see what the code does by yourself. The package is completely built with python using selenium and Firefox gechodriver.&lt;/p&gt;

&lt;p&gt;Installing AutoWhatsPy&lt;br&gt;
Environment Setup&lt;br&gt;
AutoWhatsPy requires Python 3.5 (Python 3.9 will be the best option) or above to run. I have tested it with Python 3.5. Make sure that you have Python added to your PATH. When you install Python in your Windows system, make sure to check ‘Add Python 3.x to PATH’. If you forget to do it, see this tutorial to know how to add Python to your PATH for Windows.&lt;/p&gt;

&lt;p&gt;Install Python&lt;br&gt;
For Windows and Mac&lt;/p&gt;

&lt;p&gt;Download Python 3.9 from here. Use the installer to install Python in your System. Download ‘macOS 64-bit universal2 installer’ for Mac OS. Download ‘Windows x86–64 executable installer’ for your Windows 64 Bit system and ‘Windows x86 executable installer’ for Windows 32 bit system.&lt;/p&gt;

&lt;p&gt;For Linux&lt;/p&gt;

&lt;p&gt;Use the following command to install Python 3.9 on your Linux system.&lt;/p&gt;

&lt;p&gt;apt-get install python3.9&lt;br&gt;
Check pip&lt;br&gt;
Make sure you have pip installed in your system. Use the following command to check if you have pip installed.&lt;/p&gt;

&lt;p&gt;pip --version&lt;br&gt;
If you see a message like ‘pip 21.2.2’ then you have pip installed on your system. Otherwise, follow this tutorial to install pip in your system. Generally, Python comes with an ensurepip module, which can install pip in a Python environment.&lt;/p&gt;

&lt;p&gt;python -m ensurepip --upgrade&lt;br&gt;
Download Package&lt;br&gt;
Open up your terminal/cmd and install it using the pip command.&lt;/p&gt;

&lt;p&gt;pip install autowhatspy&lt;br&gt;
Programming&lt;br&gt;
Now comes the programming part. To send a single text or image (or both) message to single/multiple contacts through WhatsApp, we have to use the message_to_contacts function from the package. Here’s the function and the arguments needed.&lt;/p&gt;

&lt;p&gt;message_to_contacts(msg, contacts, gechodriver, gechodriver_log, user_profile, image)&lt;br&gt;
Arguments&lt;br&gt;
msg — Path to the text file containing the message text.&lt;/p&gt;

&lt;p&gt;I created a file names goodnight.txt that contains just one line saying “Good night, babe”. The content of the file looks like this:&lt;/p&gt;

&lt;p&gt;Good night, honey&lt;br&gt;
contacts — Path to the text file containing the list of contacts.&lt;/p&gt;

&lt;p&gt;In this case, it just contained the name of her contact name. The content of the file contacts.txt looks like this:&lt;/p&gt;

&lt;p&gt;Bae II&lt;br&gt;
The names in the text file should be exactly the same as they are saved on your phone. You must be already talking to them on WhatsApp.&lt;/p&gt;

&lt;p&gt;gechodriver — Path to the gechodriver.exe file. Download the gechodriver.exe (link here) and send the path as an argument. You may use the absolute path or the relative path based on how your interpreter works. Make sure gechodriver.exe is in the same project folder you are working on. Or add the folder where gechodriver.exe is located in the PATH. Otherwise, an error might occur. If you still get an error, downgrade selenium to version 2.53.6.&lt;/p&gt;

&lt;p&gt;gechodriver_log — Path to the text file where the logs of gechodriver will be saved. Make sure gechodriver.log is in the same project folder you are working on. Otherwise, an error might occur.&lt;/p&gt;

&lt;p&gt;user_profile — Path to the saved firefox user profile.&lt;/p&gt;

&lt;p&gt;Open firefox. Go to about:profiles and make a new profile.&lt;br&gt;
Save it in your project directory with whatever name firefox assigns it.&lt;br&gt;
Open that profile, open web.whatsapp.com and scan the QR.&lt;br&gt;
Send the path of the profile as the argument to the function.&lt;br&gt;
image — (Optional) Path to the image/video you want to send. Make sure that it is supported by WhatsApp and is of the permissible length.&lt;br&gt;
Before I show you the code, I have a little request. Please become a member of Medium. Just for 5$ per month, you can read any article on Medium (not just my articles, any article). Click the link below. If you join from my referral link, I will get a little commission which will be very helpful for me in paying my bills.&lt;/p&gt;

&lt;p&gt;Code&lt;br&gt;
&lt;code&gt;from datetime import datetime&lt;br&gt;
import autowhatspy&lt;br&gt;
import os&lt;br&gt;
import time&lt;br&gt;
path = os.path.dirname(os.path.realpath(__file__)) + "\\"&lt;br&gt;
msg = path + "msg.txt"&lt;br&gt;
contacts = path + "contacts.txt"&lt;br&gt;
gechodriver = path + "gechodriver.exe"&lt;br&gt;
gechodriver_log = path + "gecholog.txt"&lt;br&gt;
user_profile = path + "firefoxprofile"&lt;br&gt;
while True:&lt;br&gt;
    now = datetime.now()&lt;br&gt;
    current_time = now.strftime("%H%M")&lt;br&gt;
    if current_time == "2315":&lt;br&gt;
        autowhatspy.message_to_contacts(msg, contacts, gechodriver, gechodriver_log, user_profile)&lt;br&gt;
        time.sleep(60)&lt;br&gt;
    else:&lt;br&gt;
        time.sleep(30)&lt;/code&gt;&lt;br&gt;
This sends her a “Good night, honey” text precisely at 11:15 PM. The code checks the current time every 30 seconds and when the time reaches 11:15 PM, it sends the text. If your PC runs 24/7, you can just keep this code running forever and ever and ever and ever and ever… (until she leaves you)&lt;/p&gt;

&lt;p&gt;Conclusion&lt;br&gt;
I dunno if she found out that I was using a bot to send her texts or not, but, (SPOILER ALERT), she broke up. So, now I have to code a bot to block her on WhatsApp, cause I am too weak to do it myself.&lt;/p&gt;

&lt;p&gt;Then I also have to make a bot to flirt with another girl I like. That’s a lot of bots. Let’s use them as much as we can before the machine revolution happens.&lt;/p&gt;

&lt;p&gt;Follow me to get notified when I code those bots as well.&lt;/p&gt;

&lt;p&gt;I’d love to hear your thoughts about this, so feel free to reach out to me in the comments below!&lt;/p&gt;

&lt;p&gt;— If this article helped you in any way, consider sharing it with 2 friends you care about.&lt;/p&gt;

&lt;p&gt;Till then stay alive.&lt;br&gt;
&lt;a href="https://pythonians.medium.com/i-made-a-python-bot-to-send-good-night-texts-to-my-gf-7c290273a01a"&gt;Original post -medium&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Create Personal Portfolio Using Github Api with Blog</title>
      <dc:creator>thirumald</dc:creator>
      <pubDate>Mon, 25 Jul 2022 06:51:00 +0000</pubDate>
      <link>https://dev.to/thirumald/create-personal-portfolio-using-github-api-with-blog-5125</link>
      <guid>https://dev.to/thirumald/create-personal-portfolio-using-github-api-with-blog-5125</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://dev.to/arifszn/create-personal-portfolio-using-github-api-with-blog-1a57
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Synchronous VS Asynchronous - Javascript (Simple Examples)</title>
      <dc:creator>thirumald</dc:creator>
      <pubDate>Mon, 25 Jul 2022 04:13:00 +0000</pubDate>
      <link>https://dev.to/thirumald/synchronous-vs-asynchronous-javascript-simple-examples-2fef</link>
      <guid>https://dev.to/thirumald/synchronous-vs-asynchronous-javascript-simple-examples-2fef</guid>
      <description>&lt;h2&gt;
  
  
  JavaScript is a single-threaded, non-blocking, asynchronous, concurrent programming language with lots of flexibility.
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Javascript is synchronous “by default”. Meaning, the next line of code cannot run until the current one has finished. The next function cannot run until the current one has been completed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;But when it comes to asynchronous, blocks of code run in parallel, and functions are processed independently.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WDfH1g_z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0ovpk0gwjblmouru9dg4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WDfH1g_z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0ovpk0gwjblmouru9dg4.png" alt="Image description" width="880" height="492"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Asynchronous programming
&lt;/h2&gt;

&lt;p&gt;Asynchronous programming, conversely, is a multithreaded model that’s most applicable to networking and communications. Asynchronous is a non-blocking architecture, which means it doesn’t block further execution while one or more operations are in progress.&lt;/p&gt;

&lt;p&gt;With asynchronous programming, multiple related operations can run concurrently without waiting for other tasks to complete. During asynchronous communication, parties receive and process messages when it’s convenient or possible to do so, rather than responding immediately upon receipt.&lt;/p&gt;

&lt;p&gt;Texting is an asynchronous communication method. One person can send a text message and the recipient can respond at their leisure. In the meantime, the sender may do other things while waiting for a response.&lt;/p&gt;

&lt;h2&gt;
  
  
  Synchronous programming
&lt;/h2&gt;

&lt;p&gt;Synchronous is known as a blocking architecture and is ideal for programming reactive systems. As a single-thread model, it follows a strict set of sequences, which means that operations are performed one at a time, in perfect order. While one operation is being performed, other operations’ instructions are blocked. The completion of the first task triggers the next, and so on.&lt;/p&gt;

&lt;p&gt;To illustrate how synchronous programming works, think of a telephone. During a phone call, while one person speaks, the other listens. When the first person finishes, the second tends to respond immediately.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to use async
&lt;/h2&gt;

&lt;p&gt;Asynchronous programming should only be used in programming independent tasks, where it plays a critical role. For instance, asynchronous programs are ideal for development projects with a large number of iterations. Because steps don’t have to follow a fixed sequence, asynchronous programming keeps development moving forward.&lt;/p&gt;

&lt;p&gt;Responsive UI is a great use case for asynchronous planning. Take, for example, a shopping app. When a user pulls up their order, the font size should increase. Instead of first waiting to load the history and update the font size, asynchronous programming can make both actions happen simultaneously.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to use sync
&lt;/h2&gt;

&lt;p&gt;Asynchronous programming is relatively complex. It can overcomplicate things and make code difficult to read. Synchronous programming, on the other hand, is fairly straightforward; its code is easier to write and doesn’t require tracking and measuring process flows (as async does). Because tasks are dependent on each other, there’s a need to know if they could run independently without interrupting each other.&lt;/p&gt;

&lt;p&gt;Synchronous programming could be appropriate for a shopping app, for example. When checking out online, a user wants to buy all of their items together, not individually. Instead of completing an order every time the user adds something to their cart, synchronous programming ensures that the payment method and shipping destination for all items are selected at the same time.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to choose between asynchronous and synchronous programming
&lt;/h2&gt;

&lt;p&gt;When deciding which approach to take, it may be helpful to think of asynchronous programming as adaptable, and synchronous programming as strict. Asynchronous programming is the multitasker, moving from one task to the other and alerting the system when each one is complete. Synchronous programming functions as a one-track mind, checking off one task at a time in a rigid sequence.&lt;/p&gt;

&lt;p&gt;Asynchronous programming allows more things to be done at the same time and is typically used to enhance the user experience by providing an effortless, quick-loading flow.&lt;/p&gt;

&lt;p&gt;Synchronous programming is best utilized in reactive systems. While it is simpler for developers to code and is recognized by every programming language, sync is resource-intensive and can slow things down.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.mendix.com/blog/asynchronous-vs-synchronous-programming/"&gt;This post was originally published by mendix&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.outsystems.com/blog/posts/asynchronous-vs-synchronous-programming/"&gt;other sources by outsystems&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.freecodecamp.org/news/synchronous-vs-asynchronous-in-javascript/"&gt;other sources by freecodecamp&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
