<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: George Papadopoulos</title>
    <description>The latest articles on Forem by George Papadopoulos (@gepa21).</description>
    <link>https://forem.com/gepa21</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1044988%2Fa864283a-c5b2-453b-8a6f-ce17d79cad71.png</url>
      <title>Forem: George Papadopoulos</title>
      <link>https://forem.com/gepa21</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/gepa21"/>
    <language>en</language>
    <item>
      <title>RabbitMQ vs Kaleidoscope: How the new broker achieves 12x message throughput (1100% speedup)</title>
      <dc:creator>George Papadopoulos</dc:creator>
      <pubDate>Wed, 12 Jun 2024 09:03:21 +0000</pubDate>
      <link>https://forem.com/gepa21/rabbitmq-vs-kaleidoscope-how-the-new-broker-achieves-12x-message-throughput-1100-speedup-5cgd</link>
      <guid>https://forem.com/gepa21/rabbitmq-vs-kaleidoscope-how-the-new-broker-achieves-12x-message-throughput-1100-speedup-5cgd</guid>
      <description>&lt;p&gt;In today's data-driven world, a fast and efficient message broker is essential for building efficient and scalable applications. In this blog post, we'll delve into a comparison between RabbitMQ, a well-established message broker, and Kaleidoscope, a new high-performance broker from the &lt;a href="https://glow.phoesion.com"&gt;Phoesion Glow&lt;/a&gt; framework. We'll take a close look at their benchmark results to see how they perform in real-world scenarios.&lt;br&gt;
  &lt;/p&gt;

&lt;h2&gt;
  
  
  Overview of RabbitMQ and Kaleidoscope
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;RabbitMQ&lt;/strong&gt; is one of the most popular message brokers available.&lt;br&gt;
It implements the Advanced Message Queuing Protocol (AMQP) and is renowned for its reliability, robustness, and extensive feature set, making it a staple in many production environments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Kaleidoscope&lt;/strong&gt;, is a new transient message broker, written entirely in .NET 8.0. It is engineered to deliver high performance as it was designed to be the backbone of &lt;a href="https://glow.phoesion.com"&gt;Phoesion Glow&lt;/a&gt;, a cloud backend service development and cluster management solution. In peer-to-peer &lt;em&gt;(P2P)&lt;/em&gt; mode, the Kaleidoscope broker acts as the routing authority, sending peer/routing updates to the clients, while the clients form a P2P mesh and can send data directly to each other, thus removing significant resource overhead &lt;em&gt;(cpu/memory/networking)&lt;/em&gt; from the broker and improving throughput and latency for the clients.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Benchmark Results
&lt;/h2&gt;

&lt;p&gt;The benchmark tests yielded the following results:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Broker&lt;/th&gt;
&lt;th&gt;Message Throughput&lt;/th&gt;
&lt;th&gt;Latency&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Kaleidoscope (Normal)&lt;/td&gt;
&lt;td&gt;140,000&lt;/td&gt;
&lt;td&gt;0ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Kaleidoscope (P2P)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;710,000&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;0ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RabbitMQ - Direct exchange&lt;/td&gt;
&lt;td&gt;60,000&lt;/td&gt;
&lt;td&gt;80ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RabbitMQ - Topic exchange&lt;/td&gt;
&lt;td&gt;40,000&lt;/td&gt;
&lt;td&gt;80ms&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Message Throughput: messages per second &lt;em&gt;(higher is better)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Latency: time &lt;em&gt;(milliseconds)&lt;/em&gt; for the first message to arrive&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Charts
&lt;/h3&gt;

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

&lt;p&gt;&lt;em&gt;Another chart without Kaleidoscope P2P mode, comparing the performance using the same topology&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;These results highlight a significant performance advantage for Kaleidoscope, especially in P2P mode.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Benchmark Setup
&lt;/h2&gt;

