<?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 Erlang Solutions on Medium]]></title>
        <description><![CDATA[Stories by Erlang Solutions on Medium]]></description>
        <link>https://medium.com/@erlangsolutions?source=rss-52467e7eae7d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*lC6uF0AbSJJ6LEeK4aaH2w.png</url>
            <title>Stories by Erlang Solutions on Medium</title>
            <link>https://medium.com/@erlangsolutions?source=rss-52467e7eae7d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 14 Nov 2026 18:51:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@erlangsolutions/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[Our Take on Blockchain in FinTech and the BEAM]]></title>
            <link>https://erlangsolutions.medium.com/our-take-on-blockchain-in-fintech-and-the-beam-16743279a6cd?source=rss-52467e7eae7d------2</link>
            <guid isPermaLink="false">https://medium.com/p/16743279a6cd</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[fintech]]></category>
            <dc:creator><![CDATA[Erlang Solutions]]></dc:creator>
            <pubDate>Tue, 06 Jul 2021 08:03:41 GMT</pubDate>
            <atom:updated>2021-07-08T09:54:18.182Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qVZu_SpQP3mUiUiAjkBM6Q.jpeg" /></figure><p>As things stand, FinTech solves problems and addresses pain points through innovative models, however, it is still reliant on legacy banking infrastructure. Cryptocurrency and its underlying technology, blockchain, has the power to revolutionise that infrastructure and, in doing so, revolutionise financial services work.</p><p>Even though Bitcoin has been making the big headlines, the main use cases in financial services are more practical — to store data in blockchain-based distributed databases for better efficiency and transparency. For example, we’ve seen our FinTech clients use blockchain, for storing financial operations logs and signature management. There are other uses too: for example, in lending blockchain can remove the need for centralised gatekeepers, making it more secure to borrow money and provide lower interest rates or in trade finance creating more transparency, security and trust among the trade parties.</p><p>There are many other use cases for the technology and we will explore them in detail as part of Fintech Week London for our <strong>sponsored session panel discussion ‘What’s Next For Blockchain In Financial Services’ on 12 July</strong> — you can <a href="https://www.erlang-solutions.com/landings/fintech-week-london-blockchain-in-fs-event/">get a <strong>free all-access online pass</strong> discount code here.</a></p><p>So, how does the landscape look right now? Firstly, there is a substantial difference in how blockchain can be used by players in different segments of financial services. Established banks and technology firms are primarily focusing on the applications for digital identities and regulatory compliance, whereas ‘start-up operators’ are mostly engaged in activities related to capital markets.</p><p>For banks blockchain’s power to reduce operational costs is the strongest business case while the current most relevant segment is that of payments. A decentralised ledger for payments can facilitate faster payments at lower fees, while clearance and settlement can get closer to real-time at reduced costs away from time-consuming and error-prone settlement processes.</p><p>Encouragingly for those working with blockchain, PoCs are being replaced with deployments to real production systems. While most use cases remain private and permissioned at this point, they are an encouraging indicator. The underlying technology of the network and protocol layers are now widely accepted as robust and stable allowing innovations to move to the application layer where the real value lies. As the higher stack application layer is more nascent, this is where using developers who are experienced becomes especially valuable to avoid wasting time and resources.</p><p>Technologies based on the BEAM VM and OTP such as Erlang and Elixir are often the right tool for the job when it comes to embarking upon a blockchain project. You can find the languages being used by a number of players in the space such as with ArcBlock’s blockchain developer platform that has a core infrastructure powered by BEAM technologies. They chose Erlang because it comes with built-in features that are critical to a blockchain system, like hot-upgrade, concurrency and high availability. This solid foundation has meant their team can focus more on building high-level features and making their platform developer friendly. <strong>Check out our recent webinar with Ty Chen, VP of Engineering, on building dApps on blockchain using Erlang.</strong></p><p>Another example is POA Network, the Ethereum-based sidechain that offers an open-source framework for smart contracts to solve scalability, affordability, and interoperability issues. Erlang and Elixir give them the lightweight code needed to run thousands of processes concurrently on the same virtual machine, which is beneficial for scaling.</p><p>Our team consists of domain experts who have been involved in a wide variety of innovative blockchain projects with our clients. æternity blockchain is an Erlang-based scalable smart contract platform that looks to address some of the most fundamental​ elements of the technology — contract language, oracle and governance mechanisms and methods of consensus. æternity uses Erlang because it allows their team to write code that can respond to many requests in parallel and without crashing. <strong>Check out this talk from the Code BEAM conference on how and why æternity chose to use Erlang.</strong></p><p>The last few years show blockchain technology stacks that can solve real problems in financial services. Ultimately, true advancements will emerge from the intersections of different disciplines. Interfaces of blockchain technologies with AI, ML and IoT need to be explored as we move to greater actual design and production engineering.</p><p>At Erlang Solutions we continue to collaborate closely with our partners in researching and delivering innovative solutions to support blockchain projects. This ranges from core blockchain technologies to more specific distributed applications supported by automated smart contracts. As experts with cutting edge know-how derived from direct exposure in building blockchain solutions and having been operating in this space for quite some time, we advocate that business leaders, regardless of industry, consider how to best use the technology to unlock value in their business models.</p><p><strong>Join us to as we talk about the wider industry at Fintech Week London on July 12. </strong><a href="https://www.erlang-solutions.com/landings/fintech-week-london-blockchain-in-fs-event/"><strong>Register for free.</strong></a></p><p><em>Originally published at </em><a href="https://www.erlang-solutions.com/blog/blockchain-fintech-and-the-beam/"><em>https://www.erlang-solutions.com</em></a><em> on July 6, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=16743279a6cd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 Erlang and Elixir Use Cases In FinTech — Erlang Solutions]]></title>
            <link>https://erlangsolutions.medium.com/5-erlang-and-elixir-use-cases-in-fintech-erlang-solutions-ae13075956ce?source=rss-52467e7eae7d------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae13075956ce</guid>
            <category><![CDATA[erlang]]></category>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[elixir]]></category>
            <category><![CDATA[elixirlang]]></category>
            <dc:creator><![CDATA[Erlang Solutions]]></dc:creator>
            <pubDate>Thu, 24 Jun 2021 13:48:28 GMT</pubDate>
            <atom:updated>2021-07-30T10:56:47.071Z</atom:updated>
            <content:encoded><![CDATA[<h3>5 Erlang and Elixir Use Cases In FinTech — Erlang Solutions</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*99tOMg7cZw4KiF3ExhMsYA.png" /></figure><p>It can hardly be described as ‘secret sauce’ anymore, given that Cisco ships 2 million devices per year running Erlang. That means a whopping 90% of internet traffic is going through routers and switches controlled by Erlang. But what is perhaps less well known within the tech community is that, away from telecoms, Erlang and other languages running on the BEAM virtual machine are powering some of the world’s biggest and most productive financial services systems. Here are just five to start with.</p><h3>1. Vocalink</h3><p><strong>Why Erlang?</strong></p><p><strong>For ultra-reliable transaction delivery</strong></p><p>Erlang is used for immediate payment switches by many companies facilitating instant bank transfers and bill payment services. Erlang, Mnesia and RabbitMQ are used for Vocalink’s global instant payment systems (IPS) which enables real-time payments in Singapore, Thailand, the US and other countries. The Vocalink IPS is now in use by The Clearing House — the banking association and payments companies owned by the largest commercial banks in the US. It has also been selected as the payment technology for the innovative P27 Scandinavian cross/border payment initiative.</p><p>Vocalink has been a driving force around the world in the evolution of real-time payments for over a decade. These real-time solutions sit at the centre of the global payments infrastructure and are designed to ‘run on their own rails’ at a massive scale. Their systems are relied on by financial institutions, corporates and governments to provide high availability and resilient payment solutions.</p><p>The ability to be able to securely and reliably handle payments requests at scale is thanks to Erlang, which, being originally designed for telecoms switching, is ideal for systems that need to be always on and always processing.</p><h3>2. Æternity</h3><p><strong>Why Erlang and Elixir?</strong> <strong>For groundbreaking innovation with smart contracts and blockchain</strong></p><p>æternity is one of the world’s most innovative open-source blockchains with an ambitious mission to bridge the gap between technology and society. They are using Erlang to scale a distributed peer-to-peer network and make their blockchain more reliable and available.</p><p>Founded in 2016 by Yanislav Malahov, known in some circles as “the Godfather of Ethereum”, æternity is designed to deliver productivity, transparent governance, and global scalability. Erlang Solutions were engaged to help them tackle the issues of scalability, which are inherent in modern blockchains.</p><p>The platform needed to handle large volumes of information in parallel. They wanted to increase transaction speed and scalability while also ensuring privacy by designing a unique state channel to enable the off-chain verification of data and smart contracts, allowing for all transactions to be independent of each other. The Erlang-based smart contract platform features oracles, a unique governance system, and a functional smart contract language called Sophia.</p><h3>3. Solaris Bank</h3><p><strong>Why Erlang and Elixir? To be disruptive via fast and agile development</strong></p><p>Solarisbank is a Berlin-based 400-person FinTech company making waves at a pace rarely seen before in the financial industry. Their Banking-as-a-Service platform enables businesses to offer their own financial products via Elixir powered APIs. It took Solarisbank less than three years to build the platform, scale up a team, and raise almost €100m in funding with investments.</p><p>Their full banking license enables companies to offer their own financial products. Partners can access Solarisbank modules in the fields of e-money, instant credit, lending, and digital banking as well as services from third-party providers integrated with the platform via an API.</p><p><a href="https://www.erlang-solutions.com/landings/fintech-newsletter-signup/"><strong>Sign up for our FinTech newsletter &gt;</strong></a></p><h3>4. Goldman Sachs</h3><p><strong>Why Erlang and RabbitMQ?</strong> <strong>To create system reliability for application innovation</strong></p><p>The Erlang programming language is being used by Goldman Sachs in part of its hedge fund trading platform. Erlang is used as part of the real-time monitoring solution for this distributed trading system enabling changes to be made rapidly in response to market conditions.</p><p>Goldman Sachs leverages hundreds of applications communicating with each other. The Data Management and Distribution group provide messaging middleware services to the firm’s ecosystem. RabbitMQ, which is built in Erlang, is a key part of the messaging portfolio at Goldman Sachs.</p><p>RabbitMQ is a free, Open Source message broker that is highly available, fault-tolerant and scalable. As a system middleware layer, it enables different services in your application to communicate with each other optimally. The key value of using RabbitMQ at Goldman Sachs has been the freedom it has afforded its developers to innovate with minimal friction. This freedom helps Goldman Sachs to be one of the traditional financial services firms recognised as keeping pace with the most exciting FinTechs. You can learn more about how Goldman Sachs uses <a href="https://www.youtube.com/watch?v=D9H7i6Ye_to&amp;list=PLDUzG2yLXrU4Lz33ZzSdHyfqdHJ8Zum5A">RabbitMQ in their talk at RabbitMQ Summit 2018</a>.</p><h3>5. Sum Up</h3><p><strong>Why Erlang and Elixir?</strong> <strong>Because of their 24/7 system availability and fault-tolerance</strong></p><p>SumUP is the leading mobile point-of-sale (mPOS) company in Europe, enabling hundreds of thousands of small businesses in countries worldwide to get paid. They used Erlang to build their payment service from scratch.</p><p>They picked Erlang as the ‘right tool for the job’ because card processing is an industry requiring backend systems of a certain type, where availability and fault-tolerance is a must, and Erlang boasts a battle-proven track record in delivering this in telecoms and FinTech.</p><p>Nowadays, beyond the original hardware, mobile, and web apps, SumUp has also developed a suite of APIs and SDKs for integrating SumUp payment into other apps and services.</p><h3>SUMMARY</h3><p>As you can see Erlang, Elixir and other BEAM VM based technologies are being used in production across the FinTech landscape — this includes private and public blockchain, payment and credit card gateways, banking APIs and more traditional infrastructure management. In fact, it is likely you will find an Erlang team in all of the major banks and financial institutions.</p><p>It is easy to build prototypes with Erlang which is why it’s a great choice for fast-moving FinTech startups. While the Elixir programming language mixes the best of Erlang in terms of runtime, the concurrency model, and fault-tolerance, with powerful and battle-tested frameworks.</p><p>There are many more use cases for Erlang and other BEAM VM technologies from the biggest investment banks in the world to nimble FinTech challengers. Stay tuned to find out more soon.</p><p><a href="https://www.erlang-solutions.com/landings/fintech-newsletter-signup/"><strong>Sign up for our FinTech newsletter &gt;</strong></a></p><p><em>Originally published at </em><a href="https://www.erlang-solutions.com/blog/5-erlang-and-elixir-use-cases-in-fintech/"><em>https://www.erlang-solutions.com</em></a><em> on June 24, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae13075956ce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The complete guide to Instant Messaging and in-application chat.]]></title>
            <link>https://medium.com/swlh/the-complete-guide-to-instant-messaging-and-in-application-chat-d92ba1599060?source=rss-52467e7eae7d------2</link>
            <guid isPermaLink="false">https://medium.com/p/d92ba1599060</guid>
            <category><![CDATA[chat]]></category>
            <category><![CDATA[chatbot-development]]></category>
            <category><![CDATA[slack]]></category>
            <category><![CDATA[xmpp]]></category>
            <category><![CDATA[instant-messaging]]></category>
            <dc:creator><![CDATA[Erlang Solutions]]></dc:creator>
            <pubDate>Tue, 13 Oct 2020 00:00:00 GMT</pubDate>
            <atom:updated>2020-10-13T16:20:53.849Z</atom:updated>
            <content:encoded><![CDATA[<p>by Erlang Solutions</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ej_HTkWPU2-wjQIyBATNRg.jpeg" /></figure><p>Have you got the message? Chat is a critical feature for almost every business, in virtually every industry. Now, more than ever, digital communication is relied upon to share information and keep our contacts and users in touch. We’ve created bespoke chat applications for use cases as varied as large scale medical or digital health providers, industry-leading financial service providers and modern dating apps. For business-to-consumer uses, chat is a great way to turn your app or business into a community, keeping users engaged and adding a social element to your applications. On the other hand, in the B2B space, chat applications can be used to increase collaboration and productivity. In fact, external research conducted by one of our clients <a href="https://www.erlang-solutions.com/resources/case-studies.html#mongooseim-for-use-in-financial-services-28-doc">TeleWare found that instant messaging was the most in demand feature for a financial service app.</a></p><p>In this blog, we’ll look at some of the key considerations for an Instant Messaging service as well as the must-have features of the modern chat application and how MongooseIM 4.0 stacks up to deliver what you need.</p><h3>Build vs buy</h3><p>One of the first considerations a company needs to make when implementing a chat offering is whether to use an out-of-the-box product-as-a-service or software-as-a-service offering or build your own chat. Below we weigh up the pros and cons of each approach.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ESoHEF8J625kIAKR.png" /></figure><h3>Benefits of buying</h3><p>The key benefits of an out-the-box purchase solution is that you are able to deploy quickly. The bigger players in this space often offer a comprehensive set of integrations and require little to no development from your team. They also provide users with a familiar user-interface, which means they’re incredibly quick for anyone to learn how to use. All of this means you can be up-and-running quickly with the peace-of-mind that you’re using a tried and tested solution.</p><h3>Cons of buying</h3><p>Both product-as-a-service and software-as-a-service options create the ongoing overhead of a subscription fee by their very nature. Over time, this cost inevitably adds up, making it a more expensive offering. Another drawback is that bought options are designed as one-size-fits-all products and seldom offer flexibility for bespoke features and changes. These options offer next to no control and data ownership is often shared. This makes it hard for your users to control their privacy and hard for your chat solution to meet any needs other than the most vanilla offering.The customer service and support can also be variable. All of this creates a huge potential for complication if something stops functioning in what is essentially a blackbox solution.</p><h3>Benefits of building</h3><p>Building provides you with the flexibility to create a specific chat solution for your needs and own every step in the functionality. In theory, building can be more affordable over the long-term as it reduces the ongoing costs of a software-as-a-service offering. An owned solution also minimises the risk of major changes in your chat application no longer being compitable with the rest of your application.</p><h3>Cons of building</h3><p>When building goes wrong, it is the most costly option, with high upfront and ongoing maintenance costs. Building your own chat application can run into difficulties when the app starts to scale (which is exactly when you want them least). Lastly, building something bespoke means there is no support or community to help you troubleshoot.</p><h3>The MongooseIM way</h3><p><a href="https://www.erlang-solutions.com/products/mongooseim.html">MongooseIM</a> is a massively scalable, battle tested, open-source chat server that has been proven to be able to handle 10’s of millions of connections with ease. With MongooseIM you have the freedom and flexibility to use the open-source product and develop it to your needs, or you can engage our experts to build bespoke features for you. Our team also offers the peace-of-mind of support should you ever need it. This gives you the freedom and flexibility to develop and own your chat solution without the cost or risk of starting from scratch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ao_dUuxSXTs_t35g.png" /></figure><p>With over a decade’s experience in building chat applications, we know the features required to ensure a success, taking everyone from the end-user to the DevOps team into consideration. Below is a list of the most used and desired features and how MongooseIM stacks up.</p><h3>Real-time chat</h3><p>It goes without saying that a chat application should allow users to reliably send and receive messages in real-time. MongooseIM’s scalability ensures that no matter what the spikes or loads of your user-base is, no important message will be lost in transit.</p><h3>Push notifications</h3><p>Push notifications are one of the most valuable parts of a modern chat application. Even if your user is not logged into the application, they’ll still be informed of the message. For B2C applications, that increases the chances of bringing them back to your app and for B2B applications, it ensures no important message goes missed, without requiring your team to be logged into a chat application at all times. MongooseIM has an in-house developed push notification management system, MongoosePush, which is designed to integrate with MongooseIM to easily enable push notifications for your chat app.</p><h3>External integrations</h3><p>MongooseIM rarely works alone, usually it is coupled with other microservices. We offer a rest API that these services can call, and an event pusher for MongooseIM to notify them, thus providing a two-way communication with other microservices over the REST API.</p><h3>API</h3><p>An easy to use API makes your chat application faster and easier to embed and integrate into your chat. We offer a REST API, which is simple, modern and easily understood by most developers. This can be used for both backend integration and client / service development.</p><h3>Multi-user Chat</h3><p>Group chat is one of the most popular features in social settings, and one of the most in-demand features for business collaboration. MongooseIM offers a multi-user chat functionality that is reliable and seamless for users whilst minimising demands on your server. We also provide a light-weight implementation of multi-user chat, tailored for mobile devices.</p><h3>File Transfer and sharing</h3><p>For a majority of use cases, allowing users to share and transfer files makes a chat more usable, keeping them engaged on your platform longer. MongooseIM uses an out-of-band transfer method which reduces the workload on the server side whilst still enabling an easier to use experience for users to share files within the chat application.</p><h3>Batch permission</h3><p>Batch permissions allow for privacy and control of access to information. MongooseIM uses access control lists to offer this functionality. Our chat applications have been approved by regulatory bodies in the health care and financial services worldwide.</p><p>As an application built in XMPP, MongooseIM uses the tried and tested mod_roster functionality to allow for users to manage and customise their address books within the chat application.</p><h3>History and version control</h3><p>If something goes wrong, history and version control is vital. Having access to previous versions means you always have a proven version to fall back on. MongooseIM has a public history of its source code which you have access to at all times.</p><p>Contact sharing from within a chat application encourages connections between groups of users, helps to grow user bases and increase collaboration.</p><p>MongooseIM 4.0 has just been released. In this release, we’ve gone a step further to ensure an easy to use product for developers, users and a DevOps alike. Explore the changes on <a href="https://github.com/esl/MongooseIM/releases/tag/4.0.0">GitHub</a></p><p>If you need help with the perfect chat solution for your needs, talk to our team of scalability experts. We’re always happy to help.</p><h3>You may also like:</h3><p><a href="https://www.erlang-solutions.com/blog.html">Go back to the blog</a></p><p><em>Originally published at </em><a href="https://www2.erlang-solutions.com/completeguidetoinstantmessaging3"><em>https://www.erlang-solutions.com</em></a><em> on October 13, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d92ba1599060" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/the-complete-guide-to-instant-messaging-and-in-application-chat-d92ba1599060">The complete guide to Instant Messaging and in-application chat.</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Three big upcoming virtual conferences]]></title>
            <link>https://erlangsolutions.medium.com/three-big-upcoming-virtual-conferences-ecdb7287ea0?source=rss-52467e7eae7d------2</link>
            <guid isPermaLink="false">https://medium.com/p/ecdb7287ea0</guid>
            <category><![CDATA[erlang]]></category>
            <category><![CDATA[elixir]]></category>
            <category><![CDATA[functional-programming]]></category>
            <category><![CDATA[conference]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Erlang Solutions]]></dc:creator>
            <pubDate>Wed, 05 Aug 2020 14:25:35 GMT</pubDate>
            <atom:updated>2020-08-05T14:25:35.289Z</atom:updated>
            <content:encoded><![CDATA[<p>We’re onboard to help out with three of our favourite conferences who have now gone virtual.</p><h3>Code BEAM V</h3><p>10–11 of September. This is the speaking line up that was originally organised for Code BEAM STO, now delivered online. Speakers include Viktória Fördős (Cisco NSO Core), Christopher Price (Ericsson Head of Software Technology), Robert Virding (Co-Creator of Erlang &amp; Erlang Solutions, Senior Systems Architect) just to name a few. Early Bird tickets are available but closing soon. See the full speaking line up and buy tickets <a href="https://www2.codesync.global/codebeamvreddit1">here.</a></p><h3>ElixirConf EU Virtual</h3><p>7–8 October. Our first ElixirConf EU Virtual in June had over 400 attendees, and the feedback was overwhelmingly positive. The second edition of ElixirConf EU Virtual will feature the same brilliant line-up of speakers that we had organised for this year’s physical event — only virtually. We’ve organised one of the most exciting events we’ve ever had with talks from Chris McCord, Linda Achieng’ Otieno, Sigu Magwa, Marlus Saraiva and heaps more. See the full speaking line up and buy tickets <a href="https://www2.elixirconf.eu/elixirconfeuoctred">here.</a></p><h3>Code MESH V</h3><p>Code Mesh is London’s leading alternative tech conference, designed to be a melting pot for curious, inquisitive innovators. The conference connects programmers who believe in finding best-of-class solutions to any problem. Going virtual means their cross-language community goes global, allowing Code Mesh V to connect and inspire even more people. Very Early Bird tickets sell out within 24 hours every year, but you can join the <a href="https://www2.codesync.global/code-mesh-v/waiting-list-2020">waiting list here</a>.</p><p>If you’d like to be part of the first ever global Code Mesh V event and inspire the cross-language community of ambitious programmers the <a href="https://eventil.com/events/code-mesh-v/cfp">call-for-talks</a> and <a href="https://docs.google.com/forms/d/e/1FAIpQLSdhiLA9iciqIQvPTFDEO_TgLwoTr6eOabD_yoKIHUWs9t_f-Q/viewform">call-for-tutorials</a> are now open.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ecdb7287ea0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Add value to your app with Instant Messaging. Here’s where to start.]]></title>
            <link>https://medium.com/swlh/add-value-to-your-app-with-instant-messaging-heres-where-to-start-f83619170ee0?source=rss-52467e7eae7d------2</link>
            <guid isPermaLink="false">https://medium.com/p/f83619170ee0</guid>
            <category><![CDATA[chat]]></category>
            <category><![CDATA[instant-messaging]]></category>
            <category><![CDATA[xmpp]]></category>
            <dc:creator><![CDATA[Erlang Solutions]]></dc:creator>
            <pubDate>Fri, 26 Jun 2020 00:00:00 GMT</pubDate>
            <atom:updated>2020-07-09T11:28:39.450Z</atom:updated>
            <content:encoded><![CDATA[<p>by Michał Piotrowski</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JMS0piZwSfBWu_IyOu5RHw.jpeg" /></figure><p>Over the last ten years, we have helped A LOT of companies add value to their products using <a href="https://www.erlang-solutions.com/blog/add-value-to-your-app-with-instant-messaging-here-s-where-to-start.html">MongooseIM</a> or XMPP based chat applications. This has allowed us to partner with, and get insights from companies spanning almost every industry and company size. You may wonder how much variety and complexity a team who specialises in scalable Instant Messaging is exposed to, but the truth is, the only thing that ties these projects together is MongooseIM, our scalable, customisable XMPP server. Once we dive deeper into the needs of our clients, we usually find deployments need new features, tailored to their specific need, to help them achieve their most critical business objectives.</p><p>Customisation is what sets the work we do apart. We make sure that your Instant Messaging is fit for purpose. Even when XMPP or MongooseIM offer a rich enough chat experience, there are other details we mare are right to deliver a reliable solution. This includes taking into consideration your workload and usage scenarios to ensure that you have the scalability to guarantee uptime. If you’d like a general introduction to our approach to building a chat application, watch our recent webinar.</p><h3>How can we create or improve a chat experience for your business and its customers?</h3><p>Building and maintaining a chat application is a continuous process. We join our customers at many different stages, and depending on their needs, we can help in different ways. Let’s take a closer look at some examples.</p><h3>Building a bespoke solution.</h3><p>We can become an embedded part of the team that builds the service. This allows us to architect and build the solution together from scratch. From the very first day, we learn about the unique properties of the customer and how instant messaging helps them to achieve their goals. As a result, we can use our expertise to make sure the system is built perfectly, from the start, before any less-than-ideal decisions are made. An added benefit of this for our customers is that their team gets to see how we go about architecting and designing a best-practice system. That way, there is a natural knowledge sharing of every step in the process, so when the product is launched and in-use, your team is familiar with how to operate and maintain your system. When possible, this is the perfect option for both the organisations we work with and us.</p><h3>Improving and optimising before release.</h3><p>We can’t always be there from the start. Sometimes, there is a proof of concept application ready which needs improving, often because there is a technical issue that needs to be solved before the release. At this stage, it’s still possible to help design the architecture of the entire chat system. We can also deploy it to the production environment and make sure it can cope with the increasing load introduced by new users. There are a number of common problems we help solve for companies looking to optimise their chat before release.</p><p>One of the most common reasons companies need help at this stage is that developers who have less experience with XMPP have implemented inadequate solutions which have already been solved by the existing, public XEP — XMPP extension.<br> We also often see problems arising when a custom extension is built on top of an existing one, which, when done incorrectly, can cause significant complications. In the lead up to the release of a chat solution companies often need help with custom integrations.<br> This is especially true for companies adding real time chat to an existing product. In many cases, this can be done outside of the MongooseIM code, on the other hand, it’s usually more scalable and efficient if it can be run within MongooseIM. Not every company has the need to hire full-time Erlang developers, especially for implementing a few integrations. Our team are experienced, ready and happy to help with custom integrations to ensure the reliability and scalability of the release.</p><p>To ensure success when working with an existing product that has yet to be released, we often need to take a step back and look at the product, its goals and its failures holistically. From there we can suggest the best solution. This may mean we need to rethink the existing implementation and change or reshuffle some of the code. In extreme cases, we may need to throw away large chunks of the existing solution to ensure the release is successful. This is the last resort and a decision that is taken collaboratively in the name of reaching an optimal solution.</p><h3>Increasing the scalability of your chat to allow you to handle more users.</h3><p>Your instant messaging is deployed and running. Your product is growing successfully. It should be a time to celebrate, but often increased adoption or use of a chat application comes with increased scalability issues. These need to be sorted fast and future-proofed to avoid giving your users a poor experience and damaging the growth you’ve worked hard to achieve.</p><p>Our role is to find the bottlenecks and fix them. We study the architecture, the server setup, configuration, enabled extensions and customised code. Then, we decide on the best possible solution together, in collaboration with our clients.</p><h3>Improving or customising your chat application.</h3><p>All right, the app is deployed, and users are chatting, so far so good. How can joining forces with us make things even better? There are many reasons companies will come to us to improve an existing instant messaging solution.</p><p>Many of our customers come to us to develop unique functionalities that are necessary for their success. We help by designing the extension on the protocol level and implementing it on the server. The public XEPs only cover use cases which are generic and where other people deploying chat services based on XMPP can also use them. So, if your chat needs a specific functionality, we’re always happy to help.</p><p>We also have projects where MongooseIM replaces another XMPP server. This is common when clients discover that the MongooseIM alternative technology they have chosen did not meet their expectations. A common reason for this is that out of the box functionalities can turn out to be black boxes that make it impossible to carry out necessary customisations or improvements.</p><p>Another common reason to switch to MongooseIM is to improve scalability when an existing solution reaches its capacity. In this case, we play the role of surgeons, carefully implementing a transplant to put MongooseIM at the heart, improving scalability but keeping the rest of the system running smoothly.</p><h3>Tips to avoid common mistakes when using open-source MongooseIM:</h3><h3>Choose your XEP, and choose wisely.</h3><p>X in XMPP stands for eXtensible. This means it might not be the simplest protocol, but there’s hardly a chat feature it doesn’t cover. There is a set of core RFCs on top of which custom extensions (XEPs) are built. There are usually no issues with the core functionality that is covered in RFCs. They are adopted by many client libraries and servers. XEPs are often isolated from each other, independent from the core functionalities. They add extra features or capabilities to the core of XMPP. Here comes the biggest challenge: deciding which XEP to choose (you can find more details in our <a href="https://www.erlang-solutions.com/blog/xmpp-protocol-use-cases-and-guide-erlang-solution-blog.html">XMPP use-cases</a> guide). From our experience, developers starting their adventure with XMPP may have a hard time finding a suitable XEP. This can sometimes accidentally lead to your choice creating difficulties or limitations. Some examples:</p><p><strong>Too many extensions are enabled on the server-side, but not used by the client app.</strong><br> Certain XEPs like XEP-0012: Last Activity put extra load on the server, even when the client’s application is not using them. Enabling only used extensions helps to scale the MongooseIM cluster.</p><p><strong>An outdated or rejected extension is used.</strong><br> Often, different products with instant messaging functionality store the messages on the server. For this, there is extension XEP-0313: Message Archive Management. The majority of servers and client libraries have implemented the XEP for several years already. It replaces an old, more complicated and now deprecated XEP-0136: Message Archiving. Sometimes, developers choose the deprecated extension over the new one.</p><p><strong>A custom extension is built even if an existing XEP covers the required functionality.</strong><br> For instance, if a user wants to know if someone is active in a chat conversation. To achieve that, some extra XMPP stanzas need to be sent. Developers, me included, are creative creatures, and sometimes we rush to reinvent the wheel. In this particular case, XEP-0085: Chat State Notifications fulfils this need.</p><h3>Reduce unknowns</h3><p>When preparing for a wave of users using instant messaging functionality, we need to remember to load test. It’s very crucial to run load tests to know the capacity of your production setup. To my surprise, this is often neglected. Many people want an answer to the following simple question: “how many resources do I need to handle X number of users, sending Y messages per second”. There are too many factors and variables to accurately answer this question. To have a better idea about the capacity, you can run load tests simulating user behaviours. It usually starts with developing the scenario. After making sure that monitoring is in place, the load testing can start. Now we can learn how the system behaves and what to expect in the production environment.</p><h3>Summing it up</h3><p>It is very important:</p><ul><li>to know what functionalities are needed and enabled on the server</li><li>to verify if a custom extension is already covered in a XEP</li><li>to only build a custom extension if necessary</li><li>to run load tests to find the capacity and be better prepared for the real traffic</li></ul><p>All of the above may not be rocket science; many services run on MongooseIM without our help.<br> If you are up to the challenge, good, we are always happy to see our product in use.<br> But, when your time is critical, or if you stumble upon a problem you can’t fix, we’re happy to help. If hacking through 80K lines of unknown code is not your cup of tea, we can guide you through it. Stay safe and have fun adding real-time communication to your product, if required.</p><p><em>Originally published at </em><a href="https://www.erlang-solutions.com/blog/add-value-to-your-app-with-instant-messaging-here-s-where-to-start.html"><em>https://www.erlang-solutions.com</em></a><em> on June 26, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f83619170ee0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/add-value-to-your-app-with-instant-messaging-heres-where-to-start-f83619170ee0">Add value to your app with Instant Messaging. Here’s where to start.</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Elixir is the Programming Language You Should Learn in 2020]]></title>
            <link>https://medium.com/swlh/why-elixir-is-the-programming-language-you-should-learn-in-2020-5772720b98e0?source=rss-52467e7eae7d------2</link>
            <guid isPermaLink="false">https://medium.com/p/5772720b98e0</guid>
            <category><![CDATA[elixir]]></category>
            <category><![CDATA[programming-languages]]></category>
            <category><![CDATA[technology-conference]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[ruby]]></category>
            <dc:creator><![CDATA[Erlang Solutions]]></dc:creator>
            <pubDate>Wed, 03 Jun 2020 00:00:00 GMT</pubDate>
            <atom:updated>2020-06-15T10:05:39.715Z</atom:updated>
            <content:encoded><![CDATA[<p>by Manuel Rubio</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b09B46IwXkQavEf3lZbtPw.png" /></figure><p>What should you look for when choosing to learn a new programming language? The answer might vary depending on what your project or career goals are, but as a basic starting point, you want a language that:</p><ol><li>Is fun and easy to use</li><li>Has the ability to meet modern user demands</li><li>Has rewarding career progression</li><li>Has an active and supportive community</li><li>Has a range of helpful tooling</li><li>Has frameworks to allow full-stack development</li><li>Has easily accessible documentation</li><li>Ensures you grow as a programmer.</li></ol><p>Over the course of the article, we’ll show you how Elixir rates in relation to all of the above dot points. Before we start, it’s worth letting you know a little bit about me. I like to consider myself a polyglot developer. Over the years I have worked with Elm, Lua, Rust, Dart, Go, Kotlin, Scala, C, C++, Perl, Ruby, PHP, Python, Java, JavaScript, Erlang and Elixir. If I were to only pick one language to learn as a brand new developer in 2020, it would be Elixir.</p><h3>Why Elixir is fun and easy to use</h3><p>Fun might not be the only important consideration, but it is one that should not be underestimated. Elixir’s syntax shares a lot of similarities with Ruby; both are high-level, readable, fun programming languages. As a senior developer from Pinterest once said of his decision to transition to Elixir:<br> “”I thought, ‘Wow, it’s as fun as Ruby, but it has some chops — it actually performs really well.’”<br> Personally, I love the ability to write less code. It is a language that is expressive enough to be understandable and fast to read. For example, using the Tesla library, I could implement integration with a provider like Paypal in 20 lines of code. I will be happy to schedule a hands-on workshop or a 1-on-1 call if there is a need for dive into this library.</p><h3>How Elixir has the ability to meet modern usage demands</h3><p>We all heard of the digital transformation, right? As populations grow, and more services move online there is increased pressure on systems to be able to handle huge spikes with billions of concurrent users.<br> Elixir runs on the BEAM VM. A system built for concurrency. As a result, it can handle these user spikes with ease. For those interested in what concurrency is, and how it works, we have a blog comparing the JVM and BEAM VM, which explains it well.<br> Pinterest and Bleacher Report are just two of widely popular and big companies who moved to Elixir in order to help solve issues of scalability. In the case of Bleacher Report, one of our clients, they were able to move from 150 servers, down to 5 servers. Not only did they reduce there physical infrastructure requirements, they were also able to handle more traffic with faster times. A language that can be relied upon for scalable, fault-tolerant will always be sought out by high profile companies.</p><h3>Elixir’s rewarding career progression</h3><p>Elixir is a growing language which is being adopted at a significant rate. As a result, Elixir developers have the opportunity to work for wide spectrum of companies such as PepsiCo, Pinterest, Lonely Planet or MBTA. And the list is continuing to grow. <a href="https://www.erlang-solutions.com/blog/which-new-companies-are-using-erlang-and-elixir-mytopdogstatus.html">Check out this list for companies added in the last 12 months alone.</a></p><h3>The supportive and active Elixir community</h3><p>As you might expect with any new technology or programming language, the Elixir community started out small.<br> Nowadays Elixir has a thriving community that continues to grow, with fantastic events such as <a href="https://virtual.elixirconf.eu/">ElixirConf</a> in Europe and in the US, EMPEX, Code Elixir LDN and Gig City Elixir, as well as Meetups all around the world. This community means the language is continuing to grow and evolve with new tooling, and that there is always someone to provide inspiration or help find solutions to a problem.</p><h3>Elixir’s range of useful tooling</h3><p>Tooling makes languages more versatile and tasks easier. They mean that you don’t have to reinvent the wheel with every new use case. Elixir already has a number of powerful tools, including Phoenix LiveView which enables developers to build real-time, front-end web applications without writing a line of JavaScript or Crawly which makes web crawling and Data Scraping in Elixir easy. Not only does Elixir have a wide-variety of tooling available, but as we mentioned earlier, there is also a passionate community of people continually creating new tools and improving the ones available.</p><h3>Elixir frameworks allow for full-stack development</h3><p>Given its scalability performance and its origins in Erlang, it is no surprise that Elixir is a popular backend choice. As mentioned above, Phoenix LiveView has provided an easy, time-efficient and elegant way for Elixir developers to produce front-end applications. Finally, the Nerves framework allows for embedded software development on the hardware end. As a result, Elixir is a language that can be adopted right throughout the tech stack. This doesn’t just make it an attractive choice for businesses; it also opens up the door for where the language can take you as a developer.</p><h3>Elixir’s easily accessible documentation</h3><p>A language and community where documentation is valued is one that makes knowledge sharing easy. The high standard of documentation in the Elixir community makes it easier for you to learn the language, but also, make it easier for anyone to contribute to its improvement and growth.</p><h3>Learning Elixir can make you a better programmer in other languages</h3><p>There are a number of <a href="https://www.freecodecamp.org/news/my-intro-to-elixir-how-learning-another-programming-language-can-make-you-a-better-developer-d967e568191c/">stories</a>, from <a href="https://medium.com/swlh/how-learning-elixir-made-me-a-better-programmer-4e2a73639aec">people</a> who come from object-oriented languages, who found that the process of learning Elixir made them a <a href="https://mixandgo.com/learn/why-you-too-should-learn-elixir">better programmer</a> in their language of choice. Learning a new purely functional programming paradigm forces you to examine the way you approach programming. In doing so, it can help you identify habits that can be improved and introduce you to new ways of thinking about problems. This fresh perspective is invaluable for all future development you do, regardless of what language you are working with. For our friends using Ruby, this is particularly true, as the Elixir syntax will be familiar to you, allowing you an easy transition into functional, concurrent programming.</p><p>Everyone will have different motivation and considerations for what programming language to choose. But these are the reasons I would recommend you learn Elixir in 2020, for the years ahead.</p><h3>Ready to get started in Elixir?</h3><p>There are many ways to start. First, you should head to the <a href="https://elixir-lang.org/getting-started/introduction.html">getting started page of the official Elixir website</a>. We also offer a number of <a href="https://www.erlang-solutions.com/resources/download.html">free downloadable packages for Elixir.</a><br> Secondly, we offer a variety of Elixir training, including our <a href="https://www.erlang-solutions.com/training/elixir-programming-training-for-beginners-online.html">Elixir Programming Training For Beginners.</a><br> To get started in the community <a href="https://elixirforum.com/">ElixirForum</a> is a great place to start, as well as searching the #Elixirlang and #MyElixirStatus hashtags on Twitter.</p><h3>You may also like:</h3><p><a href="https://virtual.elixirconf.eu/">ElixirConf EU Virtual</a></p><p><a href="https://www.erlang-solutions.com/blog.html">Go back to the blog</a></p><p><em>Originally published at </em><a href="https://www.erlang-solutions.com/blog/why-elixir-is-the-programming-language-you-should-learn-in-2020.html"><em>https://www.erlang-solutions.com</em></a><em> on June 3, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5772720b98e0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/why-elixir-is-the-programming-language-you-should-learn-in-2020-5772720b98e0">Why Elixir is the Programming Language You Should Learn in 2020</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Optimising for Concurrency: Comparing and contrasting the BEAM and JVM virtual machines.]]></title>
            <link>https://erlangsolutions.medium.com/optimising-for-concurrency-comparing-and-contrasting-the-beam-and-jvm-virtual-machines-5b1925877e26?source=rss-52467e7eae7d------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b1925877e26</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[jvm]]></category>
            <category><![CDATA[concurrency]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[parallelism]]></category>
            <dc:creator><![CDATA[Erlang Solutions]]></dc:creator>
            <pubDate>Mon, 11 May 2020 00:00:00 GMT</pubDate>
            <atom:updated>2020-05-21T13:20:32.263Z</atom:updated>
            <content:encoded><![CDATA[<p>by Francesco Cesarini &amp; Gabor Olah</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NsZ8XDSsF4ESJTV9vxxRbQ.png" /></figure><p>The success of any programming language in the Erlang ecosystem can be apportioned into three tightly coupled components. They are:<br> 1) <strong>the semantics of the Erlang programming language</strong>, on top of which other languages are implemented<br> 2) <strong>the OTP libraries and middleware</strong> used to architect scalable and resilient concurrent systems and<br> 3) <strong>the BEAM Virtual Machine</strong> tightly coupled to the language semantics and OTP.</p><p>Take any one of these components on their own, and you have a runner up. But, put the three together, and you have the uncontested winner for scalable, resilient soft-real time systems. To quote Joe Armstrong, “You can copy the Erlang libraries, but if it does not run on BEAM, you can’t emulate the semantics”. This gets enforced by Robert Virding’s First Rule of Programming, which states that “Any sufficiently complicated concurrent program in another language contains an ad hoc informally-specified bug-ridden slow implementation of half of Erlang.”</p><p>In this post, we want to explore the BEAM VM internals. We will compare and contrast them with the JVM where applicable, highlighting why you should pay attention to them and care. For too long, this component has been treated as a black box and taken for granted, without understanding the reasons or implications. It is time to change that!</p><h3>Highlights of the BEAM</h3><p>Erlang and the BEAM VM were invented to be the right tool to solve a specific problem. They were developed by Ericsson to help implement telecom infrastructure handling both mobile and fixed networks. This infrastructure is highly concurrent and scalable in nature. It has to display soft real-time properties and may never fail. We don’t want our Hangouts calls on our mobile with our grandmothers dropped or our online gaming experience of Fortnite to be affected by system upgrades, high user load or software, hardware and network outages. The BEAM VM is optimised to solve many of these challenges by providing fine-tuned features which work on top of a predictable concurrent programming model.</p><p>Its secret sauce are light-weight processes which don’t share memory, managed by schedulers which can manage millions of them across multiple cores. It uses a garbage collector which runs on a per-process basis, highly optimized to reduce any impact on other processes. As a result, the garbage collectors do not impact the overall soft real time properties of the system. The BEAM is also the only widely used VM used at scale with a built-in distribution model which allows a program to run on multiple machines transparently.</p><h3>Highlights of the JVM</h3><p>The Java Virtual Machine (JVM) was developed by Sun Microsystem with the intent to provide a platform for ‘write once’ code that runs everywhere. They created an object oriented language similar to C++, but memory-safe because its runtime error detection checks array bounds and pointer dereferences. The JVM ecosystem became extremely popular with the Internet-era, making it the de-facto standard for enterprise server applications. The wide range of applicability was enabled by a virtual machine that caters for a wide range use cases, and an impressive set of libraries catering for enterprise development.</p><p>The JVM was designed with efficiency in mind. Most of its concepts are an abstraction of features found in popular operating systems such as the threading model which maps to operating system threads. The JVM is highly customisable, including the garbage collector (GC) and class loaders. Some state-of-the-art GC implementations provide highly tunable features catering for a programming model based on shared memory. The JVM allows you to change the code while the program is running. And, a JIT compiler allows byte code to be compiled to the native machine code with an intent to speed up parts of the application.</p><p>Concurrency in the Java world is mostly concerned with running applications in parallel threads, ensuring they are fast. Programming with concurrency primitives is a difficult task because of the challenges created by its shared memory model. To overcome these difficulties, there are <a href="https://www.youtube.com/watch?v=EMv_8dxSqdE">attempts</a> to simplify and unify the concurrent programming models, with the most successful attempt being the <a href="https://akka.io/">Akka framework</a>.</p><h3>Concurrency and Parallelism</h3><p>We talk about parallel code execution if parts of the code are run at the same time on multiple cores, processors or computers, while concurrent programming refers to handling events arriving to the system independently. Concurrent execution can be simulated on single threaded hardware, while parallel execution cannot. Although this distinction may seem pedantic, the difference results in some very different problems to solve. Think of many cooks making a plate of Carbonara pasta. In the parallel approach, the tasks are split across the number of cooks available, and a single portion would be completed as quickly as it took these cooks to complete their specific tasks. In a concurrent world, you would get a portion for every cook, where each cook does all of the tasks. You use parallelism for speed and concurrency for scale.</p><p>Parallel execution tries to solve an optimal decomposition of the problem to parts that are independent of each other. Boil the water, get the pasta, mix the egg, fry the guanciale ham, grate the pecorino cheese. The shared data (or in our example, the serving dish) is handled by locks, mutexes and various <a href="https://www.youtube.com/watch?v=ADxUsCkWdbE">other techniques</a> to guarantee correctness. Another way to look at this is that the data (or ingredients) are present, and we want to utilise as many parallel CPU resources as possible to finish the job as quickly as possible.</p><p>Concurrent programming, on the other hand, deals with many events that arrive at the system at different times and tries to process all of them within a reasonable time. On multi-core or distributed architectures, some of the execution is run parallel, but this is not a requirement. Another way to look at it is that the same cook boils the water, gets the pasta, mixes the eggs and so on, following a sequential algorithm which is always the same. What changes across processes (or cooks) is the data (or ingredients) to work on, which exist in multiple instances.</p><p>The JVM is built for parallelism, the BEAM for concurrency. They are two intrinsically different problems, requiring different solutions.</p><h3>The BEAM and Concurrency</h3><p>The BEAM provides <a href="https://en.wikipedia.org/wiki/Green_threads">light-weight processes</a> to give context to the running code. These processes, also called actors, don’t share memory, but communicate through message passing, copying data from one process to another. Message passing is a feature that the virtual machine implements through mailboxes owned by individual processes. The message passing is a non-blocking operation, which means that sending a message to another process is almost instantaneous and the execution of the sender is not blocked. The messages sent are in the form of immutable data, copied from the stack of the sending process to the mailbox of the receiving one. This is achieved without the need for locks and mutexes among the processes, only a lock on the mailbox in case multiple processes send a message to the same recipient in parallel.</p><p>The immutable data and the message passing enable the programmer to write processes which work independently of each other and focus on the functionality instead of the low-level management of the memory and scheduling of tasks. It turns out that this simple design not only works on a single thread, but also on multiple threads on a local machine running in the same VM and, using the built in distribution, across the network with a cluster of VMs and machines. If the messages are immutable between processes, they can be sent to another thread (or machine) without locks, scaling almost linearly on distributed, multi-core architectures. The processes are addressed in the same way on a local VM as in a cluster of VMs, message sending works transparently regardless of the location of the receiving process.</p><p>Processes do not share memory, allowing you to replicate your data for resilience and distribute it for scale. This means having two instances of the same process on two separate machines, sharing state updates among each other. If a machine fails, the other has a copy of the data and can continue handling the request, making the system fault tolerant. If both machines are operational, both processes can handle requests, giving you scalability. The BEAM provides the highly optimised primitives for all of this to work seamlessly, while OTP (the “standard library”) provides the higher level constructs to make the life of the programmers easy.</p><p>Akka does a great job at replicating the higher level constructs, but is somewhat limited by the lack of primitives provided by the JVM, allowing it to be highly optimised for concurrency. While the primitives of the JVM enable a wider range of use cases, they make programming distributed systems harder as they have no built in primitives for communication and are often based on a shared memory model. For example, where in a distributed system do you place your shared memory? And what is the cost of accessing it?</p><h3>Scheduler</h3><p>We mentioned that one of the strongest features of the BEAM is the ability to break a program into small, light-weight processes. Managing these processes is the task of the scheduler. Unlike the JVM, which maps its threads to OS threads and lets the operating system schedule them, the BEAM comes with its own scheduler.</p><p>The scheduler starts, by default, an OS thread for every core and optimises the workload between them. Each process consists of code to be executed and a state which changes over time. The scheduler picks the first process in the run queue that is ready to run, gives it a certain amount of reductions to execute, where each reduction is the rough equivalent of a command. Once the process has either run out of reductions, is blocked by I/O, is waiting for a message or completes executing its code, the scheduler picks the next process in the run queue and dispatches it. This scheduling technique is called pre-emptive.</p><p>We mentioned the Akka framework many times, as its biggest drawback is the need to annotate the code with scheduling points, as the scheduling is not done at the JVM level. By removing the control from the hands of the programmer, soft real time properties are preserved and guaranteed, as there is no risk of them accidentally causing process starvation.</p><p>The processes can be spread around the available scheduler threads and maximise CPU utilisation. There are many ways to tweak the scheduler but it is rare and needed only for edge and borderline cases, as the default options cover most usage patterns.</p><p>There is a sensitive topic that frequently pops up regarding schedulers: how to handle Natively Implemented Functions (NIFs). A NIF is a code snippet written in C, compiled as a library and run in the same memory space as the BEAM for speed. The problem with NIFs is that they are not pre-emptive, and can affect the schedulers. In recent BEAM versions, a new feature, dirty schedulers, was added to give better control for NIFs. <a href="https://medium.com/@jlouis666/erlang-dirty-scheduler-overhead-6e1219dcc7">Dirty schedulers</a> are separate schedulers that run in different threads to minimise the interruption a NIF can cause in a system. The word dirty refers to the nature of the code that is run by these schedulers.</p><h3>Garbage Collector</h3><p>Modern, high level programming languages today mostly use a <a href="https://www.youtube.com/watch?v=Uj1_4shgXpk">garbage collector</a> for memory management. The BEAM languages are no exception. Trusting the virtual machine to handle the resources and manage the memory is very handy when you want to write high level concurrent code, as it simplifies the task. The underlying implementation of the garbage collector is fairly straightforward and efficient, thanks to the memory model based on immutable state. Data is copied, not mutated and the fact that processes do not share memory removes any process interdependencies, which, as a result, do not need to be managed.</p><p>Another feature of the BEAM is that garbage collection is run only when needed, on a per process basis, without affecting other processes waiting in the run queue. As a result, the garbage collection in Erlang does not ‘stop-the-world’. It prevents processing latency spikes, because the VM is never stopped as a whole — only specific processes are, and never all of them at the same time. In practice, it is just part of what a process does and treated as another reduction. The garbage collector collecting process suspends the process for a very short interval, often microseconds. As a result, there will be many small bursts, triggered only when the process needs more memory. A single process usually doesn’t allocate large amounts of memory, and is often short lived, further reducing the impact by immediately freeing up all its allocated memory on termination. A feature of the JVM is the ability to swap garbage collectors, so by using a commercial GC, it is also possible to achieve non-stopping GC in the JVM.</p><p>The features of the garbage collector are discussed in an excellent <a href="https://www.erlang-solutions.com/blog/erlang-garbage-collector.html">blog post by Lukas Larsson</a>. There are many intricate details, but it is optimised to handle immutable data in an efficient way, dividing the data between the stack and the heap for each process. The best approach is to do the majority of the work in short lived processes.</p><p>A question that often comes up on this topic is how much memory the BEAM uses. Under the hood the VM allocates big chunks of memory and uses custom allocators to store the data efficiently and minimise the overhead of system calls. This has two visible effects:<br> 1) The used memory decreases gradually after the space is not needed<br> 2) Reallocating huge amounts of data might mean doubling the current working memory.</p><p>The first effect can, if really necessary, be mitigated by tweaking the allocator strategies. The second one is easy to monitor and plan for if you have visibility of the different types of memory usage. (One such monitoring tool that provides system metrics out of the box is <a href="https://www.erlang-solutions.com/products/wombatoam.html">WombatOAM</a>).</p><p>Hot code loading is probably the most cited unique feature of the BEAM. Hot code loading means that the application logic can be updated by changing the runnable code in the system whilst retaining the internal process state. This is achieved by replacing the loaded BEAM files and instructing the VM to replace the references of the code in the running processes.</p><p>It is a crucial feature for no downtime code upgrades for telecom infrastructure, where redundant hardware was put to use to handle spikes. Nowadays, in the era of containerization, other techniques are also used for production updates. Those who have never used it dismiss it as a less important feature, but it is none-the-less useful in the development workflow. Developers can iterate faster by replacing part of their code without having to restart the system to test it. Even if the application is not designed to be upgradable in production, this can reduce the time needed for recompilation and redeployments.</p><h3>When not to use the BEAM</h3><p>It is very much about the right tool for the job. You need a system to be extremely fast, but are not concerned about concurrency? Handling a few events in parallel, and having to handle them fast? Need to crunch numbers for Graphics, AI or analytics? Go down the C++, Python or Java route. Telecom infrastructure does not need fast operations on floats, so speed was never a priority. Aided with dynamic typing, which has to do all type checks at runtime means compiler time optimizations are not as trivial. So number crunching is best left to the JVM, Go or other languages which compile to native. It is no surprise that floating point operations on Erjang, the version of Erlang running on the JVM, was 5000% faster than the BEAM. But where we’ve seen the BEAM shine is using its concurrency to orchestrate number crunching, outsourcing the analytics to C, Julia, Python or Rust. You do the map outside the BEAM and the reduce within the BEAM.</p><p>The mantra has always been fast enough. It takes a few hundred milliseconds for humans to perceive a stimulus (an event) and process it in their brain, meaning that micro or nano second response time is not necessary for many applications. Nor would you use the BEAM for microcontrollers, it is too resource hungry. But for embedded systems with a bit more processing power, where multi-core is becoming the norm, you need concurrency, and the BEAM shines. Back in the 90s, we were implementing telephony switches handling tens of thousands of subscribers running in embedded boards with 16mb of memory. How much memory does a RaspberryPi have these days? And finally, hard real time systems. You would probably not want the BEAM to manage your airbag control system. You need hard guarantees, something only a hard real time OS and a language with no garbage collection or exceptions. An implementation of an Erlang VM running on the bare metal such as GRiSP will give you similar guarantees.</p><h3>Conclusion</h3><p>Use the right tool for the job. If you are writing a soft real time system which has to scale out of the box and never fail, and do so without the hassle of having to reinvent the wheel, the BEAM is the battle proven technology you are looking for. For many, it works as a black box. Not knowing how it works would be analogous to driving a Ferrari and not being capable of achieving optimal performance or not understanding what part of the motor that strange sound is coming from. This is why you should learn more about the BEAM, understand its internals and be ready to finetune and fix it. For those who have used Erlang and Elixir in anger, we have launched a one day instructor-led course which will demystify and explain a lot of what you saw whilst preparing you to handle massive concurrency at scale. The course is available through our new instructor lead remote training, <a href="https://www.erlang-solutions.com/training/tutorial-the-beam-vm-under-the-hood-online.html">learn more here</a>. We also recommend <a href="https://blog.stenmans.org/theBeamBook/">The BEAM book</a> by Erik Stenman and the <a href="http://beam-wisdoms.clau.se/en/latest/">BEAM Wisdoms</a>, a collection of articles by Dmytro Lytovchenko.</p><h3>You may also like:</h3><p>1.One of the authors also likes a similar looking dish not called carbonara but made with cream..<a href="https://www.erlang-solutions.com/blog/optimising-for-concurrency-comparing-and-contrasting-the-beam-and-jvm-virtual-machines.html#ref1">↩</a></p><p><a href="https://www.erlang-solutions.com/blog.html">Go back to the blog</a></p><p><em>Originally published at </em><a href="https://www.erlang-solutions.com/blog/optimising-for-concurrency-comparing-and-contrasting-the-beam-and-jvm-virtual-machines.html"><em>https://www.erlang-solutions.com</em></a><em> on May 11, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b1925877e26" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Optimizing GraphQL with Dataloader.]]></title>
            <link>https://erlangsolutions.medium.com/optimizing-graphql-with-dataloader-5b768abd0839?source=rss-52467e7eae7d------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b768abd0839</guid>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[dataloader]]></category>
            <category><![CDATA[developer-tools]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Erlang Solutions]]></dc:creator>
            <pubDate>Wed, 01 Apr 2020 00:00:00 GMT</pubDate>
            <atom:updated>2020-04-06T10:14:18.999Z</atom:updated>
            <content:encoded><![CDATA[<p>by László Hegedüs</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*lRiR8jqL7qDFZvX4rXgKbw.png" /></figure><p>Throughout my professional career, I’ve had the chance to work with a few programming languages from different paradigms. Some of them were a joy to use, others, were bloated with features that could make even the simplest code unreadable. A little over two years ago I decided to give Erlang a try. Soon after, I started working at Erlang Solutions, and after a couple of months of intensive coding in Erlang I was introduced to Elixir. I’ve been working as an Elixir developer since then.</p><p>Over the last fourteen months I have been working with a client on mobility applications. We developed several parts of the backend of a corporate car sharing platform and built an application from scratch to conduct and analyze test drives at dealerships around the World. Development of the former had already started before we got there, so the tech stack was pretty much decided. We developed a handful of services exposing GraphQL APIs. For a number of reasons <a href="https://elixir-lang.org/">Elixir</a> was the right fit for this purpose. Using the <a href="https://hexdocs.pm/absinthe/overview.html">Absinthe</a> library to craft the APIs was another good choice by their team. However, multiple services had to communicate with each other and making a responsive UI requires optimized queries whenever possible. We learned a lot from the experience which we will share for you today in this blog.</p><p>When we started working on the second application, we had more flexibility in choosing the tools. We decided to stick with a GraphQL API and used Absinthe, but paid attention to how we write the resolver functions. In the end, our API was blazing fast, because most of our resolvers ran only a handful of queries.</p><p>Designing a usable API is art, as is optimizing the backend that serves that API. In this blog post — and hopefully some upcoming ones — I’ll give you a few hints on what to avoid or what to strive for when working with Absinthe. We cannot always affect how other applications/services work, but we can do our best to make our service as fast as possible.</p><p>There are plenty of resources out there to help you get started with Absinthe, and the number of tutorials on how to use <a href="https://hexdocs.pm/dataloader/Dataloader.html">Dataloader</a> are growing, but it is a recurring topic on Slack. I hope to give you an insight into how it works and how you can make use of it in your project.</p><h3>What is Dataloader in a nutshell?</h3><p>In short, Dataloader is a tool that can help your application fetch data in an optimal way by implementing batching and caching.</p><h3>Dataloader in Elixir</h3><p>In the Elixir world, it is provided by a <a href="https://hex.pm/packages/dataloader">library</a> and integrates well with Ecto and Absinthe. Note that it’s not a silver bullet, your queries using Dataloader rely on the optimal implementation of the underlying library for the specific data source.</p><p>We are not going into details on how to use Dataloader on its own. Please consult the <a href="https://hexdocs.pm/dataloader/Dataloader.html">official documentation</a> for that.</p><p>Instead, let’s dive into using Dataloader in Absinthe.</p><h3>Using Dataloader in Absinthe Resolvers</h3><p>For these examples, we are going to use rather simple schemas to avoid getting lost in the details. Assume we are building a database where we keep track of companies and their employees. One employee belongs to exactly one company, but each company may have multiple employees. The Ecto schemas may be defined as:</p><p>And the corresponding object definitions in Absinthe GraphQL may look like:</p><p>This is all good until we want to resolve the employees in the company. A naïve field definition of it may be:</p><p>Similarly, we can add the field :company to the employee object as:</p><p>If we now query a company through GraphQL and also ask for the employees on that field, then our backend will perform two SQL queries. This is not bad at all, but imagine a case where we have ten employee results. Moreover, each result asks for its own company field, which causes several duplicate queries to Ecto.</p><pre>query($id: ID!) { company(id: $id) { id name employees { id name company { id name } } } }</pre><p>This may not happen in this exact form, but it helps us imagine what happens when the same associated object has to be resolved for a list of results. We have to make several queries to Ecto for this to be answered. One query to resolve the company in the root, one query for each employee and one additional query for resolving the company of each employee. Twenty-one queries overall; we’re facing the infamous n+1 problem. This is where Dataloader comes to the rescue.</p><h3>Adding Dataloader</h3><p>The documentation of <a href="https://hexdocs.pm/absinthe/ecto.html#dataloader">Absinthe</a> is a good starting point for using Dataloader with an Ecto data source. In short, if we want to use Dataloader in our resolvers we have to do two things:</p><ul><li>Add a dataloader struct to the resolution context</li><li>Add Absinthe.Middleware.Dataloader to the list of plugins in our schema</li></ul><p>Let’s not forget to add the Dataloader plugin:</p><p>With these modifications, resolving the graphql query above requires only three Ecto queries. That is a significant improvement.</p><h3>The query function</h3><p>One of the useful features of the Dataloader.Ecto source is that we can pass a query function to it which can be used for filtering or processing parameters that are common to many fields, for example, pagination arguments.</p><p>Where we can define Repo.dataloader_query/2 to process parameters related to pagination and also leave room for extending it easily.</p><p>Note that so far we haven’t needed to write any Ecto queries, because we used the dataloader/1 helper from Absinthe.Resolution.Helpers.</p><p>We only see employees for one of the companies, while the list of employees for the other one is empty. This happens because the Ecto Dataloader tries to fetch the employees for both companies with a single query that includes an order_by on the company_id field. This works well when we don&#39;t want to add any limit or offset parameters. One workaround for this is to modify the argument list, which will force the loader to make separate queries for each company.</p><p>The query function is also useful if we want to have more flexibility, for example, filtering or ordering results. For this, we’ll have to extend our query function to process extra parameters. In general, I like to write query helpers that take a queryable object as their first parameter and return a queryable. For example (assuming we have a status field on the employee):</p><p>If we extend the query function ( Repo.dataloader_query/2) as below, we will be able to use these helpers easily:</p><p>And we can now resolve only active employees on companies if we specify query in the resolver:</p><p>Of course, other filtering is also possible, and we can also construct our queries based on the GraphQL parameters that the resolver receives in args.</p><p>Note that now :query becomes part of the key that is used in the dataloader cache, so querying the active and non-active employees of the same company in one GraphQL query might require two database queries.</p><h3>Dataloader.KV</h3><p>So far, we have only seen examples of how to use Dataloader.Ecto. But what if we need to collect data from another service to respond to the GraphQL query? We can use Dataloader.KV to retrieve and cache data based on keys.</p><p>For this, we will need a function that receives two parameters. The first parameter is a batch key that groups together different objects. We will return to this shortly. The second parameter is a list, usually a list of objects or IDs from which the required data is to be retrieved. The function should return a map where the keys are the elements of this list, and the associated values are the corresponding retrieved data. For example, if we store the addresses of employees in a different service, we may write a loader function as follows:</p><p>This function receives a list of employees and returns a map with each employee mapped to an address. How the call to another service and the lookup are completed are simply implementation details, but for the solution to be optimal, the other service should support querying data in batches (for all IDs at once instead of one-by-one).</p><p>To use this function as a load function for a Dataloader.KV source we may change the context function in the schema as follows.</p><p>Then we can resolve the address field for each employee using the :address dataloader source:</p><p>As you can see, we did not use the batch key in our loader, which means we will handle all employees in one batch. This is usually fine. The batch key can be useful if we intend to pass on certain arguments to the other service or refine the results. Perhaps we have a user token that we intend to supply for the service to check whether the user has the necessary access rights:</p><p>Then make the load function handle the additional arguments:</p><p>Note that for each different batch key we have to make a call to the other service, so we have to be careful when specifying the arguments. For example, if we pass in a unique ID (e.g., employee.id), then we lose the advantage of batching, the function is called for each employee.</p><p>In general, constructing the batch key provides flexibility, but it can also hide important details in the code. Use with caution.</p><h3>More control over dataloader</h3><p>Notice how we took advantage of the fact that we can embed on_load calls to optimize fetching the results. First, we tell dataloader to load the employees, then we use those employees to load their addresses. Finally, we fetch the addresses and count how many unique ones there are.</p><p>In general, this kind of resolver is useful when we want to move data one (or more) level up the tree with or without aggregation. In one project, I used the same solution to retrieve telematics data of vehicles to be aggregated and displayed on certain trips taken with those vehicles. Both the vehicles and telematics data needed to be queried from other services.</p><h3>Conclusion</h3><p>Dataloader is a powerful tool when it comes to optimizing queries, but we have to be aware of its limitations. We saw a few simple examples to get up and running with Dataloader and Absinthe. This is only the tip of the iceberg, and I am hoping to follow up with some more advanced tricks and tips.</p><p><a href="https://www.erlang-solutions.com/blog.html">Go back to the blog</a></p><p><em>Originally published at </em><a href="https://www.erlang-solutions.com/blog/optimizing-graphql-with-dataloader.html"><em>https://www.erlang-solutions.com</em></a><em> on April 1, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b768abd0839" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Which new companies are using Erlang and Elixir? #MyTopdogStatus]]></title>
            <link>https://erlangsolutions.medium.com/which-new-companies-are-using-erlang-and-elixir-mytopdogstatus-dfa33d22133?source=rss-52467e7eae7d------2</link>
            <guid isPermaLink="false">https://medium.com/p/dfa33d22133</guid>
            <category><![CDATA[erlang]]></category>
            <category><![CDATA[elixir]]></category>
            <category><![CDATA[use-cases]]></category>
            <dc:creator><![CDATA[Erlang Solutions]]></dc:creator>
            <pubDate>Mon, 02 Mar 2020 00:00:00 GMT</pubDate>
            <atom:updated>2020-03-12T10:47:22.376Z</atom:updated>
            <content:encoded><![CDATA[<p>by Erlang Solutions</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gvefd6wiiZo8Oqqpd3iuIQ.png" /></figure><p>Last year we launched #MyTopDogStatus to share and celebrate some of the fantastic companies using <a href="https://www.erlang-solutions.com/blog/which-companies-are-using-erlang-and-why-mytopdogstatus.html">Erlang</a> and <a href="https://www.erlang-solutions.com/blog/which-companies-are-using-elixir-and-why-mytopdogstatus.html">Elixir</a> technology. Since then, the Erlang and Elixir community has continued to thrive. Last year, our friends at <a href="http://codesync.global/">Code Sync</a> had a wave of brand new people using Erlang &amp; Elixir attending their events, there were representatives of 53 new companies added to the list! And that’s on top of many repeat attendees. The BEAM community now has at least 1,300 companies using Elixir in their tech stack and there are 3 new Elixir jobs advertised on average per week.</p><p>The benefits of BEAM technologies remain the same as they were last year, the concurrency model means higher uptime, so less lost sales or angry users when something goes wrong. Both programming languages result in a reduction of code, making it easier to manage, reducing the cost spent on development and making it easier to update. Code reductions also allow companies to reduce the cost and energy demands of their physical servers, which is a benefit to the bottom line, and the planet. Both languages support hot coding so you can have changes made in minutes, not months allowing for a more agile system. Regardless of what benefit is the core motivator, BEAM-based technologies of Erlang and Elixir are almost always the secret sauce in the tech stack of large household name brands who need to handle large volumes of users and data.</p><p>So with all those benefits to take advantage of, who were the new top dogs to join the pack and start reaping the benefits of Erlang and Elixir in the last year? Let’s find out.</p><h3>Samsung</h3><p>The biggest of the new kids on the block is <a href="https://www.samsung.com/uk/">Samsung</a>, a company which needs no introduction. With nearly 300 million mobile devices shipped and 2 billion dollars in revenue a year. Given the number of users, verticals and traffic Samsung handles, it’s no surprise that they are looking into incorporating BEAM technologies in their tech stack. This year, our very own Robert Virding, one of the co-creators of Erlang joined them in their Silicon Valley office to present a <a href="https://www.meetup.com/Erlang-SV/events/268116437/">Meetup on the Erlang Ecosystem.</a> Our team will be continuing to work with them on Erlang training and onboarding.</p><h3>Cross River Bank</h3><p><a href="https://www.crossriver.com/">Cross River Bank</a> is an innovative and ambitious take on banking. They combine the traditional features of a state-chartered bank with the flexibility and ambition of a FinTech. Their product features an extensive suite of services as a banking-as-a-platform offering, including lending, payments and risk management. Their smart work with technology partners allows them to focus on growing their business without compromising on technological innovation. As you can imagine, downtime in a sector dealing with large financial transactions needs to be minimised, so it’s no surprise to see BEAM-based technologies in their stack.</p><h3>TubiTV</h3><p>TubiTV is an entirely free alternative to video streaming services such as Netflix or Amazon Prime. It is America’s largest independently owned streaming services and operates on an ad revenue model as opposed to a user subscription model. There are over 15,000 videos available to stream at any one time. Dealing with that level of data is always going to be a good use case for a language like Elixir, you can learn more about some of their Elixir implementations over at the <a href="https://github.com/Tubitv">TubiTV Github page.</a></p><h3>Handzap</h3><p><a href="https://www.handzap.com/">Handzap</a> is an agile, mobile-first app designed to make the gig economy easy available in 32 languages and over 100 countries. People can post tasks, review applicants and chat using instant messaging, video messaging, and voice calls, all from within the app. This makes it easier and more convenient than ever to post, publish, manage and ensure satisfactory delivery for applicants and job posters alike. Due to its ambitious nature, Handzap had a number of unique requirements for its chat functionality, particularly around user privacy. The <a href="https://www.erlang-solutions.com/products/mongooseim.html">MongooseIM</a> team at Erlang Solutions know that no two sets of users are the same, and are specialists in creating customised, reliable instant messaging solutions. We helped them build a future-proof messaging platform that integrated seamlessly with their application whilst making sure all their specific requirements were met.</p><h3>Danske Bank</h3><p><a href="https://danskebank.com/">Danske Bank</a> is Denmark’s largest bank. A Fortune 500 company with over 145 years of history. It has grown to be one of the biggest banks in Northern Europe and the world. BEAM-technologies are perfectly suited to the high-value transactions of the financial services industry, and <a href="https://www.erlang-solutions.com/products/rabbitmq.html">RabbitMQ</a> (built in Erlang) specifically is often used in technology stacks to handle microservices.</p><h3>OpenX</h3><p>Digital advertising requires huge amounts of real-time decision making and needs to be able to handle significant spikes and loads. <a href="https://www.openx.com/">OpenX</a> handles over 4.5 trillion data events per day, significantly more than 10 million per second. As we have seen with <a href="https://www.erlang-solutions.com/blog/which-companies-are-using-erlang-and-why-mytopdogstatus.html">AdRoll</a> in the past, Erlang’s concurrency is perfect for managing the high volumes of concurrent users required for the industry.</p><h3>SnatchBot</h3><p><a href="https://snatchbot.me/">SnatchBot</a> is a fantastic new platform that aims to make the potential of chatbots available to everyone, including non-technical audiences who can’t write a single line of code. The SnatchBot Builder uses building block templates to allow you to publish your bot to mobile devices, web apps and chat services like Facebook Messenger, Slack and Skype. As we mentioned with Handzap, the <a href="https://www.erlang-solutions.com/products/mongooseim.html">MongooseIM</a> team are world-class experts at developing innovative and ambitious instant messaging solutions and were happy to help on such an exciting project.</p><h3>Siemens</h3><p>Siemens is the largest industrial manufacturing company in Europe, with nearly half a million employees. They cover a diverse range of industries including Energy, Healthcare, Infrastructure and cities. If you look into any company of this size and scale, you’re likely to find a BEAM-based technology somewhere in their stack, and Siemens is no different.</p><h3>PepsiCo</h3><p>We mentioned <a href="https://www.erlang-solutions.com/blog/which-companies-are-using-elixir-and-why-mytopdogstatus.html">PepsiCo’s use of Elixir</a> in their tech stack to power business-critical solutions in our article last year. This year, our team will continue to work with them to train, upskill and grow the use of Elixir in their tech stack.</p><h3>SITA</h3><p>SITA (Société Internationale de Télécommunications Aéronautiques) a large scale organisation that specialises in telecommunications and IT for the aviation industry. It is a member-owned organisation comprised of over 400 airlines major airlines ensuring the technology and communications of all flights are up to safety standards.</p><h3>Summary</h3><p>With all these great companies taking advantage of Erlang, Elixir, RabbitMQ and the BEAM, isn’t it time you looked into how you can get a more reliable, fault-tolerant and dynamic solution. Talk to us; we’re always happy to help.</p><h3>You may also like:</h3><p><a href="https://www.erlang-solutions.com/blog/which-companies-are-using-erlang-and-why-mytopdogstatus.html">Which companies are using Erlang?</a><br><a href="https://www.erlang-solutions.com/blog/which-companies-are-using-elixir-and-why-mytopdogstatus.html">Which companies are using Elixir?</a><br><a href="https://www.erlang-solutions.com/blog/how-to-build-a-machine-learning-project-in-elixir.html">How to build machine learning in Elixir.</a><br><a href="https://www.erlang-solutions.com/blog/iot-edge-computing-with-erlang-otp.html">How to manage IoT edge data with Erlang.</a></p><p><a href="https://www.erlang-solutions.com/blog.html">Go back to the blog</a></p><p><em>Originally published at </em><a href="https://www.erlang-solutions.com/blog/which-new-companies-are-using-erlang-and-elixir-mytopdogstatus.html"><em>https://www.erlang-solutions.com</em></a><em> on March 2, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dfa33d22133" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Improving push notifications with MongooseIM]]></title>
            <link>https://erlangsolutions.medium.com/improving-push-notifications-with-mongooseim-8d2a20cc64b2?source=rss-52467e7eae7d------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d2a20cc64b2</guid>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[push-notification]]></category>
            <category><![CDATA[instant-messaging]]></category>
            <category><![CDATA[erlang]]></category>
            <category><![CDATA[xmpp]]></category>
            <dc:creator><![CDATA[Erlang Solutions]]></dc:creator>
            <pubDate>Mon, 10 Feb 2020 00:00:00 GMT</pubDate>
            <atom:updated>2020-02-20T14:06:51.643Z</atom:updated>
            <content:encoded><![CDATA[<p>by Michał Piotrowski</p><figure><img alt="MIM banner phone" src="https://cdn-images-1.medium.com/max/1024/1*SaRcA85Q6oeFENZHvAWztA.jpeg" /></figure><p>MongooseIM offers a completely customisable enterprise Instant Messaging solution. This helps large organisations build solutions that meet the unique requirements of their users. As a result, we’ve built many best-in-class instant messaging platforms for household names in social media, telecoms and the health industry. In our latest release, MongooseIM 3.6.0, we’ve continued to empower our application owners, and their end users by improving and evolving the push notification functionality. <a href="https://www.erlang-solutions.com/products/mongooseim.html?utm_source=ESL&amp;utm_medium=Blog%20post&amp;utm_campaign=MIM%203.3.0">Find out more about how MongooseIM can build a bespoke instant messaging solution for your needs,</a> or read on to find out more about the improvements to push notifications.</p><h3>Creating a better Push Notification Experience in MongooseIM</h3><p>MongooseIM is continuing its evolution to improve the user experience for mobile applications. Push notifications aren’t just a standard requirement for instant messaging applications; they are also one of the most used features for end-users. As a result, there is an increased need to have a seamless experience for both application owners and the user themselves. Push notifications were added to MongooseIM 3 years ago. The implementation was based on an XMPP extension <a href="https://xmpp.org/extensions/xep-0357.html">XEP-0357: Push Notifications</a> and a dedicated, standalone component called <a href="https://xmpp.org/extensions/xep-0357.html">MongoosePush.</a> Since then, we have been lucky enough to work with several customers using this functionality. We have also been given great feedback from our community including people who use MongooseIM, MongoosePush or both in their projects. We listened to them, observed their issues and decided to create a better experience in MongooseIM 3.6.0 and MongoosePush 2.0.</p><h3>How has the MongooseIM end-user experience changed?</h3><p>Push notifications are delivered when the server observes a message addressed to a user who is offline. What does this mean exactly? From the server perspective, it means that the user has no connected devices. This works well enough in cases where users only have one device and don’t use session resumption as described in <a href="https://xmpp.org/extensions/xep-0198.html">XEP-0198: Stream Management.</a> Today, this is not the most common use case when it comes to mobile applications. First of all XEP-0198 is used because it helps to make sure that stanzas are delivered from the server to the client and the other way around. What is also important to note is that mobile applications are not always active. People switch applications or put their phone down. In this case, the app goes into the background and the network communication is limited to save battery. This leads to a situation where a device may not respond to regular TCP communication (because it’s disconnected or in the background) and the server still thinks the user is online. Push notifications are often used to notify the user that there is new information for them to check, so it is important that the notification is delivered in seconds, not minutes. In order to solve the problem, MongooseIM 3.6.0 and later versions, can send push notifications to such user sessions which are in the “undecided” state. More technical details and information on how to configure this behaviour can be found in the <a href="https://mongooseim.readthedocs.io/en/3.6.0/modules/mod_event_pusher_push/#plugin-module">push notifications documentation.</a></p><h3>Fine grained push notifications priority control</h3><p>Not all Push Notifications will have the same level of priority. Sometimes you will want to change the priority in order to have a different behaviour on the client device. Before MongooseIM 3.6.0 it was not possible to change the priority level, even though MongoosePush, which talks to FCM or APNS, has that functionality. In order to address this limitation, we decided to give the control of the priority to the application developer. Now the priority can be set while enabling push notifications. Take a look at the <a href="https://mongooseim.readthedocs.io/en/latest/user-guide/push-notifications/Push-notifications-client-side/#enabling-push-notifications">enabling push notifications documentation</a> to see the possible values and the other options you can set while enabling push notifications.</p><h3>How has MongooseIM changed from for the operator?</h3><h3>No PubSub</h3><p>The other thing we learned from our users was that they always use MongooseIM as both the instant messaging server and the service responsible for sending push notifications. The <a href="https://xmpp.org/extensions/xep-0357.html">XEP-0357: Push Notifications</a> is very generic and allows you to configure a PubSub service responsible for delivering push notifications on a different server. This was not the case in all the installations we were aware of. Because of that, we decided to bypass the PubSub communication in a situation where we know MongooseIM is responsible for sending push notifications. This makes the MongooseIM configuration easier, with no need to configure the PubSub service. What is more important is that it reduces the load on the nodes and minimises delays in delivering push notifications. In the PubSub-less configuration, MongooseIM can talk directly to MongoosePush in order to deliver push notifications. This was implemented in a way that allows smooth migrations for older versions of MongooseIM where push notifications were already used in the full version. More details about all the possible setups, their advantages and drawbacks can be found in our <a href="https://mongooseim.readthedocs.io/en/3.6.0/user-guide/push-notifications/Push-notifications/">push notification tutorial.</a></p><h3>RDBMS backend</h3><p>In production systems it’s more convenient to store persistent data in an external database. It makes life easier when it comes to clustering MongooseIM and using it in containers. One of the previous releases introduced an RDBMS backend for PubSub but this kind of backend was still missing for push notifications. Now we have it, so you can start storing all the details, passed from the app when enabling push notifications and required to deliver them in Postgres, MySQL or even MSSQL.</p><h3>Inactive device id removed</h3><p>The device ids (in other words device tokens you get from APNS or FCM) are not valid indefinitely. Generating push notifications to expired tokens doesn’t make sense and introduces unneeded load in the system. Thanks to integrating with <a href="https://github.com/esl/MongoosePush/releases/tag/2.0.0">MongoosePush 2.0</a> and it’s new API v3 for push notifications, MongooseIM can detect if a push notification was sent to a device token which is no longer active and remove it from its database. Thanks to that we eliminate stale data as soon as we know it is no longer useful.</p><h3>MongoosePush 2.0.0</h3><p>The last 6 months were also busy around MongoosePush development. It’s a standalone service written in Elixir. It exposes a simple HTTP (1.1 and 2.0) API which can be used to trigger push notifications to FCM and APNS. The recent version added support for new authentication methods to APNS, support for new FCM v1 protocol and unified error codes which allows for instances to detect if the device token is active or not.</p><p>More information can be found in <a href="https://github.com/esl/MongoosePush/releases/tag/2.0.0">MongoosePush 2.0.0 changelog</a> and its documentation on GitHub <a href="https://github.com/esl/MongoosePush">esl/MongoosePush.</a></p><h3>Other changes</h3><p>Push notification improvements are not the only change in MongooseIM 3.6.0. Take a look at <a href="https://github.com/esl/MongooseIM/releases/tag/3.6.0">3.6.0 changelog</a> to learn more and give it a try and share feedback!</p><p>Help us improve the MongooseIM platform:</p><ol><li>Star our repo: <a href="https://github.com/esl/MongooseIM">esl/MongooseIM</a></li><li>Report issues: <a href="https://github.com/esl/MongooseIM/issues">esl/MongooseIM/issues</a></li><li>Share your thoughts via <a href="http://www2.erlang-solutions.com/l/23452/2019-03-12/62y4z3">Twitter</a></li><li>Download MongooseIM 3.6.0 <a href="https://hub.docker.com/r/mongooseim/mongooseim/">Docker image</a></li><li>Download MongoosePush 2.0.0 <a href="https://hub.docker.com/r/mongooseim/mongoose-push">Docker image</a></li><li>Sign up to our dedicated <a href="https://www2.erlang-solutions.com/email-preference?epc_hash=JtO6C7Q2rJwCdZxBx3Ad8jI2D4TJum7XcUWcgfjZ8YY%C3%A5">mailing list</a> to stay up to date about <a href="http://www2.erlang-solutions.com/l/23452/2019-03-12/62y4wf">MongooseIM,</a> messaging innovations and industry news.</li><li>Check out our <a href="http://www2.erlang-solutions.com/l/23452/2019-03-12/62y4wf">MongooseIM product page</a> for more information on the MongooseIM platform.</li></ol><p><a href="https://www.erlang-solutions.com/blog.html">Go back to the blog</a></p><p><em>Originally published at </em><a href="https://www.erlang-solutions.com/blog/improving-push-notifications-with-mongooseim.html"><em>https://www.erlang-solutions.com</em></a><em> on February 10, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d2a20cc64b2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>