<?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 Kyriakos Anastasakis on Medium]]></title>
        <description><![CDATA[Stories by Kyriakos Anastasakis on Medium]]></description>
        <link>https://medium.com/@kyriakosanastasakis?source=rss-b850b6686e42------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*smiMGs4eDyihBqMS55-Byw.jpeg</url>
            <title>Stories by Kyriakos Anastasakis on Medium</title>
            <link>https://medium.com/@kyriakosanastasakis?source=rss-b850b6686e42------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 12:19:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kyriakosanastasakis/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[KubeCon + CloudNativeCon 2022 North America]]></title>
            <link>https://medium.com/xmglobal/kubecon-cloudnativecon-2022-north-america-1ca10ea9c5c3?source=rss-b850b6686e42------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ca10ea9c5c3</guid>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[cloudnativenews]]></category>
            <category><![CDATA[xm]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Kyriakos Anastasakis]]></dc:creator>
            <pubDate>Thu, 13 Apr 2023 10:57:23 GMT</pubDate>
            <atom:updated>2023-04-13T10:57:23.748Z</atom:updated>
            <content:encoded><![CDATA[<p>A colleague (<a href="https://medium.com/u/95aa8835d598">Nikos Stathis</a>) and I attended the Kubecon+CloudNativeCon 2022 North America held in Detroit from the 26th-28th of October 2022. KubeCon + CloudNativeCon is a conference organized by the <a href="https://www.cncf.io/">Cloud Native Computing Foundation (CNCF)</a> that focuses on the technologies and practices related to cloud-native computing and Kubernetes.</p><p><em>In </em><a href="http://www.xm.com/"><em>XM</em></a><em>, we invest a lot in our people, always trying to educate them and trying to give them all the necessary skills and knowledge in order to deliver state of the art solutions. For that purpose, amongst other initiatives (online training platforms and courses, internal technology talks and seminars etc.), members of the IT team frequently participate in well known technology events and conferences across the world.</em></p><p>The KubeCon + CloudNativeCon conference is held several times a year in different locations around the world and brings together developers, DevOps professionals, system administrators, and other technology leaders to learn about the latest developments in cloud-native computing and to share their own experiences and best practices. The conference features keynote presentations, technical talks, and networking opportunities, as well as an expo floor where attendees can learn about the latest tools and services from leading vendors in the cloud-native ecosystem.</p><p>This year’s conference had a <a href="https://www.cncf.io/blog/2022/08/03/inside-the-numbers-the-kubecon-cloudnativecon-selection-process-for-north-america-2022/">13% talk acceptance rate and 166 talks took</a> place in parallel sessions over the course of the conference. (There is also an unofficial one day event taking place before the conference where some of the presentations that were rejected from the main conference are presented!). The Kubernetes/Cloud Native community is vibrant and fast evolving. Currently there are 140+ projects under the CNCF umbrella, many of them competing to solve similar issues (e.g. service mesh/observability/tracing/etc.). The majority of the projects are in the Sandbox phase, which demonstrates the interest in providing solutions in the domain of cloud native solutions. Project owners appealed for contributors in their open source repositories (it may not come as a surprise most of the projects are written in Go).</p><p>In this article we try to summarise the talks we attended and found most interesting based on the talk content:</p><ul><li><a href="#a638">Inspiring Sessions</a><br>- Kubernet-Bees: How Bees Solve Problems Of Distributed Systems<br>- Arsenal Of Democracy: What Open Source Can Learn From the Motor City</li><li><a href="#3991">Community Update Talks</a><br>- Cloud Native Computing Foundation (CNFC) updates<br>- A Cloud Native Swiss Knife<br>- SIG Autoscaling Updates And Feature Highlights</li><li><a href="#d269">Developer Support Tools</a><br>- Backstage: Shaping the Future Of DeveloperExperience</li><li><a href="#029f">Service Mesh</a><br>- Istio Today and Tomorrow: Sidecars and Beyond<br>- Flagger, Linkerd, And Gateway API: Oh My!</li><li><a href="#e994">Cloud Native</a><br>- Cloudy With a Chance Of Chaos<br>- Path To Production: Sustainable Compliance In Strict Environments</li><li><a href="#3358">Conclusion</a><br>- How to Become an Open Source Mechanic</li></ul><h3>Inspiring Sessions</h3><h4><strong>Kubernet-Bees: How Bees Solve Problems Of Distributed Systems</strong></h4><p>Many CNCF participants use bees as logos (e.g. eBPF, Cilium, GiantSwam, Honeycomb). This is no coincidence; the two worlds have more in common than you might think. Honey bees are social animals which operate as a distributed system. As experienced beekeepers and cloud-native engineers, the similarities between bees and Kubernetes are fascinating. Bee hives autoscale, self-heal, have message passing mechanisms, service discovery, and RBAC. For bee colonies, these are fundamental processes which must be cost-effective. This talk is an introduction to the fascinating world of honey bees, explains how bees have solved problems we face on a daily basis as Kubernetes users and gives an outlook on features that are missing from Kubernetes which bees support today.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FJymVi3aJp1c%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DJymVi3aJp1c&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FJymVi3aJp1c%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/40c2f3e60108b421cf7a21460a619b79/href">https://medium.com/media/40c2f3e60108b421cf7a21460a619b79/href</a></iframe><h4><strong>Arsenal Of Democracy: What Open Source Can Learn From the Motor City</strong></h4><p>In this talk the speaker is taking a look at Detroit’s history and the lessons we can learn from its dominant industry, describes parallels between open source software and manufacturing, explains how lessons learned by automakers in the last century can benefit software development today and points out potential pitfalls made by industrialists that we should seek to avoid.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FMfO8wQbeVnk%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DMfO8wQbeVnk&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FMfO8wQbeVnk%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/8f7c72c094515c85342b838a7df15b49/href">https://medium.com/media/8f7c72c094515c85342b838a7df15b49/href</a></iframe><h3>Community Updates Talks</h3><h4><strong>Cloud Native Computing Foundation (CNFC) updates</strong></h4><p>Community updates about the latest developments from some of the most popular projects such as containerd and Fluent Bit.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FAQb_LKpkRDY&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DAQb_LKpkRDY&amp;image=http%3A%2F%2Fi.ytimg.com%2Fvi%2FAQb_LKpkRDY%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/030bae3efb043c9a8f26f4e45f190f9d/href">https://medium.com/media/030bae3efb043c9a8f26f4e45f190f9d/href</a></iframe><h4><strong>A Cloud Native Swiss Knife</strong></h4><p>This talk focused on various tools that can be used to make the DevOps lives easier (just like a Swiss Knife does for everyday life). Highlights:</p><ul><li><strong><em>Logging</em>: </strong>You can get the logs from ALL pods based on a label. So you don’t need to specify the individual pod. Example:</li></ul><pre>kubectl logs -l app=nginx -f</pre><ul><li><strong><em>Ephemeral Containers</em>:</strong> You don’t need to connect to a pod (and possibly install missing tools like telnet etc. to debug). Instead there is a new command that allows you to attach an image to an existing image. So you can have an image with all your tools installed and attach it to existing images for debug. Relevant command: kubectl debug</li><li><strong><em>ContainerD eStargz:</em></strong><em> </em>Allows for lazy pulling of images which allows for much faster startup times of big container images. For example a 18.7GB image takes<strong> 4.5 minutes </strong>to startup, but with <em>eStargz </em>it only takes <strong>15 seconds</strong>.</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FcsL6zY-IEOI%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DcsL6zY-IEOI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FcsL6zY-IEOI%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a0edbc2a89e964ec0f940da31b85c0ea/href">https://medium.com/media/a0edbc2a89e964ec0f940da31b85c0ea/href</a></iframe><h4><strong>SIG Autoscaling Updates And Feature Highlights</strong></h4><p>In this talk the speaker describes the latest updates and features from the Kubernetes Autoscaling community. He covers the status and future plans for the SIG owned projects — Cluster Autoscaler, Horizontal Pod Autoscaler, Vertical Pod Autoscaler. One of the most interesting features is that you can configure a percentage of the pods to use spot instances!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fd0oX_0SW0-A%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dd0oX_0SW0-A&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fd0oX_0SW0-A%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/ada48241c964ca7f00936b8dc9fbcd06/href">https://medium.com/media/ada48241c964ca7f00936b8dc9fbcd06/href</a></iframe><h3>Developer Support Tools</h3><p><strong>Backstage: Shaping the Future Of Developer Experience</strong></p><p>Backstage is one of the most popular software catalog applications. It is also able to automate the creation of repositories through templates to avoid the creation of repetitive operations/boilerplate code to facilitate coding services at scale. Additionally, through the use of 3rd party plugins it can be a fully customized framework that can be used for documentation/new developer onboarding/badges and gamification.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FUbrPNvaHxCE%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DUbrPNvaHxCE&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FUbrPNvaHxCE%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a594aed120d054a585d47aa8541c6f7c/href">https://medium.com/media/a594aed120d054a585d47aa8541c6f7c/href</a></iframe><h3>Service Mesh</h3><p>Service Mesh solutions are all about shifting concerns such as observability (logs/metrics), routing, security (service to service authentication/mtls), reliability (circuit breaking/retries) away from the application and into the Kubernetes platform layer.</p><h4><strong>Istio Today and Tomorrow: Sidecars and Beyond</strong></h4><p>Istio Ambient Service Mesh is a new development for side-car less Istio deployments. Sidecar containers have certain challenges, such as lack of transparency and overprovisioning of resources and Ambient Service Mesh promises to overcome them by providing a solution that works on both L4 and L7 of the network stack. More information can be found here: <a href="https://istio.io/latest/blog/2022/ambient-security/">https://istio.io/latest/blog/2022/ambient-security/</a> The following slide provides an overview of the architecture.</p><figure><img alt="Istio Ambient Architecture" src="https://cdn-images-1.medium.com/max/683/1*Co8wGt3K8N0dDUiPFmRpMw.png" /></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FbKNngrE4cc8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DbKNngrE4cc8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FbKNngrE4cc8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/6bdd66f3b1f341bf56d0b8c0b6d05a64/href">https://medium.com/media/6bdd66f3b1f341bf56d0b8c0b6d05a64/href</a></iframe><h3><strong>Flagger, Linkerd, And Gateway API: Oh My!</strong></h3><p>In this talk a solution was presented that uses Gateway API/Flagger and Linkerd to manage the service mesh and support canary deployments. <a href="https://flagger.app/">Flagger</a> is responsible for the canary deployments, <a href="https://linkerd.io/">Linkerd</a> is the service mesh solution and <a href="https://gateway-api.sigs.k8s.io/">Gateway API is the Kubernetes solution</a> of the known pattern. An image is a thousand words, so an overview of the components and their functionality can be seen in the following slide:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/893/1*5mUXg62U4LRO3SOYCw1GdQ.png" /></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F9Ag45POgnKw%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D9Ag45POgnKw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F9Ag45POgnKw%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/91c1a9c80723fd18520b6961123d086d/href">https://medium.com/media/91c1a9c80723fd18520b6961123d086d/href</a></iframe><h3>Cloud Native Presentations</h3><h4><strong>Cloudy With a Chance Of Chaos</strong></h4><p>Chaos engineering is popular and maybe essential in the cloud native world. In this talk the experience of Chaos Engineering at Goldman Sachs for a system deployed on AWS was presented. Key takeaways:</p><ul><li>Need to have a plan and define success criteria. What are you after when conducting this test? E.g. What are your SLAs for availability that you want to measure? Do you want to validate proper alerting?</li><li>Manual Chaos testing is a good place to start giving you quick wins with low effort/high return ratio. (e.g. shutting down services from the AWS console).</li><li>Have means in place to monitor/measure client experience during the chaos test</li><li>Have logging/monitoring in place for the postmortem to be able to identify issues so as to fix them</li><li>Chaos engineering is not trivial, it requires time and resources and need to convince both the business and the developers for its value</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FANUA-gHYXcI%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DANUA-gHYXcI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FANUA-gHYXcI%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/366c0a4102627089747bad8684b7ee4b/href">https://medium.com/media/366c0a4102627089747bad8684b7ee4b/href</a></iframe><h4><strong>Path To Production: Sustainable Compliance In Strict Environments</strong></h4><p>Security and Compliance as code is evolving and will sooner or later be required for certain types of sectors. Security/Compliance as code gives the ability to audit/verify that systems satisfy certain regulatory characteristics. In this talk a solution by the company Defence Unicorns was presented. Key takeaways:</p><ul><li>Open Security Controls Assessment Language (OSCAL) is developed by the National Institute of Standards and Technology (NIST) to document/assess and maintain the security/compliance controls</li><li>Kyverno is a policy engine that can be used to define and sign policies to ensure integrity throughout the software supply chain.</li><li>Defence Unicorns have created a tool called Lula that can check the configuration for compliance of the OSCAL against the Kyverno policies.</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F1tivKIprMsw%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D1tivKIprMsw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F1tivKIprMsw%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/dceb21c8185b0b45537e8a3df1e901f9/href">https://medium.com/media/dceb21c8185b0b45537e8a3df1e901f9/href</a></iframe><h3>Conclusion</h3><p>Attending the KubeCon/CloudNativeCon was a once in a life-time experience, where you can see all the latest developments in the field, meet new people, discuss with experts and grow your network.<br>It is also a good opportunity to find a project that interests you and start contributing to it!</p><p>Bonus talk for aspiring contributors: <strong>How to Become an Open Source Mechanic</strong> <a href="https://www.youtube.com/watch?v=chZcSIIOqnY">https://www.youtube.com/watch?v=chZcSIIOqnY</a></p><figure><img alt="Kubernetes blog" src="https://cdn-images-1.medium.com/max/1024/1*KTBqpYBEgsaKS1JgLp1yfQ.png" /></figure><p><em>Attending this conference is an awesome experience that allowed us to appreciate the latest trends in the domain. This wouldn’t have been possible without the full sponsorship of the trip by </em><a href="http://www.xm.com/"><em>XM</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ca10ea9c5c3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/xmglobal/kubecon-cloudnativecon-2022-north-america-1ca10ea9c5c3">KubeCon + CloudNativeCon 2022 North America</a> was originally published in <a href="https://medium.com/xmglobal">XM Global</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Experimenting with Quarkus Native Image Generation for xChange]]></title>
            <link>https://kyriakosanastasakis.medium.com/experimenting-with-quarkus-native-image-generation-for-xchange-47ae38690637?source=rss-b850b6686e42------2</link>
            <guid isPermaLink="false">https://medium.com/p/47ae38690637</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[graalvm]]></category>
            <category><![CDATA[xchange]]></category>
            <category><![CDATA[quarkus]]></category>
            <category><![CDATA[crypto-algorithm]]></category>
            <dc:creator><![CDATA[Kyriakos Anastasakis]]></dc:creator>
            <pubDate>Fri, 12 Mar 2021 23:00:40 GMT</pubDate>
            <atom:updated>2021-04-30T20:57:46.771Z</atom:updated>
            <content:encoded><![CDATA[<h3>This post provides some experiences from making a simple Java app (well, the actual app does something this is just a demo) that connects to Bitfinex to get the funding rates run as a GraalVM native image.</h3><p><a href="https://github.com/knowm/XChange">xChange</a> is one of the most famous Java libraries for integrating with a large number of crypto exchanges. It provides a simple API that behind the scenes uses reflection heavily, so it seemed like an interesting challenge. The challenge? Create a simple application that gets the last three 15-minute candles for funding offers. The Java code is as simple as the following:</p><pre>final Exchange bitfinex = ExchangeFactory.INSTANCE.createExchange(BitfinexExchange.class); </pre><pre>final BitfinexMarketDataServiceRaw bitfinexMarketDataServiceRaw = (BitfinexMarketDataServiceRaw) bitfinex.getMarketDataService(); </pre><pre>final List&lt;BitfinexCandle&gt; bitfinexCandles = bitfinexMarketDataServiceRaw.getFundingHistoricCandles(&quot;15m&quot;, &quot;fBTC&quot;, 2, 3); bitfinexCandles.stream().forEach(System.out::println);</pre><h3>Iteration 1: Compile as Java and run on GraalVM JVM in Docker</h3><p>Native images have many restrictions, so the first attempt was to compile it to Java, create a Docker image and run it on AWS Fargate as a scheduled task to run once every 15 minutes. The Fargate <strong>resource allocation is 512MB of Task Memory and 0.25 of vCPU.</strong></p><p>Using the IntelliJ New Quarkus project wizard also generates a set of Docker files for fast-jar/native docker images. Creating a <a href="https://quarkus.io/blog/quarkus-1-5-final-released/">fast-jar</a> for Quarkus is as simple as the following:</p><pre># Before building the container image run: <br># <br># ./gradlew build -Dquarkus.package.type=fast-jar <br># <br># Then, build the image with: <br># <br># docker build -f src/main/docker/Dockerfile.fast-jar -t quarkus/quarkus-xchange-native-demo-fast-jar .</pre><p>The initial attempt created a docker image that was <strong>150MB in size</strong>, the application took <strong>9.3 seconds to startup</strong> and CPU usage spiked to about 100% and memory to 14% .</p><pre>[io.quarkus] (main) demo on JVM (powered by Quarkus 1.11.1.Final) started in 9.307s</pre><figure><img alt="CPU Usage Docker Image (JVM — Version)" src="https://cdn-images-1.medium.com/max/300/0*OtXYqlL6QFYvG-IE.png" /></figure><p>CPU Usage Docker Image (JVM — Version)</p><figure><img alt="Memory Usage Docker Image (JVM — Version)" src="https://cdn-images-1.medium.com/max/300/0*FYbU1ibyfUUPP_3A.png" /></figure><p>Memory Usage Docker Image (JVM — Version)</p><p>Not bad, but since this is a very short lived application, it consumes rather a lot of resources. Let’s try to use GraalVM native image generation. For this experiment we used GraalVM version: <em>21.0.0.2.r11</em>.</p><h3>Iteration 2: Compile as Native Image and Run in Docker</h3><p>Creating a native image is a rather challenging process when you include third party libraries, especially if they use reflection. It is important that such features of standard JVM are defined in configuration files as mentioned in the <a href="https://www.graalvm.org/reference-manual/native-image/BuildConfiguration/#assisted-configuration-of-native-image-builds">GraalVM documentation</a>.</p><blockquote><em>Native images are built ahead of runtime and their build relies on a static analysis of which code will be reachable. However, this analysis cannot always completely predict all usages of the Java Native Interface (JNI), Java Reflection, Dynamic Proxy objects (java.lang.reflect.Proxy), or class path resources (Class.getResource). Undetected usages of these dynamic features need to be provided to the native-image tool in the form of configuration files.</em></blockquote><p>Luckily GraalVM provides an agent with the ability to automatically generate the GraalVM configuration files.</p><h3>Iteration 2 — Step 1: Use the Agent to automatically generate the GraalVM native generation configuration files</h3><p>The xChange library uses reflection a lot. In GraalVM you can explicitly <a href="https://www.graalvm.org/reference-manual/native-image/Reflection/">specify which classes use reflection</a>. It provides a method to automatically detect reflection items on a simple run:</p><p>java -agentlib:native-image-agent=config-output-dir=./agent-lib-config -jar ./build/quarkus-app/quarkus-run.jar</p><p>This code creates a set of files in the agent-lib-config directory that we defined above. GraalVM searches for those files in the src/resources/native-image directory, so we copy/paste all the automatically generated files there.</p><p><strong><em>Update 2021–04–30: As of version 5.0.7 of xChange the following step (Iteration 2 — Step 2 is obsolete).</em></strong></p><h3>Iteration 2 — Step 2: Run the native image generation using the generated files</h3><p>Trying to run the native image generation:</p><pre>./gradlew clean build -Dquarkus.package.type=native</pre><p>The first error that we get is:</p><pre>Could not resolve com.sun.proxy.$Proxy23 for reflection configuration. Reason: java.lang.ClassNotFoundException: com.sun.proxy.$Proxy23</pre><p>We need to get rid of those erroneous reflection classes in reflect-config.json. Now we try again the native image generation command above. This time the native-image generation succeeds! Now let’s try running the native image:</p><pre>./build/quarkus-xchange-native-demo-1.0-SNAPSHOT-runner</pre><p>This time we get this error:</p><pre>2021-03-08 02:15:44,947 ERROR [io.qua.run.Application] (main) Failed to start application (with profile prod): java.lang.NoSuchMethodException: javax.ws.rs.QueryParam$$ProxyImpl.value() at java.lang.Class.getMethod(DynamicHub.java:1089) at si.mazi.rescu.AnnotationUtils.getValueOrNull(AnnotationUtils.java:45)</pre><p>It appears the problem is in the <a href="https://github.com/mmazi/rescu">rescu</a> library that xChange is using, as it was using the class of the annotation for reflection. <a href="https://github.com/cyrus13/rescu/commit/aeb94695a7d8073b020a65e08df9ca6b2e17076c">Patching it</a> was relatively easy. The patched release is tagged here: <a href="https://github.com/cyrus13/rescu/commit/aeb94695a7d8073b020a65e08df9ca6b2e17076c">https://github.com/cyrus13/rescu/commit/aeb94695a7d8073b020a65e08df9ca6b2e17076c</a></p><p>Then I created a version of xChange that uses this version of the library: <a href="https://github.com/cyrus13/XChange/releases/tag/native-image-friendly">https://github.com/cyrus13/XChange/releases/tag/native-image-friendly</a></p><p>Using those versions seemed to solve the issue. Now let’s try again:</p><h3>Iteration 2 — Step 3: Results of execution on AWS</h3><p>We replaced the docker image of the fast-jar with the native image on AWS. It was running on the same AWS task definition as the JVM image (i.e. allocating the same resources). Consequent runs showed that the native application docker image started in <strong>33ms</strong></p><pre>[io.quarkus] (main) demo on JVM (powered by Quarkus 1.11.1.Final) started in 0.033s</pre><p>Also CPU usage spiked to around 45% with an average spike of 25%, and memory usage spiked to 4.6%!</p><h3>Comparison Table</h3><figure><img alt="Comparisson summary table" src="https://cdn-images-1.medium.com/max/1024/1*42N7xJC5yj6P8-5l9_1Iww.png" /></figure><p>Please note that fargate has a minimum charge of 1 minute so this whole optimization is useless from a cost saving point of view, it’s just for the nerdiness of it!</p><p>A lamda would be a more appropriate solution from a cost saving perspective. Will try that fairly soon.</p><h3>Source Code</h3><p>Source code is available on: <a href="https://github.com/cyrus13/anastasakis-net-sample-code/tree/master/quarkus-xchange-native-demo">https://github.com/cyrus13/anastasakis-net-sample-code/tree/master/quarkus-xchange-native-demo</a></p><p><em>Originally published at </em><a href="https://kyriakos.anastasakis.net/2021/03/13/experimenting-with-quarkus-native-image-generation-for-xchange/"><em>https://kyriakos.anastasakis.net</em></a><em> on March 12, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=47ae38690637" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Backing up a MacOS Time Machine Disk]]></title>
            <link>https://kyriakosanastasakis.medium.com/backing-up-a-macos-time-machine-disk-58533f26187f?source=rss-b850b6686e42------2</link>
            <guid isPermaLink="false">https://medium.com/p/58533f26187f</guid>
            <category><![CDATA[problem-solution]]></category>
            <category><![CDATA[backup]]></category>
            <category><![CDATA[disk-utility]]></category>
            <category><![CDATA[time-machine]]></category>
            <category><![CDATA[macos]]></category>
            <dc:creator><![CDATA[Kyriakos Anastasakis]]></dc:creator>
            <pubDate>Tue, 29 Oct 2019 16:58:03 GMT</pubDate>
            <atom:updated>2019-10-29T16:58:03.290Z</atom:updated>
            <content:encoded><![CDATA[<p>Like a lot of Mac users I backup my Mac using Time Machine. But for safety reasons I would like to backup the whole volume of the Time Machine to another network drive (NAS).</p><p>One way to do so is by using the Disk Utility to create an Image file (img) of the whole Time Machine volume. However, when trying to do so one gets an “<em>Operation cancelled</em>” message and the process stops without any more information.</p><figure><img alt="Operation cancelled message from Time Machine" src="https://cdn-images-1.medium.com/max/956/1*7aMLGxArVQipvllgEA6IOA.png" /></figure><p>The solution is to add the <em>Disk Utility </em>application<em> </em>to the list of applications that can have <em>Full Disk Access</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CgSpKuPnacMAEkwg2ckDCw.png" /></figure><p>The steps to take a backup of the volume successfully are the following:</p><ol><li>Stop the Automatic Backups of the Time Machine.</li><li>Go to <em>Settings -&gt; Security &amp; Privacy</em>. Go to the <em>Privacy</em> tab and scroll down to the “<em>Full Disk Access</em>”.</li><li>Add the “Disk Utility” to the applications that can full disk access.</li><li>Open the “Disk Utility” and select the Time Machine volume on the left hand side.</li><li>In Disk Utility go to: <em>File -&gt; New Image-&gt; Image from…</em></li><li>Select where the image will be saved (it’s a good idea to encrypt it with a password).</li><li>That’s it! Make sure you remove the Disk Utility from the Full Disk Access afterwards for security reasons.</li></ol><figure><img alt="Operation Completed Successfully after you follow the steps." src="https://cdn-images-1.medium.com/max/1000/1*nowXaCUklTXE5j85UoZ-ig.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58533f26187f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Call REST endpoints from MQL5 in BackTesting]]></title>
            <link>https://kyriakosanastasakis.medium.com/call-rest-endpoints-from-mql5-in-backtesting-ae4c683f3164?source=rss-b850b6686e42------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae4c683f3164</guid>
            <category><![CDATA[trading]]></category>
            <category><![CDATA[csharp]]></category>
            <category><![CDATA[rest]]></category>
            <category><![CDATA[mql]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Kyriakos Anastasakis]]></dc:creator>
            <pubDate>Thu, 02 May 2019 06:32:35 GMT</pubDate>
            <atom:updated>2019-11-13T21:50:49.266Z</atom:updated>
            <content:encoded><![CDATA[<p>During the past few months I have been creating some EAs in MQL5. I have also created some microservice like functions for other FinTech related projects (e.g. Market News / custom indicators). All those services are exposed with REST APIs. So there is the need to reuse this functionality from MQL5 Expert Advisors in the simulation mode.</p><p>There are numerous examples in MQL5 that use WebRequest, however it’s not possible to use them from within backtesting. An error is raised in such cases. The other obvious alternative was to use a custom DLL that will be used from within MQL5 and delegate the REST call to the DLL.</p><p>In this direction I have created an opensource library <a href="https://github.com/cyrus13/rest-mql">rest-mql</a> and an example on how to use it through MQL5. The library can be found here: <a href="https://github.com/cyrus13/rest-mql">https://github.com/cyrus13/rest-mql</a></p><p>The example MQL code can be found here: <a href="https://github.com/cyrus13/rest-mql/blob/master/mql5-sample-code/testmqldll.mq5">https://github.com/cyrus13/rest-mql/blob/master/mql5-sample-code/testmqldll.mq5</a></p><p>It is worth mentioning that REST calls certainly slow down the EA and should be used judiciously.</p><p><em>Originally published at </em><a href="http://kyriakos.anastasakis.net/2019/05/02/call-rest-endpoints-from-mql5-during-backtesting/"><em>http://kyriakos.anastasakis.net</em></a><em> on May 2, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae4c683f3164" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Batch inserts with Spring Data and MySQL]]></title>
            <link>https://kyriakosanastasakis.medium.com/batch-inserts-with-spring-data-and-mysql-92db282fe787?source=rss-b850b6686e42------2</link>
            <guid isPermaLink="false">https://medium.com/p/92db282fe787</guid>
            <category><![CDATA[hibernate-jpa]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[spring-data]]></category>
            <category><![CDATA[spring]]></category>
            <category><![CDATA[mysql]]></category>
            <dc:creator><![CDATA[Kyriakos Anastasakis]]></dc:creator>
            <pubDate>Fri, 12 Jun 2015 21:36:13 GMT</pubDate>
            <atom:updated>2021-04-30T21:24:21.929Z</atom:updated>
            <content:encoded><![CDATA[<p>This post describes how to enable batch inserts into a MySQL database when using the Sprint Data CRUD Repository.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*pPZug4E3QJJgBWaCmUmvDA.png" /></figure><h3>Enabling Batch Inserts in a Sprint Data application</h3><p>The application needs to have the following elements:</p><ul><li>Make sure you use a generator that supports batching in your entity. E.g.</li></ul><pre>@Id<br>@GeneratedValue(generator = &quot;generator&quot;)<br>@GenericGenerator(name = &quot;generator&quot;, strategy = &quot;increment&quot;)</pre><ul><li>Add: <em>?rewriteBatchedStatements=true</em> to the end of the connectionstring.</li><li>Use the: <em>save(Iterable&lt;S&gt; paramIterable);</em> method of the JpaRepository to save the data.</li><li>Use the: <em>hibernate.jdbc.batch_size</em> configuration.</li></ul><h3>Full Code Sample</h3><p>Full code sample (maven project) can be found on github: <a href="https://github.com/cyrus13/anastasakis-net-sample-code/tree/master/spring-data-batch">https://github.com/cyrus13/anastasakis-net-sample-code/tree/master/spring-data-batch</a></p><h3>Confirmation of Batch Inserts Functionality</h3><p>So enabling the query log in MySQL:</p><pre>SET global general_log = 1;<br>SET global log_output = ‘table’;</pre><p>we can see the following mysql code is executed:</p><pre>SET autocommit=0;<br>select max(id) from ExampleEntity;<br>SHOW WARNINGS;<br>select @@session.tx_read_only;<br>insert into ExampleEntity (exampleText, id) values <br>(&#39;de32bec8-1cf9-4f14-b816-0ab7a00b1539&#39;, 4),<br>(&#39;c0c85b32-eb2d-4a69-ade4-ac70ea94241c&#39;, 5);<br>commit;<br>SET autocommit=1;</pre><p><strong>Note: Don’t forget to stop logging statements into MySQL general log!</strong></p><pre>SET global general_log = 0;</pre><p><em>Originally published at </em><a href="http://kyriakos.anastasakis.net/2015/06/12/batch-inserts-with-spring-data-and-mysql/"><em>http://kyriakos.anastasakis.net</em></a><em> on June 12, 2015.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=92db282fe787" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>