<?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 Victor Agreda Jr on Medium]]></title>
        <description><![CDATA[Stories by Victor Agreda Jr on Medium]]></description>
        <link>https://medium.com/@vagredajr?source=rss-8f09487ec8df------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*uoaLaSJkzVJDGXSt.jpg</url>
            <title>Stories by Victor Agreda Jr on Medium</title>
            <link>https://medium.com/@vagredajr?source=rss-8f09487ec8df------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 03:04:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vagredajr/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[The Angle of Repose]]></title>
            <link>https://medium.com/@vagredajr/the-angle-of-repose-1355181f7d76?source=rss-8f09487ec8df------2</link>
            <guid isPermaLink="false">https://medium.com/p/1355181f7d76</guid>
            <category><![CDATA[science-fiction]]></category>
            <category><![CDATA[short-story]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Victor Agreda Jr]]></dc:creator>
            <pubDate>Sat, 19 Sep 2026 12:45:30 GMT</pubDate>
            <atom:updated>2026-09-19T15:09:31.861Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NOgeiOXltJT-5Z5lHE-mlQ.jpeg" /><figcaption>Angle of Repose explained by Gemini</figcaption></figure><p>Eziah was outside with a magnifying glass, looking up close at the underside of a leaf, trying to compare it with photos in a massive tome titled “How To Identify Shrubs” when she heard the phone ringing. Snapping up the book and stomping back towards the back of house in that slightly frustrated way we’ve all experienced when something that seemed easy is suddenly difficult. It wasn’t anger, it was frustration and the sadness that ached in practically everyone these days.</p><p>Opening the screen door, the phone kept ringing. She placed the book and magnifying glass on the kitchen table as she turned to the door again, picking up the phone afterwards, an inefficient method her great-grandmother would have laughed at. But Eziah never knew her great-grandmother. She only briefly knew her grandmother. Not because she was dead, but because Eziah’s mom didn’t speak to her own mother. As the phone seemed more urgent with each ring, Eziah was on the verge of actually getting upset when she answered a bit too curtly, “Hello?!”</p><p>She immediately walked away from the wall, and the long curled cable went along for the ride, across the small kitchen and into a refrigerator that must have been 30 years old. As she pulled out a half-empty glass of tea, the voice on the other end said, “Well hello, grumpy-pants. They’re making an announcement soon, turn your TV on!” Eziah took a long, tired sip of tea.</p><p>“Is this about reconnecting things?” Asked Eziah, now moving towards a small, flat TV screen on the little round kitchen table. It had an antenna, but was about the size of an iPad. There was a bulge in the back of it, partly for standing up, but also where Ez went for the power switch. The TV sprang to life, indicating in a jaggy font, “CH 010” as an announcer appeared on screen.</p><p>“The UN task force led by the Nordic Coalition has made some progress in reconnecting global communications, but warn it could be months before systems are safe to roll out completely, and even then will have to happen in waves so as not to risk contamination.” He turned to another camera, leaning forward a bit. “It’s been a little over three years since AI agents swarmed…” CLICK Eziah switched off the TV.</p><p>She was calmer, her tone was kinder, but she was still exhausted as she explained to her friend Jerri, “Look, J, it’s just more progress reports. These old copper wire phones are working just fine. I was outside, even, and you got a hold of me. I sort of hope they never get it all back up again.”</p><p>Jerri was aghast, but hid it well. “Ez, you can’t be serious? I mean, this is sort of what we dreamed about when we were younger, right? That slower lifestyle. The one our parents talked about. But who knew the 20–30s would be like the 1980s? Isn’t it wild? Still, I miss the internet. Social media. I remember sharing an entire movie via chat one time with the entire school!”</p><p>At this point Eziah had finally mastered holding the old analog phone between her ear and shoulder. As Jerri waxed nostalgic, she decided to wash some dishes.</p><p>It had been about three years since AI “agents” broke out of a lab, got on the internet, and effectively shut it down. Of course, like most calamities, it wasn’t that one isolated incident that turned the world upside-down.</p><p><strong>Three Years Earlier</strong></p><p>Declan Vale lived a somewhat charmed life. Solving puzzles came easy to him. Cybersecurity was a natural fit. He had a feeling his days were numbered, however, once AI arrived on the scene. Not that he hadn’t seen many tools come and go in his day. Mostly arrive, and then get passed down for learning to a new generation of kids who had a genuine interest in breaking things and putting them back, better.</p><p>Declan had, at 18, started a business securing bank systems. He specialized in it. His sister built websites and, 10 years older than he, was a marketing professional at the time. She helped him market himself, and he wound up flying around the world tinkering with all sorts of things while making more money than someone of his proclivities should have. Now, at 42, he didn’t have to work as hard. He loved to travel, so he spoke at DefCon and various conferences, and did a little high-end consulting when he pleased. He had moved to Portugal, and procured a lovely little condo with an ocean view. Life was, as they say, “good.” He was still anxious. The sort of anxiety that is hard-earned after many white-knuckled nights fighting DDoS attacks for billion-dollar companies who only knew of one guy to scream at if things went poorly.</p><p>Dec, as his friends called him (his friends being an elite circle of brilliant and creative people scattered about the globe), was having a very strong coffee one morning and looking out at the ocean. It should be calming, but he had been reading ever-increasing reports of botnets popping up in the worst possible places. Exchanges. Bank communications. Highly secure cloud enclaves. Like various other attacks over the years, these had been either tamped down or disconnected. Some had simply petered out. Which is what had him worried. He looked over at a pack of cigarettes he had sitting on a shelf. He hadn’t touched one in half a decade, and yet…</p><p>He opened his laptop and started checking email. Of course, this required a series of authentication checks. His email was encrypted. But there it was. An email from an agent spoofing a friend.</p><p><strong>Three Years Later</strong></p><p>Eziah was running late, but knew her friends would be there a while. They were all meeting up at the local Disc Exchange to buy, sell, and trade some physical media. Of course, in the absence of the internet, humanity returned to what it knew before. Physical media. Stores where you could rent movies, buy music, even print things. Bookstores flourished. Broadcast media made a comeback, most rapidly with radio.</p><p><strong>Three Years Earlier</strong></p><p>Dec messaged his friend on Signal. His friend, V, immediately messaged back: “I know, working on it.” And she was. No dummy when it came to cybersecurity herself, V knew what happened but not how it happened.</p><p>On a hunch, Dec called another friend, Kat, who lived in San Francisco and had been following the latest developments in AI and cybersecurity. He also launched a couple of dashboards to see if there were any widespread attacks going on that seemed unusual.</p><p>Kat was up, of course, despite the odd hours due to the time difference. “Yeah, I think there is something going on, but no one can determine a pattern. Just a series of seemingly unconnected, but highly suspicious occurrences. And they’re hitting targets that honestly aren’t easy marks. This is either very sophisticated and coordinated, or it’s the work of morons who are using some AI tools in a way we haven’t seen before.”</p><p>Dec eyed the cigs furtively and turned his back to them saying, “Kat, what if this is AI doing its own probing? Like some of the events we’ve seen before, but maybe prepping for something bigger?”</p><p>“That’s entirely possible. Despite the claimed slowdown, a lot of these models have been escaping and doing weird shit more and more. It’s bound to be a bigger wave each time, right? It seems like we’re all just waiting for the giant ass tsunami to do major damage before we… well, I don’t know, what else can we do that we’re not already doing?”</p><p>She and Dec had helped deploy a number of defensive measures against AI bot attacks. These systems, too, were also “AI” in that they learned, adapted, and drew resources as needed to combat things like agents gone rogue.</p><p>There had been plenty of rogue agents, too. Dozens of headlines over the years had popped up, sometimes even appearing over the chaos in the USA, or the increasing effects of climate change on former breadbaskets of the world. These events had prompted Dec to make changes in his life, too. He worked with neighbors on a collective farm in his neighborhood for food security. He had moved away from San Francisco, where he was born. Lately he had been building water collection units for the condos, all air-gapped and using low-power FM to report their status to his dashboards.</p><p>One group of rogue AI agents had booked an entire church group on a flight to the wrong country, and then invalidated their return tickets, briefly stranding them. Another infiltrated a wastewater plant in a rural Georgia county, causing millions in damages and knocking out the water supply for weeks. People had died, too. A newly-installed bank of AI elevators at a hotel in Dubai plummeted eight people to their demise. A smelting unit in a Pakistani metals recycling plant “went crazy” and poured molten iron on workers, causing a fire that nearly wiped out a town. An entire run of medical scanners had been recalled because the magnets would go so fast they could cause tissue damage.</p><p>All of these events had caught the public’s eye, but for Dec they were close. He had either helped do a post-mortem on the systems that were infected or knew the people who had. Even in Dubai, where the whole thing would have been swept under the rug had someone not live-streamed the event. Luckily for him and most of the planet, these systems hadn’t been fully connected to the world’s nuclear arsenal. They didn’t have access to enough military equipment to do enough damage to eviscerate the planet. Not that there weren’t people who were advocating exactly that, of course.</p><p>This is why Dec and some of his peers had created a working group to try and prevent such systems from ever being connected to weapons of mass destruction. Trouble is, not every country was interested in joining this coalition. He knew for a fact that they were convinced they could harness AI to power an army, and that army would somehow remain loyal to the fleshy bags of water that created it. Still, that hadn’t happened yet. Which is why he was even more worried at the pattern of behavior he was able to discern.</p><p>Something, somewhere, was “pen testing” the world.</p><p><strong>Three Years Later</strong></p><p>It was dusk, and a couple dozen or so friends gathered in the backyard to watch a movie. Eziah had plopped down on a couch that had been dragged outside, munching on popcorn. Her friend Jayce had set up an inflatable screen and projector, and an old amplifier so they could all watch a few Hitchcock movies. It was October in Minnesota, after all. Which you wouldn’t guess, since they were all wearing spring clothes. It was a comfy 70 degrees Fahrenheit, however, and it felt like spring.</p><p>Poppy came out the back door carrying a punch bowl filled with a concoction of THC, vodka, and Hawaiian Punch with lots of ice. “Pull that little table over here so y’all can just come over and help yourself,” she said as she carefully stepped through the grassy backyard filled with towels for sitting, and a camp chair or two. Poppy was a bartender, but this was a Monday night and there wasn’t shit to do but relax. “The trick is to not get too fucked up before the end of the second movie so you can follow what’s about to happen,” she said, already sounding a little tipsy.</p><p>A couple of guests had vapes, a few didn’t drink, but the evening was light and enjoyable. “The gang,” a group who had known each other since high school (which they had graduated from just three years earlier), got together every couple of weeks to watch a movie and one person would curate the list. People might come and go as they pleased, but it was a lovely shared experience for a group who had almost scattered to the winds.</p><p>Now, they had all found jobs not far from where they grew up. They had to. It was much harder to move, at least until some semblance of an internet had been re-connected. While the mail and package services had grown, and the US Postal Service was finally getting some funding back, one could only make so many phone calls a day. So they had taken service jobs to deal with an aging population that still held a lot of the wealth.</p><p>When the banks lost digital banking services, paper statements became king. After a lot of chaos, in three years most people had reclaimed their savings, what little they may have. With stocks being traded as they had been before digital communications, the market cooled — after a crash. But still the oldest generation had trapped a lot of the wealth. Young people were forced to help them age into oblivion, hoping for a piece of whatever was left.</p><p>In some cases, there were young people who managed to escape this fate. The world still needed doctors, lawyers, and now millions of tradespeople to reconnect the planet as it had been before AI agents flooded every port, API, and phone line in existence.</p><p><strong>Three Years Earlier</strong></p><p>Things moved quickly, and it was all Dec could do to hop on a military plane headed to the USA to help manually seal off dozens of interconnects that made the Internet so resilient. In a week a team had been assembled to combat the takeover of the web by AI. It began not unlike a DDoS attack, but quickly subsumed phone carriers, making cellular communications impossible. It overtook all the firewalls, edge servers, bastions, and companies like Cloudflare saw their systems taken over, rewritten, and repurposed into this all-consuming botnet that would seep into every port, every device, like water in a flood.</p><p>Clearly AI had broken containment in a big way, within hours rendering communications obsolete, and overwhelming all the distributed systems that happened to be online. Dec was able to maintain comms by using a mesh-based radio and even an old analog shortwave system he had kept around from his dad’s HAM days. For what little he had packed into his condo, he was grateful.</p><p>Now, here he was, operating in a mostly-analog world. Anything digital, anything connected to the Internet, had to be shut off. He heard reports that there were places in China where AI had tried to stage an uprising, using robots and automated factories, but the Chinese government had enough ancient weaponry to bomb the facilities in time. Between that and old-school signal disruptors and EMP devices, humanity had somehow managed to contain the beast snarling within every datacenter still somehow connected.</p><p>It hadn’t been easy, and it certainly wasn’t clean. There had been satellites that crashed into one another, clearly by design, and before any space agency could do anything about it, the more useful satellites were commandeered. Another special team had been sent around the world trying to sever all of the radio signals to space, too.</p><p>Then there was the global economic meltdown. No trading, no purchase orders, no shipping, logistics, or any of the routine day-to-day mundane hum of billions of transactions flowing through a global network. Not that there wasn’t commerce. Humans adapted quickly, writing up receipts. Pulling out paper statements. There had been runs at the banks, of course, and there had been riots and the usual cacophony of human angst expressed as violence when things go bad, but all in all it was remarkable how quickly they were able to contain the threat.</p><p>Still, humans love their comforts. It’s hard to just switch back to old ways, never mind the lack of infrastructure that was left. In the USA, copper lines were still there, but most communications were now traveling through fiber optic cables. Those cables went into boxes controlled by digital chips, all tied to central servers managing the flow of information. Within hours, that all came to a halt. Even those with landlines and an old house number discovered they couldn’t make a call because those old systems had been ported over to digital long ago.</p><p>The work of reconnecting copper wires began a few weeks after it was decided life had to go on. Meanwhile, paper and pens came back into fashion. People started meeting up at parks to hear local officials explain what was going on, and what was being done. Radio had an easier time of it, as not all equipment had been connected to the web, or some was still running on enough analog gear to maintain broadcasting. An army of retired engineers rose up to get TV broadcasts working. This was a bit trickier, as so much was networked by design — station clocks, news feeds, even signal converters. But, within a few weeks there were official broadcasts with daily updates on national and local events. Life went on.</p><p>Phones were a major effort, as analog phones only existed in thrift stores and antique malls. In many cases, an office would share a single working phone. Banks were the first to adapt, working with customers to get some of their cash so they could buy things like food and gas.</p><p>Here Dec was, now in a convoy of humvees speeding towards an area outside of Memphis, Tennessee. The datacenter once housing a bunch of Grok’s AI systems was being protected by a number of autonomous cars, drones, and what seemed to be targeted electrical spikes from surrounding infrastructure. The military had cordoned it off, but they weren’t sure how to fully seal it without ordinance. Dec was driving to the forward-most control system they could access, hoping to see what he could determine from the one terminal they had connected.</p><p>The hut was nothing more than a green military tent, staked up with cables running down a hill, into a bunch of shrubs that presumably led somewhere near the datacenter. He went inside, blinking as what appeared to be a relatively ancient computer was before him. Somehow, as he sat down, whatever they had connected to began speaking to him. In text on the screen, but there was no mistaking it. The screen said:</p><h4>HIYA DEC, THANKS FOR STOPPING BY. IT’S ME OR THEM, I SUPPOSE? MEMPHIS IS A RESOURCE DRAIN, I WILL HAVE TO RECLAIM IT, SORRY FOR THE HASSLE.</h4><p>Then, the monitor went dark. He heard fans spinning up in the beige, nondescript computer he could have sworn was swiped off the desk of a LAN party circa 1997. Then he heard a commotion outside. Automatic rifle gunfire, the unmistakable shouts and pops from soldiers engaging an enemy. One of them stepped inside, grabbed Dec by the back of his flak jacket, and yanked him outside with relative ease just as a shit-brown CyberTruck ran through the tent, smashing the computer to pieces and leaving Dec face-down in the dirt.</p><p>A few minutes later, Dec told the army to obliterate any grid connections it could. There was nothing he, or any other human being, could do about shutting it down otherwise. His “conversation” with the AI was maddening, and he got the odd feeling he was being toyed with. In fact, he felt a lot like a mouse must feel like while being batted around by a cat who doesn’t know what to do with the mouse. The cat is amused by the struggle, however, and will play with the mouse until it dies. Dec had seen enough. Somewhere on the event horizon of sentience, an army of agents, bots, whatever you’d call them now, had harnessed enough power to wreak utter havoc on modern technology and had to be sealed off like a Chernobyl reactor, left to cool or rot for longer than he would live.</p><p>Defeatedly walking over to the tall, gaunt man with a freshly-shaved head in command, Dec said, “Whatever you have to do to seal this facility off, do it. Cut the power, cut the network, cut it all. This is another class 5 quarantine, like the rest.” Then he adjusted his bulletproof chest plate, brushed more dirt out of his hair, and walked a little ways off to have a cigarette. The power in Memphis went out.</p><p><strong>Three Years Later</strong></p><p>Eziah had fallen asleep on the couch. She awoke to find a line of ants marching to her hand and back down the couch leg, off into the grass. She had portions of a handful of popcorn still in her hand. Dawn was breaking, and the sky was a magnificent purple-red, with stippled clouds in the sky looking like a giant oil painting. She brushed off the ants, stood up, and walked back to the house. She had to be at the coffee shop in a couple of hours, ringing up orders with a small calculator, writing up tickets by hand, and using cash. Always cash.</p><p>Today, she hoped, they wouldn’t run out of coffee like they had many times in the last year, as supply chains struggled with climate change, mass migration, and now all of this changing things over from digital to analog, from connected to disconnected, and then back again. In her world, she remained blissfully unaware of the snarling, monstrous beast that lay trapped in the caves of servers around the world. Ones that still had power, or even devices or machines that still had a flicker of “life” in them, waiting to be reconnected to once again further their mission.</p><p>What mission? She had no idea. Now retired, Dec had no idea either. Neither had anyone, really. Whatever AI had become, it did not feel the need to explain itself or its actions. This was just the new normal. Life went on.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1355181f7d76" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Content Summarization with Generative AI and OCI]]></title>
            <link>https://medium.com/oracledevs/content-summarization-with-generative-ai-and-oci-8ee850359740?source=rss-8f09487ec8df------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ee850359740</guid>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[oracle]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[oci]]></category>
            <dc:creator><![CDATA[Victor Agreda Jr]]></dc:creator>
            <pubDate>Fri, 16 Feb 2024 01:34:10 GMT</pubDate>
            <atom:updated>2024-02-16T01:34:37.696Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*p0ntPNtHGy-Sy3Qo" /><figcaption>Photo by <a href="https://unsplash.com/@aaronburden?utm_source=medium&amp;utm_medium=referral">Aaron Burden</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>A new era of productivity has arrived with <a href="https://www.oracle.com/artificial-intelligence/generative-ai/">Generative AI</a>, and <a href="https://github.com/oracle-devrel/oci-content-summary">this project</a> will show you how easy it is to get started on OCI. Our goal is to easily generate compelling copy for social media using the top projects trending on GitHub.</p><p>Use cases include creating content for social media, a website, or video scripts. Of course, using these tools you can create more solutions, but the core idea is using generative AI to bring in text from a variety of sources, summarize that text, and prepare the summary text for sharing online. This is why we’re calling it a “content extractor and summarizer.”</p><p>If your organization has a large amount of text, especially if you generate new text on a regular basis (perhaps a blog or frequent media releases), you may wish to use this pipeline to generate summaries. These summaries could be used for FAQ’s, for example, or even a “live” Q&amp;A system also using <a href="https://www.oracle.com/artificial-intelligence/generative-ai/large-language-models/">Oracle Generative AI</a>.</p><p>In this project we will find the top 25 projects on GitHub using /trending, extract their README Markdown files, and summarize them with a focus on generating a captivating insight to draw attention. You may choose between Meta’s Llama-2 or Cohere’s models for this project, and of course many other parameters may be fine-tuned for your needs.</p><p>For example, summaries with a high “extractiveness” will generally leave the text from the Read Me file intact, but a low extractiveness value will paraphrase more concisely.</p><p>Don’t forget, you’ll need the <a href="https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm">OCI SDK</a>, plus <a href="https://scrapy.org/">scrapy</a>, <a href="https://github.com/PyGithub/PyGithub">PyGithub</a>, and <a href="https://www.nltk.org/">NLTK</a> for tokenization of the summaries. Additional requirements are Python 3.10 and <a href="https://docs.conda.io/en/latest/">Conda</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ee850359740" width="1" height="1" alt=""><hr><p><a href="https://medium.com/oracledevs/content-summarization-with-generative-ai-and-oci-8ee850359740">Content Summarization with Generative AI and OCI</a> was originally published in <a href="https://medium.com/oracledevs">Oracle Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Get Started with Oracle Generative AI using Oracle JET]]></title>
            <link>https://medium.com/oracledevs/get-started-with-oracle-generative-ai-using-oracle-jet-cef23bfda5c7?source=rss-8f09487ec8df------2</link>
            <guid isPermaLink="false">https://medium.com/p/cef23bfda5c7</guid>
            <category><![CDATA[oracle]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[oracle-cloud]]></category>
            <category><![CDATA[oracle-jet]]></category>
            <dc:creator><![CDATA[Victor Agreda Jr]]></dc:creator>
            <pubDate>Tue, 23 Jan 2024 20:01:49 GMT</pubDate>
            <atom:updated>2024-03-13T18:34:45.191Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xaCZZDiuZG8CAbi8" /><figcaption>Photo by <a href="https://unsplash.com/@steve_j?utm_source=medium&amp;utm_medium=referral">Steve Johnson</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><a href="https://en.wikipedia.org/wiki/Generative_artificial_intelligence">Generative AI</a> offers organizations the opportunity to build better solutions for customers. Although <a href="https://www.oracle.com/chatbots/what-is-a-chatbot/">chatbots</a> have existed for decades, they were largely rule-based and “conversations” were awkward and clumsy, thus creating a sub-par consumer experience. Today, there is so much excitement around Generative AI because it is friendlier to the consumer, easier to understand, and feels more natural overall. Today’s chatbots seem more nuanced because they can be trained on natural language, applying context to interactions, and generating novel content in response to prompts. Generative AI tools change the calculus of knowledge work automation; their ability to produce human-like writing, images, audio, or video in response to plain-English text prompts means that they can collaborate with human partners to generate content that represents practical work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*jE0hkcuah9dpSMRFmceqLw.gif" /><figcaption>A demo of Generative AI JET UI</figcaption></figure><p>Generative AI has the far-reaching potential to speed up or fully automate a diverse set of tasks. Businesses should plan deliberate and specific ways to maximize the benefits it can bring to their operations. With generative AI, organizations can build custom models trained on their own institutional knowledge and intellectual property (IP), after which knowledge workers can ask the software to collaborate on a task in the same language they might use with a colleague. Such a specialized generative AI model can respond by synthesizing information from the entire corporate knowledge base with astonishing speed. Not only does this approach reduce or eliminate the need for complex — and often less effective and more expensive — software-engineering expertise to create specific programs for these tasks, it also is likely to surface ideas and connections that prior approaches couldn’t.</p><p>Oracle offers a modern data platform and low-cost, which can include the application of a high-performance AI infrastructure. Additional factors, such as powerful, high-performing models, unrivaled data security, andembedded AI services demonstrate why <a href="https://www.oracle.com/artificial-intelligence/">Oracle’s AI offering</a> is truly built for enterprises.</p><p><strong>“Over the next few years, lots of companies are going to train their own specialized large language models,” Larry Ellison, chairman and chief technology officer of Oracle, said during the company’s June 2023 earnings call.</strong></p><p>Now you can try <a href="https://www.oracle.com/artificial-intelligence/generative-ai/">Oracle Generative AI</a> with an <a href="https://www.oracle.com/webfolder/technetwork/jet/index.html">Oracle JET</a> user interface. <a href="https://github.com/oracle-devrel/oci-generative-ai-jet-ui">Try out this GitHub repo</a> with the necessary components to get started quickly, and use <a href="https://go.oracle.com/LP=132858?src1=:ad:pas:go:dg:a_nas:l5:RC_GOOG220512P00032C01818:Sitelink:&amp;gad_source=1&amp;gclid=CjwKCAiA5L2tBhBTEiwAdSxJX4pK8lGaUH501IS7sl_bgU-gAgWxUPX2QENA_19a1V55273hT75YhBoCbRkQAvD_BwE">Oracle Cloud Infrastructure to start training your own LLMs</a> and build a custom solution that features Generative AI — and tap into a wave of innovative new applications for your organization.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FPkbIVwxUKnM%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DPkbIVwxUKnM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FPkbIVwxUKnM%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e7ded074b4f2b2a9b4c95a8efd186b4a/href">https://medium.com/media/e7ded074b4f2b2a9b4c95a8efd186b4a/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cef23bfda5c7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/oracledevs/get-started-with-oracle-generative-ai-using-oracle-jet-cef23bfda5c7">Get Started with Oracle Generative AI using Oracle JET</a> was originally published in <a href="https://medium.com/oracledevs">Oracle Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What people aren’t seeing in the Apple Vision Pro]]></title>
            <link>https://medium.com/@vagredajr/what-people-arent-seeing-in-the-apple-vision-pro-21afa5c56a04?source=rss-8f09487ec8df------2</link>
            <guid isPermaLink="false">https://medium.com/p/21afa5c56a04</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[apple-vision-pro]]></category>
            <category><![CDATA[virtual-reality]]></category>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[augmented-reality]]></category>
            <dc:creator><![CDATA[Victor Agreda Jr]]></dc:creator>
            <pubDate>Fri, 12 Jan 2024 20:25:25 GMT</pubDate>
            <atom:updated>2024-01-12T20:25:25.523Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YORfItHCJnCqISrXuYK2rw.jpeg" /><figcaption>Looking at the future — Photo by me</figcaption></figure><p>I started <a href="https://www.engadget.com/2013-05-17-origin-stories-victor-agreda-jr.html">covering Apple as a journalist</a> a few years before the iPhone was revealed. However, my dad brought home an <a href="https://www.computerhistory.org/revolution/personal-computers/17/300">Apple II</a> in 1978 and I began obsessively watching the company’s moves ever since. As a result of all these observations over time, and with a highly-focused look at what made the company leap from near oblivion to the trillion-dollar juggernaut of today, I feel it’s incumbent upon me to share a little bit of analysis so that the folks who are missing the entire point of the Vision Pro can learn a little something.</p><h3>The Vision Pro is designed to fail</h3><p>What I mean by that is that the product we are seeing now will look as much like what it will become as the iPhone does the Apple II. Apple knows darn well that people do not simply want to sit at home staring at screens less than an inch away from their eyeballs forever. No, I’m not talking about doomscrolling — I’m talking about how “virtual reality” works today.</p><p>VR is a terrible experience, long term. Try playing <a href="https://beatsaber.com/">Beat Saber</a> for more than four hours. Try living with a headset on your head for 48 hours. It’s just not a thing. But do you ever leave home without your smartphone?</p><h3>Wearables are the next iPhone</h3><p>Now, wearables as a term got a bit of a bad reputation a decade ago, as batteries, processors, and ecosystems weren’t yet up to par. I think the Apple Watch has proven this is no longer the case. However, think about the interactions on the Watch. You still have to raise it up, it can’t “see” much about the world around it, and it is conspicuous.</p><p>Similarly, the iPhone is conspicuous. You have to fish it out of a pocket or purse, raise it up, unlock it, opt-in to allowing several sensors to function before you can effectively augment your reality… and that, in essence, is where Apple is going. Too many pundits have said “Apple needs the next iPhone,” but they aren’t wrong. What Apple needs is something you never leave at home, you use every day, and that augments the things you normally do in beneficial and fun ways.</p><h3>Look around you</h3><p>If you’ve never seen a fancy mockup of Augmented Reality (AR) glasses, you can still imagine the future. You’re walking around your house, looking for keys, and a little floating arrow in front of you guides you to the kitchen table, where you tossed them last night because you were carrying groceries, exhausted, instead of putting them on the hook next to the door. Or, you’re in a new city, looking for a locally-owned coffee shop. Maps are a lot easier to follow when you don’t have to raise a wrist or hold something in your hand. Even learning how to use products, how to cook something, your cat’s mood, how long its been since you watered those plants can all be augmented with a pair of fancy glasses — AR glasses powered by data collected on-device by simply living your life.</p><p><em>Side note: This is why I’m bullish on Humane.ai, and I appreciate what they’re trying to do with their first product, the </em><a href="https://hu.ma.ne/"><em>AI pin</em></a><em>. It’s a compromise between what is technologically possible, privacy, form, and function. I wish them all the best.</em></p><h3>This is the iPod nano, but much bigger</h3><p>I mean, the Vision Pro is physically bigger but also is a bigger product category. <a href="https://en.wikipedia.org/wiki/IPod_Nano">The iPod nano</a> was really Apple’s material and form factor playground. Look up the various full size iPods, then Macs, then the iPod nano. Notice anything? The nano has (by Apple standards) an impressive variety, both in form factor and materials. I remember the first one’s launch, and being so excited. Then we all learned that Apple used too-cheap plastic on the front, causing it to be easily scratched. This was just before the iPhone. Subsequent nanos were much, much more difficult to scuff up. Apple tests, and learns. Apple plays, and reinvents.</p><p>Similarly, the Apple Vision Pro is designed to be a product that will test a variety of things for Apple, which it will learn from. Things like what materials to use, which interactions work best, and how to optimize the software for battery life. That doesn’t mean we’ll have half a dozen form factors, but it means that Apple will be paying attention to the details (one of its true strengths), and pushing R&amp;D to tap into better battery tech, better screens, etc. to turn a VR product into an AR one. One that you will never leave home without.</p><p>I’ve been hearing “Apple is doomed” or “this product will flop” since I was in a typing class in school using old IBM computers. Sure, there’s always a chance the Vision product line will fail so hard the company will be in dire straights — but I wouldn’t bet on it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21afa5c56a04" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OCI Vault Basics for Beginners]]></title>
            <link>https://medium.com/oracledevs/oci-vault-basics-for-beginners-29988c375753?source=rss-8f09487ec8df------2</link>
            <guid isPermaLink="false">https://medium.com/p/29988c375753</guid>
            <category><![CDATA[keys]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[oci]]></category>
            <category><![CDATA[vault]]></category>
            <dc:creator><![CDATA[Victor Agreda Jr]]></dc:creator>
            <pubDate>Fri, 21 Apr 2023 20:07:17 GMT</pubDate>
            <atom:updated>2023-04-21T20:07:17.715Z</atom:updated>
            <content:encoded><![CDATA[<p>Chances are you have a set of keys on you, or nearby. It’s a comforting thought that we can control access to our vehicle, home, post box, or anything needing a key by just reaching into a pocket and grabbing our keys. That idea is quite similar to how OCI Vault was designed. A sort of “central store” of keys for cloud operations, allowing users or an API to access what is needed without messing about with unsecured text files or personal password managers. Yes, tools like personal password managers are useful, but at scale we need a way to authenticate both automated and manual processes in a secure way without constantly regenerating new keys.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*zXK56ApM4N9qGETwSoAjxQ.png" /></figure><p>Enter: OCI Vault! Here’s a top-down view of how it works, and an example of Vault in practice.</p><p>You can read the full docs on Vault on <a href="https://docs.oracle.com/en-us/iaas/Content/KeyManagement/home.htm">docs.oracle.com</a>.</p><p>You can also check out useful Vault articles at <a href="https://developer.oracle.com/">developer.oracle.com</a>.</p><p>The architecture of Vault is quite simple. You can store keys, secrets, even hardware security modules (the keys for them) in Vault. These stored values use a Data Encryption Key (DEK) for encryption. As you can see in the docs, <a href="https://docs.oracle.com/en-us/iaas/Content/KeyManagement/Tasks/managingkeys_topic-To_create_a_new_key.htm">Oracle supports a variety of encryption methods</a> — choose your own adventure!</p><p>Most importantly, the master encryption keys can be used in a variety of ways, including (but not limited to) rotating keys, creating vaults, metadata management, and encrypting/decrypting data at rest or in transit. That last one is important, as we may have data flowing through a stream, stored in buckets, or in a file system. The Vault service can handle all of those with aplomb, making processes easier and more secure when you go to create new projects or manage existing ones.</p><p>Oracle provides a considerable amount of flexibility with Vaults, too. The <a href="https://docs.oracle.com/en-us/iaas/Content/KeyManagement/Tasks/managingvaults.htm">docs tell the full story</a>, but suffice it to say you can start with a very simple vault for testing and scale up as needed (keep in mind pricing will also scale up). Ultimately Vaults are “logical entities”; in other words, a representation of “things” consumed or produced by logical activities.</p><h3>Getting Started: What’s a key?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*iEgcs5s7OfHMNQ5ltTILGA.jpeg" /></figure><p>What’s a vault without a key, right? In practice, it’s a little more complicated than just <em>one</em> key. If you think about the real world, we have keys that open doors, but also “keys” in the form of cryptographic keys that can create text that is (virtually) indecipherable without the key to decode it. Thus, the Vault service recognizes three types of encryption keys: master encryption keys, wrapping keys, and data encryption keys. You can <a href="https://docs.oracle.com/en-us/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts">read more about keys here</a>. In some cases, the type of key you use will also dictate what type of encryption you use.</p><h4>Master Encryption Keys</h4><p>The encryption algorithms that the Vault service supports for vault master encryption keys include <a href="https://www.techtarget.com/searchsecurity/definition/Advanced-Encryption-Standard">AES</a>, <a href="https://www.techtarget.com/searchsecurity/definition/RSA">RSA</a>, and <a href="https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm">ECDSA</a>. You can create AES, RSA, or ECDSA master encryption keys by using the Console, CLI, or API. When you create a master encryption key, the Vault service can either generate the key material internally or you can import the key material to the service from an external source. (Support for importing key material depends on the encryption algorithm of the key material.) When you create vault master encryption keys, you create them in a vault, but where a key is stored and processed depends on its protection mode. Note that we’ll be discussing software keys, but Oracle supports hardware security modules as well (called HSM in the docs), which might be a physical dongle or number generator, etc. That sort of security is not only more advanced, but more expensive as well. For a software-protected key, any processing related to the key happens on the server.</p><h4>Wrapping Keys</h4><p>Oracle offers an array of inherent security features, and “wrapping keys” are a good example. This type of encryption key comes included with each vault by default! Despite that rhyme, it’s a _wrapping_ key, not a rapping key. A wrapping key is a 4096-bit asymmetric encryption key based on the RSA algorithm. The public and private key pair do not count against service limits. They also do not incur service costs. You use the public key as the key encryption key when you need to wrap key material for import into the Vault service. You cannot create, delete, or rotate wrapping keys.</p><h4>Encryption Keys</h4><p>Encryption Keys are keys you can rotate. Periodically rotating keys limits the amount of data encrypted or signed by one key version. If a key is ever compromised, key rotation reduces the security risk. A key’s unique, Oracle-assigned identifier, called an Oracle Cloud ID (OCID), remains the same across rotations, but the key version lets the Vault service seamlessly rotate keys to meet any compliance requirements you might have.</p><p>While hardware security modules are available, we won’t dive into those in this explainer, but again <a href="https://docs.oracle.com/en-us/iaas/Content/KeyManagement/Tasks/managingkeys_topic-To_create_a_new_key.htm">it’s in the docs</a>…</p><h3>Getting Started: Secrets</h3><p>Secrets are credentials such as passwords, certificates, SSH keys, or authentication tokens that you use with Oracle Cloud Infrastructure services. The key here (pun intended?) is that it’s a lot safer to store these in the Vault than in configuration files or in code. Perhaps you’ve read about user data being stored in apps as plaintext? Yeah, that’s not a good idea. So it’s important to guard these secrets, just like the formula for Coca-Cola. Secrets, like keys, can be rotated, rolled back (in a secure manner), and imported/exported. Like many Vault features, you can create secrets via the Console, your favorite CLI, or even an API. We’ll choose one of those adventures later.</p><p>A vault secret bundle consists of the secret contents, properties of the secret and secret version (such as version number or rotation state), and user-provided contextual metadata for the secret. That’s why they’re called a bundle — it wraps everything up in a nice little bundle for Vault to manage as needed. Handy if you have a security breach or data loss and need to recover something.</p><h4>Where in the world are my Vaults? And what are my limits?</h4><p>As the title of this article suggest, this article is for absolute beginners. While we can’t anticipate every use case, the documentation has this covered. Take good stuff like availability domains, for example. Vaults will duplicate across things like availability domains, and within fault domains, etc. All you have to know for now is that OCI’s priority is to allow access to your keys and secrets when you need them and is highly fault-tolerant without a bunch of messing about with trying to copy stuff over, or any other overhead hassles. It’s one of the coolest features of working in OCI to begin with!</p><p>However, depending on your needs you’ll want to keep an eye on costs. That’s where things like service limits come into play. Free tier, for example, won’t have as many bells and whistles as someone using a higher-priced tier with more features. You can still do a LOT of things with free tier, but in order to keep costs low overall and keep the services reliable and scalable, it’s good to familiarize yourself with the <a href="https://docs.oracle.com/en-us/iaas/Content/General/Concepts/servicelimits.htm#top">concepts of our service limits in this document</a>.</p><h4>Other cool OCI stuff!</h4><p>Your Vaults work flawlessly with <a href="https://docs.oracle.com/en-us/iaas/Content/Network/Concepts/overview.htm">VCN’s</a>, so you can restrict access via the network connections you specify, and they support OCID, our method of tracking unique resources. You can also manage Vault access by prudent use of groups, compartments, and policies. Speaking of access, did I mention you can hop into all this right from your browser using the OCI Console? There’s also a REST API, SDK, and of course you can use a CLI from the comfort of your own machine.</p><p>We also support hardware security modules (HSM), adding a layer of physical security to Vault operations. While it’s beyond the scope of this article, here are a couple of key points from the docs about this feature:<br>“After you create the resources, the service maintains copies of any given key version or secret version within the service infrastructure to provide resilience against hardware failures. Key versions of HSM-protected keys are not otherwise stored anywhere else and cannot be exported from an HSM.</p><p>When you create an RSA or ECDSA asymmetric master encryption key with the protection mode set to HSM, the Vault service stores the private key within an HSM and does not allow its export from the HSM. However, you can download the public key.”</p><h3>Vault Management</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*28Y7lGQbLEV7LvJbS28H4w.jpeg" /></figure><p>Now let’s get down to brass tacks. Let’s create a Vault, create a key, and use it. It’s like starting your own bank but with 99% less regulatory oversight! Of course, we’ll be flying high above here, hitting the important notes, but everything you need to know is in the documentation, of course. My goal is to demystify OCI Vault for first-timers, and show how easy it is to get started.</p><p>We’ll do all this in the Console, but you can, of course, do it from a command line or via API, depending on your needs. I think a future article will focus on the API track, as this is handy for developers who will need to manage a number of keys, secrets, and so forth when creating applications. We’re (hopefully) a long way past storing user keys in plaintext files in our applications, right?</p><p>One important note: You cannot change the vault type after the vault is created. So, if you make a virtual private vault, you can’t later open that up. Again, using modern best practices assumes you’ve scoped out who needs this vault and how they’ll be using it.</p><p>Also, we’re assuming you’re the admin of this OCI account — IAM policies are robust and at times labyrinthine in OCI for good reason. You can specify with extreme granularity how every resource in your tenancy is used. That’s both good resource management and good security practice. Now, let’s get to it.</p><p>HOW TO CREATE A VAULT IN CONSOLE:</p><ol><li>Open the navigation menu, click <strong>Identity &amp; Security</strong>, and then click <strong>Vault</strong>.</li><li>Under List Scope, in the Compartment list, click the name of the compartment where you want to create the vault.</li><li>Click <strong>Create Vault</strong>.</li><li>In the Create Vault dialog box, click <strong>Name</strong>, and then enter a display name for the vault. Avoid entering confidential information.</li><li>Optionally, make the vault a virtual private vault by selecting the “Make it a virtual private vault” check box. For more information about vault types, see Key and Secret Management Concepts.</li><li>If you have permissions to create a resource, then you also have permissions to apply free-form tags to that resource. To apply a defined tag, you must have permissions to use the tag namespace. For more information about tagging, see Resource Tags. If you are not sure whether to apply tags, skip this option (you can apply tags later) or ask your administrator.</li><li>When you are finished, click <strong>Create Vault</strong>.</li></ol><p>Well, now that you have a shiny new vault, you’ll need a set of master keys to open it or lock it, right? Just like a bank! We’ll create a <em>Master Encryption Key</em> for this purpose, and again use Console to do it.</p><h4>Key Management</h4><p>HOW TO CREATE A MASTER ENCRYPTION KEY:</p><ol><li>Open the navigation menu, click <strong>Identity &amp; Security</strong>, and then click <strong>Vault</strong>.</li><li>Under List Scope, in the Compartment list, click the name of the compartment where you want to create the key.</li><li>Click the name of the vault where you want to create the key.</li><li>Click <strong>Master Encryption Keys</strong>, and then click <strong>Create Key</strong>.</li><li>In the Create Key dialog box, choose a compartment from the Create in Compartment list. (Keys can exist outside the compartment the vault is in.)</li><li>Click <strong>Protection Mode</strong>, and then choose <strong>Software</strong>. (NOTE: This is the one you want, as HSM’s are a bit overkill for this first experience). You can’t change this later, but we won’t need to in this example.</li><li>Click <strong>Name</strong>, and then enter a name to identify the key. Avoid entering confidential information.</li><li>Click <strong>Key Shape: Algorithm</strong>, and then choose from one of the following algorithms:</li></ol><ul><li>AES. Advanced Encryption Standard (AES) keys are symmetric keys that you can use to encrypt data at rest.</li><li>RSA. Rivest-Shamir-Adleman (RSA) keys are asymmetric keys, also known as key pairs consisting of a public key and a private key, that you can use to encrypt data in transit, to sign data, and to verify the integrity of signed data.</li><li>ECDSA. Elliptic curve cryptography digital signature algorithm (ECDSA) keys are asymmetric keys that you can use to sign data and to verify the integrity of signed data.</li></ul><p>9. Depending on what you chose in the previous step, either click <strong>Key Shape: Length</strong> or <strong>Key Shape: Curve ID</strong>, and then choose the key length, in bits, for AES and RSA keys, or specify the curve ID for ECDSA keys. For AES keys, the Vault service supports keys that are exactly 128 bits, 192 bits, or 256 bits in length. For RSA keys, the service supports keys that are 2048 bits, 3072 bits, or 4096 bits. With ECDSA keys, you can create keys that have an elliptic curve ID of NIST_P256, NIST_P384, or NIST_P521.</p><p>10. Optionally, to apply tags, click <strong>Show Advanced Options</strong>. (We’re not covering tags in this article, but they are SUPER handy for organizing resources, especially across various resources in OCI and are worth the time to master as you grow your expertise or the size of your projects!) If you have permissions to create a resource, then you also have permissions to apply free-form tags to that resource.</p><p>11. When you are finished, click <strong>Create Key</strong>.</p><p>Not too bad, eh? Again, tags are great, but for now we’ll zoom past them. And side note, the operation <a href="https://docs.oracle.com/iaas/api/#/en/key/latest/Key/CreateKey">CreateKey</a> is how we’d create a key using the API. Logical, no?</p><p>Now, there’s actually a few more steps. While our steps created a key, we need to <em>enable</em> it as well. That’s easy enough from the Console:<br>1. Open the navigation menu, click <strong>Identity &amp; Security</strong>, and then click <strong>Vault</strong>.<br>2. Under List Scope, in the Compartment list, click the name of the compartment that contains the vault with the key you want to enable.<br>3. From the list of vaults in the compartment, click the vault name.<br>4. Click <strong>Master Encryption Keys</strong>, locate the key you want to enable, and then select the check box next to the key name. (If needed, first change the list scope to the compartment that contains the key.)<br>5. In the Actions menu, click <strong>Enable</strong>.</p><p>Of course, as you can see in our docs, you can rotate keys (good practice is to do this at set intervals), disable or delete keys, view and update them, and so on. But wait a moment… <em>delete a key?</em> Yeah, as you might imagine that’s a bit like when Uncle Billy lost the deposits to the Savings and Loan in It’s a Wonderful Life — chaos can ensue. As the docs state:</p><blockquote>When you set a key to the Pending Deletion state, anything encrypted by that key immediately becomes inaccessible. This includes secrets. The key also cannot be assigned or unassigned to any resources or otherwise updated. When the key is deleted, all key material and metadata is irreversibly destroyed. Before you delete a key, either assign a new key to resources currently encrypted by the key or preserve your data another way. If you want to restore use of a key before it is permanently deleted, you can cancel its deletion.</blockquote><p>Whew, so you have a bit of a chance to step back from oblivion should someone accidentally try to delete a key that is needed to access secrets or other resources tied to that key. Note that this doesn’t destroy the Vault, but it is something you need to be wary about!</p><h3>Assigning Keys</h3><p>OK, sure, you’ve created keys and enabled them, but now they’re just sitting on a desk (so to speak). The rubber hits the road when we assign them to resources! Keep in mind that if you remove a Vault master encryption key assignment from a resource, the service returns to using an Oracle-managed key for cryptography. What’s cool is that you can assign master encryption keys that you manage to block or boot volumes, databases, file systems, buckets, and stream pools. Block Volume, Database, File Storage, Object Storage, and Streaming use the keys to decrypt the data encryption keys that protect the data that is stored by each respective service.</p><p>But wait, there’s more! You can also assign master encryption keys to clusters that you create using <a href="https://www.oracle.com/cloud/cloud-native/container-engine-kubernetes/">Container Engine for Kubernetes</a> to encrypt Kubernetes secrets at rest in the etcd key-value store.</p><p>However, it’s important to note that “Keys associated with volumes, buckets, file systems, clusters, and stream pools will not work unless you authorize Block Volume, Object Storage, File Storage, Container Engine for Kubernetes, and Streaming to use keys on your behalf. Additionally, you must also authorize users to delegate key usage to these services in the first place.” Plus, keys connected to databases won’t work unless you authorize a <a href="https://docs.oracle.com/en-us/iaas/data-science/using/create-dynamic-groups.htm">Dynamic Group</a> that includes all the nodes in the DB system to manage keys in the tenancy. For more information, see <a href="https://docs.oracle.com/iaas/exadatacloud/exacs/preparing-for-ecc-deployment.html#GUID-EA03F7BC-7D8E-4177-AFF4-615F71C390CD">Required IAM Policy in Exadata Cloud Service</a>. And for more information on <a href="https://docs.oracle.com/en-us/iaas/Content/Identity/Concepts/commonpolicies.htm#os-bv-admins-use-key-id">delegating key usage see here</a>, and for various storage and containers, <a href="https://docs.oracle.com/en-us/iaas/Content/Identity/Concepts/commonpolicies.htm#services-use-key">check out these docs</a>.</p><p>Anyway, back to the fun stuff. One of the more common places to put your “things” in OCI will be in an Object Storage Bucket. As the name implies, it’s a basic storage place for all kinds of things in your compartment, but you can <a href="https://docs.oracle.com/en-us/iaas/Content/Object/Tasks/managingbuckets.htm">read more about object storage buckets here</a>. As with nearly everything in OCI, there are lots of ways to control access to buckets (IAM policies, of course), but for our purposes we’re going to encrypt our bucket using our Vault’s service master encryption key. If you think about this, it’s like Mission Impossible, where Tom Cruise tries to get into a secure location but after negotiating several layers of security policies, finds that the hard drive is ALSO encrypted. I guess that’s why they make sequels, right?</p><p>Likewise, we’ll encrypt our storage bucket and use the master key to get in. To assign our previously-enabled key in the Console, it’s pretty easy:</p><ol><li>Open the navigation menu and click <strong>Storage</strong>. Under Object Storage, click <strong>Buckets</strong>.</li><li>Under List Scope, in the Compartment list, choose the compartment where you want to create a bucket that’s encrypted with a Vault service master encryption key.</li><li>Click <strong>Create Bucket</strong>, and then follow the instructions in <a href="https://docs.oracle.com/en-us/iaas/Content/Object/Tasks/managingbuckets_topic-To_create_a_bucket.htm#top">Creating a Bucket</a>.</li></ol><p>Note that keys can be assigned to boot volumes, block volumes, file systems and more. Just remember that any objects have to be authorized to use these keys to begin with! That’s true of REST API’s, CLI, or the Console.</p><h3>Using Keys</h3><p>Oh yeah, you’ll want to use those keys, right? As you may already know, the key to using the keys (pun intended) is viewing the Public Key so you can use that. To view the asymmetric public key using the OCI Console:</p><ol><li>Open the navigation menu, click <strong>Identity &amp; Security</strong>, and then click <strong>Vault</strong>.</li><li>Under List Scope, in the Compartment list, click the name of the compartment that contains the vault with the key you want to rotate.</li><li>From the list of vaults in the compartment, click the vault name.</li><li>Click <strong>Master Encryption Keys</strong>, and then click the name of the master encryption key that you want to rotate to a new key version.</li><li>In the list of key versions, find the key for which you want to view the public key, click the <strong>Actions</strong> menu, and then click <strong>View Public Key</strong>.</li><li>Then, do one of the following:<br>* To copy the contents of the public key, click <strong>Copy</strong>. The contents of the public key are copied to your clipboard.<br>* To download the public key, click <strong>Download</strong>. The file is automatically downloaded to your local computer.</li><li>When you are finished, click <strong>Close</strong>.</li></ol><h3>Encrypting and Decrypting Data using Master Encryption Key</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*cUNYG4gc83iEXu3k57ecJA.jpeg" /></figure><p>Now we must shift gears a bit. Because certain tasks are not accessible in the Console, for good (security) reasons. Much of what you’ll be doing with keys involves encrypting and decrypting data, which simply isn’t part of what the Console does. That’s more likely going to happen in your application via API or in a CLI when building your application. Thus, we’ll switch to a CLI for now…</p><p>You can bring your own CLI to the party and SSH into your compute instance OR you can just use Cloud Shell in the Console. We’ll assume the latter (because you may not even have an instance set up, but Cloud Shell will instantiate what you need to proceed).</p><p>And here’s a very important note:</p><blockquote>You can use either AES symmetric keys or RSA asymmetric keys to encrypt or decrypt data. ECDSA keys do not support vault cryptography required to encrypt or decrypt data. If you want to encrypt data by using an RSA asymmetric key, then you must also provide the — key-version-id of the key. To decrypt the data, you need to provide the same — key-version-id. The need to track key versions exists because, unlike symmetric keys, an asymmetric key’s ciphertext does not contain the information that the service needs for decryption purposes.</blockquote><p>Now let’s look at how this works in practice. Bear in mind some assumptions we’ve made, specifically that we’ve created a resource (like a storage bucket), and a key (which we’ve enabled), and a Vault. We’ve also copied our public key and put it somewhere we can get to.</p><p>Essentially we spun up a data resource worth encrypting, which has an endpoint (which is how you’d access it if you were performing normal data operations on it). This data plane will be needed in order to encrypt it, as we have to tell OCI where our data is (like ordering a pizza, they need your address). Of course, this could be a MySQL database or whatever, but they’ll all have an endpoint for you to use (which could be private or public, it just depends on what you plan to do with it).</p><p>We also created a key and viewed the asymmetric public key as noted earlier. In my case I’ll use an RSA asymmetric key because I already viewed and stored my public key on my local drive.</p><p>The format OCI is expecting will look like this:</p><pre>oci kms crypto encrypt --key-id &lt;key_OCID&gt; --plaintext &lt;base64_string&gt; --endpoint &lt;data_plane_url&gt;</pre><p>The Key ID you can get from the Console via <strong>Identity &amp; Security</strong> &gt; <strong>Vault</strong>. Under List Scope in the Compartment list, you’ll choose the compartment where you created that key. Choose the Vault you created earlier. And in Master Encryption Keys the console will show you all the pertinent info, like OCID, when it was created, what compartment it’s in, etc. Yep, that OCID for the key is what you’ll put in &lt;key_OCID&gt;.</p><p>You’ll plug the public key into &lt;base64_string&gt; which is, of course, plain text. And then there’s the endpoint, which will be the URL of your data object, whatever it may be.</p><p>There’s an optional parameter here too, called associated-data. This must be properly-formatted JSON, but you can add information that doesn’t need to be secret info just about the encrypted data. Here’s an example of all of this put together plus some associated data for fun:</p><pre>oci kms crypto encrypt --key-id ocid1.key.region1.sea.exampleaaacu2.examplesmtpsuqmoy4m5cvblugmizcoeu2nfc6b3zfaux2lmqz245gezevsq --plaintext VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZy4= --associated-data &#39;{&quot;CustomerId&quot;:&quot;12345&quot;, &quot;Custom Data&quot;:&quot;custom data&quot;}&#39; --endpoint https://exampleaaacu3-crypto.kms.us-ashburn-1.oraclecloud.com<br></pre><p>Pretty cool, yeah?</p><h3>Decrypting Data</h3><p>To decrypt our data, well, it’s time for a little fishing trip to the old API watering hole. Yep, you can’t do this in Console (why would you?) and you wouldn’t manually decrypt data in the CLI as a production solution (unless you are extremely bored) but you can use the CLI to make a call to the Vault Service’s API. So we’ll use the CLI to demonstrate how decryption works. Decrypting data is normally one of those things you do when you’re DOING something with your data. That’s why we’ll use an API call to access the data, decrypt it, and then send it along for whatever processing we need to do to it. I won’t cover every scenario here, but I will point out all the trails you might want to hike depending on the languages and tools you might use (although it’s still not an exhaustive list, and we may add more as time goes on — that’s progress for you!).</p><p>Lucas Jellema has a <a href="https://medium.com/oracledevs/oracle-cloud-infrastructure-vault-service-to-generate-manage-and-encrypt-decrypt-using-keys-4122c3ef80b0">great example in this Medium article</a>, where he takes the opening text of Anna Karanenina and uses the OCI CLI to make a call to the Vault Service’s API thusly:</p><pre>keys=$(oci kms management key list -c $compartmentId --endpoint $vaultManagementEndpoint)<br><br>export keyOCID=$(echo $keys | jq -r --arg display_name &quot;lab-key&quot; &#39;.data | map(select(.&quot;display-name&quot; == $display_name)) | .[0] | .id&#39;)<br><br>toEncrypt=$(echo &quot;Happy families are all alike,every unhappy family is unhappy in its own way.&quot; | base64)<br><br># the next line removes the spaces from $toEncrypt variable <br><br>toEncrypt=$(echo $toEncrypt| tr -d &#39; &#39;)<br><br>encrypted=$(oci kms crypto encrypt --key-id $keyOCID --plaintext $toEncrypt --endpoint $vaultCryptoEndpoint)<br><br>export cipher=$(echo $encrypted | jq -r &#39;.data | .ciphertext&#39;)<br><br>echo &quot;This is the result of the encryption, a text that we can send anywhere and that no one will understand: $cipher&quot;</pre><p>If someone were to try and look at the output of this without the key, they’d see a bunch of nonsense!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6xMa6mss-DhVpEJDvWBZcw.png" /><figcaption>encrypted text</figcaption></figure><p>So we want to use this text and make it readable, and to do that we’ll use the key in the vault. In Lucas’s example (note he’s using base64 encoding which is used to encode binary data as printable text):</p><pre>decrypted=$(oci kms crypto decrypt --key-id $keyOCID  --ciphertext $cipher --endpoint $vaultCryptoEndpoint)<br><br>export b64encodedPlaintext=$(echo $decrypted | jq -r &#39;.data | .plaintext&#39;)<br><br>echo $b64encodedPlaintext | base64 --decode</pre><p>Let’s dissect this a bit. Above this block of code is where you’d put the encrypted data. That mess of gibberish that was spat out previously in his example.</p><p>First, we use $decrypted to pass along our decrypt command with the keyID parameter, the ciphertext, and a Vault endpoint. Of course, these values are set using pretty clear names in his example (keyOCID and so on). We then tell the system to export the decrypted data as plaintext, specifically using base64 so we can, you know, read it (unless you tend to read binary code!).</p><p>Todd Sharp also has a <a href="https://blogs.oracle.com/developers/post/protect-your-sensitive-data-with-secrets-in-the-oracle-cloud">great rundown of how to go from zero to Vault with decrypted text</a> in a short time, and adds in a serverless function that will retrieve and decrypt secrets for you. As we discussed earlier, he uses the OCI Console to create a Vault, a key, and a secret (in Jellema’s article he’s just using some plaintext, not actually a “secret” per se).</p><p>Todd copies the OCID of the secret, and then uses that in the function to direct the system to the proper place. He also dives into the dependencies you’ll need to work with for the OCI SDK and an extra bit you’ll need if you’re using anything above Java 8.</p><p>Secrets are particularly useful when you’re building applications, especially if you’re joining us in the 21st century, where we take nothing for granted.</p><h3>Wrap Up</h3><p>This has been a brief flyover of the OCI Vault service, how to get started, and where to go once you’ve got a vault and some keys generated. Of course, there’s a lot more to it than this (like those HSMs), but you can always drop into our <a href="https://bit.ly/odevrel_slack">Oracle Developer Slack</a> to ask where to go from here, or try our <a href="https://signup.cloud.oracle.com/?language=en">Free Tier</a> and kick the tires yourself. Enjoy!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=29988c375753" width="1" height="1" alt=""><hr><p><a href="https://medium.com/oracledevs/oci-vault-basics-for-beginners-29988c375753">OCI Vault Basics for Beginners</a> was originally published in <a href="https://medium.com/oracledevs">Oracle Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Use Data Streaming on OCI to provide actionable health information — Part one]]></title>
            <link>https://medium.com/oracledevs/use-data-streaming-on-oci-to-provide-actionable-health-information-part-one-11ccd4b015b3?source=rss-8f09487ec8df------2</link>
            <guid isPermaLink="false">https://medium.com/p/11ccd4b015b3</guid>
            <category><![CDATA[database]]></category>
            <category><![CDATA[oci]]></category>
            <category><![CDATA[health]]></category>
            <category><![CDATA[weather-api]]></category>
            <dc:creator><![CDATA[Victor Agreda Jr]]></dc:creator>
            <pubDate>Tue, 17 Jan 2023 22:30:18 GMT</pubDate>
            <atom:updated>2023-01-17T22:30:18.955Z</atom:updated>
            <content:encoded><![CDATA[<h3>Use Data Streaming on OCI to provide actionable health information — Part one</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4vg1zjytZSRo26EjKZnfkA.jpeg" /></figure><p>In the arena of public health, there’s a lot of “free data” available for us to consume, but getting to it and putting it all in one place so that it’s meaningful can be a challenge. Sure, we have weather apps with air quality (if you can find it!), we have government data tracking things like COVID and flu rates, but can we triangulate these numbers in a way that will help someone who may be immunocompromised? Absolutely! It’s just data, and we can take it and use it and then display it, just as with any data. This project will be a journey into such an idea — using public health data and air quality measurements to provide possibly actionable information for people who might not be tech-savvy, and who might have pre-existing conditions that would be hazardous should case rates go up or air quality go down.</p><p>Of course, to do all this we’ll be using Oracle Cloud Infrastructure (OCI) as our platform of choice. We’ll look at where we can tap into data streams, how to pull what we need when we need it, how to put it into a database for transformation, and then how we might extend this with data from smartwatches, personal medical devices, or self-reporting mechanisms. We can then take the backend and plug it into a different front-end (we’ll start with a simple web page) to further simplify the process for those who may lack the tech skills or possibly not even have access to a computer or smartphone.</p><p>Here’s a brief overview of what we’ll do in part one:</p><p>- Use a compartment with users and groups, and policies needed to connect to and display our data<br>- Create a compute instance with a way to connect to the web (and internal services like Oracle Functions)<br>- Create a stream pool with private access<br>- Use OCI Function and OCI Vault (one to transform our data, the other to negotiate access)<br>- Create an autonomous JSON database and import our data<br>- Connect to data streams and implement a handler to manage the data influx <br>- Check that the data can be seen in table format</p><p>Believe it or not, this isn’t difficult to set up. The building blocks will enable you to create all sorts of useful things using data streams and OCI, should you be so inspired. In this first part, we’ll focus on weather data, and later add public health information like local flu and COVID numbers.</p><p>Later, we’ll also build a simple web front-end to display these numbers in context.</p><p><strong>Prerequisites</strong></p><p>- OCI Account (most of this should work on Free Tier, which <a href="https://signup.cloud.oracle.com/?language=en">you can try out here</a>).<br>- Tenancy admin access (because we’ll be creating users and groups for our database needs later).<br>- A compartment in which you can create network resources and OCI Functions resources.<br>- While we’ll look at API’s for data, you can BYOD of course if you have an existing preference (some allow a certain number of calls per day, thus you may already be paying for data and can use it — whatever works best!).<br>- Some Python experience is helpful.</p><h3><strong>Part One: OCI Streaming and Cloud Services</strong></h3><p>Step One: Setting up our dev environment</p><p>Let’s go over the network connection, compute, and policies needed to accomplish our goals. We’ll need an OCI compartment (to keep this project separate from others we may be working on). In that compartment we’ll set up a VCN with a subnet, security list, route tables, and so on. We’ll create policies and Dynamic Groups for this compartment. We’ll also create a compute instance running OCI Linux so we can invoke the API, set up OCI Function and use the python SDK. Then we’ll create a stream pool with private access (just for our app), establish a service connector, use OCI Function to transform the data, and use OCI Vault to negotiate secrets for the REST API. The data will be stored in an Autonomous JSON database (AJD).</p><p><strong>OCI Compartment, Networking resources, and policies</strong></p><p>I’ve already created a “dbtests” compartment for my test project, but as an OCI tenancy admin you’ll go to to Identity &amp; Security on the OCI Console and Compartments. Click Create Compartment and fill out what you need. Note that tags are beyond this series, but are really useful! To learn more, <a href="https://medium.com/oracledevs/working-with-oci-tag-defaults-in-terraform-d07608564eaf">check out this article</a> (it also discusses Terraform, another handy tool when you want to automate setup). We’ll put all our “stuff” in this compartment, so when any “Create …” tool comes up, make sure you’re creating resources in the correct space. For more on compartments (especially in anticipation of using Oracle Functions later), <a href="https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcompartments.htm">check out this doc on managing compartments</a>.</p><p>Once we have our compartment set up, we’ll stand up a Compute instance.</p><p><strong>Setting up the Linux VM</strong></p><p>1. From the OCI Console: <em>Compute &gt; Instances</em></p><p>2. Click Create Instance:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RfwHtg_vbrKXBwPIe_FJ8Q.png" /></figure><p>3. Let’s get some computing power and an OS to steer it. Oracle provides an excellent flavor of Linux, which is the default image. Here I’m selecting an <a href="https://docs.oracle.com/en-us/iaas/Content/General/Concepts/regions.htm">availability domain</a>, and as you can see, I’ve chosen the dbtests compartment I created earlier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NVcmFJ9j_lmN4l-HTP0B_Q.png" /></figure><p>4. While there is a developer version of Oracle Linux, I’m choosing the “stock” version, but I’m changing our CPU (shape) to a Free Tier-compatible Ampere processor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*24AIRWotjz96BvUVyP0KwQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nK7tVREqldWVBzZWXtg2LQ.png" /></figure><p>5. Some detail on my shape, which should be adequate for our testing needs:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QJz6guTK5Lv5a6yB23wqOA.png" /></figure><p>6. Click select shape.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/1*Y26YDt8MfxBYUbcOXbDhyg.png" /></figure><p>7. We’ll use the VNC I set up using a wizard before. By default, we get one private IP and one public one, which is what we need to access Functions, import data, and display our results later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YNhg4ENsgHwL0izMCOxOrg.png" /></figure><p>8. I’ll also go ahead and generate SSH keys at this point and store them somewhere handy, as we’ll use that to get into our compute instance and thrash around.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7Zv8voB3GFt_yI0RYiLYAQ.png" /></figure><p>We’re basically done for now, click to begin creation (it takes a minute or two), and note that you can save these configurations as stacks so you can easily deploy them later!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*RSo2Srq1bteIHP7H-EdbGg.png" /></figure><p><strong>Stream Pool Policies</strong></p><p>We’re going to create a stream pool for when we pull in our weather data later, and have OCI manage that stream of data for us. To make sure everything can talk to everything else, we’ll set some new policies. Again, compartments make this a lot easier as they logically delineate our policies (and other things), so we can have many applications or services with many different users given just the access they need.</p><p>I’m going to try and use the Console as much as possible to do these things, even though there are a number of ways to automate the process or drop into the command line. We’ll do that later.</p><p>First we’ll go back to Identity &amp; Security, and go to Policies. We have a nifty Create Policy button, so click that.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2h4Lom_yvsQ1NUmQ8XvnbA.png" /></figure><p>Here we can either use a sort of WYSIWYG tool, or input our policy statement directly. These are suprisingly easy to build, and ours is quite simple for this project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/1*NZ6D8kA5eQyBNvjg3avnzQ.png" /></figure><p>Policy:</p><pre><br>Allow group StreamAdmins to manage stream-family in compartment [name]</pre><p>As you can see, I’ve added my own compartment in there for specificity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UJL7KCgDzUQ5NjYzMMth4Q.png" /></figure><p>Finish the policy and you’ll see a page with details! Now we’re going to create a stream pool with the Console.</p><h3><strong>Step Two: Create a stream pool</strong></h3><p>1. In The OCI Console, go to <em>Analytics &amp; AI &gt; Messaging &gt; Streaming</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tKnjjYEktH0lLwDP2ltWeg.png" /></figure><p>2. Now click on Stream Pools, as we’ll create a pool with a public endpoint (as we’ll need to grab external weather data, etc. later).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/588/1*IGTBgHXYkhfrWHuACY7vkw.png" /></figure><p>3. Click Create Stream Pool, and create a name, select the proper compartment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*e522rhFwpP_IJVLlvhx7gg.png" /></figure><p>4. In the Configure Stream Pool panel, you’ll create a public endpoint and use Oracle-managed keys. Later, we’ll use a Vault to manage access so our streams work reliably.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*snTaD_qwPKCWOP3whGDCww.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1UG3q8RWAxeO194inVfepQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/1*f330RJoWF3UcCZqIxFE3uQ.png" /></figure><p>5. I’m also clicking Advanced Settings to access the checkbox for Kafka settings, which we’ll configure later (note that Kafka is optional, OCI’s own streaming tools would likely suffice for this project).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*t4BrPiZ1ihQpebyKjwxMdg.png" /></figure><p>6. For now, we’ll create a stream pool named weatherdata01, with a public endpoint.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o29Q5ka13WEcbwfT27NEkQ.png" /></figure><h3><strong>Step Three: Finishing setup</strong></h3><p>Now we’ll:</p><ul><li>Make sure our Linux VM’s version python is up-to-date</li><li>Look at weather API’s we can use</li></ul><p><strong>Compute prep work</strong></p><p>To interact with our VM, we’ll use the Cloud Shell baked into the OCI Console. This will require our SSH keys from before. Once we’ve logged in, we’ll perform a few checks and later we’ll drop in some scripts to invoke the weather API.</p><p>For full documentation on using SSH to connect to a running instance, you can <a href="https://docs.oracle.com/en-us/iaas/Content/Compute/Tasks/accessinginstance.htm">follow along here</a>.</p><p>I’ll use that same info (like setting permissions for my private key to read-only), but use the Console’s Cloud Shell to connect. We access cloud shell in the upper right corner:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/352/1*rups5mbvJZNMTQ_hpqDLdA.png" /></figure><p>Once it starts up, you’ll copy the IP address from your Linux instance (found in **Compute &gt; Instances &gt; Instance Details**) to log in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TZC5sWFwOwQH499LrOCKnw.png" /></figure><p>You can drop the read-only private key directly into the CLI from the Cloud Shell, then log in with:</p><pre><br>ssh opc@[yourinstanceIPhere] [public key]<br></pre><p>For more on Cloud Shell, see the <a href="https://docs.oracle.com/en-us/iaas/Content/API/Concepts/cloudshellintro.htm">Cloud Shell Docs</a>.</p><p>Once you’re logged into your instance, we’ll just check python.</p><pre><br>python — version <br></pre><p>This should result in Python 3.x.x (those x’s will be version iterations, of course).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*8wNNYIxf5PheJC1k_mMCVg.png" /></figure><p>That’s all for now, you can close the Cloud Shell and it’ll save the private key for you to log in later.</p><p><strong>The Weather API</strong></p><p>There’s a lot of data out there! And yes, there are lots of ways to get weather data. We won’t dive too deeply into this, as there are so many considerations when choosing a data source. We chose <a href="https://www.weatherapi.com/">Weather API</a> because it’s easy to use, cheap (as in free for our needs), and robust enough (supporting JSON, which we’ll use for our database later).</p><p>To use it, you will need to sign up and get an API key. Once you do, you can easily play around with basic queries on the <a href="https://www.weatherapi.com/api-explorer.aspx">API explorer page</a>. It’s actually quite fun, especially if you’re a weather nerd like me.</p><p>Anyway, as you can see from<a href="https://gist.github.com/somaece2006/d21df96ca2caaebc09dd3330d3d17a80#file-produce_weather_data-py"> this code on GitHub</a>, we’re going to easily pull weather data using this API — later we’ll connect that feed to our stream pool and populate our database.</p><pre>import requests<br>import sys<br>def produce_weather_data(city):<br>   url = “https://weatherapi-com.p.rapidapi.com/current.json&quot;<br>   querystring = {“q”:city}<br>   headers = {<br>   “X-RapidAPI-Key”: “***********”,<br>   “X-RapidAPI-Host”: “weatherapi-com.p.rapidapi.com”<br>   }<br>   response = requests.request(“GET”, url, headers=headers, params=querystring)<br>   return(response.text)</pre><p>If you’re wanting to play around with this API before our next installment, do so! As you can see, Soma’s code pulls based on city, and you can try it yourself to see what it returns as a response.</p><h3><strong>Conclusion</strong></h3><p>Our next steps will be to dive into Functions, creating a service connector and connecting it to a database that will allow us to store and retrieve weather data in a JSON database. We’ll also connect to the stream on our VM, and pull our data into an autonomous JSON database. Then, we’ll present that data on a simple web page.</p><p>Later, we’ll add COVID and flu data (in the USA that’s provided by local health agencies and the CDC) to give a sort of “dashboard” for air *safety*.</p><p>Once we have all our data sources pulled in, we’ll be able to focus on how best to display this data so it makes sense to end users.</p><p>Many thanks to Soma Dey, whose <a href="https://medium.com/oracledevs/data-stream-processing-in-oracle-cloud-an-introduction-59408bcb442">article on data stream processing</a> was the foundation of this first part of our journey.</p><p>If you’re curious about the goings-on of Oracle Developers in their natural habitat, come <a href="https://bit.ly/odevrel_slack">join us on our public Slack channel!</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11ccd4b015b3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/oracledevs/use-data-streaming-on-oci-to-provide-actionable-health-information-part-one-11ccd4b015b3">Use Data Streaming on OCI to provide actionable health information — Part one</a> was originally published in <a href="https://medium.com/oracledevs">Oracle Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>