&lt;p&gt;To provide a fair comparison, both RabbitMQ and Kaleidoscope were tested under the same conditions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hosting&lt;/strong&gt;: Both broker service and benchmark client run on the same machine, using the loopback interface (127.0.0.1) to ensure networking consistency.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hardware&lt;/strong&gt;: The same hardware setup and machine were used for both tests to ensure consistency.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Metrics&lt;/strong&gt;: The primary metric was message throughput, measured in messages per second. The latency of the first message was also measured as a secondary metric.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scope&lt;/strong&gt;: The scope of the benchmark includes both broker and client libraries (as they would be used in a real-world application). For RabbitMQ the "RabbitMQ.Client" library is used.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Machine specifications:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;CPU&lt;/strong&gt;: Intel Core i7-7700K @ 4.20GHz &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Memory&lt;/strong&gt;: 32.0 GB @ 2133 MHz&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OS&lt;/strong&gt;: Windows 10 (22H2)&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Benchmark design:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;OS Processes&lt;/strong&gt;: We have one broker process and one benchmark-app process. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Benchmark-app&lt;/strong&gt;: will have 2 connections to the broker, one for the producer and one for the consumer. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Producer&lt;/strong&gt;: spawns 40 concurrent C# Tasks that will flood-send messages to the broker.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Consumer&lt;/strong&gt;: counts the received messages and once all messages are received the benchmark is completed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Payload&lt;/strong&gt;: 250 byte-array &lt;em&gt;(pre-serialized)&lt;/em&gt; message.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Broker setup:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;The brokers will have one exchange, with a binding to one queue. The queue must NOT be exclusive since in a real-world scenario there will be multiple consumers (future benchmark). &lt;/li&gt;
&lt;li&gt;For RabbitMQ, both 'Topic' and 'Direct' exchange types were tested, while Kaleidoscope uses only a 'Topic'-like exchange.&lt;/li&gt;
&lt;li&gt;Both brokers use transient queues and messages&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Constraints:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;No messages are allowed to be lost, so Acknowledgments must be enabled in both brokers.&lt;/li&gt;
&lt;li&gt;No duplicate messages are allowed.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;h2&gt;
  
  
  Performance Analysis
&lt;/h2&gt;

&lt;h4&gt;
  
  
  P2P mode
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Kaleidoscope: Achieving an impressive 710,000 messages/second, making it highly suitable for applications requiring rapid, low-latency communication between endpoints.&lt;/li&gt;
&lt;li&gt;RabbitMQ: P2P mode is not supported.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Normal mode
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Kaleidoscope: Even in normal mode, Kaleidoscope's throughput of 140,000 messages/second more than doubles RabbitMQ's performance, indicating its efficiency in handling standard messaging tasks.&lt;/li&gt;
&lt;li&gt;RabbitMQ: Handles 40.000 to 60,000 messages/second, which, while solid, is outpaced by Kaleidoscope.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Exchange type
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Kaleidoscope: Only supports 'Topic' exchange&lt;/li&gt;
&lt;li&gt;RabbitMQ: The 'Direct' exchange type, with its reduced overhead, offers better performance than the 'Topic' exchange but is suited for more specific scenarios&lt;/li&gt;
&lt;/ul&gt;

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

&lt;h2&gt;
  
  
  Use cases
&lt;/h2&gt;

&lt;p&gt;While both brokers can be used similarly, each is uniquely designed with specialized features tailored to their specific use cases.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;RabbitMQ&lt;/strong&gt;: Better queuing features like persistence, dead-letter handling, and job-scheduling&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Kaleidoscope&lt;/strong&gt;: Faster messaging/RPC throughput with low latency, orchestrating clients in p2p to reduce &lt;em&gt;(CPU/network)&lt;/em&gt; overhead, tunneling and streaming as a service-bus for cloud backend.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;h2&gt;
  
  
  Topology
&lt;/h2&gt;

&lt;p&gt;These diagrams show how data move in different setups:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;RabbitMQ using Topic/Direct exchanges. \
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnfmi51k3fkdjnrfw3lu8.png" alt="Image description" width="512" height="381"&gt;
&lt;/li&gt;
&lt;li&gt;Kaleidoscope in Normal mode. \
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr64ck4vdfsn4q4aa2rt1.png" alt="Image description" width="512" height="381"&gt;
&lt;/li&gt;
&lt;li&gt;Kaleidoscope in P2P mode.\
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbhd744p9968232kpzq70.png" alt="Image description" width="512" height="381"&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;These benchmarks suggest that while RabbitMQ remains a reliable and feature-rich option, Kaleidoscope offers substantial performance benefits, particularly for high-throughput applications. The higher message throughput can lead to more responsive systems and better utilization of resources, which is crucial for modern, data-intensive applications.&lt;/p&gt;

&lt;p&gt;Kaleidoscope is not available &lt;em&gt;(documented/supported)&lt;/em&gt; as a standalone product, but instead, it serves as the backbone of the &lt;a href="https://glow.phoesion.com"&gt;Phoesion Glow&lt;/a&gt; framework by interconnecting all cloud components/services, providing significant performance benefits with its high message throughput and low latency.&lt;/p&gt;

&lt;p&gt;As always, it's important to consider your specific requirements and test in your environment to determine the best fit for your needs. If you have any questions or insights based on your experiences with these message brokers, feel free to share them in the comments below!&lt;/p&gt;

