<?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[Stories by Mohamed Zrouga on Medium]]></title>
        <description><![CDATA[Stories by Mohamed Zrouga on Medium]]></description>
        <link>https://medium.com/@medzrouga?source=rss-645a99946be8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*RZuZW1n1Zwu6cn7C26agmw.jpeg</url>
            <title>Stories by Mohamed Zrouga on Medium</title>
            <link>https://medium.com/@medzrouga?source=rss-645a99946be8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 20:26:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@medzrouga/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[What Real Privileged Access Management Looks Like for SSH — and How to Self-Host It (Orion-Belt v1.0]]></title>
            <link>https://medzrouga.medium.com/what-real-privileged-access-management-looks-like-for-ssh-and-how-to-self-host-it-orion-belt-v1-0-18039604cb20?source=rss-645a99946be8------2</link>
            <guid isPermaLink="false">https://medium.com/p/18039604cb20</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Mohamed Zrouga]]></dc:creator>
            <pubDate>Thu, 16 Jul 2026 22:46:22 GMT</pubDate>
            <atom:updated>2026-07-16T22:46:22.112Z</atom:updated>
            <content:encoded><![CDATA[<h3>What Real Privileged Access Management Looks Like for SSH — and How to Self-Host It (Orion-Belt v1.0.0)</h3><p><em>A self-hosted SSH/SCP bastion with certificate authority, session recording, ReBAC, JIT approvals, and MFA — and a practical look at the access-control problems it’s solving.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OBlHbOT6ZEBsVLXNs_5oAg.png" /></figure><p>If you’ve ever tried to lock down SSH access at a real company, you know the drill. Someone needs “just one” production box for an hour. You either hand out a standing key that lives forever in someone’s ~/.ssh, or you open a ticket, wait for a bastion change, and hope the firewall rule gets cleaned up later. Multiply that by a few dozen engineers and a few hundred machines, and you end up with one of two outcomes: sprawling, unaudited SSH access — or a serious commercial PAM subscription.</p><p>Modern privileged access management tools solve this well, but they usually come as closed-source, hosted platforms. I wanted to understand — and build — the same core mechanics as something fully open and self-hostable: SSH certificate authority, session recording and replay, relationship-based access control, MFA, and time-boxed approvals.</p><p>That project is <strong>Orion-Belt</strong>, and this week it hit <strong>v1.0.0</strong>. Here’s how the underlying access-control problem works, what Orion-Belt does about it, and what’s new in this release.</p><h3>The problem with “just SSH into it”</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mj_aCLNKgYyR9mmIFqfX1w.png" /></figure><p>Traditional SSH access has a few structural problems that don’t show up until you’re operating at scale:</p><ul><li><strong>Credentials don’t expire.</strong> A key someone generated two jobs ago is often still authorized somewhere.</li><li><strong>There’s no approval trail.</strong> Access either exists or it doesn’t — there’s rarely a record of <em>why</em> someone had it.</li><li><strong>Bastions need inbound holes.</strong> Every target machine needs a listening SSH port reachable from the jump host, which is exactly the kind of network surface security teams spend their careers trying to shrink.</li><li><strong>Enterprise PAM tools solve this — behind a paywall.</strong> Certificate-based SSH, session recording, and JIT access requests are standard features in commercial products, but they’re rarely available as something you can self-host and audit yourself.</li></ul><p>Orion-Belt exists to close that gap.</p><h3>How it actually works</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tri635P9-JwBSBjexAQt0A.gif" /></figure><p>The core trick is a reversal of the usual bastion model: instead of the gateway reaching <em>into</em> your network to find a target machine, a lightweight <strong>agent</strong> runs on each target and dials <strong>out</strong> to the gateway over SSH. That one design choice removes the need for inbound firewall rules on every host you manage — the gateway is the only thing anyone ever connects to.</p><p>From there, everything else layers on top:</p><ul><li><strong>SSH Certificate Authority</strong> — issues short-lived user and host certificates instead of relying on long-lived keys</li><li><strong>ReBAC authorization</strong> (with optional OpenFGA) — fine-grained, relationship-based rules for who can reach which machine, as which remote user</li><li><strong>JIT temporary access</strong> — request-based access with admin approval, including ChatOps approvals in Slack, Discord, Teams, or Rocket.Chat</li><li><strong>Full session recording and live watch</strong> — replay any session after the fact, or watch one happening right now, with optional AES-GCM encryption at rest</li><li><strong>MFA everywhere</strong> — TOTP and WebAuthn/FIDO2 for the console, FIDO SSH keys for the terminal</li><li><strong>A role-aware web console</strong> — live terminal, file browser, session playback, audit trail, user/machine management</li><li><strong>Plain </strong><strong>ssh compatibility</strong> — you don&#39;t have to install a custom client; ssh user+machine@gateway works with vanilla OpenSSH if you&#39;d rather not touch the CLI tools</li></ul><p>Under the hood it’s Go on the server/agent side and a React console on top, shipping as Docker images, deb/rpm/apk packages with GPG-signed repos, or a single static binary if you want to build it yourself.</p><h3>What’s new in v1.0.0</h3><p>This release is the line in the sand: the point where the maintainers are calling the SSH PAM core <strong>stable</strong>, with a documented /api/v1 compatibility contract going forward. Highlights:</p><ul><li>A full <strong>permissions editor</strong> in the console — view every grant, edit remote users and TTLs, no more hand-editing config</li><li><strong>Recording compression</strong> (gzip) so session archives don’t eat your disk</li><li><strong>Live session watch</strong> — GET /sessions/:id/watch, or just click through from Sessions in the UI</li><li><strong>Notification templates and per-user preferences</strong></li><li>JIT access requests got sharper: optional access-type scoping, reject notifications, and stale-request expiry</li><li><strong>Password + TOTP login</strong> for console and CLI, alongside key-based login</li><li>JSON structured logs, Prometheus alerting examples, and a hardening/observability guide</li><li>A make release-smoke target and a documented release-criteria checklist, because &quot;stable&quot; should mean something</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DYYi34rA5-FWK2BeZb-1Aw.jpeg" /></figure><p>What v1.0.0 <em>isn’t</em>: a new protocol, and not yet an identity provider integration. OIDC, high availability, and support for protocols beyond SSH (think RDP/VNC) are next on the roadmap.</p><h3>Try it in about 10 minutes</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*59b38XQQL0J6VFpAcDfXSw.jpeg" /></figure><p>If you’ve got Docker, this is the whole setup:</p><pre>git clone https://github.com/orion-belt-dev/orion-belt.git<br>cd orion-belt<br>./scripts/docker-quickstart.sh</pre><p>That one script generates secrets, brings up the server, and bootstraps your first admin login — it prints the admin username and public key you need at the end, and it’s safe to re-run. Register an agent from the web console, drop the generated key on a target box, and you have a working PAM gateway with zero inbound ports opened on that machine.</p><h3>Why open-source this at all</h3><p>Because “audit-and-replay every privileged session” and “expire access automatically” shouldn’t be features you only get if you’re willing to sign an enterprise contract and hand a third party the keys to your infrastructure. Orion-Belt ships under Apache 2.0 with the Commons Clause — free to use, modify, and self-host, including internally at a company, with the license only withholding the right to resell Orion-Belt itself as a hosted product.</p><p>If you’re running infrastructure that other people need occasional, accountable access to — a homelab, a startup’s production fleet, a fleet of edge devices — it’s worth the ten minutes.</p><ul><li><strong>Repo:</strong> <a href="https://github.com/orion-belt-dev/orion-belt">github.com/orion-belt-dev/orion-belt</a></li><li><strong>Docs &amp; quickstart:</strong> <a href="https://orion-belt.dev/">orion-belt.dev</a></li><li><strong>v1.0.0 release notes:</strong> <a href="https://github.com/orion-belt-dev/orion-belt/releases/tag/v1.0.0">github.com/orion-belt-dev/orion-belt/releases/tag/v1.0.0</a></li></ul><p>If you try it, a GitHub star helps other people find it, and issues/PRs on rough edges are genuinely welcome — this is a v1.0.0, not a finished product. OIDC and HA are next; I’d rather build them against feedback from people actually running this than in a vacuum.</p><p><em>If you found this useful, follow for more on self-hosted infrastructure, Go, and building security tooling in the open.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18039604cb20" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Real-Time Network Monitor with eBPF — Cerberus]]></title>
            <link>https://medzrouga.medium.com/building-a-real-time-network-monitor-with-ebpf-cerberus-c6d16f3f0a16?source=rss-645a99946be8------2</link>
            <guid isPermaLink="false">https://medium.com/p/c6d16f3f0a16</guid>
            <dc:creator><![CDATA[Mohamed Zrouga]]></dc:creator>
            <pubDate>Thu, 05 Feb 2026 18:22:15 GMT</pubDate>
            <atom:updated>2026-02-05T18:22:15.828Z</atom:updated>
            <content:encoded><![CDATA[<h3>Building a Real-Time Network Monitor with eBPF — Cerberus</h3><p>The network is speaking. Every device connecting to your infrastructure, every DNS query, every TLS handshake — they’re all part of a conversation happening at line speed. The question is: <strong>are you listening?</strong></p><p>Traditional network monitoring tools copy packets into userspace, parse them with libraries like <strong>libpcap</strong>, and hope your CPU can keep up. This worked fine when networks were slower. But with IoT devices flooding networks and security threats evolving by the hour, traditional packet capture is showing its age.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UuEmwKsISvMMiH86.png" /><figcaption>Credit : iot-analytics (<a href="https://iot-analytics.com/number-connected-iot-devices/">https://iot-analytics.com/number-connected-iot-devices/</a>)</figcaption></figure><p>This is why I built <strong>Cerberus</strong>, an open-source network monitoring tool that leverages <strong>eBPF</strong> to watch traffic at the kernel level. Instead of copying every packet to userspace, Cerberus processes packets where they naturally flow — in the kernel’s networking stack — and <strong>only surfaces what matters</strong>.</p><h3>The Problem with Traditional Tools</h3><p>Traditional network monitoring follows a predictable pattern: capture everything, filter later. Tools like tcpdump are phenomenal for debugging, but they’re fundamentally reactive. You run them when something is already wrong.</p><p>For critical infrastructure — power grids, water systems, transportation networks — reactive monitoring isn’t enough. You need continuous visibility <strong>without adding performance bottlenecks</strong>. A busy network interface sees millions of packets per second. Copying all of them into userspace will overwhelm even powerful systems. <strong>This is where eBPF changes everything.</strong></p><h3>Why eBPF Changes the Game</h3><p>eBPF lets you run sandboxed programs in the Linux kernel without modifying kernel source. Think of it as JavaScript for the kernel — safe, verifiable, and powerful.</p><p>When a packet arrives, it travels through the kernel’s networking stack. With eBPF, you attach a program to that path and inspect packets as they flow through. No copying. No context switching. Just direct access at line speed.</p><p>Cerberus uses TC hooks to intercept packets. For each one, the eBPF program parses headers (Ethernet, IP, TCP, UDP, ICMP, ARP), extracts Layer 7 payload samples, classifies traffic, and writes 75 bytes of metadata to a ring buffer. That’s it — just the essentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GUYxZ1TL9b0xIuqlgjFK9A.png" /><figcaption>Packet Inspection with eBPF — Credit: AI generated</figcaption></figure><p><strong>The Architecture:</strong> In the kernel, specialized handlers process different protocols. ARP detects address probes and scans. TCP identifies connection states. UDP classifies DNS, DHCP, NTP. ICMP tracks echo requests and errors. Layer 7 inspectors extract DNS queries, HTTP methods, and TLS handshake indicators.</p><p>In userspace, a Go application polls the ring buffer. It enriches events with vendor information from the IEEE OUI database, tracks patterns with an LRU cache, and only alerts on new communication patterns. A local BuntDB database stores historical data, batched every 30 seconds for efficiency.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DzDq3mnxlDlKxxr1Ze82zg.png" /><figcaption>Architecture simplified — credit : AI generated</figcaption></figure><h3>Patterns That Emerge</h3><p>Network monitoring isn’t about individual packets —<strong> it’s about patterns.</strong></p><p>When a device joins your network, it announces itself with ARP probes. <strong>Cerberus</strong> catches this immediately, showing the MAC address, chosen IP, and vendor from the OUI database.</p><p>DNS traffic reveals intent. Before any HTTPS connection, a device queries DNS. Cerberus extracts these queries and correlates them with subsequent TCP connections. You spot unexpected domains, DNS spikes, or new resolution patterns instantly.</p><p>TLS handshakes show encrypted communication without breaking privacy. Cerberus can’t decrypt traffic, but it tracks which endpoints devices connect to and detects unusual patterns like repeated handshake failures.</p><p>ICMP often gets ignored, but it’s essential for troubleshooting. Echo requests show reachability testing. Destination unreachable indicates routing problems. Cerberus captures all of this clearly.</p><h3>Technical Challenges Solved</h3><p>Building Cerberus meant solving constrained problems. The eBPF verifier ensures programs terminate and don’t access invalid memory — no unbounded loops, no dynamic allocation. Parsing variable-length fields like DNS query names requires fixed-size buffers and careful bounds checking.</p><p>Ring buffer sizing balances performance with memory. Cerberus uses 256KB — enough for traffic spikes without waste. The Go application polls aggressively during high traffic and backs off when quiet.</p><p>Deduplication uses an LRU cache with composite keys: source MAC + destination IP + port + protocol. Default capacity is 1000 entries, sufficient for typical networks.</p><p>Layer 7 parsing is probabilistic. With 32 bytes of payload, you can’t always parse complete messages. Cerberus identifies what it can with high confidence and degrades gracefully otherwise.</p><h3>This is Open Source — Here’s Where You Come In</h3><p>Cerberus lives on GitHub at <a href="https://github.com/zrougamed/cerberus">github.com/zrougamed/cerberus</a>. It’s Go for userspace, C for eBPF, MIT licensed. The project is functional, but it needs contributors to evolve.</p><p><strong>IPv6 support is missing.</strong> The current implementation only handles IPv4. Adding IPv6 means updating the packet parser for variable-length headers. If you’ve worked with IPv6 networking, open a PR.</p><p><strong>TLS SNI extraction needs work.</strong> 32 bytes isn’t enough to reliably extract Server Name Indication. Expanding to 128–256 bytes would fix this, but requires performance testing. Help wanted.</p><p><strong>DNS response parsing is incomplete.</strong> Cerberus extracts domains from queries but doesn’t parse responses. Adding this enables tracking which IPs resolve to domains, detecting DNS poisoning, and identifying fast-flux networks.</p><p><strong>Testing is minimal.</strong> No automated tests exist yet. Unit tests for Go code and integration tests for eBPF programs would prevent regressions and make contributing easier.</p><p><strong>Visualization is basic.</strong> Cerberus prints to stdout. A web dashboard would improve accessibility. Prometheus integration would enable monitoring at scale. If you build interfaces or work with observability, there’s meaningful work here.</p><p>Star the repository if you find it interesting. Open issues for bugs or features. The project grows through community involvement — your expertise matters.</p><h3>Getting Started</h3><p>Contributing doesn’t require deep eBPF expertise. Here are starting points:</p><p>Fix error handling — better messages and recovery improve reliability.</p><p>Add protocol support for MQTT, Modbus, or QUIC.</p><p>Test in your environment and report edge cases with packet captures.</p><p>Document your deployment. Share performance characteristics. Explain customizations. Others learn from your experience.</p><p>Visit <a href="https://github.com/zrougamed/cerberus">github.com/zrougamed/cerberus</a>, star it, and join the conversation. Code, docs, bug reports, feature suggestions — all contributions matter.</p><h3>Why This Matters for Critical Infrastructure</h3><p>Critical infrastructure networks are different. They control physical processes. Traditional monitoring assumes you can install agents everywhere and ship logs to cloud platforms.</p><p>That doesn’t work for SCADA systems controlling water treatment or ICS running manufacturing lines. You need local visibility, efficiency, and tools built for environments where security and reliability are requirements, not features.</p><p>Cerberus runs on a single Linux system at the network edge. It processes traffic locally. It’s lightweight enough for resource-constrained hardware. And because it’s open source, security teams can audit what it does.</p><h3>The Road Ahead</h3><p>Network monitoring is evolving. eBPF provides the foundation for tools that are performant, safe, and kernel-integrated. But technology alone isn’t enough — open source communities drive innovation.</p><p>Cerberus is functional and useful, but it’s just the beginning. The roadmap includes anomaly detection with machine learning, REST APIs, and Prometheus export. These features emerge as contributors bring their expertise.</p><p>If you work with networks, care about security, or want to learn eBPF, check out the project. Read the code. Try it in your lab. Break it and report findings. Add features you need. Make network monitoring more transparent and accessible.</p><p>The network is speaking. Let’s build better tools to listen.</p><p><strong>Cerberus</strong>: <a href="https://github.com/zrougamed/cerberus">github.com/zrougamed/cerberus</a></p><p>Star the repo. Open issues. Submit PRs. Join the project and help build the next generation of network monitoring.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6d16f3f0a16" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Revolutionize Your Notification Workflows with the Dynamic Notification System! ]]></title>
            <link>https://medzrouga.medium.com/revolutionize-your-notification-workflows-with-the-dynamic-notification-system-d730cd759c1a?source=rss-645a99946be8------2</link>
            <guid isPermaLink="false">https://medium.com/p/d730cd759c1a</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[devtools]]></category>
            <category><![CDATA[notifications]]></category>
            <dc:creator><![CDATA[Mohamed Zrouga]]></dc:creator>
            <pubDate>Tue, 24 Dec 2024 00:18:36 GMT</pubDate>
            <atom:updated>2024-12-24T00:18:36.935Z</atom:updated>
            <content:encoded><![CDATA[<p>🚀 Are you ready to simplify and supercharge how you manage notifications? Say hello to <a href="https://github.com/zrougamed/dynamic-notification-system"><strong>Dynamic Notification System</strong></a> — a modern, automated notification framework designed to streamline communication for your applications.</p><p>💡 <strong>Why Use This Library?</strong></p><ul><li>🔄 <strong>Automation at its Core</strong>: Automate your notification delivery processes across channels without breaking a sweat.</li><li>⚙️ <strong>Customizable Workflows</strong>: Configure notification triggers, templates, and delivery schedules with ease.</li><li>🌐 <strong>Multi-Platform Ready</strong>: Works seamlessly with email, SMS, push notifications, and more.</li><li>📈 <strong>Scalable Design</strong>: Built to handle everything from startups to enterprise-scale systems.</li><li>💬 <strong>Dynamic Rule Engine</strong>: Tailor notifications dynamically based on user preferences, behaviors, or system events.</li></ul><p>👩‍💻 <strong>What’s in It for You as a Contributor?</strong></p><ul><li>Contribute to a cutting-edge automation-focused project.</li><li>Expand your portfolio with impactful open-source work.</li><li>Collaborate with like-minded developers and gain recognition in the community.</li></ul><p>🔥 <strong>Get Involved Today!</strong><br>Here’s how you can start:<br>1️⃣ Star the repo ⭐ to show your support.<br>2️⃣ Share your feedback or suggest improvements in our Discussions.</p><p>🔗 <strong>Ready to Automate?</strong> Explore the project here: <a href="https://github.com/zrougamed/dynamic-notification-system">Dynamic Notification System</a></p><p>📢 <strong>Let’s Build a Smarter Future Together!</strong></p><p>💬 Have questions or ideas? Drop them in the comments below or open an issue on GitHub.</p><p>Feel free to check out the project, try it, and let us know your thoughts! Contributions, feedback, and stars 🌟 are all greatly appreciated. Let’s build something amazing together! 💪</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d730cd759c1a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Low Code Data Pipeline: data.world dataset to TigerGraph ingestion using TigerFlow]]></title>
            <link>https://medzrouga.medium.com/low-code-data-pipeline-data-world-dataset-to-tigergraph-ingestion-using-tigerflow-27049d4d1e86?source=rss-645a99946be8------2</link>
            <guid isPermaLink="false">https://medium.com/p/27049d4d1e86</guid>
            <dc:creator><![CDATA[Mohamed Zrouga]]></dc:creator>
            <pubDate>Fri, 04 Feb 2022 18:51:13 GMT</pubDate>
            <atom:updated>2022-02-06T12:27:02.340Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article, we will share the steps required in order to create a low-code pipeline to get Data flowing from data.world to TigerGraph.</p><h4>Before Going further :</h4><p>We will need to have the following requirement :</p><ul><li>Data.world Account: API access and DataSet to load.</li><li>Docker Engine: to run TigerFlow container</li><li>TigerGraph instance: get started today for free with <a href="https://tgcloud.io/">tgcloud</a>.</li></ul><h4>data.world API Credentials :</h4><p>After signing up for an account proceed to visit the following link :</p><p><a href="https://data.world/settings/advanced">https://data.world/settings/advanced</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*8grN5uDZeEsUaTIZSmPTVg.png" /></figure><p>you will need to grab the Read/Write API key.</p><h4>Start a TigerGraph instance :</h4><p>For Fresh starters with TigerGraph Cloud, I would recommend reading the following article created by “<strong>Akash Kaul</strong>”</p><ul><li><a href="https://medium.com/swlh/getting-started-with-tigergraph-3-0-4aac0ca4fb3d">Akash Kaul — Article to Get Started with TigerGraph</a></li></ul><h4>Start a TigerFlow Container and Import The flow :</h4><ul><li>Starting a new container :</li></ul><pre>docker run -it -p 1880:1880 -v tigerflow-data:/data --name myTigerGraphPipeLine graphflow/tigerflow</pre><ul><li>Import the Flow :</li></ul><p>Before you import the flow you will need to install a palette called <a href="https://flows.nodered.org/node/node-red-contrib-loop">node-red-contrib-loop</a> using the <strong><em>Menu -&gt; Manage Palettes</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/263/1*DyXpSCrrSX3idVUyFVpn4Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*dukdI41JuC58HjRxGRpUBw.png" /></figure><p>After installing the required node you can proceed to import the flow</p><p><strong>File -&gt; Import</strong> and then copy-paste the <a href="https://raw.githubusercontent.com/zrougamed/medium/main/flow-data-world-tg.json">flow</a> to the view and hit Import.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/255/1*803tlw-iSXPtLMc8iMdJPA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*tpYSCr9Fb5Z-y5muBFxmHQ.png" /></figure><p>After Importing the flow you should find the following view.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IhRQ7GkJDjrGtZZTQDudnA.png" /></figure><ul><li>The first step is to edit the URL to match your datasource user and name :</li></ul><p>the general link is “https://query.data.world/sql/<strong>&lt;user&gt;</strong>/<strong>&lt;datasource&gt;”</strong></p><p>in this tutorial, we will be using <strong>twitter</strong> dataset uploaded by the user <strong>mgjohns</strong> .</p><p>Then you need to add the token from the above data.world credential step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/511/1*Un9PH7bHFMU1xxMAsm-Kag.png" /></figure><p>You need to edit the query in the function node to match your data source</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xzmgCO13JAmePYvUqkum0Q.png" /></figure><p>and lastly, edit the Node and the Graph credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*RDuclDG2qABc0BAUqU5RVA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*soFSNjWT50Rle0srQGVrxw.png" /></figure><p>Watch this video for an in-depth tutorial on how to use tigerflow :</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FqMGEtTCvayQ%3Fstart%3D12%26feature%3Doembed%26start%3D12&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DqMGEtTCvayQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FqMGEtTCvayQ%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/3513a15a32a9383fbb0d429b2429ab6e/href">https://medium.com/media/3513a15a32a9383fbb0d429b2429ab6e/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=27049d4d1e86" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ultimate IoT streaming Demo with Node-Red and TigerGraph]]></title>
            <link>https://medzrouga.medium.com/ultimate-iot-streaming-demo-with-node-red-and-tigergraph-431fdaf94493?source=rss-645a99946be8------2</link>
            <guid isPermaLink="false">https://medium.com/p/431fdaf94493</guid>
            <category><![CDATA[node-red]]></category>
            <category><![CDATA[tigergraph]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Mohamed Zrouga]]></dc:creator>
            <pubDate>Thu, 11 Feb 2021 16:06:41 GMT</pubDate>
            <atom:updated>2021-02-11T16:06:41.474Z</atom:updated>
            <content:encoded><![CDATA[<p>According to Gartner IoT market size will rise to <a href="https://apnews.com/press-release/business-wire/technology-lifestyle-business-corporate-news-north-america-1a17829b83b647ba98ef8317327d6060#:~:text=The%20global%20IoT%20integration%20market,28.5%25%20during%20the%20forecast%20period.">5.3 billion by 2025</a>. And given the variety of devices out there, getting started with IoT can appear daunting. Setting up communication with or between these devices is often non-trivial. Further challenges arise if you want to integrate machine learning! Solutions need to pull together different device APIs, services, and sometimes protocols.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*L6wkh_3oAyXqrbOZ" /></figure><p><a href="https://nodered.org/">Node-RED</a> and <a href="https://www.tigergraph.com/">TigerGraph</a> combined can store data easily analyze them and bring a whole new level of Machine Learning to IoT in an easy, No-code way. Today’s topic is the TigerGraph storage Node connector and its creative approach in storing data, and enabling the Internet of Things with TigerGraph’s ML toolkit power to do Customer 360, Tweets sentiment analysis, etc.</p><blockquote>TL;DR .. Node Red + TigerGraph : empowers you with the no-code solution experiment at its best. Just link’em !</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T3m38BwMHP4OPvFjYBcglA.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vrkiaJQYITDqUSHYz8V-Ow.jpeg" /></figure><h3>Node-Red: A visual tool for wiring everything</h3><p>Node-RED is a programming tool created by two IBM Engineers, as a visual tool for wiring together hardware devices, APIs, and online services without writing code.</p><p>The project has recently become popular as it is the quickest way to prototype web services inside a business during a hackathon or an experiment. Developers who attach it to IoT devices enjoy it very well.</p><p>Node-RED runs on local workstations, the cloud, and edge devices. It has become an ideal tool for the Raspberry Pi and other low-cost hardware.</p><p>The Node-RED runtime is lightweight and built on top of Node.js. It takes full advantage of Node.js’ event-driven, non-blocking I/O model. There is also the added benefit of tapping into the most used programming language — JavaScript!</p><p>With all the Node-RED community resources and vast NPM ecosystem, you can create IoT flows in a user-friendly manner.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KR6iFC9xG9jLIC93MjlmRQ.jpeg" /></figure><h3>TigerGraph: A graph database to link Data</h3><p>A graph database is a data management system software. The building blocks are vertices and edges. To put it in a more familiar context, a relational database is also a data management software in which the building blocks are tables. Both require loading data into the software and using a query language or APIs to access the data.</p><p>TigerGraph is known as the fastest native graph database. It provides you with its unique query language (GSQL) and a <a href="https://medium.com/swlh/getting-started-with-tigergraph-3-0-4aac0ca4fb3d">GraphStudio</a> which is a streamlined graphical user interface built on top of the database engine.</p><p>It offers an easy-to-use, no-code platform that allows anyone, regardless of their experience in database technologies, to learn about graphs.</p><h3>Pre-requirements :</h3><ul><li>Spin up a free tgcloud box: <a href="https://medium.com/swlh/getting-started-with-tigergraph-3-0-4aac0ca4fb3d">Get Started here!</a></li><li>node.js + npm: <a href="https://nodejs.org/en/download/package-manager/">Not sure how to do it?</a></li><li>python3:<a href="https://www.python.org/downloads/"> Install it from here.</a></li></ul><h3>How to Install</h3><p>To install node-red you can use npm, docker, or package manager from your distro.</p><pre>$ npm install -g --unsafe-perm node-red</pre><p>after that, you should install the TigerGraph storage node</p><pre>$ npm install -g  node-red-node-tigergraph</pre><p>and then run node-red instance:</p><pre>$ node-red</pre><p>The node-red will be at this address by default “http://127.0.0.1:1880”</p><h3>TigerGraph Node In Action:</h3><p>To add the TigerGraph Node to your flow, go to the left side panel scroll down to the storage section :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PgEEAOFQgIg2qvgCMkFRWQ.png" /><figcaption>Side Panel Storage Section</figcaption></figure><p>Grab the TigerGraph node to the flow and double click on it then click the pen next to “Add new TigerGraphDatabse” :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZXphQ3rvpCl3zwraRWCJ9Q.png" /><figcaption>Configure the database</figcaption></figure><p>Add a TigerGraph Connection :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S2GtNPBpSy6mYb-vq_cgAg.png" /></figure><p>Fill the form according to your configuration you will need a server, port (default:9000), the user (default:tigergraph), the password (default:tigergraph), the graph name, and a secret. Once done with that Click Add.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y-po1v0YT1z17OT-9hMNeA.png" /></figure><p>Now click done.</p><p>In our <strong>first demo</strong> (<strong>stay tuned for Part2 and Part3 !</strong>), we will be subscribing to <strong>three MQTT Brokers</strong> and loading all the messages to the database with<strong> no coding off course</strong>.</p><p>Hive MQ public broker :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fyBXTn69gM9eJXp5rGwE_g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ppw34mvmgOOXYCIeb3A63Q.png" /><figcaption>Subscribing to all testtopic subtopics</figcaption></figure><p>Mosquitto public broker:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UEbFxMFZqQPNaEIGkNcpXw.png" /><figcaption>Subscribing to all mosquito topics</figcaption></figure><blockquote>We will be subscribing to <strong>all topics (#) </strong>on the mosquitto broker and <strong>all testtopic sub topics (/testtopic/#)</strong> on the HiveMQ broker</blockquote><p>Before the deployment, you can see that the node displays “not yet connected”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/1*vQ91vwfD-xSB0XrhAzXHMQ.png" /><figcaption>TigerGraph Database Not connected, double-check config</figcaption></figure><p>Once deployed and if you’ve successfully provided all the credentials for your TigerGraph instance, the node displays “OK” as follows :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*esJSF0FGI22GbupoEUMUlA.png" /><figcaption>TigerGraph Database connected</figcaption></figure><h3>Schema Installation :</h3><p>to initialize the schema for this ioT demo we have prepared this DDL Script written in python.</p><p>download the script from here</p><pre>$wget <a href="https://raw.githubusercontent.com/zrougamed/medium/main/iot.py">https://raw.githubusercontent.com/zrougamed/medium/main/iot.py</a></pre><p>and then execute it</p><pre>$ pip install pyTigerGraphBeta<br>$ python3 ioT.py &lt;your_solutiontag&gt;.i.tgcloud.io tigergraph password </pre><h3>What’s Next?</h3><ul><li>Build a dashboard ( Article Soon to be published )</li><li>Build a Customer 360 using Node-Red and TigerGraph ( Article Soon to be published )</li></ul><p>Any question or inquiry regarding this blog, come talk to the community.</p><p>Stay tuned and see you on our community discord server</p><p><a href="https://discord.gg/7ft9PNZAM6">Join the TigerGraph Discord Server!</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=431fdaf94493" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Next Level Intelligent RASA Chatbot with TigerGraph]]></title>
            <link>https://medzrouga.medium.com/building-a-next-level-intelligent-rasa-chatbot-with-tigergraph-a3dbbb89934a?source=rss-645a99946be8------2</link>
            <guid isPermaLink="false">https://medium.com/p/a3dbbb89934a</guid>
            <category><![CDATA[rasa-nlu]]></category>
            <category><![CDATA[assistant]]></category>
            <category><![CDATA[chatbots]]></category>
            <category><![CDATA[tigergraph]]></category>
            <category><![CDATA[rasa-core]]></category>
            <dc:creator><![CDATA[Mohamed Zrouga]]></dc:creator>
            <pubDate>Sun, 03 Jan 2021 22:48:14 GMT</pubDate>
            <atom:updated>2021-01-03T22:48:14.738Z</atom:updated>
            <content:encoded><![CDATA[<p>Did you know how easy it is to create a conversational assistant ? With machine learning/Artificial intelligence.</p><p>Building a powerful chatbot Assistant has always been a motivation for all kinds Businesses, with such tool we can:</p><ul><li>Automate Sales Inquiry and boost conversion</li><li>Automate Tech Support and create Happy customers</li><li>Answer Knowledge Base questions (KB’s) Internally</li></ul><p>Today we will be dealing with linking the most famous open source conversational AI framework (<strong>Rasa)</strong> with a TigerGraph database.</p><p>Having such Connector/Pipe will allow us to create :</p><ul><li>A Knowledge Graph that keeps on growing and maturing</li><li>An assistant that gets trained each time on a “Auto-growing” datasets</li><li>An assistant able to query data in real Time from TigerGraph Database</li><li>An assistant Rules/Actions Triggered is a multi turn conversation Assistant</li></ul><p>The previous key features allow us to create a Scalable , Intelligent auto-Learning assistant that dynamically adapts to the needs of your business!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zUq_rgvKOQTuXpMJ.png" /></figure><h3><strong>What is Rasa ?</strong></h3><p>Rasa is a conversational assistant framework brought up by startups and backed up by a fast growing community.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/0*rGflH38V9KZPL2J_" /><figcaption>Rasa Message Flow</figcaption></figure><p>The framework has these modules :</p><ul><li>Rasa NLU : Handles the Natural Language Processing</li><li>RASA Core : Handles data storing , piping , API , and basically the Assistant</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*eGEYikmmBUorS-zi" /></figure><h3>Rasa Approach</h3><p>Many AI assistants don’t use as much machine learning as you might think. While it’s common practice to apply machine learning to NLU, when it comes to dialogue management, many developers still fall back to rules and state machines.</p><p>Instead of adding more and more rules over time. with Rasa using machine learning to select the assistant’s response presents a flexible and scalable alternative. The reason for this is one of the core concepts of machine learning: generalization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*d8LDBVQvMinCYPpw" /></figure><p>In the above illustration (flowchart) we can clearly see how Rasa components interacts in order to drive a successful conversation with the user:</p><ul><li>NLU module : captures and analyses User Intent</li><li>Core Module : deals with the <strong>Next Step</strong></li></ul><p>And the next step could be :</p><ul><li>Fetching data from a database</li><li>Interacting with an API ( Ex : restaurant booking system )</li><li>Answering the user with a text</li><li>Offering the user different options to drive the conversation flow</li></ul><h3>Creating your first Rasa Assistant</h3><p>To create a RASA chatbot you don’t have to be a Machine Learning expert ,yet with very minimal programming knowledge you can develop an interactive Conversational Assistant.</p><p>Let’s see the step by step how to create a simple healthcare chatbot.</p><blockquote>$ python3 -m virtualenv -p python3 .</blockquote><blockquote>$ source bin/activate</blockquote><blockquote>$ pip install rasa</blockquote><blockquote>$ rasa init</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/971/0*5eHYA6dMNoKhjIV9" /></figure><h3>Getting Rasa to train data from TigerGraph</h3><p>Rasa Framework trains data stored in NLU, domain, actions, rules and stories files in order to make the assistant operational.</p><p>The limitation here is that the Rasa takes these data from Markdown (Md for Rasa &lt; 1.9) or YAML (yml for Rasa &gt; 2.0) formatted files, which limits the scalability and evolution of intents and dialogues scenarios.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/210/1*09ELjH7hhAcNNYIInybFgw.png" /></figure><p>In order to make our assistant learn and evolve in a dynamic way we will create a connector to pipe data from TigerGraph directly into the Rasa Framework to be trained.</p><p>These data are stored in vertices in the Graph and have certain structure to deliver the expected YML/MD file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/515/0*d6nA4rSgsnWqhlE_" /></figure><p>In other words, we made a Script that gets training data from a TigerGraph database and feed them to Rasa framework for training, and for the sake of the compatibility we made the script able to generate YML files (Rasa &gt;= 2.0) and md files (Rasa &lt; 2.0).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/411/1*1SlGliy9FKtUPFqrZzpM_w.png" /></figure><h3>Recovering data from TigerGraph in real Time</h3><p>Querying the data from TigerGraph (or any other API) is made simple using a simple step:</p><ol><li>Define the action in the domain.yml</li><li>Write the class function responsible for analyzing that message context</li><li>Call the TigerGraph query or run GSQL command</li></ol><p>The intent is extracted from the message using the RegexClassifier and passed to the Action using the Rules set in the screenshot below:</p><p>The Rules:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/476/0*drLGw3xb3Hl3JWId" /></figure><p>TigerGraph credentials in actions.py:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/0*1q7Nha9UhsD6RuVi" /></figure><p>TigerGraph Connection Initialization in actions.py:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/0*axovR1j9VV3IL5YZ" /></figure><p>Class ActionSearchPatients used by rule:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nNyH4kzr93Ms3Xju" /></figure><h3><strong>Rasa Flask/Web Sample chat Widget</strong></h3><p>To implement our little chatbot in action will install Flask and run a sample flask website using our chatbot.</p><h4>Install Flask</h4><p>We need to create a virtual environment for flask:</p><blockquote>$ python3 –m virtualenv –<strong>p</strong> python3 .</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/771/0*zQ9ThX-oM3RqfLyi" /></figure><p>Activate the virtual environment</p><blockquote>$ source bin/activate</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/972/0*jqrXtbZ-Ow11iQi-" /></figure><p>And then we install Flask using pip</p><blockquote>$ pip <strong>install</strong> Flask</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gca3nxOVvKINLQeh" /></figure><h4>Create the template</h4><p>We create a file called app.py as follows</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/486/0*FMyHUXdF6awFmN89" /></figure><p>And we create a directory called <a href="https://flask.palletsprojects.com/en/1.1.x/tutorial/templates/">templates</a> and in that folder, we create our index.html as follow</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*q6bi4MID0Hlcuaqk" /></figure><h4>Run the chatbot and the actions server</h4><p>To run the rasa server locally and the actions endpoint we need to run this:</p><blockquote>$ rasa run — endpoints endpoints.yml — connector socketio — credentials credentials.yml — port 5005 — cors “*” — enable-api</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8Y9MnML8CcRwzn7_" /></figure><blockquote>$ rasa <strong>run</strong> actions</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MjL96uNop-G0ZEde" /></figure><h4><strong>Run the flask Server</strong></h4><p>To run our small web demo, we activate our virtual environment and we launch the webapp as follows:</p><blockquote>$ source bin/activate</blockquote><blockquote>$ <strong>python3</strong> app.<strong>py</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5fLRuvTS3hrfMiBE" /></figure><h3>The Bot in Action</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FRkYLPasOQY0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DRkYLPasOQY0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FRkYLPasOQY0%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/9ff624167e9274865b6eb835da4ec70f/href">https://medium.com/media/9ff624167e9274865b6eb835da4ec70f/href</a></iframe><p>Below the links to the github repository to download:</p><p>YML AND MD Connector</p><p>RASA TG Assistant ( Covid 19 Template Demo )</p><p><a href="https://github.com/TigerGraph-OSS/RASA">https://github.com/TigerGraph-OSS/RASA</a></p><p><strong>P.S:</strong> we require a 3rd party javascript library <a href="https://github.com/microsoft/BotFramework-WebChat">BotFramework</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a3dbbb89934a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>