<?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 Busra Hazer on Medium]]></title>
        <description><![CDATA[Stories by Busra Hazer on Medium]]></description>
        <link>https://medium.com/@busrahazer?source=rss-16b7c4cab718------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*1X3D6K2xHUaNnsT7mcxfeQ.jpeg</url>
            <title>Stories by Busra Hazer on Medium</title>
            <link>https://medium.com/@busrahazer?source=rss-16b7c4cab718------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 23:55:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@busrahazer/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 Power of Learning Through Conversation: Interactive Learning Experience with ILTeach]]></title>
            <link>https://medium.com/@busrahazer/the-power-of-learning-through-conversation-interactive-learning-experience-with-ilteach-8b88edea601f?source=rss-16b7c4cab718------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b88edea601f</guid>
            <category><![CDATA[gemini]]></category>
            <category><![CDATA[web-app-development]]></category>
            <category><![CDATA[product-development]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[ai-chatbot]]></category>
            <dc:creator><![CDATA[Busra Hazer]]></dc:creator>
            <pubDate>Sat, 09 Aug 2025 10:44:49 GMT</pubDate>
            <atom:updated>2025-08-09T10:44:49.876Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/548/1*UbpyIpHmg25TqqS80maT_Q.png" /></figure><p>🟣 <em>“Having my friend explain the subject to me before an exam was more useful than studying for days.”</em></p><p>Many students have said this sentence. Because one of the most effective ways to learn is through <strong>mutual interaction</strong>. Based on this idea, I started developing the <strong>ILTeach — Interactive Lesson Teaching </strong>project.</p><h4>👾 How Did the Idea Come About?</h4><p>When I started the project, my fundamental question was:</p><blockquote>Can artificial intelligence explain a subject to us just like a friend would?</blockquote><p>Behind this question were three key observations:</p><ol><li>Presenting information in a synthesized manner reduces mental load.</li><li>Learning with someone at a similar level is more effective due to emotional closeness.</li><li>Mutual interaction makes both learning and questioning information easier.</li></ol><p>As a result, my goal was to design not just a system that presents information, but a truly <strong>interactive AI learning companion</strong>.</p><h4>The Main Purpose of the Product</h4><p><strong>ILTeach</strong> is a platform where students can upload their own resources (PDF notes, course content, etc.) and chat about these documents.</p><p><strong>Purpose:</strong></p><ul><li>To synthesize the content available to students</li><li>To enable them to ask questions directly related to the topic</li><li>To <strong>provide general information support</strong> even in situations where there are no resources available</li></ul><h3>🔗Technologies Used</h3><p>In this project, the priority was to offer a powerful AI engine alongside a fast and simple user interface.</p><h4>Backend</h4><p><strong>Python / Flask </strong>Web server and API management<br><strong>Gemini API </strong>Google’s powerful language model (Gemini 1.5 Flash)<br><strong>LangChain </strong>Document processing, vectorization and LLM integration<br><strong>FAISS </strong>Vector database (making documents instantly searchable)<br><strong>dotenv </strong>Secure key management</p><h4>Frontend</h4><p><strong>HTML CSS </strong>Modern and simple UI design<br><strong>Vanilla JS </strong>Mod selection, chat management, loading, localStorage and all other operations</p><h4>How Design Interface (UI) ?</h4><p>Avoiding complex and distracting UI, a design was chosen that allows students to interact only with content and chat:</p><ul><li>Panel listing documents</li><li>Chat titles, automatic naming and deletion</li><li>Notebook: Pop-up structure on the right panel</li><li>Pomodoro: Work time tracking</li><li>Simple theme with purple and soft tones</li></ul><h3>🔮 Features</h3><h4>Main Functions:</h4><ul><li><strong>Upload PDF files</strong> (multiple file support)</li><li><strong>Automatic document splitting and vector creation</strong></li><li><strong>Chat based on uploaded content</strong></li><li><strong>Source selection / General information mode</strong></li><li><strong>Automatic chat title determination &amp; chat history list</strong></li><li><strong>Notebook command to record</strong> important points with commands such as “Note this”</li><li>Create work cycles with the<strong> Pomodoro timer</strong></li><li><strong>Modern interface with an aesthetic purple theme</strong></li></ul><h3>🌱 Features in Development</h3><blockquote>In the near future, the project will evolve into a more powerful AI learning experience with the following features:</blockquote><p>🎧 <strong>Podcast creation </strong>Text-to-speech conversion from documents<br>🧠 <strong>Personalized learning</strong> Response quality and level based on the student’s previous questions<br>📊 <strong>Visual analysis</strong> Showing focus in the particular topic through graphs. 🌐 <strong>Rich sources </strong>Retrieving information from YouTube subtitles, articles, or links<br>🎭 <strong>Role-based narration</strong> Special narration modes such as “Explain this to me like a high school teacher”</p><h3>🐙 What Am I Trying to Prove?</h3><blockquote><strong>“Learning through conversation is not just a style; it is a natural and effective form of learning.”</strong></blockquote><p>With ILTeach, the student uploads their own resources, interacts, takes notes where they forget, studies if they want, or listens if they want.</p><p>Just like listening to a friend explain a topic before an exam and saying, “<strong>I understand this topic now!”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*vq5cCuJQlBP3RdXuHqlEGg.png" /></figure><h3>🐈‍⬛ Got to Project Code</h3><p>GitHub: <a href="https://github.com/busrahazer/ilteach">https://github.com/busrahazer/ilteach</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b88edea601f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sohbet Ederek Öğrenmenin Gücü: ILTeach ile Etkileşimli Ders Deneyimi]]></title>
            <link>https://medium.com/@busrahazer/sohbet-ederek-%C3%B6%C4%9Frenmenin-g%C3%BCc%C3%BC-ilteach-ile-etkile%C5%9Fimli-ders-deneyimi-b9522711ac91?source=rss-16b7c4cab718------2</link>
            <guid isPermaLink="false">https://medium.com/p/b9522711ac91</guid>
            <category><![CDATA[web-app-development]]></category>
            <category><![CDATA[gemini]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[product-development]]></category>
            <category><![CDATA[ai-chatbot]]></category>
            <dc:creator><![CDATA[Busra Hazer]]></dc:creator>
            <pubDate>Tue, 05 Aug 2025 20:44:51 GMT</pubDate>
            <atom:updated>2025-08-09T10:46:05.747Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/548/1*UbpyIpHmg25TqqS80maT_Q.png" /></figure><p>🟣 <em>“Bir sınavdan önce arkadaşımın bana konuyu anlatması, günlerce çalışmaktan daha faydalı oluyordu.”</em></p><p>Bu cümleyi birçok öğrenci kurmuştur. Çünkü öğrenmenin en etkili yollarından biri, <strong>karşılıklı etkileşim</strong> yoluyla gerçekleşir. İşte bu fikirden yola çıkarak, <strong>ILTeach — Interactive Lesson Teaching</strong> projesini geliştirmeye başladım.</p><h3>👾 Fikir Nasıl Ortaya Çıktı?</h3><p>Projeye başlarken temel sorum şuydu:</p><blockquote>Yapay zeka, bir konuyu bize tıpkı bir arkadaşımız gibi anlatabilir mi?</blockquote><p>Bu sorunun arkasında üç temel gözlem vardı:</p><ol><li><strong>Bilginin sentezlenerek sunulması</strong>, zihinsel yükü azaltır.</li><li><strong>Benzer düzeydeki biriyle öğrenme</strong>, duygusal yakınlık sayesinde daha etkilidir.</li><li><strong>Karşılıklı etkileşim</strong>, bilgiyi hem öğrenmeyi hem de sorgulamayı kolaylaştırır.</li></ol><p>Bunun sonucunda hedefim, sadece bilgi sunan bir sistem değil, gerçekten etkileşimli bir <strong>AI öğrenme arkadaşı</strong> tasarlamaktı.</p><h3>Ürünün Temel Amacı</h3><p><strong>ILTeach</strong>, öğrencilerin kendi kaynaklarını (PDF notları, ders içerikleri vb.) yükleyerek, bu belgeler üzerinden sohbet edebilecekleri bir platformdur.</p><p>Amaç:</p><ul><li>Öğrencinin elindeki içerikleri sentezlemek</li><li>Doğrudan konuyla ilgili sorular sorabilmesini sağlamak</li><li>Kaynaksız durumlarda da <strong>genel bilgiyle destek sunmak</strong></li></ul><h3>🔗 Kullanılan Teknolojiler</h3><p>Bu projede, güçlü bir AI motorunun yanında, hızlı ve sade bir kullanıcı arayüzü sunmak öncelikliydi.</p><h3>Backend</h3><p><strong>Python / Flask </strong>Web sunucusu ve API yönetimi<br><strong>Gemini API </strong>Google’ın güçlü dil modeli (Gemini 1.5 Flash)<br><strong>LangChain </strong>Belge işleme, vektörleme ve LLM entegrasyonu<br><strong>FAISS </strong>Vektör veritabanı (belgeleri anında sorgulanabilir hale getirme)<br><strong>dotenv </strong>Güvenli anahtar yönetimi</p><h3>Frontend</h3><p><strong>HTML CSS </strong>Modern ve sade UI tasarımı<br><strong>Vanilla JS </strong>Mod seçimi, sohbet yönetimi, yükleme, localStorage gibi tüm işlemler</p><h3>🔮 Arayüz (UI) Nasıl Tasarlandı?</h3><p>Karmaşık ve dikkat dağıtan UI’lardan kaçınarak, öğrencinin sadece içerik ve sohbetle etkileşimde olabileceği bir tasarım tercih edildi:</p><ul><li>Belgeleri listeleyen panel</li><li>Sohbet başlıkları, otomatik isimlendirme ve silme</li><li>Not defteri: Sağ panelde açılır yapı</li><li>Pomodoro: Çalışma süresi takibi</li><li>Mor ve soft tonlarla sade tema</li></ul><h3>🔮 Özellikler</h3><h3>Temel Fonksiyonlar</h3><ul><li><strong>PDF dosyası yükleme</strong> (çoklu dosya desteği)</li><li><strong>Otomatik belge parçalama ve vektör oluşturma</strong></li><li><strong>Yüklenen içeriklere göre sohbet edebilme</strong></li><li><strong>Kaynak seçimi / Genel bilgi modu</strong></li><li><strong>Sohbet başlığı otomatik belirleme &amp; geçmiş sohbet listesi</strong></li><li><strong>Not defteri komutu </strong>“Bunu not et” gibi komutlarla önemli noktaları kaydetme</li><li><strong>Pomodoro zamanlayıcı </strong>ile çalışma döngüsü oluşturma</li><li><strong>Estetik mor temalı modern arayüz</strong></li></ul><h3>🌱 Geliştirme Aşamasındaki Özellikler</h3><blockquote><em>Yakın gelecekte proje, aşağıdaki özelliklerle daha güçlü bir AI eğitim deneyimine dönüşecek:</em></blockquote><p>🎧 <strong>Podcast oluşturma </strong>Belgelerden metin-ses dönüşümü <br>🧠 <strong>Kişiselleştirilmiş öğrenme </strong>Öğrencinin önceki sorularına göre yanıt kalitesi ve seviyesi<br>📊 <strong>Görsel analiz </strong>Hangi konuda ne kadar yoğunlaştığını grafikle gösterme🌐 <strong>Kaynak zenginliği </strong>YouTube altyazısı, makale veya bağlantıdan bilgi alma<br>🎭 <strong>Rol bazlı anlatım </strong>“Bana bunu lise öğretmeni gibi anlat” gibi özel anlatım modları</p><h3>🐙 Neyi Kanıtlamak İstiyorum?</h3><blockquote><strong><em>“Sohbet ederek öğrenme, sadece bir stil değil; öğrenmenin doğal ve etkili bir biçimidir.”</em></strong></blockquote><p>ILTeach ile öğrenci kendi kaynaklarını yükler, etkileşime girer, unuttuğu yerde not alır, isterse çalışır, isterse dinler.</p><p>Tıpkı sınavdan önce arkadaşından bir konuyu dinleyip <strong>“Ben bu konuyu şimdi anladım!”</strong> demesi gibi.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*vq5cCuJQlBP3RdXuHqlEGg.png" /></figure><h3>🐈‍⬛ Projeye Git</h3><p>GitHub: <a href="https://github.com/busrahazer/ilteach">https://github.com/busrahazer/ilteach</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b9522711ac91" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What I did with AWS and DynamoDB?]]></title>
            <link>https://medium.com/@busrahazer/hi-i-made-some-additions-to-a-desktop-application-i-developed-with-aws-82757e31b2c3?source=rss-16b7c4cab718------2</link>
            <guid isPermaLink="false">https://medium.com/p/82757e31b2c3</guid>
            <category><![CDATA[aws-session-manager]]></category>
            <category><![CDATA[aws-dynamodb]]></category>
            <category><![CDATA[boto3]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-services]]></category>
            <dc:creator><![CDATA[Busra Hazer]]></dc:creator>
            <pubDate>Wed, 10 Jul 2024 14:39:01 GMT</pubDate>
            <atom:updated>2024-07-10T14:42:22.417Z</atom:updated>
            <content:encoded><![CDATA[<p>hi! I made some additions to a desktop application I developed with <strong>AWS</strong>. With these, I want to explain how I entered the<strong> Cloud System</strong> and what I did.</p><p>First of all, let’s talk about <strong>AWS</strong>. <strong>AWS, Amazon Web Service</strong> is a platform that offers cloud-based services. <strong>AWS</strong> provides services in many areas such as data storage, data processing, data analysis, artificial intelligence and machine learning. <strong>AWS</strong> services make it easier to process and analyze large data sets, develop and deploy applications.</p><p>There are dozens of services you can access through <strong>AWS</strong>. I have added some titles below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/260/1*YMWkfNadtjshKbtfP4L4Qw.png" /></figure><p>Since I will use <strong>AWS</strong> for data storage in my own project, I used <strong>DynamoDB </strong>service. <strong>DynamoDB</strong> is a high-performance and scalable <strong>NoSQL</strong> database. This database is used to efficiently store data and provide fast access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*LORblZvKfHEjnhy68AfSiQ.png" /></figure><p><strong>AWS</strong> <strong>Access Key ID and AWS Secret Access Key</strong> are required to establish a connection with <strong>AWS</strong>. This information can be generated from <strong>Security Credentials &gt; Access Key.</strong></p><p>You need to enter this information from the terminal to establish the connection on your computer. Or, if you use <strong>Python</strong> in your project, you need to connect with the <strong>boto3</strong> library. <strong>boto3</strong> is an SDK for interacting with <strong>AWS</strong> services via <strong>Python</strong>. <strong>boto3</strong> allows you to work programmatically with <strong>AWS</strong> services and manage various <strong>AWS</strong> resources. Here is the part of my connection to send data to the <strong>AWS</strong> database:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/543/1*l7_zsNz4zQnzkYA4ZrPwzw.png" /></figure><p>The <em>boto3.Session</em> function creates a session with the given access keys and zone name. The session is used for all interactions with <em>AWS.session.resource(‘dynamodb’)</em> function returns the <strong>DynamoDB</strong> resource <em>and session.client(‘dynamodb’) </em>function returns the <strong>DynamoDB</strong> client. These objects are used to perform operations on <strong>DynamoDB</strong>.</p><p>After making the connection and accessing the database, I started throwing the data I had into the database. For this part, I created a text file with random names. I wrote a code to assign each data in this file as columns and to assign values between 0–100 to these columns every 5 seconds. The main part where this code was executed was as follows:</p><pre>def main():<br>    # Read parameters<br>    current_directory = os.path.dirname(os.path.abspath(__file__))<br>    file_path = os.path.join(current_directory, &#39;items_parameters.txt&#39;)<br>    parameters = read_parameters_from_file(file_path)<br><br>    # Get next table name<br>    table_name = get_next_table_name()<br><br>    # Create table<br>    table = create_table(table_name)<br>    print(f&quot;Table {table_name} created successfully&quot;)<br><br>    # Add data<br>    data_id = 1<br>    while True:<br>        add_data_to_table(table, data_id, parameters)<br>        print(f&quot;Data added to table {table_name}&quot;)<br>        data_id += 1<br>        time.sleep(5)  # add data every 5 second</pre><p>First of all, I started by reading my text file and making the names in it as parameters. Then I created the tables by adding 1 to the table if there is a table with this name in the database (<em>for example, if there is a table with this name, the new table name should be given as Veriler2</em>). Finally, I assigned an id and grew my tables by giving new values to these items every 5 seconds with a loop. By continuing this process as long as the code was running, I was able to continue uploading my data to the <strong>AWS</strong> database. Also, my <em>add_data_to_table</em> function I wrote for the values I added between 0–100 was as follows:</p><pre># Adding data<br>def add_data_to_table(table, data_id, parameters):<br>    data = {&#39;dataId&#39;: data_id}<br>    for param in parameters:<br>        data[param] = random.randint(0, 100)<br>    table.put_item(Item=data)</pre><p>Up to this point, I have created a connection between my application and <strong>AWS</strong> and managed to upload data to the <strong>Cloud System</strong> with a code. In the next step, I will try to pull this data and work on real-time data display.</p><p>See you in my next article. ☁️ 👋🏻</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82757e31b2c3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS ve DynamoDB ile Neler Yaptım?]]></title>
            <link>https://medium.com/@busrahazer/aws-ve-dynamodb-ile-neler-yapt%C4%B1m-f4e85171a0fa?source=rss-16b7c4cab718------2</link>
            <guid isPermaLink="false">https://medium.com/p/f4e85171a0fa</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-dynamodb]]></category>
            <category><![CDATA[aws-cloud]]></category>
            <category><![CDATA[aws-session-manager]]></category>
            <category><![CDATA[boto3]]></category>
            <dc:creator><![CDATA[Busra Hazer]]></dc:creator>
            <pubDate>Wed, 10 Jul 2024 12:39:38 GMT</pubDate>
            <atom:updated>2024-07-10T12:39:38.196Z</atom:updated>
            <content:encoded><![CDATA[<p>hi! Geliştirdiğim bir masaüstü uygulamasına <strong>AWS</strong> ile bazı eklemeler yaptım. Bunlarla birlikte <strong>Bulut Sistemine </strong>nasıl girdiğimi ve neler yaptığımı anlatmak istiyorum.</p><p>Öncelikle <strong>AWS</strong> yani Amazon Web Service’den bahsedelim. <strong>AWS</strong>, bulut tabanlı hizmetler sunan bir platformdur. <strong>AWS</strong>, veri depolama, veri işleme, veri analizi, yapay zeka ve makine öğrenimi gibi birçok alanda hizmet sağlar. <strong>AWS</strong>’nin sunduğu hizmetler sayesinde, büyük veri setlerini işlemek ve analiz etmek, uygulama geliştirmek ve dağıtmak kolaylaşır.</p><p><strong>AWS</strong> üzerinden ulaşabileceğiniz onlarca servis mevcut. Bazı başlıkları aşağıya ekledim.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/260/1*YMWkfNadtjshKbtfP4L4Qw.png" /></figure><p><strong>AWS</strong>’yi kendi projemde veri depolama amacıyla kullanacağım için <strong>DynamoDB</strong> servisinden yararlandım. <strong>DynamoDB</strong>, yüksek performanslı ve ölçeklenebilir bir <strong>NoSQL</strong> veritabanıdır. Bu veritabanı, verileri verimli bir şekilde depolamak ve hızlı erişim sağlamak için kullanılır.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*LORblZvKfHEjnhy68AfSiQ.png" /></figure><p><strong>AWS</strong> ile bağlantı kurmak için gerekli olan <strong>AWS</strong> erişim anahtarı <strong>(AWS Access Key ID</strong>) ve gizli anahtar <strong>(AWS Secret Access Key)</strong> bilgileri kullanmak gerekir. Bu bilgiler <strong>Security Credentials &gt; Access Key</strong> kısmından oluşturulabilir.</p><p>Bağlantının bilgisayarınızda kurulması için terminalden bu bilgileri girmeniz gerekir. Ya da projenizde <strong>Python</strong> kullanırsanız <strong>boto3</strong> kütüphanesiyle bağlantı sağlamanız gerekir. <strong>boto3</strong>, <strong>AWS</strong> servisleri ile <strong>Python</strong> üzerinden etkileşim kurmak için kullanılan bir SDK’dır. <strong>boto3</strong>, <strong>AWS</strong> servisleri ile programatik olarak çalışmanıza ve çeşitli <strong>AWS</strong> kaynaklarını yönetmenize olanak tanır. Benim <strong>AWS</strong> veritabanına veri göndermek için bağlantı yaptığım kısmı şöyleydi:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/543/1*l7_zsNz4zQnzkYA4ZrPwzw.png" /></figure><p>boto3.Session fonksiyonu, verilen erişim anahtarları ve bölge adı ile bir oturum oluşturur. Oturum, <strong>AWS</strong> ile yapılacak tüm etkileşimlerde kullanılır.session.resource(&#39;dynamodb&#39;) fonksiyonu, <strong>DynamoDB</strong> kaynağını döner ve session.client(&#39;dynamodb&#39;) fonksiyonu ise <strong>DynamoDB</strong> istemcisini döner. Bu nesneler, <strong>DynamoDB</strong> üzerinde işlem yapmak için kullanılır.</p><p>Bağlantı yaptıktan ve veritabanına ulaştıktan sonra elimdeki verileri veritabanına atmaya başladım. Bu kısım için rastgele isimler olan bir text dosyası oluşturdum. Bu dosyadaki her bir veriyi sütun olarak ve her 5 saniyede bir bu sütunlara 0–100 arası değerler atacak şekilde bir kod yazdım. Bu kodun çalıştırıldığı ana kısım şöyleydi:</p><pre>def main():<br>    # Parametreleri oku<br>    current_directory = os.path.dirname(os.path.abspath(__file__))<br>    file_path = os.path.join(current_directory, &#39;items_parameters.txt&#39;)<br>    parameters = read_parameters_from_file(file_path)<br><br>    # Sonraki tablo adini al<br>    table_name = get_next_table_name()<br><br>    # Tablo olusturma<br>    table = create_table(table_name)<br>    print(f&quot;Table {table_name} created successfully&quot;)<br><br>    # Verileri ekleme<br>    data_id = 1<br>    while True:<br>        add_data_to_table(table, data_id, parameters)<br>        print(f&quot;Data added to table {table_name}&quot;)<br>        data_id += 1<br>        time.sleep(5)  # Her 5 saniyede bir veri ekle</pre><p>Öncelikle text dosyamı okumak ve buradaki isimleri parametre yapmakla başladım. Sonrasında tabloları, eğer veritabanında bu isimde tablo varsa ona 1 ekleyerek <em>(örneğin Veriler1 tablosu varsa Veriler2 olarak yeni tablo ismi verilmeli)</em> yeni tabloyu oluşturdum. En sonunda da id ataması yaptım ve bir döngüyle her 5 saniyede bu itemlere yeni değerler vererek tablolarımı büyüttüm. Kod çalıştığı sürece bu işleme devam ederek <strong>AWS</strong> veritabanına verilerimi yüklemeye devam edebildim. Ayrıca 0–100 arası eklediğim değerler için yazdığım <strong>add_data_to_table</strong> fonksiyonum da şöyleydi:</p><pre># Veri ekleme<br>def add_data_to_table(table, data_id, parameters):<br>    data = {&#39;dataId&#39;: data_id}<br>    for param in parameters:<br>        data[param] = random.randint(0, 100)<br>    table.put_item(Item=data)</pre><p>Bu aşamaya kadar uygulamam ile <strong>AWS</strong> arasında bir bağlantı oluşturdum ve bir kod ile <strong>Bulut Sistemine</strong> veri yüklemeyi başardım. Sonraki aşamada bu verileri çekmeye çalışarak gerçek zamanlı veri gösterimi üzerinde çalışacağım.</p><p>Sonraki yazımda görüşmek üzere. ☁️ 👋🏻</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f4e85171a0fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create a Requirements File]]></title>
            <link>https://medium.com/@busrahazer/create-a-requirements-file-d048358444c3?source=rss-16b7c4cab718------2</link>
            <guid isPermaLink="false">https://medium.com/p/d048358444c3</guid>
            <category><![CDATA[requirements]]></category>
            <category><![CDATA[python-pip]]></category>
            <category><![CDATA[command-line]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Busra Hazer]]></dc:creator>
            <pubDate>Fri, 26 Apr 2024 07:52:18 GMT</pubDate>
            <atom:updated>2024-04-26T07:52:18.660Z</atom:updated>
            <content:encoded><![CDATA[<p>When you browse a project on GitHub, you must have seen the Requirements section, where the project dependencies are listed. Instead of installing each dependency one by one, it is much more convenient to manage them with a single file. Alternatively, creating a Requirements file for your own project can be very useful for users who want to use your project. First, it is necessary to identify the requirements. As an example, I will explain this for Python. If we enter the following command in the terminal:</p><pre>pip list</pre><p>You can see all installed Python modules and their versions on your computer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/1*74gC0qs_hCItrxTlwei9zQ.png" /></figure><p>Then, you can determine which modules you need for your project, and copy these modules along with their versions into an empty text file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/1*2iuhPAIQ2x9fX6aMwO0ewQ.png" /></figure><p>After saving this file, how can we use it?</p><p>You can use the following command in the terminal to automatically install the modules listed in this file.</p><pre>pip install -r requirements.txt    // write a your file name</pre><p>Creating this file can be useful for both you and other users when you use a large number of modules and libraries in your projects. See you in the next post. Bye!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d048358444c3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Gereklilikler Dosyası Oluşturmak]]></title>
            <link>https://medium.com/@busrahazer/gereklilikler-dosyas%C4%B1-olu%C5%9Fturmak-6990c9128458?source=rss-16b7c4cab718------2</link>
            <guid isPermaLink="false">https://medium.com/p/6990c9128458</guid>
            <category><![CDATA[python-pip]]></category>
            <category><![CDATA[commands]]></category>
            <category><![CDATA[requirements]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Busra Hazer]]></dc:creator>
            <pubDate>Fri, 26 Apr 2024 07:46:32 GMT</pubDate>
            <atom:updated>2024-04-26T07:46:32.362Z</atom:updated>
            <content:encoded><![CDATA[<p>GitHub’da bir proje incelediğinizde bu projedeki Requirements yani Gereklilikler kısmını mutlaka görmüşsünüzdür. Buradaki kaynakları tek tek yüklemek yerine tek bir dosyayla yapmak büyük kolaylık sağlar. Ya da kendi projeniz için bir Gereklilikler dosyası oluşturmak projenizi kullanmak isteyen kullanıcılar için epey faydalıdır. Öncelikle gereklilikleri tespit etmek gerekir. Ben örnek olarak Python için anlatacağım. Terminale gelerek şu komutu girersek:</p><pre>pip list</pre><p>bilgisayarınızda yüklü tüm Python modüllerini ve hangi <br>sürümleri olduğunu görebilirsiniz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/1*74gC0qs_hCItrxTlwei9zQ.png" /><figcaption>Benim Bilgisayarımda Yüklü Olan Python Modüllerinin Bir Kısmı</figcaption></figure><p>Daha sonra projenize gelerek hangi modüllere ihtiyacınız olduğunu tespit ederek boş bir text dosyasına bu modülleri sürümleriyle birlikte kopyalayabilirsiniz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/1*2iuhPAIQ2x9fX6aMwO0ewQ.png" /><figcaption>Bir Projem için Oluşturduğum Gereklilikler Dosyası</figcaption></figure><p>Bu işlemden sonra text dosyasını kaydediyoruz. Peki bu text dosyasını nasıl kullanabiliriz?</p><p>Terminale gelerek şu komutu yazmak bu dosyadaki modülleri otomatik şekilde indirecektir.</p><pre>pip install -r requirements.txt    // dosya isminizi girmelisiniz</pre><p>Projelerinizde çok fazla modül ve kütüphane kullandığınızda bu dosyasyı oluşturmak hem sizin için hem de diğer kullanıcılar için faydalı olacaktır. Sonraki yazıda görüşmek üzere.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6990c9128458" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Built a System with MQTT]]></title>
            <link>https://medium.com/@busrahazer/i-built-a-system-with-mqtt-f867e754968d?source=rss-16b7c4cab718------2</link>
            <guid isPermaLink="false">https://medium.com/p/f867e754968d</guid>
            <category><![CDATA[mqtt-broker]]></category>
            <category><![CDATA[mosquitto]]></category>
            <category><![CDATA[system]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[mqtt]]></category>
            <dc:creator><![CDATA[Busra Hazer]]></dc:creator>
            <pubDate>Fri, 19 Apr 2024 07:26:27 GMT</pubDate>
            <atom:updated>2024-04-19T07:26:27.189Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi! In my previous post, I mentioned that I’m trying to learn the <strong>MQTT</strong> protocol and will share my progress. It might be helpful to take a quick look at the post where I explained what <strong>MQTT</strong> is, what it’s used for, and how to use it:</p><p><a href="https://medium.com/@busrahazer/mqtt-mosquitto-mongodb-008f9c07f889">MQTT | Mosquitto | MongoDB</a></p><p><strong>MQTT</strong> is an IoT protocol consisting of clients that publish messages and servers that listen to these messages. I used the <strong>Mosquitto</strong> module to connect to the <strong>MQTT</strong> server, which is also known as the broker. Additionally, my project is a <strong>C++</strong> project based on the <strong>signal-slot </strong>mechanism. My goal is to manipulate data using <strong>MQTT</strong>. Before moving on to this, let’s go over the steps I completed to include this in my project.</p><p>Firstly, I created a base for this system in my project. I did this by creating the mqsystem class. This class contains:</p><p><strong>Header files are files that contain C function declarations and macro definitions shared between several source files, with the extension “.h”.</strong></p><p>Below, I defined functions belonging to this file that can be used by each source file:</p><pre>public:<br>        explicit MqSystem();<br><br>        void connectBroker(QString host, qint16 port, qint16 timeout);<br>        void disconnectBroker();<br>        void pub(QString topic, QString val);<br>        void sub(QString topic);<br>        void unsub(QString topic);</pre><p>Here, we start by connecting to a <strong>Broker</strong>, providing parameters such as the host name, the port to connect to (for example, port 1883 is used for the <strong>Mosquitto</strong> module), and the time interval. We also mentioned that <strong>MQTT</strong> follows the subscribe/publish logic. We have defined functions to perform these operations.</p><p>I mentioned that I’m working on a project based on the signal-slot mechanism. Let’s explain these first.</p><p><strong>Signals: They are used to notify other objects when an event occurs.</strong></p><p><strong>Slots: They are functions that are automatically called when a signal is triggered.</strong></p><p>For example, when connecting the <strong>signal</strong> in class ax to the <strong>slot</strong> in class bz:</p><pre>// ax class<br><br>signals:<br>        void busraSinyali(int id, QString bValue);</pre><pre>// bz class<br><br>public slots: <br>        void busraSlotu(int id, QString bValue);<br><br><br>// Connection signal-slot<br><br>ax *sinyal = new ax();<br>bz *slot = new bz();<br><br>QObject:: connect(sinyal &amp; ax :: busraSinyali, slot &amp; bz :: busraSlotu);<br>        void onMsgReceived(const QByteArray &amp;msg, const QMqttTopicName &amp;topic);</pre><p>If I managed to explain the <strong>signal-slot</strong> mechanism a bit, let’s continue. In the following section, I made the <strong>signal</strong> and <strong>slot</strong> definitions for the project.</p><pre>signals:<br>       void newVal(QString topic, QString val);<br><br>public slots:<br>       void busraDenemeChanged();<br><br>private slots:<br>        void onConnected();<br>        void onDisconnected();<br>        void onMsgReceived(const QByteArray &amp;msg, const QMqttTopicName &amp;topic);</pre><p>Additionally, we also need to make the following definitions that only the mqsystem class can use:</p><pre>private:<br>        QMqttClient m_client;<br><br>        QString m_host;<br>        qint16 m_port;<br>        qint16 m_timeout;<br>        QList&lt;QString&gt; m_topics;</pre><p>When we write the content of the <strong>header</strong> <strong>file</strong>, we need to fill these in the source file.</p><p><strong>The source file is the one containing C++ code. Here, we should write the contents of the functions defined in the header file.</strong></p><p>Firstly, I established the connections:</p><pre>MqSystem::MqSystem(){<br>  connect(&amp;m_client, &amp;QMqttClient::connected, this, &amp;MqSystem::onConnected);<br>  connect(&amp;m_client, &amp;QMqttClient::disconnected, this, &amp;MqSystem::onDisconnected);<br>  connect(&amp;m_client, &amp;QMqttClient::messageReceived, this, &amp;MqSystem::onMsgReceived);<br>}</pre><p>Here, we connect our functions with the functions of QMqttClient (this part comes from the ready-made class created by <strong>QT</strong> for <strong>MQTT</strong>). Instead of making this connection, we could directly use the functions of QMqttClient, but to make the function contents more flexible, it&#39;s more functional to create new functions that will include only the relevant parts from here and add additional features.</p><p>Now, let’s take a look at how we use the connectBroker function in the header file and the variables defined as private in the header file:</p><pre>void MqSystem::connectBroker(QString host, qint16 port, qint16 timeout){<br><br>        m_host = host;<br>        m_port = port;<br>        m_timeout = timeout;<br><br>// We mapped m_client to QMqttClient in the header file, <br>// so names like setHostName come from there.<br><br>        m_client.setHostname(m_host);<br>        m_client.setPort(m_port);<br>        m_client.connectToHost();<br>}</pre><p>Additionally, we had defined two more functions named pub and sub. I wrote their contents as follows:</p><pre>void MqSystem::pub(QString topic, QString val){<br><br>        QMqttTopicName mqttTopic(topic);<br>        QString value = val.toUtf8();<br>        m_client.publish(mqttTopic, value);<br>}<br><br>void MqSystem::sub(QString topic){<br><br>        m_client.subscribe(QMqttTopicFilter(topic));<br>        m_topics.append(topic);<br>}</pre><p>The contents of the onConnect, onDisconnect, and onMsgReceived functions in the header file:</p><pre>void MqSystem::onConnected(){<br><br>        qDebug() &lt;&lt; &quot;Connected to MQTT broker&quot;;<br>        for (const QString &amp;topic : qAsConst(m_topics)) {<br>            m_client.subscribe(QMqttTopicFilter(topic));<br>}<br><br>void MqSystem::onDisconnected(){<br><br>        qDebug() &lt;&lt; &quot;Disconnected from MQTT broker&quot;;<br>}<br><br>void MqSystem::onMsgReceived(const QString &amp;msg, const QMqttTopicName &amp;topic){<br>        <br>        emit newVal(topic.name(), QString::fromUtf8(msg));<br>}</pre><p>You may have noticed the emit operation in the onMsgReceived function. This operation is where we emit the signal, allowing us to use it. I<em>f a signal is not emitted, there is no function. </em>This function is our message broadcasting function, and it makes sense to emit the newVal signal here.</p><p>Now, let’s make a publish operation from the function we wrote for testing purposes, so we can test the system.</p><pre>void MqSystem::busraDenemeChanged(){<br><br>        pub(&quot;busraMesaji&quot; &quot;Hi from BUSRA!&quot;);<br>        qDebug() &lt;&lt; &quot;busraDeneme communicate from MQTT.&quot;;<br>}</pre><p>Great job! We have written the functions, made the signal slot connections, emitted the signal and broadcast a message. Now, let’s see if we can receive this message.</p><p>Firstly, I included the mqsystem class in the main file of my project along with details such as host and port, and connected to the Broker.</p><pre>m_mqSystem.connectBroker(&quot;localhost&quot;, 1883, 60);<br>m_mqSystem.busraDenemeChanged();   // for testing</pre><p><strong>Now, we can listen to the message from the terminal!</strong></p><pre>mosquitto_sub -t &quot;busraMesaji&quot;</pre><p>In the terminal where I’m listening to the channel, I can receive the message “<strong>Hi from BUSRA!</strong>”.</p><p>I’ve attempted to set up a basic <strong>IoT</strong> communication system and explain it. Until next time!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f867e754968d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MQTT ile Bir Sistem Kurdum.]]></title>
            <link>https://medium.com/@busrahazer/mqtt-ile-bir-sistem-kurdum-7cb60cf6e507?source=rss-16b7c4cab718------2</link>
            <guid isPermaLink="false">https://medium.com/p/7cb60cf6e507</guid>
            <category><![CDATA[system]]></category>
            <category><![CDATA[mosquitto-mqtt]]></category>
            <category><![CDATA[mqtt]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[mosquitto]]></category>
            <dc:creator><![CDATA[Busra Hazer]]></dc:creator>
            <pubDate>Fri, 19 Apr 2024 07:02:02 GMT</pubDate>
            <atom:updated>2024-04-19T07:02:02.847Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi! <strong>MQTT</strong> protokolünü öğrenmeye çalıştığımı ve bu adımları paylaşacağımı önceki yazımda anlatmıştım. <strong>MQTT</strong> nedir, ne işe yarar, nasıl kullanılır bunları açıkladığım yazıya kısa bir göz atmanın faydası olacaktır:</p><p><a href="https://medium.com/@busrahazer/mqtt-mosquitto-mongodb-3af455dd09f8">MQTT | Mosquitto | MongoDB</a></p><p><strong>MQTT</strong>, mesaj yayınlayan bir client ve bu mesajları dinleyen sunuculardan oluşan bir IoT protokolüdür. <strong>MQTT</strong> sunucusunu <strong>Broker</strong>’a bağlarken <strong>Mosquitto</strong> modülünden yararlandım. Ayrıca projem <strong>sinyal-slot</strong> mantığına dayanan bir <strong>C++</strong> projesi. Amacım ise <strong>MQTT</strong> ile verilerim üzerinde değişiklikler yapabilmek. Projeme bunu dahil ederken hangi adımları tamamladım bunlara geçebiliriz.</p><p>Projemde öncelikle bu sistem için bir base oluşturdum. Bu temeli <strong>mqsystem sınıfı </strong>oluşturarak bunu yaptım. Bu sınıfın içeriği:</p><p><strong>Header dosyası </strong>“.h” uzantısı ile biten C fonksiyon tanımlamaları ve makro tanımlamalarını içeren birkaç kaynak dosya arasında paylaşılan dosyalardır.</p><p>Aşağıda bu dosyaya ait ve her kaynak dosyası tarafından kullanılabilir fonksiyonları tanımladım:</p><pre>public:<br>        explicit MqSystem();<br><br>        void connectBroker(QString host, qint16 port, qint16 timeout);<br>        void disconnectBroker();<br>        void pub(QString topic, QString val);<br>        void sub(QString topic);<br>        void unsub(QString topic);</pre><p>Burada öncelikle bir <strong>Broker</strong>’a bağlanmak ve bağlanırken de <strong>host</strong> ismi, hangi <strong>port</strong>’tan bağlanılacağı (<em>örneğin </em><strong><em>Mosquitto</em></strong><em> modülü için </em><strong><em>1883</em></strong><em> numaralı port kullanılır</em>) ve zaman aralığı gibi parametreler vererek başlıyoruz. Ayrıca <strong>MQTT</strong> ‘nin <strong>subscribe/publish</strong> mantığına sahip olduğunu anlatmıştık. Bu işlemleri yapacak fonksiyonları da tanımladık.</p><p><strong>Sinyal-Slot</strong> mantığına dayalı bir projede çalıştığımı söylemiştim. Önce bunları açıklayalım.</p><p><strong>Signals: Bir olayın gerçekleştiğini diğer nesnelere bildirmek için kullanılır.</strong></p><p><strong>Slots: Bir sinyal tetiklendiğinde otomatik olarak çağrılacak işlevdir.</strong></p><p>Örneğin ax sınıfındaki <strong>sinyali</strong>, bz sınıfındaki <strong>slota</strong> bağlarken:</p><pre>// ax sınıfı<br><br>signals:<br>        void busraSinyali(int id, QString bValue);</pre><pre>// bz sınıfı<br><br>public slots: // her yerden ulaşmak adına public tanımladım<br>        void busraSlotu(int id, QString bValue);<br><br><br>// Bağlantıyı kuralım<br><br>ax *sinyal = new ax();<br>bz *slot = new bz();<br><br>QObject:: connect(sinyal &amp; ax :: busraSinyali, slot &amp; bz :: busraSlotu);<br>        void onMsgReceived(const QByteArray &amp;msg, const QMqttTopicName &amp;topic);</pre><p><strong>Sinyal-slot</strong> mantığını biraz açıklayabildiysem devam edelim. Aşağıdaki kısımda da projenin <strong>sinyal</strong> ve <strong>slot </strong>tanımlarını yaptım.</p><pre>signals:<br>       void newVal(QString topic, QString val);<br><br>public slots:<br>       void busraDenemeChanged();<br><br>private slots:<br>        void onConnected();<br>        void onDisconnected();<br>        void onMsgReceived(const QByteArray &amp;msg, const QMqttTopicName &amp;topic);</pre><p>Ayrıca sadece <strong>mqsystem</strong> sınıfının kullanabileceği aşağıdaki tanımları da yapmak gerekiyor:</p><pre><br>private:<br>        QMqttClient m_client;<br><br>        QString m_host;<br>        qint16 m_port;<br>        qint16 m_timeout;<br>        QList&lt;QString&gt; m_topics;</pre><p><strong>Header</strong> dosyasının içeriğini yazdığımızda bunları kaynak dosyasında doldurmamız gerekiyor.</p><p><strong>Kaynak</strong> dosyası, <strong>C</strong>++ kodlarını içeren dosyaya denir. Burada <strong>header</strong> dosyasında tanımladığımız işlevlerin içeriklerini yazmalıyız.</p><p>Öncelikle bağlantıları kurdum:</p><pre>MqSystem::MqSystem(){<br>  connect(&amp;m_client, &amp;QMqttClient::connected, this, &amp;MqSystem::onConnected);<br>  connect(&amp;m_client, &amp;QMqttClient::disconnected, this, &amp;MqSystem::onDisconnected);<br>  connect(&amp;m_client, &amp;QMqttClient::messageReceived, this, &amp;MqSystem::onMsgReceived);<br>}</pre><p>Buradaki bağlantı <strong>QMqttClient</strong> <em>(bu kısım </em><strong><em>QT</em></strong><em>’nin </em><strong><em>MQTT</em></strong><em> ile oluşturduğu hazır sınıftan geliyor)</em> işlevleri ile kendi işlevlerimi bağlıyoruz. Bu bağlantıyı yapmak yerine direkt <strong>QMqttClient</strong> işlevlerini de kullanabilirdik ancak fonkiyon içeriklerini daha esnekleştirmek adına sadece ilgili kısımları buradan alıp ek özellikleri kendimizin yazacağı yeni fonksiyonlar oluşturmak daha işlevsel.</p><p>Şimdi <strong>header</strong> dosyasında <strong>connectBroker</strong> fonksiyonunu ve <strong>header </strong>dosyasında<strong> private</strong> olarak tanımladığımız değişkenleri nasıl kullandığımıza bakalım:</p><pre>void MqSystem::connectBroker(QString host, qint16 port, qint16 timeout){<br><br>        m_host = host;<br>        m_port = port;<br>        m_timeout = timeout;<br><br>// Header dosyasında m_client sözcüğünü QMqttClient ile map&#39;lemiştik, <br>// yani setHostName gibi isimler oradan geliyor .<br><br>        m_client.setHostname(m_host);<br>        m_client.setPort(m_port);<br>        m_client.connectToHost();<br>}</pre><p>Ayrıca <strong>pub</strong> ve <strong>sub</strong> isminde iki işlev daha tanımlamıştık bunların içeriğini de temel şekilde şöyle yazdım:</p><pre>void MqSystem::pub(QString topic, QString val){<br><br>        QMqttTopicName mqttTopic(topic);<br>        QString value = val.toUtf8();<br>        m_client.publish(mqttTopic, value);<br>}<br><br>void MqSystem::sub(QString topic){<br><br>        m_client.subscribe(QMqttTopicFilter(topic));<br>        m_topics.append(topic);<br>}</pre><p><strong>Header</strong> dosyasındaki <strong>onConnect</strong>, <strong>onDisconnect</strong> ve <strong>onMsgReceived</strong> fonksiyonlarının içeriği:</p><pre>void MqSystem::onConnected(){<br><br>        qDebug() &lt;&lt; &quot;Connected to MQTT broker&quot;;<br>        for (const QString &amp;topic : qAsConst(m_topics)) {<br>            m_client.subscribe(QMqttTopicFilter(topic));<br>}<br><br>void MqSystem::onDisconnected(){<br><br>        qDebug() &lt;&lt; &quot;Disconnected from MQTT broker&quot;;<br>}<br><br>void MqSystem::onMsgReceived(const QString &amp;msg, const QMqttTopicName &amp;topic){<br>        <br>        emit newVal(topic.name(), QString::fromUtf8(msg));<br>}</pre><p><strong>onMsgReceived</strong> fonksiyonundaki <strong><em>emit</em></strong> işlemi dikkatinizi çekmiştir. Bu işlem sinyali yaydığımız ve bu şekilde onu kullanabildiğimiz kısımdır. <em>Bir sinyal </em><strong><em>emit</em></strong><em> edilmezse/yayılmazsa bir işlevi yoktur.</em> Bu fonksiyon da mesajları yayan fonksiyonumuz, burada <strong>newVal</strong> sinyalini <strong>emit</strong> etmek mantıklı.</p><p>Artık deneme için yazdığımız fonksiyondan da bir <strong>publish</strong> işlemi yaparak mesaj yayalım, böylece sistemi test edebiliriz.</p><pre>void MqSystem::busraDenemeChanged(){<br><br>        pub(&quot;busraMesaji&quot; &quot;Hi from BUSRA!&quot;);<br>        qDebug() &lt;&lt; &quot;busraDeneme communicate from MQTT.&quot;;<br>}</pre><p>İşlevleri yazdık, <strong>sinyal</strong> ve <strong>slot</strong> bağlantılarını yaptık, sinyali yaydık ve bir adet mesaj yayınladık. Peki bu mesajı görebilecek miyiz bunu kontrol edelim.</p><p>Ben öncelikle projemin ana dosyasında <strong>host</strong>, <strong>port</strong> gibi detaylarla birlikte <strong>mqsystem</strong> sınıfını dahil etme işlemi yaptım ve <strong>Broker</strong>’a bağlandım.</p><pre>m_mqSystem.connectBroker(&quot;localhost&quot;, 1883, 60);<br>m_mqSystem.busraDenemeChanged();   // for testing</pre><p><strong>Artık terminalden mesajı dinleyebiliriz!</strong></p><pre>mosquitto_sub -t &quot;busraMesaji&quot;</pre><p>Kanalı dinlediğim terminalde<strong> Hi from BUSRA!</strong> mesajını alabilirim.</p><p>Giriş seviyesinde bir IoT haberleşme sistemi kurmaya ve bunu anlatmaya çalıştım. Devamında görüşmek üzere.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7cb60cf6e507" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MQTT | Mosquitto | MongoDB]]></title>
            <link>https://medium.com/@busrahazer/mqtt-mosquitto-mongodb-008f9c07f889?source=rss-16b7c4cab718------2</link>
            <guid isPermaLink="false">https://medium.com/p/008f9c07f889</guid>
            <category><![CDATA[mosquitto-mqtt]]></category>
            <category><![CDATA[mosquitto]]></category>
            <category><![CDATA[mqtt-broker]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[mqtt]]></category>
            <dc:creator><![CDATA[Busra Hazer]]></dc:creator>
            <pubDate>Tue, 26 Mar 2024 13:09:34 GMT</pubDate>
            <atom:updated>2024-03-26T13:09:34.611Z</atom:updated>
            <content:encoded><![CDATA[<p>Let’s take a look at what these terms do and how they are used, which I’m also starting to learn from scratch today.</p><p><strong>MQTT (Message Queuing Telemetry Transport)</strong> is a lightweight and efficient messaging protocol among <strong>Internet of Things (IoT)</strong> devices. This protocol is used for exchanging data between devices and typically operates in a client/server model. Client devices connect to an <strong>MQTT </strong>server (often referred to as a <strong>broker</strong>) and exchange data by publishing and subscribing. <strong>MQTT</strong> is commonly used in <strong>IoT</strong> applications such as collecting sensor data, device management, and control scenarios.</p><p><strong>MQ</strong> is an abbreviation for <strong>Message Queue. </strong>A message queue is a system that temporarily stores messages and then delivers these messages to the processor that will handle them later. These queues can be used to organize workloads that need to be processed, facilitate asynchronous communication between different systems, or exchange data between systems. Message queues provide independence and flexibility between systems, and are commonly used in distributed systems, especially in microservices architectures and business process management.</p><blockquote>A useful analogy is television or radio.</blockquote><blockquote>A TV broadcaster broadcasts a TV program using a specific channel, and a viewer opens that channel to watch the broadcast. There is no direct connection between the broadcaster and the viewer. Similarly, in MQTT, a publisher broadcasts messages about a topic, and a subscriber must subscribe to that topic to view the message. <br>Source: <a href="https://canerezeroglu.blogspot.com/2020/08/iot-mosquitto-nedir.html">https://canerezeroglu.blogspot.com/2020/08/iot-mosquitto-nedir.html</a></blockquote><p><strong>Mosquitto</strong> is a message broker software developed by the Eclipse Foundation that supports the <strong>MQTT</strong> protocol. <strong>MongoDB</strong> is a document-oriented database, meaning data is stored in JSON-like documents. It provides a more flexible structure compared to traditional relational database systems and offers high scalability and performance.</p><p>In this section, we’ll only focus on the installation and usage of <strong>Mosquitto</strong>. In the second section, we’ll look into MongoDB.</p><p>Let’s start by installing <strong>Mosquitto</strong>. Go to the terminal and type the following commands. (The commands are written for Ubuntu, but they won’t be much different for Windows and MAC, you can easily find them or contact me.)</p><pre>sudo apt install mosquitto<br><br>sudo systemctl start mosquitto<br><br>sudo systemctl enable mosquitto<br><br>sudo systemctl status mosquitto</pre><p>By this point, we’ve installed and activated the <strong>Mosquitto</strong> <strong>MQTT</strong> <strong>broker</strong>. Let’s install the <strong>MQTT</strong> client and start publishing messages:</p><pre>sudo apt install mosquitto-clients <br><br>mosquitto_pub -h localhost -t test_topic -m &quot;Hi! from Busra&quot; <br><br>mosquitto_sub -h localhost -t test_topic</pre><p>After subscribing to the topic in the terminal as shown above, you can open a different terminal and use the publishing function. This way, you can start listening to the messages on the subscribed channel.</p><p>mosquitto_pub: Command used to publish <strong>MQTT</strong> messages.</p><p>mosquitto_sub: Command used to receive/listen to <strong>MQTT</strong> messages.</p><p>-h localhost: Specifies the address of the <strong>MQTT</strong> broker to connect to. Here, &quot;localhost&quot; is used to connect to the broker on the local machine (your computer).</p><p>-t test_topic: Specifies the <strong>MQTT</strong> topic to which the message will be published. Let&#39;s assume we have a topic named &quot;test_topic&quot;.</p><p>-m &quot;Hi! from Busra&quot;: Content of the message to be published.</p><p>You can learn about different features of <strong>Mosquitto</strong> and how to use them with the following commands:</p><pre>mosquitto --help<br>mosquitto_pub --help<br>mosquitto_sub --help</pre><p>You can also monitor message exchanges and connections by watching the <strong>‘/var/log/mosquitto/mosquitto.log’ </strong>file.</p><p><strong>Let’s explore MongoDB installation and usage in the second section. Goodbye for now!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=008f9c07f889" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MQTT | Mosquitto | MongoDB]]></title>
            <link>https://medium.com/@busrahazer/mqtt-mosquitto-mongodb-3af455dd09f8?source=rss-16b7c4cab718------2</link>
            <guid isPermaLink="false">https://medium.com/p/3af455dd09f8</guid>
            <category><![CDATA[mqtt]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[mongodb]]></category>
            <category><![CDATA[mosquitto]]></category>
            <category><![CDATA[mqtt-broker]]></category>
            <dc:creator><![CDATA[Busra Hazer]]></dc:creator>
            <pubDate>Tue, 26 Mar 2024 13:03:21 GMT</pubDate>
            <atom:updated>2024-03-26T13:03:21.780Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi! Bugün benim de sıfırdan öğrenmeye başladığım bu terimlerin ne işe yaradığına ve nasıl kullanıldığına bakalım.<br><br><strong>MQTT</strong> (<strong>Message Queuing Telemetry Transport</strong>), <strong>Internet of Things</strong> (<strong>IoT</strong>) cihazları arasında hafif ve verimli bir mesajlaşma protokolüdür. Bu protokol, cihazlar arasında veri alışverişi yapmak için kullanılır ve tipik olarak bir istemci/sunucu modelinde çalışır. İstemci cihazlar, <strong>MQTT</strong> sunucusuna (genellikle bir <strong>broker</strong> olarak adlandırılır) bağlanır ve yayınlama (<strong>publish</strong>) ve abonelik (<strong>subscribe</strong>) işlemleri yaparak veri alışverişi yaparlar. <strong>MQTT</strong>, genellikle <strong>IoT</strong> uygulamalarında sensör verilerinin toplanması, cihaz yönetimi ve kontrolü gibi senaryolarda kullanılır.</p><p><strong>MQ</strong> ise <strong>Message Queue</strong>’nin kısaltmasıdır. Bir mesaj kuyruğu, mesajları geçici olarak depolayan ve daha sonra bu mesajları alacak olan işleyiciye aktaran bir sistemdir. Bu kuyruklar, işlenmesi gereken iş yükünü düzenlemek, farklı sistemler arasında asenkron iletişimi kolaylaştırmak veya sistemler arasında veri alışverişi yapmak için kullanılabilir. Mesaj kuyrukları, sistemler arasında bağımsızlık ve esneklik sağlayarak genellikle dağıtılmış sistemlerde, özellikle mikro servis mimarilerinde ve iş süreç yönetiminde kullanılır.</p><blockquote>Yararlı bir benzetme, TV veya radyodur.</blockquote><blockquote>Bir TV yayıncısı, belirli bir kanalı kullanarak bir TV programını yayınlar ve bir izleyici, yayını izlemek için bu kanalı açar. Yayıncı ile izleyici arasında doğrudan bir bağlantı yoktur. MQTT’de bir yayıncı bir konu hakkında mesajlar yayınlar ve bir abonenin mesajı görüntülemek için o konuya abone olması gerekir.<br>Kaynak: <a href="https://canerezeroglu.blogspot.com/2020/08/iot-mosquitto-nedir.html">https://canerezeroglu.blogspot.com/2020/08/iot-mosquitto-nedir.html</a></blockquote><p><strong>Mosquitto</strong>, Eclipse Vakfı tarafından geliştirilen ve <strong>MQTT</strong> protokolünü destekleyen bir mesaj broker yazılımıdır.<br> <strong>MongoDB</strong>, belge tabanlı bir veritabanıdır, yani veriler JSON benzeri belgeler halinde saklanır. Geleneksel ilişkisel veritabanı sistemlerine göre daha esnek bir yapıya sahiptir ve yüksek ölçeklenebilirlik ve performans sunar.</p><p>Bu bölümde yalnızca <strong>Mosquitto</strong> kurulum ve kullanımına bakacağız. İkinci bölümde ise <strong>MongoDB</strong> ile ilgileneceğiz.</p><p><strong>Mosquitto</strong> kurulumunu yaparak başlayalım. Terminale gelerek aşağıdaki komutları yazalım. (Komutlar Ubuntu için yazılmıştır ancak Windows ve MAC için de çok farklı olmayacaktır, kolaylıkla bulabilirsiniz ya da bana ulaşabilirsiniz.)</p><pre>sudo apt install mosquitto<br><br>sudo systemctl start mosquitto<br><br>sudo systemctl enable mosquitto<br><br>sudo systemctl status mosquitto</pre><p>Bu kısma kadar <strong>Mosquitto</strong> <strong>MQTT</strong> broker’ını kurmuş ve aktifleştirmiş olduk. Veri alışverişi yapmak için <strong>MQTT</strong> istemcisini kuralım ve mesaj yayınlamaya başlayalım:</p><pre>sudo apt install mosquitto-clients <br><br>mosquitto_pub -h localhost -t test_topic -m &quot;Hi! from Busra&quot; <br><br>mosquitto_sub -h localhost -t test_topic</pre><p>Yukarıdaki abone olma işlemini terminalde yaptıktan sonra farklı bir terminal açarak pub işlevini kullanabilirsiniz. Böylece abone olduğunuz kanalın mesajlarını dinlemeye başlayabilirsiniz.</p><p><strong>mosquitto_pub</strong>: <strong>MQTT</strong> mesajlarını yayınlamak için kullanılan komuttur.</p><p><strong>mosquitto_sub</strong>: <strong>MQTT</strong> mesajlarını almak/dinlemek için kullanılan komuttur.</p><p><strong>-h localhost</strong> : Bağlanılacak <strong>MQTT</strong> broker’ının adresini belirtir. Burada “localhost” kullanılarak yerel makinedeki (bilgisayarınız) broker’a bağlanılır.</p><p><strong>-t</strong> <strong>test_topic</strong>: Yayınlanacak mesajın gönderileceği <strong>MQTT</strong> konusunu belirtir. “test_topic” adlı bir konumuz olduğunu varsayalım.</p><p><strong>-m “Hi! from Busra”: </strong>Yayınlanacak mesaj içeriğidir.</p><p>Mosquitto’nun farklı özelliklerini öğrenmek ve kullanmak için aşağıdaki komutları kullanabilirsiniz:</p><pre>mosquitto --help<br>mosquitto_pub --help<br>mosquitto_sub --help</pre><p>Ayrıca mesajlaşmaların ve bağlantıların kontrolünü de<em> </em><strong>‘/var/log/mosquitto/mosquitto.log’ </strong>dosyasını izleyerek yapabilirsiniz.</p><p><strong>İkinci bölümde de MongoDB kurulum ve kullanımına göz atalım. Şimdilik hoşçakalın!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3af455dd09f8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>