&lt;p&gt;More benchmarks are needed to get the full picture. Some benchmarks planned for the future include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Test on Linux OS&lt;/li&gt;
&lt;li&gt;Test using multiple machines with producer, broker and consumer each running on a separate machine&lt;/li&gt;
&lt;li&gt;Test using multiple consumers.&lt;/li&gt;
&lt;li&gt;Test clustering&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Stay tuned for more insights and benchmarks as we continue to explore the capabilities of the latest messaging technologies!&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Source Code
&lt;/h2&gt;

&lt;p&gt;Source code is available at &lt;a href="https://github.com/gepa21/broker_benchmark"&gt;https://github.com/gepa21/broker_benchmark&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;More info about &lt;a href="https://dev.to/gepa21/getting-started-with-phoesion-glow-the-backend-service-development-solution-for-human-beings-437e"&gt;getting started with Phoesion Glow&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cloud</category>
      <category>microservices</category>
      <category>dotnet</category>
      <category>backend</category>
    </item>
    <item>
      <title>Getting started with Phoesion Glow, the backend service development solution for human beings</title>
      <dc:creator>George Papadopoulos</dc:creator>
      <pubDate>Wed, 05 Jun 2024 09:25:53 +0000</pubDate>
      <link>https://forem.com/gepa21/getting-started-with-phoesion-glow-the-backend-service-development-solution-for-human-beings-437e</link>
      <guid>https://forem.com/gepa21/getting-started-with-phoesion-glow-the-backend-service-development-solution-for-human-beings-437e</guid>
      <description>&lt;p&gt;&lt;a href="https://glow.phoesion.com"&gt;Phoesion Glow&lt;/a&gt; is a cloud-native framework designed for dotnet (micro-)services with features like service-bus, load-balancing, scaling, logging/tracing, monitoring and cluster management, service-to-service discovery/communication and more. It also includes a lot of GUI/CLI developer tools (eg. aspire-like dashboards) and build-in Distributed application services like persistent key-value storage (caching), Mutexes, Job-Scheduling, State-Machines, FeatureFlags etc.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;To get started without installing ANY tools, you can give it as quick try using docker containers, by :&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://files.phoesion.com/Samples/HelloWorldSample.zip"&gt;Downloading the "hello world" sample code&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Start the Reactor service container using :&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="nt"&gt;--name&lt;/span&gt; reactor-2.x &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; 80:80 &lt;span class="nt"&gt;-p&lt;/span&gt; 443:443 &lt;span class="nt"&gt;-p&lt;/span&gt; 15000-15010:15000-15010 &lt;span class="nt"&gt;-p&lt;/span&gt; 16000:16000 phoesion/phoesion.glow.reactor-dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run the sample (using Visual Studio)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open &lt;a href="http://localhost/HelloWorld/Greeter/SayHello"&gt;http://localhost/HelloWorld/Greeter/SayHello&lt;/a&gt; and you should see a "Hello World" response.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;&lt;strong&gt;What happened behind the scenes to produce that response?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The ingress/mediator service &lt;em&gt;(running in container)&lt;/em&gt; received the http request and, using the service-bus &lt;em&gt;(also in container)&lt;/em&gt;, made an RPC call to your service &lt;em&gt;(running in visual studio)&lt;/em&gt;, that handled it and returned the response. All this happened automatically, without needing to configure any of them! and it's because all components were build from the ground-up to work together as part of a complete (opinionated) solution&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;To get the full developer experience, including developer dashboard, i recommend installing the tools:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Stop/Delete the reactor container from docker &lt;em&gt;(it will not be needed anymore)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Close Visual Studio &lt;em&gt;(so new templates can be installed)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://glow-docs.phoesion.com/downloads/Downloads_Blaze.html?tabs=oses-1"&gt;Download and install the tools (Blaze)&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now, open up the sample code again in Visual Studio and run the service. The &lt;strong&gt;developer dashboard&lt;/strong&gt; will pop-up giving your visibility to you service metrics, structured logging, tracing and more. Your are now fully setup to start developing services using Phoesion Glow!&lt;/p&gt;

