<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Aws - Tag - 300.Watts</title><link>https://300watts.me/tags/aws/</link><description>Aws - Tag - 300.Watts</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>morristai01@gmail.com (Morris)</managingEditor><webMaster>morristai01@gmail.com (Morris)</webMaster><copyright>This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.</copyright><lastBuildDate>Wed, 08 Mar 2023 19:43:00 +0000</lastBuildDate><atom:link href="https://300watts.me/tags/aws/" rel="self" type="application/rss+xml"/><item><title>Serverless with Rust and Protocol Buffers</title><link>https://300watts.me/posts/serverless-with-rust-and-protocol-buffers/</link><pubDate>Wed, 08 Mar 2023 19:43:00 +0000</pubDate><author><name>Morris</name></author><guid>https://300watts.me/posts/serverless-with-rust-and-protocol-buffers/</guid><description><![CDATA[<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.2/dist/katex.min.css" integrity="sha384-bYdxxUwYipFNohQlHt0bjN/LCpueqWz13HufFEV1SUatKs1cm4L6fFgCi1jT643X" crossorigin="anonymous">
<p>I&rsquo;ve recently been working on rewriting our small service with Rust for fun. One reason is to see if Rust, as a system programming language, is ready for cloud development in 2023. Another reason is that I wonder how much better it is compared to Python or Java in major cloud and data computing.</p>
<blockquote>
  <p>💡 There is a lot of discussion over which language to use as a serverless service. In my point of view, dynamic languages like Python lack compile-time checks, which can cause more runtime errors than static languages like Rust or Java.<br>
Another reason is that Python and Java need a runtime process (JVM, CPython) to run your actual code, which means they can&rsquo;t run natively like compiled Rust does. However, I&rsquo;m not sure about the performance gap. Furthermore, Rust doesn&rsquo;t require garbage collection, so ideally, a program&rsquo;s heap size should fluctuate less than a garbage-collected language when running. That means Lambda or Function underlying infrastructure controller should be able to handle invocation or scaling more easily.<br>
In terms of language paradigms, in my opinion, compared to traditional OOP, the modern <a href="https://en.wikipedia.org/wiki/ML_%2528programming_language%2529" target="_blank" rel="noopener noreferrer">ML (meta-language) family</a> has a better design for scalable cloud services.</p>]]></description></item></channel></rss>