<?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[Wealth Wizards Engineering - Medium]]></title>
        <description><![CDATA[The place where we blog about the cool stuff that&#39;s going on in Wealth Wizards Engineering and where we showcase our public APIs. - Medium]]></description>
        <link>https://medium.com/ww-engineering?source=rss----9491601574f2---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Wealth Wizards Engineering - Medium</title>
            <link>https://medium.com/ww-engineering?source=rss----9491601574f2---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 01:45:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/ww-engineering" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[From K8 to Serverless at Wealth Wizards]]></title>
            <link>https://medium.com/ww-engineering/from-k8-to-serverless-at-wealth-wizards-293cd086465c?source=rss----9491601574f2---4</link>
            <guid isPermaLink="false">https://medium.com/p/293cd086465c</guid>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[realworldserverless]]></category>
            <dc:creator><![CDATA[Ionut Craciunescu]]></dc:creator>
            <pubDate>Thu, 23 Jul 2020 09:42:23 GMT</pubDate>
            <atom:updated>2020-07-23T09:42:08.771Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/735/1*LkodawOgRHtKP3IJg3u1Sg.jpeg" /></figure><p>It’s been great talking with <a href="https://medium.com/u/d00f1e6b06a2">Yan Cui</a> on <a href="https://twitter.com/RealWorldSls">@RealWorldSls</a> podcast about Wealth Wizards serverless adoption. Have a listen on your favourite podcast player or here: <a href="https://podcasts.google.com/feed/aHR0cHM6Ly9mZWVkcy5idXp6c3Byb3V0LmNvbS84Nzc3NDcucnNz/episode/QnV6enNwcm91dC00MTUzNjgy">https://podcasts.google.com/feed/aHR0cHM6Ly9mZWVkcy5idXp6c3Byb3V0LmNvbS84Nzc3NDcucnNz/episode/QnV6enNwcm91dC00MTUzNjgy</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=293cd086465c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ww-engineering/from-k8-to-serverless-at-wealth-wizards-293cd086465c">From K8 to Serverless at Wealth Wizards</a> was originally published in <a href="https://medium.com/ww-engineering">Wealth Wizards Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes Nginx ingress: traffic redirect using annotations demystified]]></title>
            <link>https://medium.com/ww-engineering/kubernetes-nginx-ingress-traffic-redirect-using-annotations-demystified-b7de846fb43d?source=rss----9491601574f2---4</link>
            <guid isPermaLink="false">https://medium.com/p/b7de846fb43d</guid>
            <category><![CDATA[redirect]]></category>
            <category><![CDATA[nginx-ingress]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[rewrite-rule]]></category>
            <category><![CDATA[annotations]]></category>
            <dc:creator><![CDATA[Ionut Craciunescu]]></dc:creator>
            <pubDate>Wed, 13 May 2020 09:29:44 GMT</pubDate>
            <atom:updated>2020-05-13T09:29:27.789Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*COtUezC74W4rR68f.jpg" /><figcaption>Follow the signs</figcaption></figure><p>Redirect HTTP traffic or rewrite URLs using Kubernetes ingress annotations and Nginx ingress controller. This article explains annotations usage and their effect on the resulting nginx.conf configuration file.</p><p><em>Originally published on </em><a href="https://www.linuxrecruit.co.uk/blog?title=Kubernetes%20Nginx%20Ingress%3A%20Traffic%20Redirect%20Using%20Annotations%20Demystified&amp;id=132"><em>Linux Recruit Blog</em></a><em>.</em></p><h3>1. nginx.ingress.kubernetes.io/rewrite-target</h3><p><a href="https://github.com/kubernetes/ingress-nginx/tree/master/docs/examples/rewrite">kubernetes/ingress-nginx</a></p><p><strong>Example 1:</strong></p><pre>apiVersion: networking.k8s.io/v1beta1 <br>kind: Ingress <br>metadata:<br>   annotations:<br>     kubernetes.io/ingress.class: &quot;nginx&quot;<br>     nginx.ingress.kubernetes.io/rewrite-target: /destination$1$2<br>   name: destination-home<br>   namespace: myNamespace<br> spec:<br>   rules:<br>   - host: nginx.redirect<br>     http:<br>       paths:<br>       - backend:<br>           serviceName: http-svc<br>           servicePort: 80 <br>        path: /source(/|$)(.*)</pre><p>This one does a transparent reverse proxy. <br>It does not update the Location header so the URL in the browser does not change.</p><p><strong>Example 2:</strong></p><pre>apiVersion: networking.k8s.io/v1beta1<br> kind: Ingress<br> metadata:<br>   annotations:<br>     kubernetes.io/ingress.class: &quot;nginx&quot;<br>     nginx.ingress.kubernetes.io/rewrite-target: <a href="https://saturn-green.wealthwizards.io/fact-find$1$2">https:/</a>/nginx.redirect<a href="https://saturn-green.wealthwizards.io/fact-find$1$2">/</a>destination<a href="https://saturn-green.wealthwizards.io/fact-find$1$2">$1$2</a><br>   name: destination-home<br>   namespace: myNamespace<br> spec:<br>   rules:<br>   - host: nginx.redirect<br>     http:<br>       paths:<br>       - backend:<br>           serviceName: http-svc<br>           servicePort: 80<br>         path: /source(/|$)(.*)</pre><p>This one changes the Location header and the URL in the browser is updated:</p><pre>HTTP/1.1 302 Moved Temporarily<br>curl -I  <a href="http://saturn-green.wealthwizards.io/home">http://</a>nginx.redirect<a href="http://saturn-green.wealthwizards.io/home">/s</a>ource<br>Location: https://nginx.redirect/destination</pre><pre>HTTP/1.1 302 Moved Temporarily<br>curl -I  <a href="http://saturn-green.wealthwizards.io/home/ping">http://</a>nginx.redirect<a href="http://saturn-green.wealthwizards.io/home/ping">/source/b</a>ar<br>Location: https://nginx.redirect/destination/<a href="http://saturn-green.wealthwizards.io/home/ping">b</a>ar</pre><p>This is because the replacement string as specified in rewrite-target <br>annotation starts with https:// .<br>From <a href="https://nginx.org/en/docs/http/ngx_http_rewrite_module.html"><em>nginx docs</em></a>:</p><pre>In addition, a URL for temporary redirect with the code 302 can be specified as  the sole parameter. Such a parameter should start with the “http://”, “https://”,  or “$scheme” string. <br>.............. <br>If the specified regular expression matches a request URI, URI is changed as  specified in the replacement string. The rewrite directives are executed  sequentially in order of their appearance in the configuration file. It is possible  to terminate further processing of the directives using flags. If a replacement  string starts with “http://”, “https://”, or “$scheme”, the processing stops and  the redirect is returned to a client.</pre><p>Using nginx.ingress.kubernetes.io/permanent-redirect-code: ‘308’annotation has no effect on the code returned as this is controlled by the rewrite rule in nginx.conf . The directive added in nginx.conf is similar to:</p><p>rewrite “(?i)/source(/|$)(.*)” <a href="https://saturn-green.wealthwizards.io/fact-find$1$2">https://</a>nginx.redirect<a href="https://saturn-green.wealthwizards.io/fact-find$1$2">/destination$1$2</a> break;</p><pre>Syntax: break;<br>Default: — <br>Context: server, location, if</pre><pre>Stops processing the current set of ngx_http_rewrite_module directives.  </pre><pre>If a directive is specified inside the location, further processing of the request  continues in this location.</pre><p>If you need to control the return code using a rewrite rule, then you need to use a return directive after the rewrite directive. More info here: <a href="https://www.nginx.com/blog/creating-nginx-rewrite-rules/">https://www.nginx.com/blog/creating-nginx-rewrite-rules</a>. <br>I assume this can be used using nginx.ingress.kubernetes.io/configuration-snippet: | (I have not tried it yet).</p><p>This one is nice: defines the Application Root that the Controller must redirect if it’s in / context:</p><pre>$ echo &quot;<br> apiVersion: extensions/v1beta1<br> kind: Ingress<br> metadata:<br>   annotations:<br>     nginx.ingress.kubernetes.io/app-root: /destination<br>   name: approot<br>   namespace: default<br> spec:<br>   rules:<br>   - host: approot.bar.com<br>     http:<br>       paths:<br>       - backend:<br>           serviceName: http-svc<br>           servicePort: 80<br>         path: /<br> &quot; | kubectl create -f -</pre><p>In the resulting nginx.conf an if statement will be added to the server context :</p><pre>if ($uri = /) {<br>  return 302 /destination<br>}</pre><h3>2. nginx.ingress.kubernetes.io/configuration-snippet: |</h3><pre>apiVersion: networking.k8s.io/v1beta1<br>kind: Ingress<br>metadata:<br>   annotations:<br>     kubernetes.io/ingress.class: &quot;nginx&quot;<br>     nginx.ingress.kubernetes.io/configuration-snippet: |<br>       rewrite ^/source(/?)$ https://nginx.redirect/destination$1 permanent;<br>       name: destination-home<br>   namespace: myNamespace<br> spec:<br>   rules:<br>   - host: nginx.redirect<br>     http:<br>       paths:<br>       - backend:<br>           serviceName: http-svc<br>           servicePort: 80<br>         path: /source</pre><p>This one looks like it gives the greatest control over the redirect/rewrite as it will add the additional configuration snippet to the resulting nginx.conf location.</p><p>permanent: returns a permanent redirect with the 301 code.</p><p>Additional docs <a href="https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#configuration-snippet">here</a>.</p><h3>3. nginx.ingress.kubernetes.io/server-snippet: |</h3><p>Use carefully. While it can be used similar to the one above (only the annotation is slightly different) it will add your custom config to the server block in the resulting nginx.conf , thus taking effect server wide. A redirect/rewrite rule placed in here will be processed before any other statement in a location directive (controlled by a kubernetes ingress resource) so it might lead to undesired behaviour.</p><p>Additional docs <a href="https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#server-snippet">here</a>.</p><h3>4. nginx.ingress.kubernetes.io/permanent-redirect</h3><pre>apiVersion: networking.k8s.io/v1beta1<br>kind: Ingress<br>metadata:<br>   annotations:<br>     nginx.ingress.kubernetes.io/permanent-redirect: https://nginx.redirect<a href="https://saturn-green.wealthwizards.io/fact-find$1$2">/</a>destination<br>     nginx.ingress.kubernetes.io/permanent-redirect-code: &#39;308&#39;<br>   name: destination-home<br>   namespace: myNamespace<br> spec:<br>   rules:<br>   - host: nginx.redirect<br>     http:<br>       paths:<br>       - backend:<br>           serviceName: http-svc<br>           servicePort: 80<br>         path: /source</pre><p>Pretty self explanatory, works a treat 😄</p><pre>curl -I  <a href="http://saturn-green.wealthwizards.io/home">http://</a>nginx.redirect<a href="http://saturn-green.wealthwizards.io/home">/</a>source<br>HTTP/1.1 308 <br>Permanent Redirect <br>Location: https://nginx.redirect/destination</pre><pre>curl -I  http://nginx.redirect<a href="http://saturn-green.wealthwizards.io/home">/</a>source/bar <br>HTTP/1.1 308 <br>Permanent Redirect <br>Location: https://nginx.redirect/destination</pre><p>It adds an if statement in the nginx.conf under /source location as follows:</p><pre>if ($uri ~* /source) {<br>     return 308 https://<a href="https://medium.com/nginx.redirect/destination">n</a>ginx.redirect/destination;<br>    }</pre><p>Additional docs: <a href="https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md#permanent-redirect">annotations.md#permanent-redirect</a> and <a href="https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#permanent-redirect">here</a>.</p><h4>Permanent Redirect</h4><p>This annotation allows to return a permanent redirect instead of sending data to the upstream. For example nginx.ingress.kubernetes.io/permanent-redirect: <a href="https://www.google.com/">https://www.google.com</a> would redirect everything to Google.</p><h4>Permanent Redirect Code</h4><p>This annotation allows you to modify the status code used for permanent redirects. For example nginx.ingress.kubernetes.io/permanent-redirect-code: ‘308’ would return your permanent-redirect with a 308.</p><h4>Temporal Redirect</h4><p>This annotation allows you to return a temporal redirect (Return Code 302) instead of sending data to the upstream. For example nginx.ingress.kubernetes.io/temporal-redirect: <a href="https://www.google.com/">https://www.google.com</a> would redirect everything to Google with a Return Code of 302 (Moved Temporarily)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b7de846fb43d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ww-engineering/kubernetes-nginx-ingress-traffic-redirect-using-annotations-demystified-b7de846fb43d">Kubernetes Nginx ingress: traffic redirect using annotations demystified</a> was originally published in <a href="https://medium.com/ww-engineering">Wealth Wizards Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A tale about object encryption]]></title>
            <link>https://medium.com/ww-engineering/a-tale-about-object-encryption-6972f9c97ef3?source=rss----9491601574f2---4</link>
            <guid isPermaLink="false">https://medium.com/p/6972f9c97ef3</guid>
            <category><![CDATA[encryption]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[vault]]></category>
            <category><![CDATA[eaas]]></category>
            <dc:creator><![CDATA[Dave Shepherd]]></dc:creator>
            <pubDate>Wed, 13 May 2020 08:33:06 GMT</pubDate>
            <atom:updated>2020-06-01T09:29:51.086Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1oiEZ6VJ7_vCca6LJQAAgg.jpeg" /></figure><p>Encryption is difficult, it shouldn’t be, but it always seems to be a challenge. While something is difficult to do, its adoption is going to be very slow.</p><p>At Wealth Wizards, we are keen to ensure that the data we store is safe and secure, this led to the decision to do row level encryption within our databases in order to separate access to the database from access to the data — defence in depth. But this level of encryption does not make using the data very easy.</p><p>This is a little tale about encrypting objects and managing their encryption keys.</p><h3>Basic encryption</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/443/1*OIuvXdXoQujHmag0vqX04g.png" /><figcaption>Basic encryption using an encryption key</figcaption></figure><p>To encrypt an object, you have the plaintext object that you want to encrypt and an encryption key that you pass through an encryption algorithm to produce an encrypted version of the object.</p><p>To decrypt you use the encrypted data with the encryption key to run back through the encryption algorithm to produce the plaintext object.</p><p>This is pretty straightforward.</p><h3>Initialisation vector (IV)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/443/1*G21QyqKUATV1a-nX6_hGwg.png" /><figcaption>Encrypting using an initialisation vector</figcaption></figure><p>To make your encryption more secure you should use an initialisation vector, it should be random or pseudo random and its use should be limited, for example; one IV per record in a database.</p><p>Using an IV means that if the same text is encrypted with the same key then you get a different output from the encryption algorithm, this makes it more difficult for an attacker to identify patterns in the encrypted data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/459/1*CV0DorajfsXrgiIqd1EhEA.png" /></figure><p>The IV is not a secret which means you can store the IV in the database against the encrypted data that uses it. However, the encryption key should not be stored with the encrypted data, instead, it should be kept somewhere secure.</p><h3>A compromised key</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/459/1*NwnP5Lew8VQ-bP3NfE9o5Q.png" /></figure><p>Using this mechanism to encrypt can leave your database records vulnerable, if the encryption key is compromised by an attacker then all records in that database can be decrypted by the attacker.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/459/1*clduRYFBdlOL6jiS53SYcw.png" /></figure><p>To mitigate this, all data encrypted with that encryption key should be re-encrypted with a new encryption key. In a simple implementation this would mean that the services accessing the data would have to be taken offline while the re-keying is applied.</p><p>One way to get around this problem is to implement encryption key versioning and embed information about the version of the key in the encrypted object. This would allow you to encrypt new data with the new version of the key and still decrypt data that used an old key. Re-keying the encrypted data could be done online as long as any service using the data has all versions of the key.</p><p>However, now we have a lot of our own encryption code that we have to maintain</p><h3>Encryption as a service</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/574/1*DMFxflCw7naDzutanVLKig.png" /></figure><p>Encryption services allow a plaintext object to be passed to them requesting that’s it’s encrypted with a specific key and the service returns the encrypted data to be used.</p><p><a href="https://www.vaultproject.io/docs/secrets/transit">Hashicorp Vault’s transit secrets engine</a> and <a href="https://aws.amazon.com/kms/">Amazon Web Services’ Key Management Service (KMS)</a> are examples of encryption as a service. Your mobile phone’s security chip also provides this functionality.</p><p>As well as not having to manage our own encryption code base, the main benefit is that the encryption keys never leave the secure environment, which means it’s very difficult for them to be leaked. Instead, the are protected with authentication and authorisation processes which allows services to be granted access in a secure way.</p><p>They offer built in key rotation and will automatically use the newest key when encrypting (or re-encrypting) an object, whilst data encrypted with an old key can still be decrypted.</p><p>On top of this they offer a “rekey” function that allows an encrypted payload to be re-encrypted with a newer key without having access to the plaintext version.</p><p>However, there are limitations; they normally have a hard limit to the size of object that they can encrypt, and even if they didn’t that can be a lot of data to pass over a network connection.</p><p>If you are doing granular levels of encryption, like row-level, you could be making many requests to the encryption service for each transaction.</p><p>Both of these could potentially make your system slow.</p><h3>Envelope encryption</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*7dp-7y2qWmZuMbdZ8VnbhA.png" /></figure><p>Envelope encryption combines both these methods to provide a scalable, secure solution to encrypting data.</p><p>Rather than using the service to encrypt all our data, a record encryption key is generated for each object that is to be stored. The plaintext object is encrypted with that record encryption key and an IV.</p><p>The record encryption key we just used on the object is itself encrypted by the encryption service to provide an encrypted record key. Then we store the encrypted record key, the encrypted data and the IV as a record in our database (or other storage, e.g. a queue).</p><p>To decrypt, we use the encryption service to decrypt the record encryption key, which we can then use in turn with the IV to recreate the plaintext object.</p><p>This combines the benefits of the other encryption mechanisms; we can protect our encryption keys and manage their access securely, whilst avoiding too many requests to the encryption service.</p><p>Using a unique encryption key for each record means that if any one of them gets leaked, then only that record is exposed. That key can be cached while a service is actively reading and writing that record to speed up the encryption process and can be easily rotated when writing a record.</p><h3>Summary</h3><p>We’ve been doing row level encryption for a while now and it’s caused us some headaches. Developing software that is storing sensitive information becomes difficult when trying to do it securely, and, rightly or wrongly, the effort to do so is always balanced against business functionality. So, any encryption mechanism that can be securely controlled and yet is easy to work with must be the way forward.</p><p>After looking into using AWS KMS more in our system, it became apparent that AWS services (e.g. S3, DynamoDB) that provide encryption with KMS use envelop encryption to store their objects: <a href="https://aws.amazon.com/kms/faqs/">https://aws.amazon.com/kms/faqs/</a></p><p>Exploring these encryption mechanisms has lead us to build confidence in using the AWS provided encryption as a service (KMS) to protect our data. Access is tightly controlled with policies on the KMS keys as well as the data sources like S3, to ensure that they are not accessed from outside our controlled environments.</p><p>Some encryption is good, easy encryption is better.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6972f9c97ef3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ww-engineering/a-tale-about-object-encryption-6972f9c97ef3">A tale about object encryption</a> was originally published in <a href="https://medium.com/ww-engineering">Wealth Wizards Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[To Monolith or to Microservice]]></title>
            <link>https://medium.com/ww-engineering/to-monolith-or-to-microservice-f8c3f967e63c?source=rss----9491601574f2---4</link>
            <guid isPermaLink="false">https://medium.com/p/f8c3f967e63c</guid>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[team-topologies]]></category>
            <category><![CDATA[teamwork]]></category>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[Rich Marshall]]></dc:creator>
            <pubDate>Sat, 29 Feb 2020 12:45:09 GMT</pubDate>
            <atom:updated>2020-03-13T11:52:56.662Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Team interactions and microservice architectures." src="https://cdn-images-1.medium.com/max/1024/1*Wdxy0xBiNUlpNdOA2tlcSg.png" /></figure><h4>TL,DR;</h4><p>Start with a monolith. Learn to recognise the patterns that indicate when you grow (reduce?) that into Microservices. Depending on your circumstances, that might still be straight away. It might also be never.</p><p>I was <a href="https://medium.com/@aleon1220/i-dont-know-anything-about-istio-but-to-me-it-sounds-like-another-layer-of-complexity-from-an-2c8f90ec3b72?source=post_page-----194b8475bdaa----------------------">recently contacted by someone</a> who’d been reading my my post about why we use the Istio Service Mesh in our Kubernetes platform. They’d made a really pertinent observation: Adding the complexity of Istio to the already complex Kubernetes feels like I really high cost for making it easier to run and co-exist versions of Microservices (co-existence being our use case for Istio). Why not just build a monolith instead and avoid all the complexity?, he asked. “That’s a really good question” I thought and one I have attempted to answer in the past but I think I should have another go.</p><p>At the same time, at <a href="http://www.wealthwizards.com/">Wealth Wizards</a>, we’ve been adopting the principles taught in the brilliant <a href="https://teamtopologies.com/">Team Topologies book</a> by Matthew Skelton and Manuel Pais. I’ve been promising to write something about our experiences to date with what actions we’ve taken from the learning. As I sat down to write the first, it stuck me that these are really the same post. The underlying subject is exactly the same, one helps deal with the consequences of the other.</p><h4>Always start with the WHY.</h4><p>Why are we using Microservices? Why didn’t that solve our problem?</p><p>@Wealth Wizards we’re building a SaaS platform which will allow us to provide regulated, automated financial advice to everyone, regardless of their circumstances. Financial wellness — which has a huge impact on mental health, should be available to everyone, from those with debt worries all the way through to those without a care in the world. Right now in this country it is typically the preserve of the wealthy — those who can afford to spend hundreds or thousands of pounds to know where they should best invest their money or how to use their pensions. There’s a lot to financial advice, many factors to take into account and literally millions of possible outcomes for given areas of advice — e.g mortgage, investment or retirement.</p><p>When we began our journey we had a handful of developers and we started out working on automating “at retirement” advice — what’s recognised as one of the most complicated and risk-laden areas. We started with a monolith. We had one problem to solve and two people working on solving it. With a monolith it’s (relatively) easy to know where the code is, how functions interact with each other and how and where to deploy the code.</p><p>With two developers it’s easy to co-ordinate work that’s taking place on that code base, what changes are occurring, why, and the expected outcome of those changes. There’s still a lot for two developers to consider — retirement advice is notoriously difficult to understand and get right. This is exactly why we started there — to prove that automating complex advice is possible.</p><p>As the product grew, along with ambitions and funding (or customers — depending on your business model) we needed to hire more developers “build faster!”. This meant more people having to co-ordinate around a code base. At four devs, we managed. Then it became necessary to start working on a new area of advice — a new product for us. We hired more people and made what turns out to be a good decision: we forked our code base. One team on Pensions, one on Retirement. Why was this good? Forking is often considered a Bad Thing(tm).<br> <br>By forking the code, we were able to reuse some of the first team’s learning but we were also able to give the new team independence from the existing product. We’d unwittingly reduced the cognitive load of each team — they each had one problem to worry about instead of two and there were fewer people to co-ordinate when working on each code base.</p><p>We continued in this mode for a while — building two separate products on two code bases. They functioned in a similar way — they were essentially twins but they slowly grew apart. Over time, our release frequency slowed. The products grew, along with the capabilities but each change became more complicated and with greater risk.</p><p>We had a funding round and wanted to grow more. We hired more devs, we decided to move to JS (node and react, full stack), microservices and kubernetes. It was the latest thing and microservices solve slow releases, right?</p><p>We started to decompose our monoliths. New functions were built as microservices and the teams started releasing more often. Kubernetes took care of the traditional deployment and scaling problems like load balancing, service discovery, etc. this carried on for a year or more. New product lines were started — investment advice, DB (“final salary” pensions) Transfer advice . Each time, a new, independent team.</p><p>Midway thought last year we ground to a halt. Releases were taking weeks, sometimes months, to appear and contained 10–15 microservices at a time. The platform we’d built had little ability to hand over from one type of advice to another — something an adviser would do seamlessly. I’m good at pointing out our worst faults but it truth, it wasn’t all bad. Some teams were still able to release frequently, but they were generally not working on “difficult advice” problems.</p><p>What had gone wrong? The truth was, it was hard to know. Conways law was itching at the back of my mind — “organisations design systems which mirror their own communication structure” and I had this memory that the real value of microservices lay in being able to model different functions in your business or process as independent functions (and ultimately teams owning those functions), not just in building small code bases which are “easy to reason with”. I also had a fear that we were no longer building a coherent platform as we liked to describe it, but different products using common technology.</p><p>At the same time as this, some of our teams started to recognise and complain about the number of things they were having to work on and importantly, to think about — we started to understand the term “cognitive load”. When you’re moving from one problem to another you often have to stop a moment and reset your brain, “load-up” the new problem and start again. This context switching is a real performance killer — anyone that’s worked closely with Operating Systems will know that CPU switches can be a performance killer — it’s a valuable performance metric for system administrators to follow, especially in older single-core CPUs. The teams started to recognise the affect that working on such a complicated set of problems was having on their cognitive load and that ultimately it was damaging their ability to code, refactor and solve problems quickly and efficiently.</p><p>I started to look back at some sales slide decks(!) and diagrams I’d been building of our systems to demonstrate to 3rd parties how we mapped our ‘Fin’ to our ‘Tech’. Slowly ideas started to form — could we map our micro services directly over these advice areas? We were close in many places but to date we’d taken an engineers approach to breaking down the system and the truth was, we weren’t domain experts.</p><p>A few of us had been aware of Matthew Skelton from talks he’d run in the past and so I happen to follow him on twitter. We’d been reading books like <a href="https://www.amazon.co.uk/dp/1491949880">Designing Delivery</a> and <a href="https://www.amazon.co.uk/Accelerate-Software-Performing-Technology-Organizations/dp/1942788339/">Accelerate</a> among others and getting great ideas about what seemed right but didn’t really know how to put it into practice. By some chance of fate it turned out that Matthew and Manual Pais had clearly also been thinking in depth about these problems (not specifically for our benefit, unfortunately) and were about to launch a <a href="https://teamtopologies.com/book">book</a> helping solve these problems.</p><p>We had to wait a few weeks — their timing was good, but not impeccable — so started to scan what they had available online. It made sense immediately — perhaps because our heads were already in the right context. When the book arrived I devoured the audio book. I quickly evangelised the book to the teams and encouraged them to get copies and learn.</p><p>Now we could form a model on how to solve not only our immediate cognitive load problems but also our potential scaling problems in future. The methods described in the book have been a huge help — recognising the different team patterns — enablement, complicated sub-system, platform services, value streams. We quickly identified the problems we were seeing and the most appropriate solutions to help us reduce cognitive load and deliver faster.</p><p>So far so good but we’re nowhere near done. Having these new patterns we’ve been able to take a step back from our platform and look at the functions and the microservices with a mind to how we _want_ them to work. What structure will give us not only the most cohesive yet decoupled platform alongside the highest performing empowered teams.</p><p>We’re really still at the beginning of our journey but Team Topologies and a Microservices approach — with the knowledge of _where_ we need to build boundaries, has given us the tools we were looking for and have helped us to build a plan and have confidence that we know where we’re going and how to get there.</p><p>I know there’s more to come in this thread. The whole process has stated me thinking about how we build truly empowered and engaged teams. This is no small challenge and has lead me down the path of “<a href="https://en.m.wikipedia.org/wiki/Teal_organisation">Teal Organisations</a>” — as proposed by <a href="https://en.m.wikipedia.org/wiki/Reinventing_Organizations">Frederic Laloux</a>. Definitely a topic for another post, in the future, when I know where we’re going. In the mean time. I’ll stop here but feel free to comment or ask questions if this sound familiar to you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f8c3f967e63c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ww-engineering/to-monolith-or-to-microservice-f8c3f967e63c">To Monolith or to Microservice</a> was originally published in <a href="https://medium.com/ww-engineering">Wealth Wizards Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Two new Javascript libraries: ramda-decimal and year-month]]></title>
            <link>https://medium.com/ww-engineering/two-new-javascript-libraries-ramda-decimal-and-year-month-ac1fa0291a60?source=rss----9491601574f2---4</link>
            <guid isPermaLink="false">https://medium.com/p/ac1fa0291a60</guid>
            <category><![CDATA[npm]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[ramda]]></category>
            <dc:creator><![CDATA[John Hartnup]]></dc:creator>
            <pubDate>Wed, 26 Feb 2020 13:07:48 GMT</pubDate>
            <atom:updated>2020-02-26T13:07:48.398Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*Vo2v_p92wd9ltgu4i_Uqhw.jpeg" /></figure><p>Wealth Wizards has released two of our home-grown Javascript libraries as open source NPM libraries.</p><h3>Ramda-Decimal</h3><p>Firstly we have <a href="https://www.npmjs.com/package/ramda-decimal">ramda-decimal</a> — a very small wrapper around <a href="https://mikemcl.github.io/decimal.js/">Decimal.js</a> that makes it more convenient to use with <a href="https://ramdajs.com/">Ramda</a>.</p><p>At Wealth Wizards we do a lot of financial calculations, and for that floating-point maths just isn’t good enough. Decimal.js gives us arbitrary precision decimal maths, which is great.</p><p>But we also write a lot of our processing code using Ramda, and although it’s not exactly <em>difficult</em> to use, there’s a tension between Ramda’s verb(noun) style and Decimal’s noun.verb() style:</p><pre>const value = R.pipe(<br>    n =&gt; new Decimal(b),<br>    d =&gt; d.times(growthRate)<br>)</pre><p>ramda-decimal simply provides functions that wrap Decimal’s methods. All the functions use Ramda’s curry() so you can use them in a point-free style:</p><pre>const RD = require(&#39;ramda-decimal&#39;);<br>const value = R.pipe(<br>    RD.decimal,<br>    RD.times(growthRate)<br>);</pre><p>If you’re using Ramda and need arbitrary precision maths, give it a go. We’ve implemented all the functions we currently need, and many more of the basic operations Decimal provides. We plan to add more of Decimal’s functions, but feature requests via GitHub’s “issues” will encourage us — or better still, we love to get pull requests.</p><h3>Year-Month</h3><p>Next, we’ve released <a href="https://www.npmjs.com/package/year-month">year-month</a>. One of the fundamental things we do at Wealth Wizards is to model a household’s projected finances. As it happens, the smallest unit we model is a month.</p><p>We were using <a href="https://momentjs.com/">Moment.js</a> to represent dates. Moment is a great date-handling library (<a href="https://moment.github.io/luxon/">Luxon</a>, by the same team, is better still, as it embraces immutable objects). However we noticed that our code got more complicated than it needed to, as our code used to-the-millisecond Moment objects to represent a whole month.</p><p>We also noticed that some operations on Moment were really slowing down our processing. This was entirely our fault, because we were asking Moment to do something that wasn’t really its strength, and we were doing that in a big loop.</p><pre>thousandsOfEntries.forEach( e =&gt; {<br>   if(moment.utc(e.startDate).isBefore(someDate, &#39;month&#39;)) {<br>       doSomething();<br>   }<br>});</pre><p>It turns out that for unavoidable reasons, moment.utc() is expensive, and so is moment.isBefore(m, &#39;month&#39;). This is because in both cases it has to translate between a year and month, and some number of milliseconds, taking into account leap years, leap seconds, the number of days in each month, etc. None of this expensive computation is necessary if we’re only interested in months.</p><p>Enter year-month, which uses immutable objects like Luxon does, and works by making a very simple conversion from year and month, to the integer number of months since January 1970, assuming all years have 12 months.</p><p>year-month is in production use, and the API is considered stable. We’re on the brink of making that official by bumping the version to 1.0.</p><p>We still use Moment and Luxon in the parts of our code that need to measure smaller units of time than a month.</p><p>Again, we love communication. If you think there’s a way we can make year-month better, let us know via GitHub. Or better still, we <em>really</em> love a pull request.</p><p>Links:</p><ul><li>Ramda-Decimal: <a href="https://github.com/WealthWizardsEngineering/ramda-decimal">at GitHub</a>, <a href="https://www.npmjs.com/package/ramda-decimal">at NPM</a></li><li>Year-Month: <a href="https://github.com/WealthWizardsEngineering/year-month">at GitHub</a>, <a href="https://www.npmjs.com/package/year-month">at NPM</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ac1fa0291a60" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ww-engineering/two-new-javascript-libraries-ramda-decimal-and-year-month-ac1fa0291a60">Two new Javascript libraries: ramda-decimal and year-month</a> was originally published in <a href="https://medium.com/ww-engineering">Wealth Wizards Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A VS Code Extension Pack]]></title>
            <link>https://medium.com/ww-engineering/a-vs-code-extension-pack-d974aa8ea769?source=rss----9491601574f2---4</link>
            <guid isPermaLink="false">https://medium.com/p/d974aa8ea769</guid>
            <category><![CDATA[vs-code-extensions]]></category>
            <category><![CDATA[pair-programming]]></category>
            <category><![CDATA[vscode]]></category>
            <dc:creator><![CDATA[Jonathan Lester]]></dc:creator>
            <pubDate>Fri, 22 Nov 2019 10:03:31 GMT</pubDate>
            <atom:updated>2019-11-22T12:36:58.462Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="a yellow extension cord with 2-pin black plugs" src="https://cdn-images-1.medium.com/max/1024/1*uFmhS5zmMeaNdgjGyrQ4DQ.jpeg" /></figure><p><strong>What is an extension pack?</strong></p><p>This is lifted straight from the VS Code API docs but it does a perfect job of summarising what an extension pack is:</p><blockquote>An Extension Pack is a set of extensions that will be installed together. This enables easily sharing your favourite extensions with other users or creating a set of extensions for a particular scenario like PHP development to help a PHP developer get started with VS Code quickly.</blockquote><p><strong>Why do it?</strong></p><p>I’ll start with a little back story if you’ll allow me. I joined Wealth Wizards as a Junior Software Engineer about 5 months ago, this is my 1st programming job and pairing was an integral part of my on-boarding, without I’d have really, really struggled. An issue that occurred a few times in my 1st week was my editor of choice (<a href="https://code.visualstudio.com/">VS Code</a>) not honouring our <a href="https://editorconfig.org/">editorconfig</a> files and not respecting our <a href="https://eslint.org/">ES Lint</a> rules. This was fixed fairly easily. (As a side note: Wealth Wizards are happy for any software engineer to use the editor they please but I think about half of us here use VS Code.)</p><p>About 2 months ago we had new Junior Software Engineer (yes, no longer the noob). After an initial week or 2, us 2 juniors started pair programming. We got on great! We blasted though story after story after story, our code flew though our QA and validation processes. (We work in the financial industry with strict regulation so all our numbers and features are checked by financial advisors working in-house.) We were quicker than anyone expected 2 noobs to be.</p><p>Inspired by our remarkable pairing success we started encouraging pairing for all of our software engineers. This lead to 1 of my colleagues suggesting a funky new VS Code extension: <a href="https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare-pack">VS Code Live Share</a>. It’s kind of a Google Docs for code and it immediately overcame the issue we’d seen when pairing previously.</p><p>More of our software engineers started using VS Code when pairing so we had more people facing similar issue to the ones I faced shortly after joining.</p><p><strong>If only there was a way of giving new starters or software engineers new to VS Code a quick, easy way of getting the setup they need.</strong></p><p>Well there is: a VS Code Extension Pack.</p><p>As described earlier a VS Code Extension Pack is just a list of extensions that will be installed. You install one extension pack, VS Code pulls the other extensions listed. The Wealth Wizards extension pack can be found here: <a href="https://marketplace.visualstudio.com/items?itemName=WealthWizards.extension-pack">WW Extension Pack</a>.</p><p><strong>How to do it?</strong></p><p>There’s a lot of blog posts about this and some really good documentation from Microsoft. I’ll share a rough outline of what I did and provide links for things that are a bit more in depth.</p><ol><li>Install yo and vsce. Yo is an npm package (<a href="https://www.npmjs.com/package/yo">npmjs.com</a>) used to generate a code template for the extension pack and vsce (<a href="https://www.npmjs.com/package/vsce">npmjs.com</a>) is used to build and publish extension</li><li>Run yo code and select New Extension Pack to generate the extension pack template, this also generates a few useful files with additional info.</li><li>Edit the &quot;extensionPack&quot;: array in package.json with the publisher and extension details of the extensions you want (see below).</li><li>Build the extension: vsce package. This will build an *.vsix file that you can pass around your organisation as needed if you don’t intend to publish your extension pack. Or, optionally:</li><li>Using vsce publish &lt;version&gt; you can publish the extension pack to the VS Code marketplace.</li></ol><figure><img alt="a list of vs code extension IDs" src="https://cdn-images-1.medium.com/max/1024/1*pPc_aVklccLb3yrNcfUGWA.png" /><figcaption>3. edit package.json</figcaption></figure><p>The above list is really just a summary of <a href="https://code.visualstudio.com/blogs/2017/03/07/extension-pack-roundup">this blog post from Microsoft</a>.</p><p>Publishing the extension is just as easy. Again, I’ll sum up the steps I took but here’s a <a href="https://code.visualstudio.com/api/working-with-extensions/publishing-extension">link to the docs from Microsoft</a>.</p><ol><li>Sign up at <a href="https://azure.microsoft.com/en-gb/services/devops/">Azure DevOps Services here</a>.</li><li>Set up an organisation. At Wealth Wizards that was done for me by 1 of our platform engineers.</li><li>Generate a Personal Access Token under your account settings &gt; Security &gt; Personal Access Token</li><li>Use vsce to login to that publisher so the extension can be published: vsce login (publisher name)</li><li>Publish the extension: vsce publish minor</li></ol><p>That’s a really quick summary of what I did but the blogs and docs from Microsoft go in to a lot more detail.</p><p>That’s it though, a really easy way to on board new engineers or people new to VS Code by publishing a list of useful extension. I hope that helps.</p><p>If you’re interested here’s the <a href="https://marketplace.visualstudio.com/items?itemName=WealthWizards.extension-pack">Wealth Wizards Extension Pack</a> on the VS Code Marketplace and here’s a <a href="https://github.com/WealthWizardsEngineering/vscode-extension-pack">link to the Github repo</a>.</p><p><strong>Links</strong></p><p><a href="https://code.visualstudio.com/">Download VS Code</a></p><p><a href="https://editorconfig.org/">EditorConfig</a></p><p><a href="https://eslint.org/">ES Lint</a></p><p><a href="https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare-pack">Live Share Extension Pack</a></p><p><a href="https://marketplace.visualstudio.com/items?itemName=WealthWizards.extension-pack">Wealth Wizards Extension Pack</a></p><p><a href="https://www.npmjs.com/package/yo">Yo</a></p><p><a href="https://www.npmjs.com/package/vsce">vsce</a></p><p><a href="https://code.visualstudio.com/blogs/2017/03/07/extension-pack-roundup">Extension Pack Roundup</a></p><p><a href="https://code.visualstudio.com/api/working-with-extensions/publishing-extension">Publishing Extension</a></p><p><a href="https://azure.microsoft.com/en-gb/services/devops/">Azure DevOps</a></p><p><a href="https://github.com/WealthWizardsEngineering/vscode-extension-pack">Github</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d974aa8ea769" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ww-engineering/a-vs-code-extension-pack-d974aa8ea769">A VS Code Extension Pack</a> was originally published in <a href="https://medium.com/ww-engineering">Wealth Wizards Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to functional programming in JavaScript (using Ramda.js)]]></title>
            <link>https://medium.com/ww-engineering/introduction-to-functional-programming-in-javascript-using-ramda-js-bc16bd85c651?source=rss----9491601574f2---4</link>
            <guid isPermaLink="false">https://medium.com/p/bc16bd85c651</guid>
            <category><![CDATA[ramda]]></category>
            <category><![CDATA[junior-developer]]></category>
            <category><![CDATA[functional-programming]]></category>
            <category><![CDATA[node]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Jonathan Lester]]></dc:creator>
            <pubDate>Wed, 14 Aug 2019 16:31:10 GMT</pubDate>
            <atom:updated>2019-08-14T16:31:10.487Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l5NRI3MGywF_z55DmEt01w.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@seanpaulkinnear?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Sean Paul Kinnear</a> on <a href="https://unsplash.com/search/photos/ram-sheep?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p><strong>A bit about me</strong></p><p>I’ll start this post with a quick intro to me and where I’ve come from.</p><p>Hi all, I’m Jonny, I’ve been at <a href="https://www.wealthwizards.com/">Wealth Wizards</a> six weeks and this is my first programming/developing job. Prior to Wealth Wizards I was an IT Technician with 11 years experience providing consumer level support for Apple Macs, iPhone and iPad hardware and software. In February of this year, I gave all that up and started a 16 week coding bootcamp at the <a href="https://schoolofcode.co.uk/">School of Code</a>.</p><blockquote>School of Code offers a free 16 week coding course based in Birmingham open to applicants of all backgrounds.</blockquote><p>That’s right, its completely free and it was honestly one of the best decisions I’ve made.</p><p>After 16 weeks we had our demo day, showing off our new talents to businesses in an around the West Midlands.</p><blockquote>The purpose of the School of Code is to get more and different types of people into technology, and teach them the skills they need to leap into the industry.</blockquote><p>School of Code really is as much about finding work as learning the skills and over the next few days really was an essential part of me getting a job.</p><p>Wealth Wizards had supported the bootcamp heavily, providing three guest speakers and <em>I think</em> five mentors so I was well aware of the business, what they did and where they were. My initial impressions of Wealth Wizards made me think they’d be a good fit for me. After passing a code test and an interview, I was offered the job 8 working days after finishing the boot camp.</p><p>The reason for all this is that the rest of this post will be heavily flavoured by my experiences on the School of Code bootcamp because it is my only view into coding in JavaScript and Node.js. I’m sure any seasoned developer will tell you though, 16 weeks is not long but during the 16 weeks we covered HTML, CSS, JavaScript, React, Mongo DB, agile development, git and collaborative coding, paired programming and lots more. These topics were picked to give us the best chance of finding work because, in the middle of 2019, these topics are extremely relevant. On the bootcamp we did discuss pure functions, mutability, currying and closures but, all core concepts of functional programming, but since then I’ve delved much deeper in to the subject. All the stuff that follows are things I’ve learned or applied since School of Code, in my professional software engineering career.</p><p><strong>Functional Programming in JavaScript</strong></p><p>According to Wikipedia, JavaScript is:</p><blockquote>JavaScript (/ˈdʒɑːvəˌskrɪpt/),[8] often abbreviated as JS, is a high-level, interpreted scripting language that conforms to the ECMAScript specification. JavaScript has curly-bracket syntax, dynamic typing, prototype-based object-orientation, and first-class functions.</blockquote><p><a href="https://en.wikipedia.org/wiki/JavaScript">Wikipedia</a></p><p>Lets also look at functional programming:</p><blockquote>In computer science, functional programming is a programming paradigm — a style of building the structure and elements of computer programs — that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data.</blockquote><p><a href="https://en.wikipedia.org/wiki/Functional_programming">Wikipedia</a></p><p>Functional programming has many benefits including:</p><p>- encouraging pure functions with no side effects, that way we always get the same output from the same input</p><p>- code is split into smaller, independent blocks</p><p>- it makes testing and verification easier because each block can be tested in isolation</p><p>- it leads to more declarative code rather than imperative code</p><p>Although JavaScript was not designed as a purely functional language it treats functions as first class citizens so can definitely be used in a functional programming style.</p><p>There are several libraries to help with functional programming in JavaScript including <a href="http://folktale.origamitower.com/">Folktale</a> and <a href="http://functionaljs.com/">functional.js</a>, but here at Wealth Wizards we use Ramda.</p><p>But what is Ramda?</p><p><strong>Making it Easier with Ramda.js</strong></p><p>Ramda describes itself as a</p><blockquote>library designed specifically for a functional programming style, one that makes it easy to create functional pipelines, one that never mutates user data.</blockquote><p><a href="https://ramdajs.com/">Ramda</a></p><p>At first appearance Ramda doesn’t really make things look too much different, it’s just another library that gets required then used. I found Ramda most difficult when trying to work out what a piece of code is doing, I’ll admit this was probably due to my lack of experience with Ramda but Ramda also tries to stay correct to the mathematical representation of functions which complicates things a little bit more.</p><p>The other thing that is somewhat confusing when using Ramda in an existing codebase is the sheer number of functions Ramda has built in, as I write this it’s 255!</p><p>Let’s have a look at an example.</p><p>Say we have a csv file of the actors, character and episode count for a selection of the Stranger Things characters:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e2b9545f9532d9f0ed433d19363e55f3/href">https://medium.com/media/e2b9545f9532d9f0ed433d19363e55f3/href</a></iframe><p>A csv is all well and good for collecting and viewing data but let’s say we want it in a JSON format. We’ll import the file then use a vanilla JavaScript that will turn our csv in to a JSON array:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/df7ed8cb1d4c4340fd06547301a8f3c5/href">https://medium.com/media/df7ed8cb1d4c4340fd06547301a8f3c5/href</a></iframe><p>What a monstrosity that is! Two splits, two maps and so many dots. It’s also worth noting that we have to define our data first. We have to define our data, then say split, then map it, then split, then map it again where we make the JSON object we want.</p><p>Doing the same in Ramda gives us:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2e75d0a3707303bbac985ceaece6f29f/href">https://medium.com/media/2e75d0a3707303bbac985ceaece6f29f/href</a></iframe><p>I’ll admit, this does look quite a bit different and theres some new words: compose, evolve and zipObj. But notice, we don’t define our data till the end and we don’t have to make up variable names in the map. In fact because Ramda curries everything we can define our function and not pass any data until we need it, I’m just calling it straight away so it runs.</p><blockquote>That looks far too complicated Jonny, I think I’ll do it the old way.</blockquote><p>Wait, let me explain what’s going on line by line (I’ll ignore the requires).</p><p>The first row (line 6) declares a constant then opens a Ramda compose. But what is compose? The Ramda docs describe it as:</p><blockquote>Performs right-to-left function composition. The rightmost function may have any arity; the remaining functions must be unary.</blockquote><p>That doesn’t really help though, well it didn’t help me.</p><p>This ends up being one of the core concepts of functional programming, function composition. Functional programming treat functions like any other variable, they can be declared, passed around, stored and called later, This allows us to declare some smaller, single purpose functions then ‘compose’ a functional pipeline chaining those functions together. In our example, the first level of indentations chains the output R.split(&#39;\n&#39;) (line 12) into R.map(R.compose((line 7).</p><blockquote>That looks weird though Jonny, why does start at the bottom? Why is the R.split run first?</blockquote><p>Good question, and I’ll admit I don’t understand all of it but… In short, I think it has to do with the mathematical representing of functions; reading right-to-left, or bottom-to-top is accurate to the mathematical notation of composed functions, the Ramda docs shows this for every function, the compose one looks like this:</p><blockquote>((y → z), (x → y), …, (o → p), ((a, b, …, n) → o)) → ((a, b, …, n) → z)</blockquote><p>It’s complex and I can’t explain it yet but that’s why it read backwards. The other weird bit, the arity/unary bit is to do with arguments the functions accepts. The first function can accept any number of arguments but subsequent functions may only accept one argument: the output of the preceding function.</p><p>Line 12, R.split(&#39;\n&#39;), splits our csv file line by line so we have an array with each item being a line of our csv, this means we can map over each line.</p><p>That array is then passed in to line 7 R.map(R.compose(so we can start mapping over each line. R.mapaccepts a function, which will be called for each item in an array, and the array itself. The array is passed in by our compose earlier so we only need to add the functions. You’ll notice we have another compose… here comes another backwards reading list of functions. The first one to be run is another split, R.split(&#39;,&#39;) (line 10), this time splitting our line into columns in order to transform our csv in to a JSON array of objects. Once we have that we have an array of columns: [‘Millie Bobbie Brown&#39;, ‘Eleven&#39;, ‘25’]. This array is passed upwards to our R.zipObj(columns)(line 9). zipObj is a Ramda function that take two arrays, one of keys and one of values and combines them to make and array of objects, perfect for what we need. The Ramda docs are excellent and give good examples of each function, a link to a REPL so you can play with it and a link to the code on github. The Ramda docs can be found <a href="https://ramdajs.com/docs/">here</a> and in the link section of the bottom.</p><p>The final part of our map is R.evolve({ episodes: Number })(line 8). This casts our episode count to a number, not a string so we can sort it more easily, not needed for this but it might be helpful in the future. R.evolvetakes in an object with the desired transformations and the object to be transformed, in our case this looks for the episodeskey in our object passed up from our R.zipObj(columns) (line 9) and then applies Number to the value at that key.</p><p>That’s it we have built a simple functional pipeline to take a csv and convert it to a JSON array, first we split the data into rows (line 12), then we map over each row (line 7), splitting each row in to an array of columns (line 10), this array is then combined with the column titles (line 9) and finally, we cast the episode count to a number.</p><p>The end result is:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/709530cdfc3fb65591ed1e488fb6b9c3/href">https://medium.com/media/709530cdfc3fb65591ed1e488fb6b9c3/href</a></iframe><p>We did it! We started with a csv and made a JSON, that’s what we set out to do.</p><p>You might well say that still seems too complicated, and two to three weeks ago I’d have probably agreed but I’m coming round to thinking in a functional programming way and I can see the benefits of it. Ramda makes it even easier by giving us a toolbox of useful functions, currying out-of-the-box and it encourages pure functions.</p><p>If this interests you or you want to find more the Ramda website does have some useful link but I found these most useful:</p><ul><li><a href="http://randycoulman.com/blog/categories/thinking-in-ramda/">Thinking in Ramda</a>, this is a series of blog posts by Randy Coulman,</li><li>And this series of vidoes by Christopher Okhravi <a href="https://www.youtube.com/playlist?list=PLrhzvIcii6GMeyUfpn-o5xVCH3_UykrzI">Ramda JS Tutorial</a>.</li><li>Christopher Okhravi’s Ramda Introduction is a good one to start with because he gives a good overview of Ramda <a href="https://www.youtube.com/watch?v=AINnOyUVEyI">Ramda JS — An Introduction</a>.</li><li>The last recommendation I have is this, a colleague recommended it to me <a href="https://mostly-adequate.gitbooks.io/mostly-adequate-guide/">Professor Frisby’s Mostly Adequate Guide to Functional Programming</a></li></ul><p>That’s all. Thanks for reading this far. Below is a list of all the links I provided:</p><p><strong>Links</strong></p><ul><li><a href="https://www.wealthwizards.com/">Wealth Wizards</a></li><li><a href="https://schoolofcode.co.uk/">School of Code</a></li><li><a href="https://en.wikipedia.org/wiki/JavaScript">JavaScript</a></li><li><a href="https://en.wikipedia.org/wiki/Functional_programming">Functional Programming</a></li><li><a href="https://ramdajs.com/docs/">Ramda Docs</a></li><li><a href="http://randycoulman.com/blog/categories/thinking-in-ramda/">Thinking in Ramda</a></li><li><a href="https://www.youtube.com/playlist?list=PLrhzvIcii6GMeyUfpn-o5xVCH3_UykrzI">Ramda JS Tutorial</a></li><li><a href="https://www.youtube.com/watch?v=AINnOyUVEyI">Ramda JS — An Introduction</a></li><li><a href="https://mostly-adequate.gitbooks.io/mostly-adequate-guide/">Professor Frisby’s Mostly Adequate Guide to Functional Programming</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc16bd85c651" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ww-engineering/introduction-to-functional-programming-in-javascript-using-ramda-js-bc16bd85c651">Introduction to functional programming in JavaScript (using Ramda.js)</a> was originally published in <a href="https://medium.com/ww-engineering">Wealth Wizards Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Video: Unblocking our release train with Istio traffic management]]></title>
            <link>https://medium.com/ww-engineering/video-unblocking-our-release-train-with-istio-traffic-management-58d15b42df38?source=rss----9491601574f2---4</link>
            <guid isPermaLink="false">https://medium.com/p/58d15b42df38</guid>
            <category><![CDATA[releases]]></category>
            <category><![CDATA[cloudnativecon]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[kubecon]]></category>
            <category><![CDATA[istio]]></category>
            <dc:creator><![CDATA[Dave Shepherd]]></dc:creator>
            <pubDate>Tue, 13 Aug 2019 08:46:20 GMT</pubDate>
            <atom:updated>2019-08-13T08:46:20.473Z</atom:updated>
            <content:encoded><![CDATA[<h3>Video: Unblocking the release train with Istio traffic management</h3><p>Recently, <a href="https://medium.com/@pierre.meunier">Pierre Meunier</a> and I delivered a talk at <a href="https://events.linuxfoundation.org/events/kubecon-cloudnativecon-europe-2019/">KubeCon/CloudNativeCon Europe 2019</a> in Barcelona on our use of the <a href="https://istio.io/">Istio service mesh</a>. You can view this talk on YouTube:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FjJdhec4Yufo%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DjJdhec4Yufo&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FjJdhec4Yufo%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/7961840afacd857595da8d95e15d9614/href">https://medium.com/media/7961840afacd857595da8d95e15d9614/href</a></iframe><p>The talk was based on the some our previous articles which you can read here:</p><ul><li><a href="https://medium.com/ww-engineering/unblocking-our-release-train-with-istio-traffic-management-42206f7f8376">Unblocking our release train with Istio traffic management</a></li><li><a href="https://medium.com/ww-engineering/headers-propagation-with-hpropagate-27de8347f76a">Headers propagation with hpropagate</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rLmwL2rr0xeLBd4I2MV-ZQ.jpeg" /><figcaption>Cover image: Unblocking the Release Train with Istio Traffic Management — Dave Shepherd &amp; Pierre Meunier</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58d15b42df38" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ww-engineering/video-unblocking-our-release-train-with-istio-traffic-management-58d15b42df38">Video: Unblocking our release train with Istio traffic management</a> was originally published in <a href="https://medium.com/ww-engineering">Wealth Wizards Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Istio performance in a multi-tenancy Kubernetes cluster]]></title>
            <link>https://medium.com/ww-engineering/istio-performance-in-a-multi-tenancy-kubernetes-cluster-a843ec4e51f7?source=rss----9491601574f2---4</link>
            <guid isPermaLink="false">https://medium.com/p/a843ec4e51f7</guid>
            <category><![CDATA[service-mesh]]></category>
            <category><![CDATA[istio]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[sidecar]]></category>
            <dc:creator><![CDATA[Dave Shepherd]]></dc:creator>
            <pubDate>Wed, 29 May 2019 15:41:36 GMT</pubDate>
            <atom:updated>2019-05-29T15:41:36.828Z</atom:updated>
            <content:encoded><![CDATA[<p>At Wealth Wizards we run a soft multi-tenancy set up in <a href="https://kubernetes.io/">Kubernetes</a> by defining a namespace to each of our customers (or tenants) and restricting access between tenant namespaces using <a href="https://kubernetes.io/docs/concepts/services-networking/network-policies/">network policies</a> and <a href="https://github.com/weaveworks/weave">weave</a>. This set up was defined to ensure isolation between different tenants’ services.</p><p>There is also a “common” namespace for tenant agnostic services which can be used by services in any tenant namespace.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/569/1*Pdr4nT0zoA1o0SVfBHnPVQ.png" /><figcaption>Multi-tenancy: communication between namespaces</figcaption></figure><p>When the <a href="https://istio.io/">Istio service mesh</a> was introduced into our Kubernetes cluster it used the default setup of a single control plane. After running it for a short while it became evident that all of the Envoy proxy sidecars were getting the configuration for all namespaces irrelevant on whether that service was allowed to communicate with services in those other namespaces or not.</p><p>This did not cause us any security issues because the network policy prevented access, but it did appear to add unnecessary load to the control plane; as well as a reasonably high base load there was also spikes of anything up to 800% CPU.</p><p>We looked into options to restrict the configurations being sent based on namespaces, but the only option at the time was to have <a href="https://istio.io/blog/2018/soft-multitenancy/#watching-specific-namespaces-for-service-discovery">one control plane per namespace</a>.</p><p>This wasn’t acceptable for two reasons:</p><ol><li>The resources required to run a control plane per namespace was unacceptable for the number of namespaces that we wanted to run</li><li>The communication to the common namespace would be forced to leave the cluster and re-enter via the ingress</li></ol><p>At the time, we decided to park this problem and just boosted the control plane resources.</p><p>Along came <a href="https://istio.io/about/notes/1.1/">Istio 1.1</a> and with it came the introduction of the <a href="https://istio.io/docs/reference/config/networking/v1alpha3/sidecar/">sidecar resource</a>; this can be defined in a namespace and allows you to configure the sidecar in that namespace, including specifying the egress hosts which can restrict which namespaces sidecars in the current namespace will receive configuration for.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3fb2c6cd5093e756f2aa7c01dca15f4e/href">https://medium.com/media/3fb2c6cd5093e756f2aa7c01dca15f4e/href</a></iframe><p>We now use this to limit the Istio sidecars to the information regarding it’s own namespace, the common namespace and the istio system namespace</p><p>Since then the load from Istio control plane has been a lot more consistent, and a noticeable reduction in the size of any CPU spikes and therefore the resources required to run Istio, this is a great improvement for Istio and a prime example of the Istio community responding to the needs of it’s user base.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a843ec4e51f7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ww-engineering/istio-performance-in-a-multi-tenancy-kubernetes-cluster-a843ec4e51f7">Istio performance in a multi-tenancy Kubernetes cluster</a> was originally published in <a href="https://medium.com/ww-engineering">Wealth Wizards Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unblocking our release train with Istio traffic management]]></title>
            <link>https://medium.com/ww-engineering/unblocking-our-release-train-with-istio-traffic-management-42206f7f8376?source=rss----9491601574f2---4</link>
            <guid isPermaLink="false">https://medium.com/p/42206f7f8376</guid>
            <category><![CDATA[istio]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Dave Shepherd]]></dc:creator>
            <pubDate>Fri, 11 Jan 2019 15:07:45 GMT</pubDate>
            <atom:updated>2019-01-11T15:07:45.214Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oObo90-PBsW4YFWig0wHHw.jpeg" /><figcaption>St Pancras International</figcaption></figure><p>Wealth Wizards employs a microservice architecture. This means lots of services, each being actively developed. To ensure that our changes work a variety of tools are used, including unit-tests, contract tests and linting tools which can be used against work in progress.</p><p>However, there is still a number of steps that need to happen using the whole suite of services, or at least a reasonable portion of them. This includes end to end testing, review or demonstrations with stakeholders to get feedback.</p><p>There’s a number of ways these steps could be achieved, but the easiest and most common method is to merge the change into the mainline and push it out to the test environment.</p><p>The problem with this is that as soon as a change is in the mainline, it’s on the release train and any subsequent changes to the same service end up in a queue. If that change results in a delay, e.g. some feedback caused some rework, then all subsequent changes get stuck and then have to be released together as a bundle. Making bigger and bigger changes that all have to be applied in one go… this starts to become risky and difficult to manage.</p><p>There are many way to try and avoid these problems, but one of the best ways is to stop changes from getting on the release train until there is almost no risk of that change holding it up.</p><p>What if it was possible to build a branch from version control and deploy it alongside the mainline version? If it could interact with the mainline versions of it’s dependencies and be available to anyone who wants to use it for testing or demonstrations without affecting the use of the mainline version?</p><p>This can be done using <a href="https://istio.io/">Istio</a>. Istio does many things, but the <a href="https://istio.io/docs/concepts/traffic-management/">traffic management</a> functionality is the key to this solution. It allows traffic to be routed to different versions of the same service based on a http header.</p><p>The Wealth Wizards implementation will route all traffic to the mainline or master version of a service by default. However, if the hostname includes a version prefix then it will route traffic to the corresponding version of the service, if it exists.</p><p>Our microservices run on <a href="https://kubernetes.io/">Kubernetes</a>; this gives us a lot of flexibility on how they are deployed.</p><p>Istio is deployed to our Kubernetes cluster, which includes an <a href="https://istio.io/docs/tasks/traffic-management/ingress/">ingress gateway</a> and we have enabled <a href="https://istio.io/docs/setup/kubernetes/sidecar-injection/">sidecar injection</a> for the namespaces hosting our test services. This means that external traffic is routed via the Istio gateway and internal traffic is routed via the Istio proxy sidecars.</p><p>By defining destination rules and virtual services we can control how traffic is routed by Istio.</p><p>A destination rule defines subsets of pods for a given services that are available and uses labels on pods to identify these subsets, we use a ‘version’ label which is set to ‘master’ for our mainline deployments and the ticket number when we have deployed a variant from a branch.</p><p>In this case ‘some-microservice’ has a master subset and a subset for ticket ‘ABC-1234’.</p><pre>apiVersion: networking.istio.io/v1alpha3<br>kind: DestinationRule<br>metadata:<br>  name: some-microservice<br>spec:<br>  host: some-microservice.some-namespace.svc.cluster.local<br>  subsets:<br>  - name: ABC-1234<br>    labels:<br>      version: ABC-1234<br>  - name: master<br>    labels:<br>      version: master</pre><p>A virtual service definition defines the rules on how to route traffic. This is used by the Istio gateway and the Istio proxy sidecars to decide which pods to route traffic to. It will typically route based on the requested host and HTTP<br>paths, headers and other rules.</p><p>In this ingress gateway example, requests to some-address.wealthwizards.com/some-microservice will be routed to the master subset by default or the ‘ABC-1234’ subset if the x-variant-id header is set to ‘ABC-1234’ or the host (aka authority) is abc-1234.some-address.wealthwizards.com/some-microservice.</p><pre>apiVersion: networking.istio.io/v1alpha3<br>kind: VirtualService<br>metadata:<br>  name: some-microservice-ingress<br>spec:<br>  gateways:<br>    - default-gateway<br>  hosts:<br>    - some-address.wealthwizards.com<br>    - &quot;*.some-address.wealthwizards.com&quot;<br>  http:<br>    -<br>      appendHeaders:<br>        x-variant-id: ABC-1234<br>      match:<br>        -<br>          authority:<br>            regex: (ABC-1234|abc-1234).some-address.wealthwizards.com<br>          uri:<br>            regex: ^/some-microservice(/.*)?$<br>      route:<br>        -<br>          destination:<br>            host: some-microservice.default.svc.cluster.local<br>            subset: ABC-1234<br>    -<br>      match:<br>        -<br>          uri:<br>            regex: ^/some-microservice(/.*)?$<br>          headers:<br>            x-variant-id:<br>              regex: (ABC-1234|abc-1234)<br>      route:<br>        -<br>          destination:<br>            host: some-microservice.default.svc.cluster.local<br>            subset: ABC-1234<br>    -<br>      match:<br>        -<br>          uri:<br>            regex: ^/some-microservice(/.*)?$<br>      route:<br>        -<br>          destination:<br>            host: some-microservice.default.svc.cluster.local<br>            subset: master</pre><p>We wanted to apply this to all of our feature branches across all microservices, to enable this we have introduced automation around this, so that the delivery teams don’t have to do too much to make use of this.</p><p>First, when a branch is pushed it is already built and tested, so we’ve added an extra step to deploy that to Kubernetes, this was pretty trivial as we already do a very similar step when we build the mainline. We use the ticket number from the branch name to identify a variant.</p><p>To keep the destination rules and virtual service configurations up to date, we created a little tool called <a href="https://github.com/WealthWizardsEngineering/AutoKube">AutoKube</a>. This listens for deployments on Kubernetes and generates the Istio configuration and applies it based on the variants deployed.</p><p>Once a branch is finished with, it needs to be cleaned up, for this we introduced <a href="https://github.com/WealthWizardsEngineering/kube-housekeeper">kube-housekeeper</a>, a simple job that will delete old branch deployments.</p><p>Finally, we wanted to be able to test services downstream from those we’re interacting with directly. For this the x-variant-id header needs to be propagated through our services. This has to be done by the services themselves, but rather than manually passing it through we created <a href="https://github.com/WealthWizardsEngineering/hpropagate">hpropagate</a>, a node.js module that handles it all for us. So when a variant of a service is requested, any downstream requests will also ask for the variant. You can read more about hpropagate in <a href="https://medium.com/ww-engineering/headers-propagation-with-hpropagate-27de8347f76a">this article</a>.</p><p>With all this, our delivery teams can develop features in a branch, and test them before they are committed to the release train, even if they cross microservice boundaries. This has become an invaluable tool to help keep change flowing through our system.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=42206f7f8376" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ww-engineering/unblocking-our-release-train-with-istio-traffic-management-42206f7f8376">Unblocking our release train with Istio traffic management</a> was originally published in <a href="https://medium.com/ww-engineering">Wealth Wizards Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>