&lt;p&gt;There a lot of &lt;a href="https://github.com/Phoesion/Glow-Samples"&gt;samples demonstrating the capabilities of Glow&lt;/a&gt;, have a look and try them out!&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Some notable samples include :&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/Phoesion/Glow-Samples/tree/master/1_REST"&gt;1_REST&lt;/a&gt; : a lot of examples for creating your web APIs&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/Phoesion/Glow-Samples/tree/master/2_Interop"&gt;2_Interop &lt;/a&gt;: service to service communication.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/Phoesion/Glow-Samples/tree/master/10_AspHosting"&gt;10_AspHosting &lt;/a&gt;: running ASP services in Glow&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/Phoesion/Glow-Samples/tree/master/0b_Logging"&gt;0b_Logging &lt;/a&gt;: structured logging sample&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/Phoesion/Glow-Samples/tree/master/30_AppJobs"&gt;27_* - 31_* (AppXXX services)&lt;/a&gt; : distributed application services like job scheduling, state machines, mutexes and caches.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you find it interesting and would like to know more information and how to run/deploy your services in your cloud or on-premises let me know.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Screenshots
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;This is a screenshot of the developer dashboard&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;em&gt;This is a screenshot of Blaze, the service cluster management dashboard&lt;/em&gt;&lt;/p&gt;

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

</description>
      <category>dotnet</category>
      <category>devops</category>
      <category>cloud</category>
      <category>backend</category>
    </item>
    <item>
      <title>Create JSON Web Tokens for development and testing</title>
      <dc:creator>George Papadopoulos</dc:creator>
      <pubDate>Wed, 26 Apr 2023 16:32:03 +0000</pubDate>
      <link>https://forem.com/gepa21/create-json-web-tokens-for-local-development-and-testing-1lc6</link>
      <guid>https://forem.com/gepa21/create-json-web-tokens-for-local-development-and-testing-1lc6</guid>
      <description>&lt;p&gt;It can be challenging to test an API that requires authentication through a &lt;a href="https://jwt.io/introduction" rel="noopener noreferrer"&gt;JSON Web Token&lt;/a&gt; &lt;em&gt;(JWT)&lt;/em&gt;. To obtain a valid access token that can be used with your API, you typically need to setup/use an entire identity and access management system. &lt;/p&gt;

&lt;p&gt;Using the &lt;a href="https://github.com/Phoesion/Phoesion.DevJwt" rel="noopener noreferrer"&gt;&lt;code&gt;dotnet-devjwt&lt;/code&gt;&lt;/a&gt; tool you can simplify this process. It allows you to generate custom JSON Web Tokens that can be used during development and &lt;em&gt;(system)&lt;/em&gt; testing of your JWT-Protected API endpoints.&lt;/p&gt;

&lt;p&gt;Let's go through the steps of using this new tool.&lt;br&gt;
 &lt;/p&gt;
&lt;h2&gt;
  
  
  Getting started
&lt;/h2&gt;

