<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[HelloBetter - Medium]]></title>
        <description><![CDATA[We develop and offer psychological digital therapeutics translating scientifically validated cognitive behavioural therapy approaches into an online course experience. - Medium]]></description>
        <link>https://medium.com/hellobetter-engineering?source=rss----60c76f17883d---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>HelloBetter - Medium</title>
            <link>https://medium.com/hellobetter-engineering?source=rss----60c76f17883d---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 12:43:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/hellobetter-engineering" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Streamlining CI/CD with Jenkins and SonarQube at HelloBetter]]></title>
            <link>https://medium.com/hellobetter-engineering/streamlining-ci-cd-with-jenkins-and-sonarqube-at-hellobetter-d67d981ea135?source=rss----60c76f17883d---4</link>
            <guid isPermaLink="false">https://medium.com/p/d67d981ea135</guid>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[groovy]]></category>
            <category><![CDATA[jenkins]]></category>
            <dc:creator><![CDATA[Amit Gupta]]></dc:creator>
            <pubDate>Wed, 17 May 2023 09:13:33 GMT</pubDate>
            <atom:updated>2023-05-17T09:13:33.477Z</atom:updated>
            <content:encoded><![CDATA[<p>At HelloBetter, we strive to maintain high-quality code and seamless integration and deployment processes for our numerous backend microservices and frontend projects. To achieve this, we’ve implemented a continuous integration and deployment (CI/CD) pipeline using Jenkins, along with code quality checks through SonarQube. In this blog post, we’ll walk you through our setup, shared library structure, and the benefits of this approach.</p><p>Setting Up Jenkins: Our journey began with setting up Jenkins on a Telekom server running Ubuntu 20. We followed these steps to install Jenkins:</p><pre>wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -<br>sudo sh -c &#39;echo deb http://pkg.jenkins.io/debian-stable  binary/ &gt; /etc/apt/sources.list.d/jenkins.list&#39;<br>sudo apt update<br>sudo apt install jenkins<br>sudo systemctl start jenkins</pre><p>Creating a Jenkins Shared Library: To streamline our Jenkins pipeline, we designed a shared library that consists of independent Groovy scripts. This library is shared across all our repositories and is automatically imported at the beginning of each Jenkins job, allowing the Jenkinsfile to utilize these functions.</p><p>Shared Library Code Structure:</p><pre>-vars<br>- dockerBuild.groovy<br>- unitTest.groovy<br>- npmPublish.groovy<br>- ...</pre><p>Sample Groovy Function:</p><pre>#!/usr/bin/env groovy<br>def call() {<br>  sh &#39;&#39;&#39;<br>    docker-compose rm -f<br>    docker-compose pull<br>    docker-compose up --build --exit-code-from test<br>    docker-compose down<br>  &#39;&#39;&#39;<br>}</pre><p>This sample code demonstrates how we run our test cases, which are completely dockerized.</p><p>Sample Jenkins Job File: Our Jenkins job files are clean and straightforward, thanks to the shared library functions. Here’s a sample Jenkinsfile:</p><pre>pipeline {<br>  libraries {<br>    lib(&#39;jsl&#39;) // Shared library imported at the start of job <br>  }<br>  agent any<br>  parameters {<br>    choice(name: &#39;***&#39;, choices: [&#39;***&#39;], description: &#39;&#39;)<br>    choice(name: &#39;***&#39;, choices: [&#39;***&#39;], description: &#39;&#39;)<br>  }<br>  stages {<br>    stage (&#39;Sonarqube &amp; Unit Test&#39;) {<br>      agent any<br>      when { anyOf { branch pattern: &quot;(feature|release|hotfix|fix|docs|style|refactor|perf|test|chore)/([A-Za-z]+-\\d+).*&quot;, comparator: &quot;REGEXP&quot;; } }<br>      steps {<br>        unitTest()<br>        sonarQubeTest()<br>      }<br>    }<br>    stage (&#39;Build&#39;) {<br>      when { anyOf { branch &quot;develop&quot;; tag &quot;q*&quot;; tag &quot;s*&quot;; tag &quot;v*&quot; } }<br>      steps {<br>        dockerBuild()<br>      }<br>    }<br>    stage (&#39;Dev Deploy&#39;) {<br>      when { branch &quot;develop&quot; }<br>      steps {<br>        devDeploy()<br>      }<br>    }<br>    stage (&#39;QA Deploy&#39;) {<br>      when { tag &quot;q*&quot; }<br>      steps {<br>        qaDeploy()<br>      }<br>    }<br>    stage (&#39;Staging Deploy&#39;) {<br>      when { tag &quot;s*&quot; }<br>      steps {<br>        echo &#39;Deploying only because this commit is tagged...&#39;<br>        stagingDeploy()<br>      }<br>    }<br>    stage (&#39;Production Deploy&#39;) {<br>      when { tag &quot;v*&quot; }<br>      steps {<br>        echo &#39;Deploying only because this commit is tagged...&#39;<br>        prodDeploy()<br>      }<br>    }<br>  }<br>  post {<br>    always {<br>        cleanWs()<br>    }<br>  }<br>}</pre><p>Integrating SonarQube for Code Quality Checks: To ensure that code quality checks are passed before the pull request (PR) review, we integrated SonarQube into our Jenkins pipeline. Our SonarQube Groovy code is as follows:</p><pre>#!/usr/bin/env groovy<br>def call() {<br>  def scannerHome = tool &#39;SonarScanner 4.6&#39;;<br>  println params<br>  withSonarQubeEnv(&#39;***&#39;) { <br>    def Result = sh (script: &quot;${scannerHome}/bin/sonar-scanner -Dsonar.login=$SONAR_AUTH_TOKEN -Dsonar.projectKey=${params.PROJECT} -Dsonar.host.url=$SONAR_HOST_URL -Dsonar.javascript.lcov.reportPaths=coverage/lcov.info&quot;, returnStdout: true)<br>    println Result<br>  }<br>  sleep(10)<br>  timeout(time: 10, unit: &#39;MINUTES&#39;) {<br>    waitForQualityGate abortPipeline: true<br>  }<br>}</pre><p>In the Jenkinsfile, sonarQubeTest() is executed every time new code is pushed to any branch.</p><p>Setting Quality Gates: To maintain code quality, we’ve set up quality gates with specific criteria. If any of these quality gates fail, the PR cannot be merged.</p><p>Conclusion: By implementing a CI/CD pipeline with Jenkins and SonarQube, we have streamlined our development process at HelloBetter, ensuring high-quality code and seamless integration and deployment across our projects. Our shared library approach keeps our Jenkinsfiles clean, while quality gates in SonarQube help us maintain a high standard of code quality throughout the development process.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d67d981ea135" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hellobetter-engineering/streamlining-ci-cd-with-jenkins-and-sonarqube-at-hellobetter-d67d981ea135">Streamlining CI/CD with Jenkins and SonarQube at HelloBetter</a> was originally published in <a href="https://medium.com/hellobetter-engineering">HelloBetter</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[NodeJS guide for consuming and publishing messages to RabbitMQ]]></title>
            <link>https://medium.com/hellobetter-engineering/nodejs-guide-for-consuming-and-publishing-messages-to-rabbitmq-26747407e62f?source=rss----60c76f17883d---4</link>
            <guid isPermaLink="false">https://medium.com/p/26747407e62f</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[queue-management-system]]></category>
            <category><![CDATA[rabbitmq]]></category>
            <category><![CDATA[backend-development]]></category>
            <category><![CDATA[amqp]]></category>
            <dc:creator><![CDATA[Saurabh Kushwaha]]></dc:creator>
            <pubDate>Fri, 14 Apr 2023 08:45:53 GMT</pubDate>
            <atom:updated>2023-04-14T08:45:53.762Z</atom:updated>
            <content:encoded><![CDATA[<p>This article will show you how to consume and publish RabbitMQ queues using NodeJS.</p><blockquote>RabbitMQ is a message-queueing software also known as a message broker or queue manager. Simply said; it is software where queues are defined, to which applications connect in order to transfer a message or messages.</blockquote><blockquote>A message can include any kind of information. It could, for example, have information about a process or task that should start on another application (which could even be on another server), or it could be just a simple text message. The queue-manager software stores the messages until a receiving application connects and takes a message off the queue. The receiving application then processes the message.</blockquote><blockquote>Source: <a href="https://www.cloudamqp.com/blog/2015-05-18-part1-rabbitmq-for-beginners-what-is-rabbitmq.html"><em>https://www.cloudamqp.com/blog/2015-05-18-part1-rabbitmq-for-beginners-what-is-rabbitmq.html</em></a></blockquote><p>If you are reading this article, you should have some basic understanding of what and how Rabbit works</p><p>Check out the following links to understand the basics of RabbitMQ</p><ul><li><a href="https://hevodata.com/learn/rabbitmq-queue/">Understanding RabbitMQ Queue &amp; Messaging Simplified 101 - Learn | Hevo</a></li><li><a href="https://www.cloudamqp.com/blog/part1-rabbitmq-for-beginners-what-is-rabbitmq.html">Part 1: RabbitMQ for beginners - What is RabbitMQ? - CloudAMQP</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2sO2mW-SatkBlUo8DGOu3A.png" /></figure><p>When connecting to RabbitMQ servers, developers often make mistakes. It is not clear to them what connections and channels are inside RabbitMQ. Occasionally, apps create unnecessary multiple connections that cause RabbitMQ servers to consume a lot of RAM. Often apps crash whenever the RabbitMQ server is down or rebooted, or when the app’s connection to it is broken.</p><h3>Basic requirements for client apps</h3><ul><li>A client app should automatically connect to the RabbitMQ server if the RabbitMQ server goes down or a client app connection breaks.</li><li>In order to not exhaust RabbitMQ memory, don’t create unnecessary RabbitMQ connections per process</li></ul><h3>In short</h3><ul><li>In each process, we will create a single connection, with event listener callbacks on an error and close events to allow auto-connection</li><li>Then we will create a publisher and consumer channel using the above connection with event listener callbacks on an error and close events for logging and setting the publisher channel to null on close events.</li><li>Then we will assert (create if missing) queues and assign consumer processing functions to consume messages from the consumer queue channel.</li></ul><h3>Install the RabbitMQ client package</h3><p>We will install <a href="https://www.npmjs.com/package/amqplib">amqplib</a> for Node JS applications</p><pre>npm install amqplib --save</pre><h3>Create a connection to the RabbitMQ server</h3><p>Using the amqplib library, the app will create the connection on boot. The app requires connection configurations, which can be either a string or a JS object.</p><pre>const connectionConfig = {<br>  protocol: &#39;amqp&#39;,<br>  hostname: &#39;localhost&#39;,<br>  port: 5672,<br>  username: &#39;guest&#39;,<br>  password: &#39;guest&#39;,<br>  locale: &#39;en_US&#39;,<br>  frameMax: 0,<br>  heartbeat: 60,<br>  vhost: &#39;/&#39;<br>};</pre><p>or</p><pre>export connectionConfig=amqp://**user**:**password**:**url**</pre><p>Connection code.</p><pre>// connection.js<br>const init = (connectionConfig, options, callback) =&gt; {<br>  // Start connection with Rabbitmq<br>  amqplib.connect(config, { clientProperties: { connection_name: options.connection_name } }, (err, conn) =&gt; {<br>    // If connection error<br>    if (err) {<br>      console.error(`[AMQP] ${err.message}`);<br>      return setTimeout(() =&gt; {<br>        module.exports.init(clientConfig, clientOptions, callback);<br>      }, 1000);<br>    }<br>    conn.on(&#39;error&#39;, function (error) {<br>      console.error(`[AMQP] ${error.message}`);<br>      if (error.message !== &#39;Connection closing&#39;) {<br>        console.log.error(`[AMQP] ${error.message}`);<br>      }<br>    });<br>    conn.on(&#39;close&#39;, function () {<br>      // Reconnect when connection was closed<br>      console.info(&#39;[AMQP] reconnecting&#39;);<br>      return setTimeout(() =&gt; {<br>        module.exports.init(clientConfig, clientOptions, callback);<br>      }, 1000);<br>    });<br>    // Connection OK<br>    console.info(&#39;[AMQP] Connection with Rabbitmq was successful&#39;);<br>    amqpConn = conn;<br>    // Execute callback function<br>    callback();<br>  });<br>};<br>// connection.js</pre><p>In the above code, we define a one-argument callback, it executes when the connection with RabbitMQ is successful. If not, we will try to reconnect them as many times as possible.</p><p>Let us test the connection</p><pre>// index.js<br>Connection.init(config, options, () =&gt; {<br>  console.info(&#39;[AMQP] Connection with Rabbitmq was successful&#39;);<br>});</pre><h3>Create a publisher using the above connection</h3><p>After we have created a connection with RabbitMQ, let’s create a publisher that will send messages to the RabbitMQ server.</p><p>The following code will first create a publisher channel and a publish function to send messages to RabbitMQ</p><pre>// publisher.js<br>let pubChannel;<br>exports.start = (publisherQueues) =&gt; {<br>  // Init publisher<br>  const amqpConn = RMQConnection();<br>  amqpConn.createConfirmChannel(function (err, ch) {<br>    if (closeOnErr(err)) return;<br>    ch.on(&#39;error&#39;, function (error) {<br>      console.error(`[AMQP] ${error.message}`);<br>    });<br>    ch.on(&#39;close&#39;, function () {<br>      pubChannel = null;<br>      console.error(&#39;[AMQP] channel closed&#39;);<br>    });<br>    // Set publisher channel<br>    pubChannel = ch;<br>    // Create all queues<br>    Object.values(publisherQueues).forEach((queue) =&gt; pubChannel.assertQueue(queue, { durable: true }));<br>    console.info(&#39;[AMQP] Publisher Started&#39;);<br>  });<br>};</pre><pre>exports.publish = (queue, message) =&gt; {<br>  if (process.env.NODE_ENV === &#39;test&#39;) return;<br>  const console = getconsole();<br>  if (!pubChannel) {<br>    console.error(<br>      &quot;[AMQP] Can&#39;t publish message. Publisher is not initialized. You need to initialize them with StartPublisher function&quot;<br>    );<br>    return;<br>  }<br>  const msg = JSON.stringify(message);<br>  try {<br>    pubChannel.sendToQueue(queue, Buffer.from(msg), { persistent: true });<br>    console.info(`[AMQP] Message sent to queue : ${msg}`);<br>  } catch (error) {<br>    console.error(`[AMQP] publish error ${error.message}`);<br>  }<br>};</pre><pre>function closeOnErr(err, console) {<br>  if (!err) return false;<br>  console.error(`[AMQP] ${err}`);<br>  const amqpConn = RMQConnection();<br>  amqpConn.close();<br>  return true;<br>}<br>// publisher.js</pre><p>publish() takes two arguments</p><ul><li><em>queue</em>: Name of the queue</li><li><em>message</em>: Message to be sent to the queue</li></ul><p>Let us publish our first message</p><pre>// index.js<br>// InitConnection of rabbitmq<br>// queues: array of queue names<br>Connection.init(config, options, () =&gt; {<br>  Publisher.start(queues)<br>  console.info(&#39;[AMQP] Connection with Rabbitmq was successful&#39;);<br>});</pre><pre>// We wait 5 seconds after send a message to queue. ONLY FOR TEST PURPOSES<br>setTimeout(() =&gt; {<br>    // We send a message to queue<br>    Publisher.publish(&quot;test&quot;, &quot;&quot;, &quot;test message from nodejs&quot;);<br>}, 5000);<br>// index.js</pre><h3>Create a consumer</h3><p>Now that we have the ability to publish messages, let’s consume them.</p><p>In the following code, we will prefetch 5 messages, but it can be adjusted according to the needs or set up using environment or configuration variables.</p><pre>// consumer.js<br>module.exports = {<br>  start: (queue, process) =&gt; {<br>    // Create a channel for queue<br>    amqpConn.createChannel(function(err, ch) {<br>      if (closeOnErr(err)) return;<br>      ch.on(&quot;error&quot;, function(err) {<br>        console.error(&quot;[AMQP] channel error&quot;, err.message);<br>      });<br>      ch.on(&quot;close&quot;, function() {<br>        console.log(&quot;[AMQP] channel closed&quot;);<br>      });<br>      // Set prefetch value<br>      ch.prefetch(process.env.CLOUDAMQP_CONSUMER_PREFETCH ? process.env.CLOUDAMQP_CONSUMER_PREFETCH : 5);<br>      // Connect to queue<br>      ch.assertQueue(queue, { durable: true }, function(err, _ok) {<br>        if (closeOnErr(err)) return;<br>          // Consume incoming messages<br>          ch.consume(queue, processMsg, { noAck: false });<br>          console.log(&quot;[AMQP] Worker is started&quot;);<br>        });<br>        function processMsg(msg) {<br>          // Process incoming messages and send them to process<br>          // Here we need to send a callback(true) for acknowledge the message or callback(false) for reject them<br>          process(msg, function(ok) {<br>            try {<br>              ok ? ch.ack(msg) : ch.reject(msg, true);<br>            } catch (e) {<br>              closeOnErr(e);<br>            }<br>          });<br>        }<br>     });<br>  }<br>}</pre><pre>function closeOnErr(err) {<br>    if (!err) return false;<br>    console.error(&quot;[AMQP] error&quot;, err);<br>    amqpConn.close();<br>    return true;<br>}<br>// consumer.js</pre><p>StartConsumer function takes two arguments.</p><ul><li><strong><em>queue</em></strong>: Name of the queue.</li><li><strong><em>process</em></strong>: function to be executed when a message is received.</li></ul><p>Let us test our consumers. At this time, we also need to generate the function that will be executed when a message arrives from the queue, called <em>process()</em>.</p><pre>// index.js<br>// consumer process function<br>function process(msg, callback) {<br>    console.log(&quot;Received message: &quot;, msg.content.toString());<br>    // we tell rabbitmq that the message was processed successfully<br>    callback(true);<br>}</pre><pre>// InitConnection of rabbitmq<br>// queues: array of queue names<br>Connection.init(config, options, () =&gt; {<br>  Publisher.start(queues)<br>  Consumer.start(&quot;test&quot;, process);<br>  console.info(&#39;[AMQP] Connection with Rabbitmq was successful&#39;);<br>});</pre><pre>// We wait 5 seconds after send a message to queue. ONLY FOR TEST PURPOSES<br>setTimeout(() =&gt; {<br>    // We send a message to queue<br>    Publisher.publish(&quot;test&quot;, &quot;&quot;, &quot;test message from nodejs&quot;);<br>}, 5000);<br>// index.js</pre><p>With everything in place, we have a publisher pushing messages and a consumer receiving them.</p><h3>Ending notes</h3><p>If you are interested, you can easily integrate the above code into any Node JS app by using this npm package.</p><p><a href="https://github.com/saubi1993/amqp-client">GitHub - saubi1993/amqp-client: amqp-client</a></p><p>Thank you for taking the time to read this.</p><p><a href="https://www.linkedin.com/in/saubi7/">https://www.linkedin.com/in/saubi7/</a></p><p>References:</p><ul><li><a href="https://www.cloudamqp.com/blog/part1-rabbitmq-for-beginners-what-is-rabbitmq.html">Part 1: RabbitMQ for beginners - What is RabbitMQ? - CloudAMQP</a></li><li><a href="https://www.rabbitmq.com/networking.html">Networking and RabbitMQ</a></li><li><a href="https://www.cloudamqp.com/blog/part2-2-rabbitmq-for-beginners_example-and-sample-code-node-js.html">Part 2.2: Getting started with RabbitMQ and Node.js - CloudAMQP</a></li><li><a href="https://amqp-node.github.io/amqplib/channel_api.html">amqplib</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=26747407e62f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hellobetter-engineering/nodejs-guide-for-consuming-and-publishing-messages-to-rabbitmq-26747407e62f">NodeJS guide for consuming and publishing messages to RabbitMQ</a> was originally published in <a href="https://medium.com/hellobetter-engineering">HelloBetter</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Machine Learning Lifecycle — From experiment to production: Part I — Introduction]]></title>
            <link>https://medium.com/hellobetter-engineering/the-machine-learning-lifecycle-from-experiment-to-production-part-i-introduction-989ec404b4a0?source=rss----60c76f17883d---4</link>
            <guid isPermaLink="false">https://medium.com/p/989ec404b4a0</guid>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[ml-pipeline]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Vincent Bremer]]></dc:creator>
            <pubDate>Thu, 06 Apr 2023 12:51:02 GMT</pubDate>
            <atom:updated>2023-04-06T12:51:01.974Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Machine Learning Lifecycle — From experiment to production: Part I — Introduction</h3><p>Welcome to today´s start of the series <em>‘The Machine Learning Lifecycle — From experiment to production’</em>. Data gathering, experimenting with different approaches or models to reach satisfying predictive performance or inference metrics, and finally deploying a machine learning model in production can be burdensome — <a href="https://venturebeat.com/ai/why-do-87-of-data-science-projects-never-make-it-into-production/">only nine out of ten data science projects make it to production</a>. This is a scary number — one reason being the interdependences between model, features and target (data), and generally the developed code crucial for successfully deploying a machine learning model.</p><p>The MLOps principle could help out here — it is a suitable principle to bring a machine learning model into production. This process makes stable data available through automation, which can be efficiently utilized in production to re-train models and serve them to the end user. Furthermore, it saves time on various manual steps that need to be executed and fosters faster development and deployment by simultaneously increasing the quality of the developed solution.</p><p><em>From experiment to production </em>means that I will portrait various steps of the machine learning lifecycle from a theoretical as well as from a practical point of view. These portraits are discussable, and I am very much looking forward to all of your comments. The following entries are currently planned to be released:</p><h3>Theoretically building up a machine learning experiment</h3><p>In this part of the series, I will highlight the importance of defining the Use Case of a machine learning project and the target that is to be analyzed. Furthermore, I will focus on how to build and validate a machine learning model using various performance metrics for predictive projects. This part will be more theory-based and not much practical application will be covered. However, this changes in the upcoming parts of <em>‘The Machine Learning Lifecycle — From experiment to production’</em>.</p><h3>Data retrieval and ingestion</h3><p>This part of the series will be about different concepts on how to extract various raw data sources, transform them, and load them into a data warehouse (the last two statements are switchable). I will focus on Airflow in this series and how to implement it to extract raw data sources. I will also talk briefly about DBT for transforming raw data into an actionable state.</p><h3>Feature engineering &amp; feature storage</h3><p>This part of the series will focus on the art of feature engineering. It will reveal important factors that need attention during this process and, ultimately, will focus on how to make this process sharable, reusable, and manageable using a feature store. For this, I will be using the Feature Store tool Feast.</p><h3>Model development and artifact tracking</h3><p>This part of the series will be about how to track machine learning experiments, model artifacts, and how to put these models into production. For this, I will showcase the tool MLFow.</p><h3>Model serving and other notes</h3><p>In this part, I want to discuss options to serve a machine learning model in production based on the aforementioned parts of the series. Furthermore, I want to briefly highlight considerations that have not been addressed in this blog-series.</p><p>I am very much looking forward to the next part of this series and diving deeper into how to build a complete machine learning lifecycle with you. Stay tuned!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=989ec404b4a0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hellobetter-engineering/the-machine-learning-lifecycle-from-experiment-to-production-part-i-introduction-989ec404b4a0">The Machine Learning Lifecycle — From experiment to production: Part I — Introduction</a> was originally published in <a href="https://medium.com/hellobetter-engineering">HelloBetter</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DTx and Data Security]]></title>
            <link>https://medium.com/hellobetter-engineering/dtx-and-data-security-8c3c4ff24396?source=rss----60c76f17883d---4</link>
            <guid isPermaLink="false">https://medium.com/p/8c3c4ff24396</guid>
            <dc:creator><![CDATA[Amit Gupta]]></dc:creator>
            <pubDate>Tue, 07 Mar 2023 14:14:57 GMT</pubDate>
            <atom:updated>2023-03-07T14:14:57.683Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*Qt8omZyjRP8K_LwdoKkMtw.png" /></figure><p>Leaving billions of people locked into their homes for an indefinite period of time, COVID-19 has brought mental health <a href="https://hellobetter.de/en/company/insights/digital-mental-health-market/">to the centre of focus in the healthcare industry</a>. Clearly, investors have picked up on this dynamic, investing record numbers into Digital Mental Health quarter after quarter.</p><p>The mental health startups can be segregated into 2 categories</p><ul><li>Wellness Startups (for example, Headspace and Calm) focus on one’s overall wellness and can be used anytime.</li><li>Digital Therapeutics (DTx; for example, <a href="http://hellobetter.de/">HelloBetter</a>) help treat a particular clinical condition like Depression or Burnout.</li></ul><p>We at Hellobetter, being a DTx company, have made sure that User privacy and data security is of utmost importance and is always on our mind when building our HelloBetter mobile application. The 3 most important aspects of User data and data security are the following:</p><h3>Zero Data Loss</h3><p>How to ensure that data entered by users is never lost even if users don’t have a proper internet connection or if a user’s phone dies while entering data?</p><p>The answer to this question is pretty simple: “Offline Apps.” But offline apps often come with many challenges, especially when users use the application in both mobile and web products. There can be multiple problems that arise because of this: for example, data entered in the mobile app is not synced with the web app or vice versa. We have tackled this problem by following the hybrid approach of online-first-then-offline. In this approach, we try to sync all data to our servers before saving it in the local database (database in the mobile app) if the user has an internet connection. If the internet or server is unavailable (due to any reason), the mobile app saves the user’s data in the local database. This unsynced data is synced with our server with the help of background jobs. With this approach, we could minimize the syncing issues in our mobile and web apps and reduce the loss of any data entered by the user in our mobile app.</p><h3>Data Encryption in transit</h3><p>The second most important aspect is to make sure the data transferred from mobile apps to the server is encrypted. We use TLS (Transport layer security) to encrypt data when it travels from the mobile app to the server or vice versa. An important thing to pay attention to here is the use of the latest version, which is TLS1.3 or TLS1.2 with disabled unsafe cyphers. By default TLS1.1 and TLS1.0 are enabled, so don’t forgot to disable them on your server. We have explicitly disabled TLS1.1, TLS1.0, SSLv3 and SSLv2.</p><h3>Data Encryption at Rest</h3><p>In healthcare, apps are required to encrypt data while in transition and it’s recommended to encrypt data at rest in your databases. In our case, it means that we have to encrypt data on our database server and have to encrypt the data on the mobile app’s local database. On servers, this encryption can be done at 2 levels:</p><ul><li>Volume, or</li><li>Database</li></ul><p>Generally, you can achieve this by using a tool provided by the service providers like AWS, Google Cloud or Open Telekom Cloud. In our case, we are using Volume level encryption provided by the Open Telekom Cloud. For service providers that operate outside the EU (such as AWS or Microsoft Azure), encryption keys should not be handled by those providers (BYOK — “Bring-Your-Own-Key”). Once the data on our servers is encrypted the next task is to encrypt the data stored in the mobile app local database. For this, we are using a private key that is stored in keychain access to encrypt the local database.</p><p>These are the 3 basic security concepts that I wanted to share, and every Digital Health team should consider from the beginning of their product building. I will be talking more about these topics in our upcoming <a href="https://www.eventbrite.de/e/hellobetter-tech-lunch-registration-166290540483">HelloBetter Tech Lunch</a> event in our office on September 3rd that we host for the Berlin based Tech Community. I am especially excited to present our new mobile app which we are currently working on.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c3c4ff24396" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hellobetter-engineering/dtx-and-data-security-8c3c4ff24396">DTx and Data Security</a> was originally published in <a href="https://medium.com/hellobetter-engineering">HelloBetter</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Software Device Lifecycle of DTx Applications]]></title>
            <link>https://medium.com/hellobetter-engineering/software-device-lifecycle-of-dtx-applications-531298025b24?source=rss----60c76f17883d---4</link>
            <guid isPermaLink="false">https://medium.com/p/531298025b24</guid>
            <dc:creator><![CDATA[Amit Gupta]]></dc:creator>
            <pubDate>Tue, 07 Mar 2023 14:10:20 GMT</pubDate>
            <atom:updated>2023-03-07T14:10:20.223Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*EkcMMIUx8NKzHs3R27Jwyg.jpeg" /></figure><p>Every Software Engineer knows what Software Development Lifecycle means in the Agile methodology: it starts from gathering requirements to implementation of the product to testing the product and finally releasing the product for the users. However, it looks different in the world of Digital Therapeutics (DTx). The reason for this is that DTx are regulated products. Most of our products are medical devices regulated by the Medical Device Regulation. In order for us to be compliant in the European Union, we established a Quality Management System according to ISO 13485 which integrated other norms such as IEC 62304. In my following article, I share my experience of implementing such a regulated software development process. We spend much time fine tuning the device lifecycle for our HelloBetter platform and I am happy to share our approach with you.</p><p>The HB platform provides the necessary technical foundation to provide the content of each medical device. The platform is shared among all HelloBetter devices. The device consists of the platform in combination with the content layer. At HelloBetter, with the help of the experts such as Pascal from <a href="https://regulatory.me/">regulatory.me</a>, we set up a Software Device Lifecycle for the HB platform which is divided into the following phases. The following article will only focus on the tech related lifecycle phases.</p><ul><li>Exploration</li><li>Planning</li><li>Implementation</li><li>Verification and Validation</li><li>Release</li><li>Post Release</li><li>Retirement</li></ul><p>In this article, I will briefly talk about all the above-mentioned 7 phases and would like to cover them individually in detail in my upcoming articles.</p><h3>Exploration</h3><p>During this phase, opportunities for a new product (or new feature) are analyzed. Features are defined, and product and technical requirements are specified. The goal of this phase is to answer the following questions.</p><ul><li>What value is this product/feature gonna bring to our clients?</li><li>Whether it is feasible to build this feature with the technical skills we have?</li><li>How viable is this product/feature for the business?</li><li>What is the impact on the Technical Documentation?</li><li>For changes: Is it a significant change (according to Medical Device Regulation and/or DiGAV)?</li></ul><p>The product requirements generated during this phase form the basis for a subsequent planning phase, while the technical requirements form the basis for the technical implementation phase. At the same time, we cover similar exploration processes for the content part of our medical devices, which is built upon our HelloBetter Platform.</p><h3>Planning</h3><p>In this phase, we consume the products and technical requirements generated during the exploration to develop the following.</p><ul><li>Software Development Plan</li><li>Software Architectural Changes, &amp;</li><li>Software Detailed Design.</li></ul><p>We conduct the Planning phase in our workflow during Backlog-Refinement and Sprint Planning meetings. This planning session considers the release management and informs the team responsible for Technical Documentation. This early start of release management enables our teams to prepare necessary documentation well in advance and prepare notification of a Notified Body and/or BfArM (for our digital health applications), if applicable.</p><h3>Implementation</h3><p>During implementation, Software Engineers develop the product/feature and our QA team tests the developed product/features. This phase includes creating a branch, writing a codebase, reviewing the codebase and testing the product/feature. This is one of the most important phases and is followed by continuous phase reviews by our QMO.</p><h3>Verification and Validation</h3><p>As the name suggests, this phase is basically all about testing. However, the testing done in this phase is different from QA done in the Implementation phase. During V&amp;V, we verify and validate that the medical device developed works as intended — so, we prove whether we meet the intended purpose defined initially during Exploration. Once this phase is completed, we have a release candidate which is ready for release.</p><h3>Release</h3><p>Releasing a product/feature is a critical phase where we make sure the following things are in place.</p><ul><li>Technical Documentation regarding the release candidate</li><li>Teams are trained and informed about the release changes</li><li>If applicable, we have informed regulatory bodies and have got their approval.</li></ul><p>This process starts early as described in the Planning stage. Our teams have access to comprehensive checklists and templates that guide them through the process.</p><h3>Post Release</h3><p>During the Post Release phase, we monitor the product performances and feedback/complaints from users and customers. This includes our Post Market Surveillance and Change Control processes which ensure that we continue to deliver the best quality products to our clients and have appropriate measures to fix any incidents.</p><h3>Retirement</h3><p>In the Retirement phase, we define how to discontinue the production of a medical device (well, in case of software medical device this is rather about version management) and, if necessary, retire from the market.</p><p>I have briefly touched upon each phase of our HelloBetter Software Device Lifecycle in this article. During the following weeks, my team and I will share more details regarding each step of the lifecycle to provide a pragmatic and easy first step into the world of regulated software development. Please also check my previous post on <a href="https://www.linkedin.com/pulse/dtx-data-security-amit-gupta/">DTx and Data Security</a>.</p><p>If you want to learn more about HelloBetter, please visit our <a href="https://www.notion.so/HelloBetter-Culture-Guide-eb8de889fea749df8f71e76a466e9d07">Culture Guide</a>. #wearehiring</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=531298025b24" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hellobetter-engineering/software-device-lifecycle-of-dtx-applications-531298025b24">Software Device Lifecycle of DTx Applications</a> was originally published in <a href="https://medium.com/hellobetter-engineering">HelloBetter</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>