&lt;p&gt;Let's create a small ASP.NET Core application, configured to use JTW Bearer authentication:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;builder&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;WebApplication&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;CreateBuilder&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Services&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;AddAuthentication&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
                &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;AddJwtBearer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt;
                &lt;span class="p"&gt;{&lt;/span&gt;
                    &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Authority&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"https://login.microsoftonline.com/common"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
                    &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Audience&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"myApi"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
                &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Services&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;AddAuthorization&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;app&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Build&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;UseAuthorization&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;MapGet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/protected"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ClaimsPrincipal&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s"&gt;$"Hello &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;FindFirst&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ClaimTypes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Email&lt;/span&gt;&lt;span class="p"&gt;)?.&lt;/span&gt;&lt;span class="n"&gt;Value&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
   &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;RequireAuthorization&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Run&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To test our endpoint we would need a valid token from our authority &lt;em&gt;(in this case login.microsoftonline.com)&lt;/em&gt;. Getting this token is not always easy or even possible. This becomes even more difficult when we want to run isolated system tests in different environments.&lt;/p&gt;

&lt;p&gt;Let's use the &lt;strong&gt;DevJwt&lt;/strong&gt; lib/tool to create a token for local development.&lt;br&gt;
 &lt;/p&gt;
&lt;h2&gt;
  
  
  Using Phoesion.DevJwt
&lt;/h2&gt;

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

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Install the dotnet tool&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;dotnet tool &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--global&lt;/span&gt; phoesion.devjwt.cli
&lt;/code&gt;&lt;/pre&gt;



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


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Generate token using&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;dotnet devjwt create myApi &lt;span class="nt"&gt;--email&lt;/span&gt; user@mail.com
&lt;/code&gt;&lt;/pre&gt;



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


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Configure your service &lt;code&gt;appsettings.Development.json&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"Authentication"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"Schemes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Bearer"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
         &lt;/span&gt;&lt;span class="nl"&gt;"ValidIssuer"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"phoesion.devjwt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
         &lt;/span&gt;&lt;span class="nl"&gt;"SigningKeys"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
             &lt;/span&gt;&lt;span class="nl"&gt;"Issuer"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"phoesion.devjwt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
             &lt;/span&gt;&lt;span class="nl"&gt;"Value"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"c29tZV9kZWZhdWx0X2tleV9mb3JfZGV2cw=="&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
         &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;



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


&lt;/li&gt;

&lt;/ol&gt;

&lt;p&gt;Now we can call our API by passing the generated JWT token:&lt;br&gt;
&lt;code&gt;curl -i -H "Authorization: Bearer {token}" http://localhost:5256/protected&lt;/code&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr47sa37n3ciw1xkbqqa2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr47sa37n3ciw1xkbqqa2.png" alt="Postman window" width="800" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can find &lt;a href="https://github.com/Phoesion/Phoesion.DevJwt/tree/main/Samples" rel="noopener noreferrer"&gt;more samples here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to learn more, check out &lt;a href="https://github.com/Phoesion/Phoesion.DevJwt" rel="noopener noreferrer"&gt;the project documentation&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Happy Coding!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://discord.com/invite/YJxdPbvdUj" rel="noopener noreferrer"&gt;&lt;em&gt;Join Discord Group&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aspdotnet</category>
      <category>dotnet</category>
      <category>webdev</category>
      <category>security</category>
    </item>
    <item>
      <title>Running microservices using Reactor container - Phoesion Glow</title>
      <dc:creator>George Papadopoulos</dc:creator>
      <pubDate>Mon, 24 Apr 2023 10:40:29 +0000</pubDate>
      <link>https://forem.com/gepa21/running-microservices-with-using-reactor-container-phoesion-glow-5ceh</link>
      <guid>https://forem.com/gepa21/running-microservices-with-using-reactor-container-phoesion-glow-5ceh</guid>
      <description>&lt;h3&gt;
  
  
  What is Phoesion Glow
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://glow.phoesion.com/"&gt;Phoesion Glow&lt;/a&gt; is a framework for developing cloud microservices using c#. It offers out-of-the-box API-Gateway, Service-bus, service hosts, Kubernetes operators and more! All components have been designed to work together seamlessly and provide a uniform and streamlined experience for developing, deploying and managing your cloud services.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Phoesion Glow Reactor
&lt;/h3&gt;

&lt;p&gt;Phoesion Glow &lt;strong&gt;Reactor&lt;/strong&gt; is a standalone meta-app that includes all entities needed to run a Glow cloud setup, inside a single process/app. This includes the Prism &lt;em&gt;(API Gateway)&lt;/em&gt;, the Kaleidoscope &lt;em&gt;(Service-Bus)&lt;/em&gt;, Lighthouse &lt;em&gt;(Command-and-Control)&lt;/em&gt; and Firefly &lt;em&gt;(business logic service host/supervisor)&lt;/em&gt;. Using Reactor you can easily develop your services locally without setting up a bunch of components.&lt;/p&gt;

&lt;h3&gt;
  
  
  Using Containers
&lt;/h3&gt;

&lt;p&gt;Normally, when you install &lt;a href="https://glow-docs.phoesion.com/downloads/Downloads_Blaze.html?tabs=oses-1"&gt;Phoesion Glow Blaze&lt;/a&gt; the &lt;strong&gt;Reactor&lt;/strong&gt; is also installed as a system service. This is great most of the time but in many cases, when you want to evaluate the samples, run services in a non-developer PC, or just use a different version of Reactor, docker and containers come to the rescue. With one simple command, you can have the &lt;strong&gt;Reactor container&lt;/strong&gt; up and running on your machine so your services can connect to it and attach on the service bus &lt;em&gt;(to start handling incoming requests)&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;To start a &lt;strong&gt;Phoesion Glow Reactor container&lt;/strong&gt; run :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="nt"&gt;--name&lt;/span&gt; reactor &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; 80:80 &lt;span class="nt"&gt;-p&lt;/span&gt; 443:443 &lt;span class="nt"&gt;-p&lt;/span&gt; 15000-15010:15000-15010 &lt;span class="nt"&gt;-p&lt;/span&gt; 16000:16000 phoesion/phoesion.glow.reactor-dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will start the reactor and expose the appropriate ports &lt;em&gt;(http(s) and service-bus)&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Running a sample
&lt;/h3&gt;

&lt;p&gt;Now that our container is up and running, we can run some samples!&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Clone the GitHub sample repo :
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/Phoesion/Glow-Samples.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  2. Start the 1_Rest sample that demonstrates basic web api concepts/capabilities :
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Open the solution 1_REST\Sample_1_REST.sln&lt;/li&gt;
&lt;li&gt;Start &lt;strong&gt;Foompany.Services.SampleService1&lt;/strong&gt; and &lt;strong&gt;Foompany.Services.SampleService2&lt;/strong&gt; projects &lt;em&gt;(our two microservices)&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  3. Test our services using the URLs :
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://localhost/SampleService1/SampleModule1/"&gt;http://localhost/SampleService1/SampleModule1/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://localhost/SampleService1/SampleModule1/Action1"&gt;http://localhost/SampleService1/SampleModule1/Action1&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://localhost/SampleService1/SampleModule1/Action2/test?myKey=myValue"&gt;http://localhost/SampleService1/SampleModule1/Action2/test?myKey=myValue&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://localhost/SampleService1/SampleModule1/Action3?value1=hi&amp;amp;value2=true"&gt;http://localhost/SampleService1/SampleModule1/Action3?value1=hi&amp;amp;value2=true&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://localhost/SampleService1/SampleModule1/DoTheThing?username=john"&gt;http://localhost/SampleService1/SampleModule1/DoTheThing?username=john&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://localhost/SampleService1/SampleModule2/Action1"&gt;http://localhost/SampleService1/SampleModule2/Action1&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://localhost/SampleService1/SampleModule2/AsyncAction"&gt;http://localhost/SampleService1/SampleModule2/AsyncAction&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://localhost/SampleService1/SampleModule2/SampleStrongType"&gt;http://localhost/SampleService1/SampleModule2/SampleStrongType&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="http://localhost/SampleService1/SampleModule2/SampleObjectType?retType=1"&gt;http://localhost/SampleService1/SampleModule2/SampleObjectType?retType=1&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://localhost/SampleService2/SampleModule1/Action1"&gt;http://localhost/SampleService2/SampleModule1/Action1&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://localhost/SampleService2/SampleModule1/RedirectMe"&gt;http://localhost/SampleService2/SampleModule1/RedirectMe&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://localhost/SampleService2/SampleModule1/SampleStatusCode?command=hi"&gt;http://localhost/SampleService2/SampleModule1/SampleStatusCode?command=hi&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="http://localhost/SampleService2/SampleModule1/SampleStatusCode?command=banana"&gt;http://localhost/SampleService2/SampleModule1/SampleStatusCode?command=banana&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://localhost/SampleService2/SampleModule1/StreamingSample1"&gt;http://localhost/SampleService2/SampleModule1/StreamingSample1&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://localhost/SampleService2/SampleModule1/FileDownloadSample"&gt;http://localhost/SampleService2/SampleModule1/FileDownloadSample&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://localhost/SampleService2/SampleModule1/YieldReturnResults"&gt;http://localhost/SampleService2/SampleModule1/YieldReturnResults&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="http://localhost/SampleService2/SampleModule1/"&gt;http://localhost/SampleService2/SampleModule1/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Summary
&lt;/h3&gt;

&lt;p&gt;In this post, we saw how easy it is to create a Glow setup that includes the api-gateway, service-bus and more using Reactor and docker containers. With the Reactor container running we can launch our services locally for developing/testing/debugging or just evaluating them, without installing all the Phoesion Glow tools on our system.&lt;/p&gt;

&lt;p&gt;For more information about Phoesion Glow, you can check out :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://glow.phoesion.com"&gt;Website&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://glow-docs.phoesion.com/getting_started/index.html"&gt;Documentation&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/watch?v=RfrkUuAnT5U&amp;amp;list=PLgd9-Gs1hc3FIME3CIo3yblIbxU5JbTi-&amp;amp;index=1&amp;amp;t=0s"&gt;YouTube tutorials&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://discord.com/invite/YJxdPbvdUj"&gt;New Discord community&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Happy coding!&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>webdev</category>
      <category>programming</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Part 2 - Deploy your services</title>
      <dc:creator>George Papadopoulos</dc:creator>
      <pubDate>Tue, 28 Mar 2023 07:45:35 +0000</pubDate>
      <link>https://forem.com/gepa21/part-2-deploy-your-services-3720</link>
      <guid>https://forem.com/gepa21/part-2-deploy-your-services-3720</guid>
      <description>&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=3bJl3lJiIw8"&gt;Learn how to setup a Linux server and deploy your cloud services&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this 20 minute video tutorial, you will learn how to :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Setup a Linux server with Phoesion Glow&lt;/li&gt;
&lt;li&gt;Deploy your services&lt;/li&gt;
&lt;li&gt;Manage and Monitor their health and performance&lt;/li&gt;
&lt;li&gt;Setup SSL using let's encrypt&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Phoesion Glow is a framework for developing cloud microservices using c#. It offers out-of-the box Mediators/Gateway, Service-bus, service hosts, Kubernetes operators and more! All components have been designed to work together seamlessly and provide a uniform and streamlined experience for developing, deploying and managing your cloud services.&lt;/p&gt;

&lt;p&gt;The series, aims to teach the basic concepts, setups and tools of Phoesion Glow.&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>cloud</category>
      <category>csharp</category>
      <category>webdev</category>
    </item>
    <item>
      <title>New video tutorial series - Phoesion Glow basics</title>
      <dc:creator>George Papadopoulos</dc:creator>
      <pubDate>Wed, 22 Mar 2023 12:22:33 +0000</pubDate>
      <link>https://forem.com/gepa21/new-video-tutorial-series-phoesion-glow-basics-5cfk</link>
      <guid>https://forem.com/gepa21/new-video-tutorial-series-phoesion-glow-basics-5cfk</guid>
      <description>&lt;p&gt;The first video of the new "Phoesion Glow basics" series is up!&lt;br&gt;
Learn how to create your first C# web API micro-service!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=RfrkUuAnT5U&amp;amp;list=PLgd9-Gs1hc3FIME3CIo3yblIbxU5JbTi-&amp;amp;index=1"&gt;&lt;strong&gt;Watch it now at Youtube!&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Phoesion Glow&lt;/strong&gt; is a &lt;strong&gt;new framework&lt;/strong&gt; for developing &lt;strong&gt;cloud microservices&lt;/strong&gt; using C#. It offers out-of-the box Mediators/Gateway, Service-bus, service hosts, Kubernetes operators and more! All components have been designed from the ground up to work together seamlessly and provide a uniform and streamlined experience for developing, deploying and managing your cloud services.&lt;/p&gt;

&lt;p&gt;The series, aims to teach the basic concepts, setups and tools of Phoesion Glow. &lt;a href="https://www.youtube.com/watch?v=RfrkUuAnT5U&amp;amp;list=PLgd9-Gs1hc3FIME3CIo3yblIbxU5JbTi-&amp;amp;index=1"&gt;&lt;strong&gt;Playlist available at Youtube!&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>microservices</category>
      <category>webdev</category>
      <category>dotnet</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Using ASP.Net Core in Phoesion Glow</title>
      <dc:creator>George Papadopoulos</dc:creator>
      <pubDate>Tue, 14 Mar 2023 11:14:46 +0000</pubDate>
      <link>https://forem.com/gepa21/using-aspnet-core-in-phoesion-glow-1f3o</link>
      <guid>https://forem.com/gepa21/using-aspnet-core-in-phoesion-glow-1f3o</guid>
      <description>&lt;p&gt;&lt;strong&gt;Phoesion Glow&lt;/strong&gt; is a microservice development framework that offers a complete solution for creating, deploying, and managing your microservices. While &lt;strong&gt;Phoesion Glow&lt;/strong&gt; offers a glow-native SDK for writing services, many times we need to use ASP.Net specific features or add a service that is already written in ASP.Net.&lt;/p&gt;

&lt;p&gt;In this article, we will focus on creating Glow microservices using the ASP.Net framework.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites / Preparation
&lt;/h2&gt;

&lt;p&gt;For developing &lt;strong&gt;Phoesion Glow&lt;/strong&gt; services we need a &lt;strong&gt;Windows machine with Visual Studio 2019/2022&lt;/strong&gt; and &lt;strong&gt;&lt;a href="https://glow-docs.phoesion.com/downloads/Downloads_Blaze.html?tabs=oses-1"&gt;Phoesion Glow Blaze for Windows&lt;/a&gt; installed&lt;/strong&gt; &lt;/p&gt;

&lt;h1&gt;
  
  
  Creating a new service
&lt;/h1&gt;

&lt;h4&gt;
  
  
  1. Create a new Solution
&lt;/h4&gt;

&lt;p&gt;Create a new solution using &lt;strong&gt;Visual Studio&lt;/strong&gt; with a &lt;strong&gt;Firefly ASP.NET Core Service Project&lt;/strong&gt; project.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KpXhgbwA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://glow-docs.phoesion.com/images/Tutorials_ASP_Hosting/Create_New_Project_Template_Selection.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KpXhgbwA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://glow-docs.phoesion.com/images/Tutorials_ASP_Hosting/Create_New_Project_Template_Selection.png" alt="VisualStudio_Create_New_Solution_Type" width="800" height="438"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;[NOTE]&lt;br&gt;
If you can't find the &lt;strong&gt;Firefly ASP.NET Core Service Project&lt;/strong&gt; template, make sure you have &lt;strong&gt;Phoesion Glow Templates&lt;/strong&gt; visual studio extension installed. If not you can &lt;a href="https://marketplace.visualstudio.com/items?itemName=Phoesion.phoesion-glow-vstemplates-vs2022"&gt;get it from the Visual Studio Marketplace&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  2. Configure new Project
&lt;/h4&gt;

&lt;p&gt;Name your new project and solution :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Project name : Foompany.Services.MyAspService
Location : &amp;lt;Set your location&amp;gt;
Solution name : Foompany.Services
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--f0Pz10x6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://glow-docs.phoesion.com/images/Tutorials_ASP_Hosting/Create_New_Project_Setup.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--f0Pz10x6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://glow-docs.phoesion.com/images/Tutorials_ASP_Hosting/Create_New_Project_Setup.png" alt="VisualStudio_Create_New_Solution_Configs" width="800" height="399"&gt;&lt;/a&gt;       &lt;/p&gt;

&lt;h1&gt;
  
  
  The &lt;code&gt;AspFireflyService&lt;/code&gt; class
&lt;/h1&gt;

&lt;p&gt;Notice that your ServiceMain class now derives from &lt;code&gt;AspFireflyService&lt;/code&gt; instead of the basic &lt;code&gt;FireflyService&lt;/code&gt;.&lt;br&gt;
The &lt;code&gt;AspFireflyService&lt;/code&gt; class provides the necessary &lt;code&gt;IServer&lt;/code&gt; implementations that will hook into the &lt;strong&gt;ASP.Net&lt;/strong&gt; framework and host the &lt;strong&gt;ASP.Net&lt;/strong&gt; stack on top of &lt;strong&gt;Phoesion Glow&lt;/strong&gt;.&lt;br&gt;
Think of it like a replacement of &lt;strong&gt;Kestrel&lt;/strong&gt;, that instead of handling requests from sockets, it handles request from the &lt;strong&gt;Phoesion Glow&lt;/strong&gt; framework.&lt;/p&gt;

&lt;h1&gt;
  
  
  Test your services
&lt;/h1&gt;

&lt;p&gt;To test that your services are up and running open a browser and go to one of the following :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://localhost/MyCompany.Services.MyService2/Test/Action1"&gt;http://localhost/&lt;strong&gt;MyCompany.Services.MyAspService&lt;/strong&gt;/Test/Action1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://localhost:16000/MyCompany.Services.MyService2/Test/Action1"&gt;http://localhost:16000/&lt;strong&gt;MyCompany.Services.MyAspService&lt;/strong&gt;/Test/Action1&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Changing the Service name &lt;em&gt;(base path)&lt;/em&gt;
&lt;/h1&gt;

&lt;p&gt;As a part of the &lt;strong&gt;Phoesion Glow&lt;/strong&gt; project, your microservice &lt;strong&gt;MUST&lt;/strong&gt; have a service name so the &lt;strong&gt;API Gateway&lt;/strong&gt; system can route the request to the proper service.&lt;br&gt;
Like native &lt;strong&gt;Firefly Services&lt;/strong&gt; this can be specified using the &lt;code&gt;[ServiceName("XXX")]&lt;/code&gt; attribute on the &lt;code&gt;ServiceMain.cs&lt;/code&gt; class. &lt;br&gt;
Change this to your desired name, for example just &lt;em&gt;MyAspService&lt;/em&gt; (without the full assembly namespace that was added by the templates)&lt;/p&gt;

&lt;p&gt;Run the project again and test using the following :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://localhost/MyAspService/Test/Action1"&gt;http://localhost/&lt;strong&gt;MyAspService&lt;/strong&gt;/Test/Action1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://localhost:16000/MySMyAspServiceervice2/Test/Action1"&gt;http://localhost:16000/&lt;strong&gt;MyAspService&lt;/strong&gt;/Test/Action1&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Summary
&lt;/h1&gt;

&lt;p&gt;In this article, we demonstrated how easy it is to create a new &lt;strong&gt;ASP.NET&lt;/strong&gt; microservice that can be deployed/hosted in our &lt;strong&gt;Phoesion Glow&lt;/strong&gt; setup. &lt;br&gt;
We can now take full advantage of &lt;strong&gt;Phoesion Glow&lt;/strong&gt; including the out-of-the-box Mediator, API Gateway, Service-Bus and Deployment/Managing/Monitoring capabilities.&lt;/p&gt;

&lt;p&gt;For more information, you can dive into the &lt;a href="https://glow-docs.phoesion.com/"&gt;documentation&lt;/a&gt; and &lt;a href="https://github.com/Phoesion/Glow-Samples"&gt;sample repo&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>csharp</category>
      <category>cloud</category>
      <category>microservices</category>
    </item>
  </channel>
</rss>
