<?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 Socure on Medium]]></title>
        <description><![CDATA[Stories by Socure on Medium]]></description>
        <link>https://medium.com/@TheSocureTechnologyBlog?source=rss-c04c7151b891------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*rbR1suO1CvSeEW80X-NxWQ.png</url>
            <title>Stories by Socure on Medium</title>
            <link>https://medium.com/@TheSocureTechnologyBlog?source=rss-c04c7151b891------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 17:46:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@TheSocureTechnologyBlog/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[The Evolution of Socure’s Data Platform]]></title>
            <link>https://medium.com/the-socure-technology-blog/the-evolution-of-socures-data-platform-93013ac8e09c?source=rss-c04c7151b891------2</link>
            <guid isPermaLink="false">https://medium.com/p/93013ac8e09c</guid>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[platform]]></category>
            <dc:creator><![CDATA[Socure]]></dc:creator>
            <pubDate>Tue, 08 Oct 2024 16:58:01 GMT</pubDate>
            <atom:updated>2024-10-08T17:17:03.326Z</atom:updated>
            <content:encoded><![CDATA[<p><em>By </em><a href="https://www.linkedin.com/in/junaideffendi/"><em>Junaid Effendi</em></a><em>, Senior Data Engineer in Data Automation; and </em><a href="https://www.linkedin.com/in/aliongun/"><em>Ali Ongun</em></a><em>, Staff Software Engineer in Data Platform</em></p><p>At Socure, we have seen tremendous improvements in our data platform over the last few years.</p><p>In the early days of our informal data platform, the goal was to provide the right tooling for Data Engineers and scientists to build batch pipelines for processing data from diverse sources.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u640Z89p_1TtD4QEIcCF7w.png" /></figure><p>In this article, we’ll share a brief overview of how our three data platforms evolved.</p><h3><strong>Data Platform &lt; 2021</strong></h3><p><em>Not really a data platform</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iOzcX70NDYi-1GSoElGxCg.png" /><figcaption>Dashboard: Looker, Experimentation: RStudio Workbench, Processing: Python, Orchestration: Airflow, Workbench, Storage: Redshift, RDS, S3, Platform: AWS</figcaption></figure><p>This worked well for several years as the scale of data was not that big. The above stack was built and maintained by multiple teams.</p><p><strong>Key points:</strong></p><ul><li>Python single node processing was the only way to do processing.</li><li>Airflow was owned by DevOps and running on EC2.</li><li>Workbench was the internal WebApp on top of S3, Airflow.</li><li>RDS was used to store different kinds of configs that were used in pipelines.</li><li>Looker was also used as a client for querying Redshift.</li><li>S3 was storing all data files coming from different sources.</li></ul><p><strong>Why we migrated:</strong></p><ul><li>This wasn’t really a data platform, it was just the technologies provided in the raw form.</li><li>Not scalable in terms of processing and orchestration as no distributed compute was involved.</li><li>DevOps owned the Airflow, which meant version upgrades and issues with infra were DevOps dependent.</li><li>No IaaC (Infra as Code), making it hard for the other teams to make changes and own parts of the infra.</li><li>RDS was not the right choice to store configs.</li><li>Our implementation of Redshift was proving to be slow and expensive.</li><li>We were missing proper monitoring and alerting, which were connected via a few different ways such as Airflow to Slack.</li><li>Data Governance and control was lacking.</li></ul><h3><strong>Data Platform 2021 — ~2024</strong></h3><p><em>Data Platform-as-a-Product</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W6fB8A9N4unXS79_P-nHgw.png" /><figcaption>Dashboard: Looker, Experimentation: Jupyter Notebooks. API: Swagger, Governance: Immuta, Quality: Great Expectations, Deeque, Processing: Spark, Snowflake, Orchestration: Airflow, Kubernetes, Storage: Snowflake, DynamoDB, S3, Monitoring: DataDog, IaaC: Terraform, Platform: AWS</figcaption></figure><p>This was completely new and the first formal Data Platform built by a centralized Data Platform team serving more than 100 engineers, scientists and analysts.</p><p><strong>Key points:</strong></p><ul><li>Swagger was used for interacting with the platform services in a config driven approach, such as deploying a DAG in Airflow.</li><li>Open Source Jupyter Notebooks with Spark capabilities were part of the new platform.</li><li>Data Quality through Spark open source libraries was available as part of Spark internal package.</li><li>Data tagging and security was automatically built into the process.</li><li>Kubernetes was introduced for Airflow and Spark, making it scalable.</li><li>DynamoDB was the new storage solution for various types of configs.</li><li>Snowflake replaced Redshift, making it much faster and easier to query through its Web UI.</li><li>DataDog, a proper monitoring, logging, and alerting tool, was introduced for all data workloads and infra.</li><li>Terraform was adopted as part of the company-wide self serve initiative.</li></ul><p><strong>Why we migrated:</strong></p><ul><li>Not user friendly for data scientists when creating pipelines as it involves a reasonably steep learning curve.</li><li>Notebook experience was not great for doing experimentation analysis, mainly due to infra and access.</li><li>Data was available but not easily accessible and it was unclear who owned each source and could give access.</li><li>Too many technologies glued together under the hood, making it difficult to maintain by a very lean team.</li><li>DataDog custom metrics and custom logging solution was getting too expensive.</li></ul><h3><strong>Data Platform &gt; 2024</strong></h3><p><em>Databricks to the rescue</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5QgH1hVkJ8G2VTIN8sOEfg.png" /><figcaption>Dashboard: Tableau, Experimentation, Processing, Orchestration, Governance, Storage: Databricks, IaaC: Terraform, Platform: AWS</figcaption></figure><p>This year, we are moving to a clean and simple architecture with the help of Databricks. We have already moved many of our pipelines and built several directly in the Databricks environment.</p><p><strong>Key points:</strong></p><ul><li>Tableau, a new visual tool, came into the picture as Looker was getting costly and hard to maintain on our EC2 instance. Tableau provided a managed product with a secure connection to our AWS Databricks account.</li><li>A simple, clean architecture with Databricks offers seamless, easy to use tooling.</li><li>Spark-managed environment makes it easier for everyone to leverage distributed computing.</li><li>Jupyter Notebook for data scientists makes it easy to interact with Delta Tables.</li><li>Workflows for pipeline orchestration.</li><li>Unity Catalog for governance.</li><li>Built in monitoring, logging and alerting.</li><li>Terraform is still heavily used for Databricks infrastructure, such as deploying workflows, permissions, and roles.</li><li>Databricks is expensive and we are trying to be careful how we use and implement scalable pipelines and services.</li></ul><p>These improvements are a collaborative effort of multiple teams including Data &amp; AI Platform, Data Automation and our Data Science organization.</p><p><strong><em>Want to be a part of these innovative teams? </em></strong><a href="https://socure.wd1.myworkdayjobs.com/SocureCareers"><strong><em>Check out our open roles here</em></strong></a><strong><em>.</em></strong></p><p>Authors:</p><ul><li><a href="https://www.linkedin.com/in/junaideffendi/">Junaid Effendi</a>, Senior Data Engineer in Data Automation, Socure</li><li><a href="https://www.linkedin.com/in/aliongun/">Ali Ongun</a>, Staff Software Engineer in Data Platform, Socure</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93013ac8e09c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-socure-technology-blog/the-evolution-of-socures-data-platform-93013ac8e09c">The Evolution of Socure’s Data Platform</a> was originally published in <a href="https://medium.com/the-socure-technology-blog">The Socure Technology Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Case study: Enhancing SDK integration and onboarding with GenAI]]></title>
            <link>https://medium.com/@TheSocureTechnologyBlog/case-study-enhancing-sdk-integration-and-onboarding-with-genai-610988a7354f?source=rss-c04c7151b891------2</link>
            <guid isPermaLink="false">https://medium.com/p/610988a7354f</guid>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[sdk]]></category>
            <category><![CDATA[gen-ai-tools]]></category>
            <dc:creator><![CDATA[Socure]]></dc:creator>
            <pubDate>Fri, 20 Sep 2024 17:24:20 GMT</pubDate>
            <atom:updated>2024-09-20T17:24:20.393Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong><em>By:</em></strong> Tao Tao, Principal Engineer, Socure</h4><h3>Background</h3><p>Socure ID+ is a SaaS solution designed to provide comprehensive identity verification and fraud prevention. A critical step in our customer onboarding process is API integration with customer SDKs (Software Development Kits).</p><p>We have two main API endpoints: one based on a regular REST API and the other on a payload-encrypted REST API. Integrating the payload encryption endpoint is especially complex as it requires the customer-facing SDK to perform PKI-based encryption, decryption, and signature verification.</p><p>Our recent collaboration highlights the power of efficient communication, the utility of GenAI (generative artificial intelligence), and the importance of standardized processes, with a specific focus on integrating a payload encryption endpoint crucial for secure data transmission between systems. This article delves into the intricacies of the project, addressing both the challenges and the innovative solutions, particularly for customers using Node.js as their primary language, who were unable to utilize our Java SDK and had to develop their own SDK based on our API specification.</p><h3>Payload encryption</h3><p>The payload encryption ID+ API provides mutual encryption, decryption, and signature verification between customers and Socure to safeguard payloads (request and response) at the application layer, strengthening sensitive data protection on top of one-way Transport Layer Security (TLS), and providing end-to-end encryption customer between customer client application and Socure backend services</p><p>Our solution for payload encryption is based on the JSON Object Signing and Encryption (JOSE) framework, specifically including JSON Web Encryption (JWE) and JSON Web Signature (JWS) protocols. The overall protocol includes RSA public key exchange, payload signing with RS256, encryption with a 256-bit CEK (Content Encryption Key) using A256GCM, CEK creation via the JOSE library, encrypting the CEK with RSA_OAEP_256, packaging the data, and Socure decrypting the payload and verifying the signature with the customer’s public key.</p><h3>Project overview</h3><p>The use of GenAI focused on integrating a payload encryption endpoint crucial for secure data transmission between systems. Customers used Node.js as the primary language for their SDK, so they could not use our Java SDK and had to develop their own SDK per our API specification. Here’s a detailed account of our journey and the steps to achieve a successful integration.</p><h3>Initial steps</h3><ol><li><strong>Payload design and SDK sample</strong>: On May 1, we sent our payload design and a sample customer-facing Java SDK to the customer’s engineering team. This initial step provided a clear blueprint for the integration.</li><li><strong>Communication and collaboration</strong>: Extensive communications, including online meetings and Slack-based Q&amp;A, were conducted with the team to discuss payload encryption approaches and implementation details. This phase was critical for aligning our technical perspectives and understanding their requirements.</li></ol><h3>Encountering challenges</h3><p>The customer’s team attempted to develop their version of the payload encryption SDK using Node.js. However, this implementation failed to integrate successfully. The primary challenges were:</p><ol><li>Lack of familiarity with the payload encryption protocols within their team.</li><li>Lack of familiarity with Node.js within the Socure team.</li></ol><p>Both issues hindered effective debugging of the specific implementation issues.</p><p>A particular challenge arose from a library the customer’s team was trying to use: <a href="https://www.npmjs.com/package/node-jose">node-jose</a>, a JavaScript library for handling JSON Object Signing and Encryption (JOSE) in Node.js.</p><h3>Leveraging GenAI for solutions</h3><p>Recognizing the significant time (weeks) required for the customer’s engineering team to develop and test their Node.js-based SDK, we decided to leverage GenAI, utilizing ChatGPT and Amazon Q, to help accelerate the process. We employed these AI tools to translate our Java SDK into Node.js by incorporating the node-jose library.</p><p>We instructed the GenAI tools to:</p><ol><li>Use the node-jose library to translate the Java-based SDK to a Node.js-based SDK.</li><li>Explain the node-jose API usage compared to Java-based JOSE API usage.</li><li>Explain the generated Node.js code line by line for us to comprehend.</li><li>Compare step-by-step between the Node.js-based SDK and our Java-based SDK to ensure the same functionalities.</li></ol><p>It took a few hours to generate, update, and verify the new SDK before sending this version back to the customer’s team. This version was quickly tested successfully by their team. By May 10, API integration with the new Node.js-based SDK was accomplished in our sandbox environment.</p><h3>Integration efforts</h3><p>The overall integration efforts were substantial, involving multiple team members and several weeks of dedicated work:</p><p><strong>Socure team</strong></p><ul><li><strong>Personnel involved</strong>: 1 Technical Account Manager (TAM) and 2 engineers.</li><li><strong>Effort breakdown</strong>: Debugging, communicating, and ensuring the integration met all necessary requirements.</li></ul><p><strong>Customer’s team</strong></p><ul><li><strong>Personnel involved</strong>: At least 1 engineer and 1 account manager.</li><li><strong>Integration timeline</strong>:</li><li>10 days to onboard the customer’s engineering team into our sandbox environment (payload encryption).</li><li>11 additional days to onboard the team into our certificate and production environment (payload encryption).</li></ul><h3>Overcoming additional challenges</h3><p>Throughout the integration process, we encountered several other challenges:</p><ol><li><strong>API errors</strong>: The customer’s team occasionally made errors, such as sending requests without API keys or adequate product modules. These errors required additional debugging and communication to resolve.</li><li><strong>Coordination latencies</strong>: Latencies in responses from either the Socure or the customer’s team led to integration delays.</li><li><strong>Debugging and Administrative Tasks</strong>: The Socure team had to spend time with our admin tooling for debugging purposes and creating JIRA tickets to manually generate key pairs for the customer.</li></ol><h3>Next steps and future improvements</h3><p>Building on the success and lessons learned from this project, we have outlined several key next steps to expedite our SDK integration and onboarding processes further:</p><p><strong>Standardizing the IDPlus SDK</strong></p><ul><li>We aim to use GenAI to generate a set of standard IDPlus SDKs that support multiple programming languages. This will cater to a broader range of customers and reduce integration complexity.</li></ul><p><strong>Supporting encrypted IDPlus</strong></p><ul><li>The SDK will be enhanced to support both regular IDPlus and encrypted IDPlus. By hiding all the encryption details within the SDK, we can simplify the integration process for our customers.</li></ul><p><strong>Onboarding standardization and automation</strong></p><ul><li>We plan to standardize and automate the onboarding process. This will involve creating comprehensive documentation, automated tools, and standardized procedures to ensure a smoother and faster onboarding experience.</li></ul><p><strong>Using GenAI for enhanced onboarding</strong></p><ul><li>In the future, we’ll leverage GenAI to guide customers through the onboarding steps more effectively. AI-driven onboarding assistants can provide real-time assistance like troubleshooting and answering questions, reducing dependency on human intervention and accelerating the process.</li></ul><h3>Conclusion</h3><p>This onboarding project underscored the importance of flexibility, communication, and innovation in SDK integration. By harnessing the power of GenAI, we overcame significant challenges and delivered a successful integration in less than 1 hour instead of 1–2 week of conventional engineering development. As we move forward, our focus will be on standardizing and automating our processes with the help of LLM agents to provide a more efficient and user-friendly experience for our customers.</p><p><strong><em>About the author</em></strong></p><p>Tao Tao is a Principal Engineer at Socure and a former Googler and IBMer with over 15 years of experience in advanced software research and development. He has driven key initiatives in Generative AI, security engineering, and data privacy. Tao holds over 12 U.S. patents and has authored more than 20 research and technical papers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=610988a7354f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GenAI Powered Service Curator]]></title>
            <link>https://medium.com/@TheSocureTechnologyBlog/genai-powered-service-curator-472ba5c6ae8e?source=rss-c04c7151b891------2</link>
            <guid isPermaLink="false">https://medium.com/p/472ba5c6ae8e</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ux]]></category>
            <dc:creator><![CDATA[Socure]]></dc:creator>
            <pubDate>Mon, 15 Jul 2024 16:48:25 GMT</pubDate>
            <atom:updated>2024-07-18T13:52:11.696Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>By: LiYu Yi, Technical Advisory, Socure</em></strong></p><p>The Socure team has been working on a proof of concept LLM application designed for customer conversion. This LLM-based bot is specifically designed to guide customers through Socure’s offerings, allowing them to tailor combinations of offerings according to their unique needs. The chatbot is conceptualized to be a part of the Socure website, offering an interactive chat interface where customers (gaming, fintech, gig economy) can enter their queries and understand Socure’s offerings. Leveraging its advanced AI capabilities, the bot interprets these queries, applies relevant knowledge, and suggests a feasible workflow or demo data.</p><p>The demo here is a proof of concept and demonstrates several key aspects of an LLM application.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F984383925%3Fh%3D0b91dbecc8%26app_id%3D122963&amp;dntp=1&amp;display_name=Vimeo&amp;url=https%3A%2F%2Fvimeo.com%2F984383925%2F0b91dbecc8&amp;image=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1899824010-3a560c50d6dcc19a6798c2c672385f669891a0ca0d15df8bd171aa2eb5b15696-d_1280&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=vimeo" width="1424" height="986" frameborder="0" scrolling="no"><a href="https://medium.com/media/318ba069d38151f3054bd77bf4b5f3d4/href">https://medium.com/media/318ba069d38151f3054bd77bf4b5f3d4/href</a></iframe><p>User experience and interface For adoption of an LLM application, the best user experience can be a mix of a chat bot and other traditional UI elements. Striking the right balance is key for success. We found that <a href="https://streamlit.io/"><strong>Streamlit</strong></a> is a good starting point for our trial launch.</p><p>Model choice Although ChatGPT is arguably the most capable model on the market, we chose Claude3 models through AWS Bedrock for their ease of use and their stronger scalability, security, and compliance features. The models differ in multiple aspects, including response speed and accuracy. In a single LLM application, it is a feasible option to leverage multiple models at the same time.</p><h3><strong>Prompt engineering</strong></h3><p>Prompt design takes effort and is one of the key areas that makes the difference for the application. Although there are many existing techniques and templates available as free community resources (such as <a href="https://smith.langchain.com/hub">Langchain Hub</a> or <a href="https://www.promptingguide.ai/techniques">Promptingguide.ai</a>), the right prompt always require tuning for a specific use case and the chosen model.</p><h3><strong>Tools</strong></h3><p>The smooth integration of the tool and action is also typically complex in an LLM application, even with LLM agents available from frameworks like <a href="https://www.langchain.com/">Langchain</a>. In this PoC we did not use any existing agent, but instead invoked the LLM model in a second call for each user query. The second call is with a separate prompt and context plus the conversation history, and the output was converted into a JSON string to be passed into a tool method. We found this custom approach works better than any canned agents.</p><p><strong><em>Author: LiYu Yi</em></strong></p><p>LiYu is a Technical Advisor at Socure, leading the company’s GenAI lab program. With over 15 years of experience in the cloud service and machine learning domains, Liyu is dedicated to driving technological advances and innovation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=472ba5c6ae8e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Many Ways IP Address Manipulation Enables Fraud]]></title>
            <link>https://medium.com/the-socure-technology-blog/the-many-ways-ip-address-manipulation-enables-fraud-36527d207e68?source=rss-c04c7151b891------2</link>
            <guid isPermaLink="false">https://medium.com/p/36527d207e68</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[fraud-investigation]]></category>
            <category><![CDATA[identity-verification]]></category>
            <dc:creator><![CDATA[Socure]]></dc:creator>
            <pubDate>Wed, 28 Jun 2023 15:08:22 GMT</pubDate>
            <atom:updated>2023-06-28T15:08:22.850Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cVYwCf9iq6vrHDBJeaX9xA.png" /></figure><p>Understanding the basic building blocks of Internet Protocol (IP) can help shed light on patterns of behavior observed among identity fraudsters. Fraud analysts, investigators, and analytics teams can make important determinations about users on the platforms they govern using tools and technology that analyze IP addresses, whether it be at onboarding or after the account is opened. To put the bottom line up front: fraudsters, like everyone else, use devices that connect to the Internet. Those devices rely on IP addresses, and those addresses can tell us a lot about a device.</p><h3>A Model for the Internet</h3><p>In terms of modern technology, it might surprise people to learn that IP technology is fairly old<strong>. </strong><a href="https://www.cs.princeton.edu/courses/archive/fall06/cos561/papers/cerf74.pdf">A Protocol for Packet Network Intercommunication</a><strong>, </strong>a 1974 paper<strong> </strong>penned by two venerable “godfathers” of the internet, Vinton Cerf and Robert Kahn, describes a “packet communication network” as a “transportation mechanism for delivering data between computers or between computers and terminals.” In roughly 12 pages, Cerf and Kahn describe “a simple but very powerful and flexible protocol which provides for variation in individual network packet sizes, transmission failures, sequencing, flow control, and the creation and destruction of process-to-process associations.”</p><p>Their model gave way to the internet we know and love today. Funded by the Department of Defense’s Defense Advanced Research Projects Agency (DARPA), IP became part of a suite of protocols which govern the modern internet to this day. The first three versions of IP were experimental, and were built from 1973 to 1978. IPv4 became the modern IP address standard we see attached to devices and networks. Despite having competing and proprietary protocols, early tech industry behemoths — including IBM and AT&amp;T — were the first to adopt this protocol. IPv6 has been in development since the mid 2000s and now occasionally surfaces on newer devices. For fraud investigators, IP addresses present a potential goldmine of relevant information.</p><p>If you’re wondering what happened to IPv5, <a href="https://www.ipxo.com/blog/what-happened-to-ipv5/#:~:text=Here&#39;s%20the%20kicker%20%E2%80%93%20IPv5%20never,Internet%20Stream%20Protocol%20(ST).">you’re not alone.</a> While a protocol with the designation “5” does exist, it was renamed as the Internet Stream Protocol, and had to do specifically with video and audio streaming. An experimental protocol, Internet Stream was never actually implemented. This is why the official versions of Internet Protocol skip from 4 to 6.</p><p>Drilling down into the more relevant specifics, an IP address is a numerical label, used for identifying and addressing any computer network that uses IP for communication. Initially, in IPv4, these numerical labels were relatively simple, consisting of a 32-bit number (four 8-bit numbers in a row, separated by periods — ex. “192.168.0.” — the most common IP address). However, all unique IP addresses on IPv4 were estimated to have been <a href="https://www.nro.net/ipv4-free-pool-depleted">completely depleted in 2011</a>. Some IP addresses are designated for private networks, and are not globally unique, but rather shared, and often limited to use by military, government, or infrastructure networks with corresponding high security requirements. For example, the IP “192.168.0.1” is so ubiquitous because it is the default IP for setup and configuration on <a href="https://helpdeskgeek.com/networking/what-is-192-168-0-1-and-why-is-it-the-default-ip-address-for-most-routers/">most home wi-fi routers and internet modems.</a></p><h3>How Fraudsters Try to Outrun IP Data</h3><p>Smart fraudsters know that their IP address is visible, creating a clear motivation for them to obfuscate their IP address by way of manipulating the address. With custom solutions, IP manipulation is endlessly complex and configurable. However, the majority of fraudsters use paid or <a href="https://codeablemagazine.com/open-source-ip-address-management-software.html">open-source services and tools</a>, such as VPNs, TOR, and SIM-swapping to manipulate their IP information. The different methods that fraudsters use to manipulate their IP addresses vary in levels of risk, difficulty, and effectiveness, but their end goal is the same — another layer of deception, another facet of a false persona.</p><h3>The Most Common Tool for Manipulation</h3><p>Perhaps the most common tool for manipulation is the Virtual Private Network or <a href="https://www.cisco.com/c/en/us/products/security/vpn-endpoint-security-clients/what-is-vpn.html">VPN.</a> Many consumers use VPNs for personal security and privacy on the internet, as it provides an additional layer between client requests and server responses. However, like most technologies, VPNs offer different solutions based on intent, not on usage. Some are more reputable and reliable than others, and the available services vary widely in terms of configurability and customization. For example, some VPNs offer the ability to switch the country from which the user’s end-traffic is visible. While often used to dodge availability concerns on streaming sites and other mundane consumer purposes, a fraudster could use this functionality to their advantage by manipulating their IP into showing they are in a different location, thus deceiving screening tools and investigators.</p><p>VPN users also have access to features disguising the fact they are using a VPN in the first place. This is obviously an alluring feature for fraudsters, although analytics tools are improving the ability to identify VPNs. Some VPNs may also have features that completely obscure any useful information about the IP address.This is done by making the address appear as a data center or content-delivery network. As one of the more well-worn methods, VPNs are well understood and easily detected, allowing analysts and investigators with the right tools to make smart decisions about the users and accounts they service and protect. Fraud fighters should use care to examine which VPN provider their tools indicate, and evaluate the risk accordingly.</p><h3>When IP Address Manipulation Raises Red Flags</h3><p>There is an even darker side to IP manipulation, however. One of the riskier methods used to manipulate IP is known as the Dark Web. It’s called that for a reason: without specialized browsers and other software, the Dark Web is invisible to the average internet user. It is known more specifically as <a href="https://en.wikipedia.org/wiki/Tor_(network)">The Onion Router or TOR</a>, a <a href="https://en.wikipedia.org/wiki/Free_and_open-source_software">free and open-source software</a> that enables browsing the web anonymously. Using a volunteer-based network of user-hosted “nodes” (think of a node as something akin to a virtual door), a TOR user passes their IP address through many layers of networks and hosts, hence “the onion.” The user then browses and interacts with the web, not with their own IP, but with a TOR “exit node” — the last portal in the chain. TOR gives a user access to sites that are inaccessible from a conventional IP address or even a VPN.</p><p>It’s also “dark” in another sense: nefarious activities commonly observed on the Dark Web range from illicit drugs to human trafficking, and more. TOR exit nodes are easily detected by most tools that are used to analyze IP addresses, and many institutions and organizations bar the gates of entry entirely to anyone detected on a TOR exit node.</p><p>TOR is most-often used for illicit purposes apart from financial fraud or identity theft, but can occasionally rear its ugly head during identity investigations. An otherwise normal and productive relationship with a customer who is suddenly observed using a TOR exit node can often result in a warning, or a check-up on that user to resolve concerns of account takeover. At onboarding, and for otherwise suspicious or risky account activity, TOR use may be cause for adverse action.</p><p>Many of Socure’s customers seem to be aware of the risk associated with allowing users to access their platforms from TOR, because only a tiny fraction of a percent (<strong>0.000004%)</strong> of all traffic coming through Socure’s product suite is observed using TOR. Having worked at a Socure customer organization in the past, my experience as a fraud analyst tells me that TOR use was grounds for auto-denial on any new application, as a matter of organizational policy. Users who were already onboarded and booked would receive a single warning for TOR use as a courtesy; but any additional TOR usage would result in adverse action, typically termination of services for that individual consumer. This is usually something that digital firms in particular will include as a part of their user agreement.</p><h3>Using IP Addresses to Identify Device Characteristics</h3><p>As previously mentioned, some IP addresses are <a href="https://en.wikipedia.org/wiki/List_of_assigned_/8_IPv4_address_blocks">designated for private purposes.</a> These are often related to government or internet traffic that requires heavy security. Applicants transacting from a military base or from within a government building may show signs of a private secured network that has no designated location. These are of minimal concern to an investigator, but still warrant a second look at the overall identity presented to check for other contextual clues and risk factors.</p><p>Even conventional, un-manipulated IP addresses can tell us a lot about device characteristics and behaviors. For example, <a href="https://en.wikipedia.org/wiki/SIM_swap_scam">SIM-swapping</a>, a hallmark of romance scams, can change the IP address characteristics of a mobile device, and make scammers easy to spot. Some regions, and even some specific internet service providers, are known to be laden with a high volume of spam and scam traffic. One notable example is Nigeria, where SIM-swapping and romance scams are rampant. An IP address from Nigeria on an otherwise normal account or profile is an indicator of fraud, most likely an account takeover — the most common end goals of a romance scam.</p><h3>Socure and IP Address</h3><p>I was able to get some IP address insights from Jonas Cuadrado, Lead Data Scientist at Socure. Jonas analyzes potentially anomalous behavior to help identify and alert customers about potential fraud attacks. Certain identity and device characteristics, individually and on a macro-scale, impact the designated levels of risk. While Jonas confirmed that phone and email remain generally the strongest predictors for most outcomes, on a macro scale, IP addresses can provide valuable risk-screening indicators for large swaths of data. This enables Socure to help our customers avoid massive fraud-related financial losses by enabling them to react quickly.</p><p>Jonas told me about another intriguing area of IP manipulation: subnet and subnet masks. <a href="https://www.ipxo.com/blog/what-is-subnet-mask/">According to IXPO</a>, subnetting serves a number of purposes, from giving administrators more control over their networks and improving their networks’ performance, to boosting security and using IP addresses more efficiently.</p><p>Like many other methods and styles of IP address manipulation, subnetting is not solely used to commit fraud, but is also a legitimate way of managing how one’s devices interact with the internet. Spiceworks gives an excellent set of examples, analogies, and explanations <a href="https://www.spiceworks.com/tech/networking/articles/what-is-subnet-mask/#:~:text=Subnet%20masks%20determine%20the%20network,an%20IP%20network%20upon%20subnetting.&amp;text=A%20subnet%20mask%20is%20defined,device%20operating%20on%20that%20network.">here</a> to provide further clarification and technical specifics on subnet masking, but you can essentially think of it as separating an IP address into its key components. To paraphrase an example from the article, imagine sending a letter to your friend who works in an office building, but you don’t know which floor, which cubicle, etc. — you just know the address of the building, and your friend’s name. The letter will still get to them. You can think of subnet masking as a way of internally managing and operating different devices on a given network.</p><p>With subnetting, it is also possible to create private networks and relays that exist alongside the Internet and use the same networks, but are not generally accessible to the public unless credentials and private addresses are leaked. This is what makes it essential to have some basic knowledge of network and information security before attempting to set up complex private networks and relays.</p><p>Like many features of IP manipulation, subnet masking is a tool, and tools in benign hands with good intentions can do great things. On the other hand, imagine this configurability and network control in the hands of a person who is connected with the underworld of synthetic identity fraud, and potentially even criminal activity; a person who has access to TOR, knows how to set up their own server gear, and has access to knowledge on committing fraud for a living. With illicit bulk files and data, and the knowledge on how to manipulate the specifics of each device on their sophisticated and complex networks to stay hidden, skilled fraudsters can transact and otherwise interact with the Internet to an extreme degree of volume and velocity.</p><p>People in this position can do a tremendous amount of financial damage, quickly and efficiently; not only to Socure’s customer organizations, but also to large numbers of individual consumers, whose credit may be negatively impacted from a false association, or even a blatant identity theft. If we as fraud investigators can better understand and recognize risk indicators related to IP manipulation, we can position consumers to better trust the solutions and services on offer with less friction, and stay a step ahead of the fraudsters.</p><h3>IP Addresses in Fraud Investigations</h3><p>For a fraud investigator or analyst, even the most basic familiarity with IP addresses and the various methods of IP manipulation can make or break an investigation. In addition to our IP address analysis tools provided by proprietary third-party intelligence vendors, there are open source tools available for analyzing IP addresses. Some notable examples include <a href="https://whatismyipaddress.com/">whatismyipaddress.com</a> and <a href="https://ip-lookup.net/">ip-lookup.net</a>. Many of these lookup tools and websites also contain blogs and other resources related to internet security and privacy, general current events in tech, and noteworthy security incidents such as data breaches and vulnerabilities.</p><p>Analysts and investigators should always consider the pros, cons, and tradeoffs for underlying sources of information and investigative tools. With the right resources, investigators and analysts can make informed decisions about their users and customers, from onboarding all the way through booked accounts.</p><h3>How Socure Can Help</h3><p>Socure uses fraud performance data from our customers tied to incoming application signals, including IP address and its relation to the potential riskiness of an identity, in our machine learning Sigma models. Socure tests IP address-related signals, along with over 15,000 additional identity and behavioral signals when we redevelop our Sigma Identity Fraud, Sigma Synthetic and Sigma Email, Phone and Address RiskScores. To stay in sync with bad actors and their changing fraud patterns, Socure updates and makes the newest versions of our Sigma models available to our customers several times a year.</p><p>We also continuously monitor our customers’ transaction flows on a real-time basis to identify and suggest short-term strategies to overcome any potential fraud attacks.</p><p>IP addresses are a valuable signal in the fight to eradicate fraud. Ready to get started? <a href="https://www.socure.com/request-a-demo">Schedule time with our team here</a> to learn how Socure can help you fight fraud.</p><p>Author: <a href="https://www.linkedin.com/in/patrick-pickett-3662a9180/">Patrick Pickett</a>, Fraud Investigator at Socure</p><h3>References:</h3><ol><li>A Protocol for Packet Network Intercommunication — Cerf, Vinton G. and Kahn, Robert E. — <a href="https://www.cs.princeton.edu/courses/archive/fall06/cos561/papers/cerf74.pdf">https://www.cs.princeton.edu/courses/archive/fall06/cos561/papers/cerf74.pdf</a></li><li>What Is a VPN? — Virtual Private Network — Cisco blog post — <a href="https://www.cisco.com/c/en/us/products/security/vpn-endpoint-security-clients/what-is-vpn.html">https://www.cisco.com/c/en/us/products/security/vpn-endpoint-security-clients/what-is-vpn.html</a></li><li>Tor: An Anonymous, And Controversial, Way to Web-Surf — Fowler, Geoffrey A. — Wall Street Journal article — <a href="https://www.wsj.com/articles/SB10001424127887324677204578185382377144280">https://www.wsj.com/articles/SB10001424127887324677204578185382377144280</a></li><li>List of assigned /8 IPv4 address blocks — Wikipedia article — <a href="https://en.wikipedia.org/wiki/List_of_assigned_/8_IPv4_address_blocks">https://en.wikipedia.org/wiki/List_of_assigned_/8_IPv4_address_blocks</a></li><li>SIM Card Swapping Takes Cellphone Hacking To A New Level — Wang, Deborah — NPR article — <a href="https://www.wbur.org/hereandnow/2019/08/26/sim-swapping-cell-phone-hacking">https://www.wbur.org/hereandnow/2019/08/26/sim-swapping-cell-phone-hacking</a></li><li><a href="https://whatismyipaddress.com/">https://whatismyipaddress.com</a></li><li><a href="https://ip-lookup.net/">https://ip-lookup.net</a></li><li>Free Pool of IPv4 Address Space Depleted — Smith, Lucie and Lipner, Ian — NRO Article — <a href="https://www.nro.net/ipv4-free-pool-depleted">https://www.nro.net/ipv4-free-pool-depleted</a></li><li>7 Top Open Source IP Address Management Software — Codeable Magazine blog post — <a href="https://codeablemagazine.com/open-source-ip-address-management-software.html">https://codeablemagazine.com/open-source-ip-address-management-software.html</a></li><li>IP Addresses — WhatIsMyIPAddress blog section — <a href="https://whatismyipaddress.com/learning/ip-addresses">https://whatismyipaddress.com/learning/ip-addresses</a></li><li>What an IP Address Can Reveal About You — The Office of the Privacy Commissioner of Canada — <a href="https://www.priv.gc.ca/en/opc-actions-and-decisions/research/explore-privacy-research/2013/ip_201305/">https://www.priv.gc.ca/en/opc-actions-and-decisions/research/explore-privacy-research/2013/ip_201305/</a></li><li>Find Your Public IP Address — WebNots tool/resource — <a href="https://www.webnots.com/seo-tools/find-my-ip-address">https://www.webnots.com/seo-tools/find-my-ip-address</a></li><li>What Is 192.168.0.1, and Why Is It The Default IP Address for Most Routers? — Butler, Sydney — HelpDeskGeek blog, 11/19/2021 <a href="https://helpdeskgeek.com/networking/what-is-192-168-0-1-and-why-is-it-the-default-ip-address-for-most-routers/">https://helpdeskgeek.com/networking/what-is-192-168-0-1-and-why-is-it-the-default-ip-address-for-most-routers/</a></li><li>First Came IPv4… <a href="https://www.ipxo.com/blog/what-happened-to-ipv5/#:~:text=Here&#39;s%20the%20kicker%20%E2%80%93%20IPv5%20never,Internet%20Stream%20Protocol%20(ST)">https://www.ipxo.com/blog/what-happened-to-ipv5/#:~:text=Here&#39;s%20the%20kicker%20%E2%80%93%20IPv5%20never,Internet%20Stream%20Protocol%20(ST)</a>.</li><li>What Is a Subnet Mask? Definition, Working, and Benefits — <a href="https://www.spiceworks.com/tech/networking/articles/what-is-subnet-mask/#:~:text=Subnet%20masks%20determine%20the%20network,an%20IP%20network%20upon%20subnetting.&amp;text=A%20subnet%20mask%20is%20defined,device%20operating%20on%20that%20network">https://www.spiceworks.com/tech/networking/articles/what-is-subnet-mask/#:~:text=Subnet%20masks%20determine%20the%20network,an%20IP%20network%20upon%20subnetting.&amp;text=A%20subnet%20mask%20is%20defined,device%20operating%20on%20that%20network</a>.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=36527d207e68" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-socure-technology-blog/the-many-ways-ip-address-manipulation-enables-fraud-36527d207e68">The Many Ways IP Address Manipulation Enables Fraud</a> was originally published in <a href="https://medium.com/the-socure-technology-blog">The Socure Technology Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Migrating Large Scale Data Pipelines]]></title>
            <link>https://medium.com/the-socure-technology-blog/migrating-large-scale-data-pipelines-493655a47fa6?source=rss-c04c7151b891------2</link>
            <guid isPermaLink="false">https://medium.com/p/493655a47fa6</guid>
            <category><![CDATA[data-pipeline]]></category>
            <category><![CDATA[migration]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Socure]]></dc:creator>
            <pubDate>Fri, 17 Mar 2023 16:06:05 GMT</pubDate>
            <atom:updated>2023-03-17T16:06:05.699Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rAhyMNU1wnIB2KNElSiWhQ.png" /></figure><p>Migrating data pipelines is something that every data engineer is likely to encounter in their career as the company matures and new technologies become available. Our team has been working on the migration of one such pipeline, Feedback, for the past several months. It has been a great experience so far with a lot of opportunities to learn and improve along the way.</p><p>The goal of the Feedback pipeline is to ingest data received from our clients. We use an ELTL process to maintain the richness of raw data received while providing some standardization and conformity to a common schema for downstream use by data scientists and products. This article will focus less on the ELTL logic and more on the overall architectural changes made during the migration.</p><p>Specifically, we will cover the following topics:</p><ul><li>Motivation</li><li>Architecture &amp; Design</li><li>Migration Plan and Execution</li><li>Future Items</li><li>Lessons Learned</li></ul><p>Let’s dive deeper into each:</p><h3><strong>Motivation</strong></h3><p>We had been running our data pipelines on a stack including Airflow, RDS, Redshift, Workbench (internal tool) and some custom tooling. Much of this infrastructure was set up manually several years ago, lacked proper documentation, and did not follow best practices in terms of separation of concerns between the infrastructure and application code. While the feedback pipeline still worked, it accumulated tech debt over the years which made it difficult to add incremental features and upgrade individual components of the architecture. It also required a significant operational burden rather than taking an automation-first approach. It was time for a complete overhaul to a more scalable, fault tolerant and secure solution.</p><p>The goal of the migration was to move to a centralized Data Platform ecosystem which is more robust, built around the following core tools:</p><ul><li>Process massive data (Spark)</li><li>Tooling for proper governance (Immuta)</li><li>Modern data warehouse (Snowflake)</li><li>Ownership and control via IaaC (Terraform)</li><li>Observability (Datadog)</li><li>Access controls, encryption/decryption, data lifecycle, etc</li></ul><blockquote>This was a company wide goal to move to Data Platform</blockquote><h3><strong>Architecture &amp; Design</strong></h3><p>Here is a high level design of legacy system [this requires manual ingestion first before automating]:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/0*DJJu21oF9BwKThYZ" /></figure><p>We receive a file from a client via SFTP which copies to S3, Workbench (Internal tool that listens to file, alerts, triggers Airflow and has UI on top of S3 and Airflow) triggers Airflow which runs python processes then writes to RDS and Redshift.</p><p>This is the new architecture that we recently migrated to [this is fully automated from day 1].</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/0*P2JlwaeM_c2yglnm" /></figure><p>At a high level, Lambda listens to both new s3 and legacy S3 which then triggers the Airflow in Data Platform via SQS (each call can have its own configuration). We use Pyspark to process data that syncs to S3 and Snowflake. The Data Platform in the above design is not a complete depiction, it provides a lot of other functionality as mentioned earlier that is abstracted through an API.</p><blockquote>Legacy S3 source is a temporary solution till we migrate all clients to new SFTP, discussed more later.</blockquote><p>While overhauling the pipeline architecture, we also used the opportunity to improve the application logic. Significant changes include:</p><ul><li>Replacing ad hoc data checks with a robust validation framework built around <a href="https://greatexpectations.io/">Great Expectations</a> to ensure data quality</li><li>An automation-first approach with common configuration across clients to transform data in common ways</li><li>Much richer metadata tracking, including automation generation of metrics that save data scientists time when doing exploratory data analysis (EDA) on the data</li><li>Improved logging, helpful especially for troubleshooting failed runs</li><li>Improved deduplication logic</li><li>Improved capture of the raw data (enabled in part by Snowflake’s variant data type, for which Redshift does not have an equivalent)</li><li>Fault tolerance in the data itself, with an implementation of a “failures” table that allows for processing of a batch file upon meeting a certain quality threshold without failing the entire run</li></ul><p>We will not dive deep into the specific technologies used but will focus on how we handled the migration.</p><h3><strong>Migration Plan and Execution</strong></h3><p>In order to make this a successful migration we had to come up with a solid plan. Below is a step by step plan on how we approached the migration and improved along the way.</p><blockquote>Read more: <a href="https://www.junaideffendi.com/blog/large-scale-migration-best-practices/">Large Scale Migration Best Practices</a></blockquote><h4><strong>Backfilling</strong></h4><p>Once we had the new pipeline ready, we needed to backfill years of feedback files. We considered a couple options:</p><ul><li>Migrate data directly from Redshift to Snowflake (using s3 as an intermediate staging layer), which is quick and straightforward</li><li>Re-process all files on the new system. This was a much more time consuming option but provides all the application code improvements such as metrics, data quality checks, etc. making sure our data is consistent and that historical data is just as reliable as new data.</li></ul><p>We took the hard road and went with the second approach given the importance of this data, which leads us to backfilling.</p><p>Backfilling itself is a very tedious process. We started off with a spreadsheet of files that we had ingested in the old pipeline, divided and conquered the work among the team members. The data size was not that big per file, but the number of files were many.</p><p>The backfill ingestion works like this:</p><ul><li>We download file from source AWS account bucket</li><li>Optional: We manually test it (Next section discusses more on how we test)</li><li>We upload it with a file arrival timestamp in the file name to the destination bucket which triggers the pipeline via Lambda. (More on file arrival timestamp later)</li></ul><p>We started with easier clients that had fewer files with less data issues and we processed those very quickly, but the challenge came when we started to ingest the older clients that have been sending files daily for the past several years, meaning hundreds of thousands of files. With startup time in the Airflow pipeline, even runs for small files could take 15 mins end to end. This isn’t an issue for new files coming in, but given concurrency limitations, this meant the backfill would have taken many months. In the next section, we will discuss how we solved this problem and the importance of investing in automated tooling.</p><h4><strong>Scripting and Tooling to Achieve Automation</strong></h4><p>We decided to come up with some temporary automation solutions to speed up our process. The basic idea was to deal with two types of challenges:</p><p><strong>Pipeline failure in production:</strong></p><p>Clients have been providing data for a long time, so differences in schema, column values and types have been inconsistent which does not conform to our newer standards set by the Feedback Product Owners and would often fail validation.</p><p><strong>We had been running the backfill in two ways:</strong></p><ul><li>Directly by moving files to the new s3, manually kicking off a pipeline run, then reading failure logs on the prod pipeline, which would then require configuration updates.</li><li>Downloading and manually testing files with custom scripts for basic data quality checks on sampled data.</li></ul><p>After having a lot of pain with these, we came up with a tool that serves as a local mini ETL to ease our pain. Since we were already moving files across accounts with the help of local as temporary storage, it was ideal to make sure on a few files per client that they pass our validations. This tool utilized the same validation code as our production pipeline, providing high confidence. It took more time upfront to build but was used widely and frequently within the team, saving hundreds of hours. No more testing on prod!</p><p><strong>Combining files per client:</strong></p><p>The second scenario where we needed a tool was ingesting too many files. Some clients had thousands of files with an average size of 5MB. Since we were using Spark there was no concern what the resultant combined data size would be, so we again decided to come up with a custom tool to handle the concatenation process and automate things locally.</p><blockquote>Our Pipelines took 15 mins per run, but data size does not really matter, as we can scale Spark executors horizontally very easily.</blockquote><p>This may look easy but it was not for several reasons, considering that clients have been sending data with different schemas, so we needed to consider that especially with a CSV file format. Second, we needed to make sure to handle duplicates with proper upsert logic when combining the files, so we had to update our application code to deal with this in the case of a combined file.</p><blockquote>We used file arrival timestamp extracted from file name in our upsert logic.</blockquote><p>With the combined approach, we did lose some granularity in metrics and metadata on a per file basis (e.g. row counts per file), but we decided that this was the right trade off. Speed was more important than keeping metrics for historical data in our scenario where we had strict deadlines and goals, and we did not make any concessions when it came to the more crucial data quality checks.</p><p>Lesson: automation is always important to speed up workflows. Even though the migration was a temporary effort, investing in tooling can really make you 10x (and save developers from a lot of tedium).</p><h4><strong>Config Driven Pipeline</strong></h4><p>Our pipelines are config driven, with logic controlled via YAML files. For example, types of configuration include column mappings, value mappings, data types, and validations. During the backfill we were running local mini ETL to make sure our validation passes, the beauty of our process was, everything was driven via a config with the ability to override per client via client config. This makes it easy to switch off validations, update mappings etc.</p><p>Typical validation was defined like this in YAML config:</p><pre>&lt;column_name&gt;:<br>  &lt;validations&gt;:<br>    - &lt;not_null&gt;<br>    - &lt;is_unique&gt;</pre><p>Our validations (also metrics) are abstractions on top of Great Expectations PySpark library. This custom framework would need a separate article. For now, we are in the process of contributing this abstraction back to the core Data Platform API so that other teams may benefit from the work we have done.</p><h4><strong>Treating Migrations as a Product</strong></h4><p>The migration in our case was more involved than simply moving data from Redshift to Snowflake, with tradeoffs and discussions needed along the way, and thus it made sense to involve product management. Our product manager was involved from the start of our migration process, helping in making decisions, communicating status to external teams, unblocking the team by paving the way to deal with challenging data, and bridging the gap between the client facing data team and our team. In short, the value of having a Product Manager is tremendous during migrations.</p><h4><strong>Pipeline Trigger Automation</strong></h4><p>Everyday we were receiving new files from clients that were going into our backfill list, which made it difficult to keep track of in our initial inventory spreadsheet and ingest in the new pipeline while still maintaining the old pipeline until we had finished the backfill. Eventually the plan was to migrate clients to the new SFTP, but since this is a lengthy process that involves help from account management and our clients themselves, we decided to have a short term solution. (Shown in the architecture diagram earlier)</p><p>We reused one of our lambdas to listen to the cross account s3 source bucket and trigger the lambda on file drop. This would allow us to run our old and new pipeline concurrently with minimal manual work.</p><h4><strong>Dealing with clients data consent</strong></h4><p>Some of our clients had not given consent to store data in the new data warehouse, Snowflake. To accommodate this, we created a new DAG for such clients where we can easily avoid writing to Snowflake Sinks and switch over if and when clients give consent. End users will still be able to query the data by using internal tools and packages but not within the Snowflake environment, and future work will attempt to make these distinctions as invisible as possible to end users.</p><h4><strong>Parallel Systems and Redshift Cost</strong></h4><p>One of our goals was to move away completely from legacy Redshift clusters, which are more expensive to maintain and were not updated with our latest data sources. The switch from Redshift did two important things for us:</p><ul><li>Cost savings</li><li>No more maintenance/ingestion in old pipelines</li></ul><p>For the first few months, we kept running the pipelines in parallel. We also needed to give users and reporting tools like Looker time to switch over to Snowflake before we could fully deprecate the old pipeline. With lambda automation in place to copy files to the new s3 bucket and ingest in both pipelines, we could take our time with this, communicate expectations clearly, and deprecate Redshift at the right time.</p><h4><strong>End to End Alerting &amp; Notification</strong></h4><p>We implemented alerting and notifications across multiple places using DataDog and Slack. We have three types: client file drop notification, pipeline trigger notification and pipeline alerts. This gives us end to end visibility of our process.</p><h4><strong>Migration Status</strong></h4><p>We had few ways to track our migration status, the ideal one was to do an apples to apples comparison per file between Redshift and Snowflake via a dashboard on Looker. However, this was messy given some limited metadata tracking in the legacy pipeline and differences in deduplication and validation logic which made exact counts vary between the pipelines. We did build some tracking dashboards but again relied heavily on our product manager to provide context when row counts did not match precisely.</p><h4><strong>UAT</strong></h4><p>During the backfill process, we also wanted to make sure to get feedback from the consumers, so we decided to start the user acceptance testing by involving Data Science more often. We asked a few people to help test the data and even involved a key stakeholder in our regular scrum rituals for about a month. This helped us identify issues early and provide enhancements before opening up the data to a larger group of users.</p><h4><strong>Onboarding Users</strong></h4><p>Recently, we have opened our data for consumption to everyone. To make the transition smooth, we wrote an onboarding guide on our knowledge library hosted on Confluence during the migration. This includes helpful information like getting access, schema comparisons between the old and new data, and example queries. We also worked with an internal tooling team which writes abstractions on top of SQL to make sure that our internal python libraries had nice wrappers around the new data. Finally, we reached out to product teams that use feedback data to provide a white glove service in helping their developers switch over to the new data warehouse and schema. In the world of data, “if you build it, they will come” is far from true and the work does not end when the pipeline is complete. Making this project successful has required excellent documentation, tutorials, and lots of time invested in making sure any teams dependent on this data are supported.</p><h3><strong>Future Items</strong></h3><h4><strong>SFTP Migration</strong></h4><p>As the original goal is to migrate clients to new SFTP which resides in the new AWS account, we would start that switch slowly with few clients in the upcoming months, this will be a cross team effort.</p><h4><strong>Iterating on Validations</strong></h4><p>We still have a lot to improve and iterate on validations, we have a very good validation foundation as mentioned before (Config Driven Framework on top of Great Expectations). We need to iterate on some business logics and use cases and add the functionality to go deeper with validations.</p><h4><strong>Automatic Sink Cleanup</strong></h4><p>We write data to Snowflake and S3 and sometimes either due to bad data, missed validations, duplicate data, consent challenges, we have to do an automated cleanup from the sinks, currently it’s rare and we do it manually once in a while.</p><h4><strong>Self Serve Pipelines</strong></h4><p>Long term goal is to have a fully self-serve pipeline, right now we maintain configs and run the data ingestion. This would free our time, rather than ingesting we would focus on writing abstractions and frameworks on top of Data Platform.</p><h4><strong>Separation of Configs</strong></h4><p>As discussed, our pipelines are config driven, as of now they live with the code which is not a good practice in general, we kept it to keep things simple and have less external dependencies. But the scalable solution is to separate them out and with the Terraform foundation now we can take complete ownership.</p><h4><strong>Data Alerts</strong></h4><p>We will soon be implementing alerts on top of our Snowflake data. We already have built reports on top of our Snowflake tables using Looker. We may end up using custom alerting on Looker reports or using a tool like Soda.</p><h3><strong>Lessons Learned</strong></h3><p>We learned many lessons along the way, some important ones are:</p><h4><strong>Keep users with you from the start</strong></h4><p>We did not really involve our data users consistently from the start, we missed on a few things which we caught up later.</p><h4><strong>Make sure clients are on same page</strong></h4><p>Client consent was important and required during the planning to address issues as early as possible to avoid delays.</p><h4><strong>Using IaaC the right way</strong></h4><p>We use Terraform for most of our services that live in a new aws account, however, legacy is still maintained by DevOps manually. We ended up overwriting some s3 notifications while creating the triggers in Terraform for our cross account Lambda trigger. An important lesson we learned is to never use IaaC if the resources were created manually before, keep relying on Devops in that case.</p><h3><strong>Conclusion</strong></h3><p>Generally speaking, I believe that it was a successful migration, there were few minor mishaps in terms of missing some product features and addressing some client concerns but we dealt with it easily by reprioritizing. Also, we were able to provide a more robust system, with full automation and cutting off our usage from legacy big systems especially Redshift. There are still important pieces we need to do in future, hopefully we will learn from our mistakes that we mentioned in the article and move forward. Stay Tuned.</p><p>This was a team effort which required cross collaboration with multiple teams from DevOps, Data Platform, and Data Scientists.</p><p>Authors: <a href="https://www.linkedin.com/in/junaideffendi">Junaid Effendi</a> (Engineer) and <a href="https://www.linkedin.com/in/lucaschapin">Lucas Chapin</a> (Manager)</p><p>Thanking the rest of members who contributed in this migration:</p><ul><li>Engineers: Sindhusha Boyapati, Robert Smith, Girish Sukhwani</li><li>Product Manager: Naman Dhaliwal</li><li>Data Scientist: Louis Yansaud</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=493655a47fa6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-socure-technology-blog/migrating-large-scale-data-pipelines-493655a47fa6">Migrating Large Scale Data Pipelines</a> was originally published in <a href="https://medium.com/the-socure-technology-blog">The Socure Technology Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Production Replay System for Cloud Software Applications]]></title>
            <link>https://medium.com/the-socure-technology-blog/production-replay-system-6602faa36be7?source=rss-c04c7151b891------2</link>
            <guid isPermaLink="false">https://medium.com/p/6602faa36be7</guid>
            <category><![CDATA[replay]]></category>
            <category><![CDATA[software-developer]]></category>
            <category><![CDATA[application-development]]></category>
            <category><![CDATA[cloud-software]]></category>
            <dc:creator><![CDATA[Socure]]></dc:creator>
            <pubDate>Wed, 14 Dec 2022 16:20:27 GMT</pubDate>
            <atom:updated>2022-12-16T15:53:17.146Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2VttFVVNnqF7BDuVc9Ykrg.png" /></figure><p><em>By Venkatesh Prabu Narayanan, Senior Software Engineer; Sathya Srinivasan, Senior Staff Software Engineer; Swami Subbarathnam, Senior Director of Engineering</em></p><h3>Introduction</h3><p>Cloud software applications are often expected to support many new features in a short time with high quality and availability, and their scope and complexity have been growing.</p><h3>Problems</h3><p>These are the problems we’re addressing:</p><ol><li>The set of use cases a cloud software application supports is already substantial, and the growing number of new features only adds more. The N x N dependencies across current and new features were impacting accuracy and functionality which in turn was leading to complexity in development and test. So, the interoperability expectation of all these features has increased the scope and complexity of testing.</li><li>There always exists a gap between the test coverage in pre-production environments and the numerous use cases served by the production environment. The real-time traffic and many use cases in production can not be simulated in full capacity in pre-production.</li><li>While developing and releasing any new feature, ensuring high quality and high availability in a short span of time with so many interconnected features/use cases is obviously challenging.</li></ol><p>A system which can replay the production use cases and traffic patterns (in real time as well as offline pipelines) in pre-production, would help bridge the gaps. Another critical use case for the replay system is to do “shift left” during the development of new features that consume the replay transactions in a way to enable first-cut of the features itself to be nearer to the production quality, hence the development life cycles are shorter.</p><p>However, there are many challenges that exist in developing such a “replay system’’ end to end.</p><h3>Challenges</h3><p>These are some of the important challenges (not in order of priority):</p><h4><strong>Compliance or contract restrictions</strong></h4><p>Dealing with potential restrictions in sharing the production traffic/data to a pre-production (replay) environment because of sensitivity/privacy concerns</p><h4><strong>Creation and isolation</strong></h4><p>Creating a short lived pre-production environment and isolating it to avoid causing disruption for the production environment</p><h4><strong>Live replay</strong></h4><p>Keeping an exact copy of the state of the whole environment to run live replay simultaneously with the production environment and handling several scenarios</p><h4><strong>Offline replay</strong></h4><p>Keeping an audit of transactions executed in the production environment with all the required state information to be able to replay them in an offline replay pipeline</p><h4><strong>On-demand scaling</strong></h4><p>Overheads to ramp up/down the replay environment on demand basis</p><h4><strong>Cost</strong></h4><p>Huge operational cost incurred in running the whole replay environment</p><h4><strong>Filter criteria</strong></h4><p>Developing a rich set of criteria to filter and replay a subset of production traffic to ensure an apples-to-apples comparison and enable several “what if” scenarios that are very critical during feature development to assess impacts and positive feature flip</p><h4><strong>Replay use cases</strong></h4><p>Implementation of any new feature/bug-fix by comprehending the replay use cases in the architecture and design</p><h4><strong>Infrastructure</strong></h4><p>Upgrading any resource in the cloud infrastructure in the production environment by comprehending the replay environment as well</p><h4><strong>High availability</strong></h4><p>Ensuring a high availability of production during code deployments and other situations while keeping the replay environment absolutely in sync.</p><h3>Solution</h3><p>The offline or live replay system would be set up as a “parallel-production” environment. It would work like an <em>active clone</em> of the production environment. It wouldn’t serve the production traffic directly but would work as a parallel-live path and/or an offline pipeline. We would then overcome the challenges of potential restrictions from sharing the production traffic/data.</p><p>Nonetheless, the parallel-production setup adds to the operational cost. Whether it’s parallel-live or an offline replay, we must keep it running only when needed. Auto scaling of the infrastructure for the live replay can help balance the cost, performance and availability. For the on-demand setup, automation to ramp up and down the system will be useful. The particular cloud technology being used for the system governs the effectiveness of the automation and influences the operational cost.</p><p>While the operational cost could be minimized by sharing the downstream dependencies (database and other storage clusters and other service instances in the cloud) between the production and replay environments, it creates a single-point-of-failure situation. If the traffic is heavy on the replay path, it would stretch the dependencies and disrupt the production traffic. We can solve this problem with a rate-limit mechanism, which would address the reliability and isolation concerns too.</p><p>The cloud software stack that runs on the production and replay systems must always be identical, only then we can minimize false positives while analyzing the discrepancies in execution results across these environments. An exception would be when a new feature or a bug fix is being tested for regressions against the production use cases and the replay system would run a release candidate software version. This helps in gaining confidence about the delta code changes before they go live in production.</p><p>Usually on the offline replay pipeline we would replay only a subset of the production traffic. The ability to choose such a subset using a rich set of filter criteria is essential to execute a focused set of production use cases. This will help analyze the software stack running in the replay environment against the typical production traffic patterns and is also helpful in minimizing the false positives. Developing a subsystem that can provide a large variety of filter criteria to choose from the superset of production traffic patterns will involve an auditing storage (with detailed breakup of various parameters) and an offline and/or live segregation layer.</p><p>For the live replay use case, both the pipelines (production as well as replay) must start the execution of each call using an “exact copy” of the state of all the downstream dependencies such as database storage, other services in the pipeline, and so on. This can be solved by reusing the snapshot of the state taken while starting to execute the call in parallel. The execution time of those parallel pipelines could vary but it’s always the production pipeline response that would be awaited to return to the caller.</p><p>Lastly, the architecture and design changes for a new feature implementation, will have to keep replay use cases in mind as well. Each service would implement the replay pipeline as part of the production use cases to ensure the parallel execution aspects are comprehended. The code deployments to the production environment for the upstream and downstream services pair would have to consider the replay environment as well.</p><p>To conclude, though there are several challenges in developing the replay system, it is indeed feasible by devising the right solutions.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6602faa36be7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-socure-technology-blog/production-replay-system-6602faa36be7">Production Replay System for Cloud Software Applications</a> was originally published in <a href="https://medium.com/the-socure-technology-blog">The Socure Technology Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Migration of a Refactored Microservice with Zero Impact to Customers]]></title>
            <link>https://medium.com/the-socure-technology-blog/migration-of-a-refactored-microservice-with-zero-impact-to-customers-2bae2a29dc39?source=rss-c04c7151b891------2</link>
            <guid isPermaLink="false">https://medium.com/p/2bae2a29dc39</guid>
            <category><![CDATA[refactoring]]></category>
            <category><![CDATA[microservice-architecture]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[technical-debt]]></category>
            <dc:creator><![CDATA[Socure]]></dc:creator>
            <pubDate>Wed, 30 Nov 2022 16:19:45 GMT</pubDate>
            <atom:updated>2022-12-05T14:50:05.232Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BUmDLvWAepARTgHEwwtTUA.png" /></figure><p><em>By Kalaimani Ranganathan, Staff SDET; Sathya Srinivasan, Senior Staff Software Engineer; Sumit Kumar, Senior Software Engineer; Swami Subbarathnam, Senior Director of Engineering</em></p><h3>Background</h3><p>A software architecture usually accumulates technical debts over time because of the continuous addition of new features and enhancements. Those debts cause performance inefficiency, code/design maintainability difficulties and other bottlenecks. Software teams try to clear those debts by refactoring their code periodically. Often, those code changes are substantial which makes them quite risky to release in production.</p><h3>Problem Statement</h3><p>One of the many microservices we run internally at Socure is part of an important product line. Any error or downtime in that particular microservice would disrupt availability and performance for many customers. We wanted to refactor the code for that particular microservice. It was not causing a performance inefficiency or other problems affecting any SLA (Service Level Agreement), rather it was causing problems for code maintainability aspects as a technical debt.</p><h3>Challenges</h3><p>Design and implementation of the refactoring posed several challenges as described below.</p><p>The redesign, coding, and basic testing were not challenging much. However, the first challenge was ensuring a full coverage while testing each API exposed by the microservice to qualify the refactored code for production deployment. Especially since some of the APIs and their use cases have been in use for a few years, it was difficult to achieve 100% coverage by testing the legacy code.</p><p>The next challenge surfaced before moving the refactored code to the production environment. Since this microservice is a legacy service, the set of use cases supported by this microservice was large, and hence there were many permutations and combinations of those use cases served so far. While most of those use cases were validated in the pre-production environment, there were many unknown use cases supported for a long time in the production environment. Thus the challenge was: what if those use-cases break just after the refactored code would be deployed in production? So it is quite risky to roll out the refactored code only on the basis of the testing done in the pre-production environment. As that particular microservice implements the call-flows for some of the largest customers it further adds to the risk factor.</p><p>Therefore, we had to achieve two challenging goals:</p><ol><li>None of the new APIs would cause any functional errors.</li><li>All of the new APIs would function exactly the same as their existing API counterparts for the same input request.</li></ol><p>Additionally, qualifying the refactored code within a short span of time would be challenging but essential.</p><h3>Solution</h3><p>This is how we implemented the solution:</p><h4><strong>Evaluation of the new APIs in production</strong></h4><p>The APIs of this particular service were invoked by another service. We employed a shadow framework that performs execution across real-time (current) as well as shadow (new) paths and compares their results in real time. This was done for about 10% of all the production traffic for a period of a few days (it was configurable). The results were logged and metrics were emitted. Though both versions of the APIs were invoked, only the result of the old API was returned for the calls from the customer, to avoid any regressions.</p><p>The results are compared in near real time and associated deviation metrics were analyzed offline. We observed that all the calls in the production environment yielded exactly the same results between old and new (refactored) code. This gave us high confidence that the new APIs were at par.</p><blockquote><em>Why did we choose to experiment with only 10% of the production traffic?</em></blockquote><p>Considering our call patterns for random patterns that come in sporadically by analyzing several metrics in production, we could conclude that 10% of the traffic for this period covers nearly all the use cases. The volume of the calls that were falling in the said criteria was so huge that it covers all the use cases actively being served (they are all “read” calls, no writes). Importantly, the additional calls incurred extra cost and slightly increased response time (owing to the comparison done), therefore we didn’t wish to experiment with a larger share of the production traffic.</p><h4><strong>Phased roll out of the new APIs:</strong></h4><p>Although we had high confidence that the new APIs were working well, we were still cautious about the roll-out strategy. We planned to roll out the refactored code path gradually for which we developed a fine-grained feature flags tool across multiple dimensions to do a canary deployment. Thus we controlled the overall traffic in the production environment and also the set of customer accounts that would take the refactored code path.</p><p>When the refactored code was enabled through the feature flag framework, first we verified the same, using many internal accounts by diverting 100% of the traffic from those test accounts to the refactored code path. For those selected calls, there were no parallel calls made but only for the new version of the APIs. Load tests and other tests were performed to verify the functionality and stability.</p><p>Once the test results were positive, we opened the gates for the customer accounts gradually, i.e., 10% of traffic for a subset of customers first, and went on further to include all the remaining customers and increased the share (20%, 30%, etc.) of the traffic until all the customers were dialed up to 100% on the refactored code path.</p><p>During all these steps, we gathered adequate metrics and logs to analyze any errors or spikes in latency due to the new code. However we didn’t experience any errors at any point in time. Still, considering a worst case scenario, we kept a global feature flag to turn off the refactored code for all customers or for only a particular set of customers. However, we never needed to turn off the refactored code as the gradual enabling went smooth — thanks to the evaluation phase.</p><p>Overall, these were the benefits of the phased deployment. Even though it took some extra effort to build out the phased deployment framework, it was completely worth the time and effort to deploy the refactoring changes of a critical service to production with zero impact to the customers.</p><h3>Summary of learnings</h3><ul><li>Plan</li><li>Profile the application with available data</li><li>Understand different knobs that are needed to control/shape traffic</li><li>Test thoroughly (functional, load etc.)</li><li>Determine key metrics for successful production cutover beyond the controls</li><li>Determine derisk factors for a successful migration — customers, product, api, etc.</li><li>Use the tooling developed to monitor across multiple hours/days (improve coverage)</li><li>Communicate internally and externally; avoid surprising upstream and downstream stakeholders</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2bae2a29dc39" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-socure-technology-blog/migration-of-a-refactored-microservice-with-zero-impact-to-customers-2bae2a29dc39">Migration of a Refactored Microservice with Zero Impact to Customers</a> was originally published in <a href="https://medium.com/the-socure-technology-blog">The Socure Technology Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is Developer Relations?]]></title>
            <link>https://medium.com/the-socure-technology-blog/what-is-developer-relations-cb8ca9e72eba?source=rss-c04c7151b891------2</link>
            <guid isPermaLink="false">https://medium.com/p/cb8ca9e72eba</guid>
            <category><![CDATA[devrel]]></category>
            <category><![CDATA[socure]]></category>
            <category><![CDATA[developer-relations]]></category>
            <dc:creator><![CDATA[Socure]]></dc:creator>
            <pubDate>Wed, 02 Nov 2022 17:37:06 GMT</pubDate>
            <atom:updated>2022-11-02T17:37:06.360Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ibFFBaCwJA0yLb-d_4PFxw.png" /></figure><p><em>By </em><a href="https://www.linkedin.com/in/biosb/"><em>Burak Kebapci</em></a><em>, Director - Developer Support</em></p><p>Developer Relations, also known as DevRel, is an umbrella term covering the strategies and tactics that help organizations build better products and solutions.</p><p>It’s a cycle where DevRel teams provide support and also receive feedback from developers which helps them integrate organizations’ solutions more easily and faster.</p><p>DevRel has four pillars:</p><ul><li>Adoption: You have to build products and tools that developers can easily adopt.</li><li>Product building: You need a team to work with developers and build a feedback mechanism so you can get the information you need to be successful.</li><li>Developer enablement: providing the education, tools, and infrastructure that developers need to use a product once their employer has adopted it.</li><li>Developer perception: Developer perceptions can be a potential barrier to the product’s success. You have to make sure they have a positive opinion of your products.</li></ul><h4>Adoption:</h4><p>As developers are often both users and buyers of the product, everyone is focused on how to interact with them.</p><p>“But consider a 300-year-old bank forced by law to offer open banking APIs. For this bank — in fact for most organizations — developers are just a target audience, and more importantly, an audience whose work, motivations, preferred channels, hotspots, and culture seem unconventional to those who aren’t developers. In this situation, it makes sense to have a team dedicated to relations with developers.”</p><p>That’s why teams that you have to build under Devrel such as Developer Success, Support, Experience, and Marketing will increase Developer Adoption, in addition to building a feedback mechanism to help the organization, will also help build better products and tools.</p><h4>Product building:</h4><p>As explained in the Adoption section above, DevRel organization is the most important part of the product building process. DevRel teams should have a close relationship with developers to understand their challenges while using company’s products and tools. This approach will help DevRel teams to identify gaps and improvements that the DevRel organization needs to make.</p><p>This is valuable information that the end user won’t be able to provide you. Let me give you an example. Imagine you’ve created an SDK and you have certain dependencies. — let’s say, Google MLKit. Do you know how to keep up with the versions? What if your customers are using the same libs and there’s a conflict between the customers’ app and your SDK? Should you use the latest version of these libraries? or Will you let your developers use the version they want? What if your SDK doesn’t support newer ones? The answer is that having a team that has close relationships with those who are integrating your products (i.e., developers) will help you create better processes and make the best decision when creating your products.</p><p>Organizations often try multiple solutions before making purchase decisions. Some of the criterias that they consider are the Integration time, maintainability, documentation, and support.</p><p>Developers may affect the business stakeholders’ decision to choose other vendors over you because of those reasons. This is why having a strong DevRel organization helps you to get developers to love your product and adopt it easily.</p><h4>Developer enablement:</h4><p>We can group the things needed to enable developers to use your tools and products in three categories:</p><ul><li>Developer experience: API design, SDKs, Sample Apps, Request builders</li><li>Developer education: Playgrounds, documentation, tutorials, videos</li><li>Developer support and success: A team that can support any integration needs</li></ul><p>As you can imagine, enabling developers is necessary to ensure they give their consent to integrate your products. If they don’t, the project may end up failing. So, as a DevRel organization, you have to make sure they have everything they need to integrate your product.</p><h4>Developer perception:</h4><p>Understanding developer perception is also a key to success in DevRel. Have a look at this useful Information Valve diagram built by DevRelBook. (next page)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/835/0*0xh2Z-itOHG0Ifm7" /></figure><p>Together, the Developer Support &amp; Success, Developer Experience, Developer Marketing, and Developer Resources functions can feed the product and engineering teams the information they need to build better products.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cb8ca9e72eba" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-socure-technology-blog/what-is-developer-relations-cb8ca9e72eba">What is Developer Relations?</a> was originally published in <a href="https://medium.com/the-socure-technology-blog">The Socure Technology Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[(Part II) Omni Channel Deployment Focused Machine Learning Workflow For On-Device Capture Quality…]]></title>
            <link>https://medium.com/the-socure-technology-blog/part-ii-omni-channel-deployment-focused-machine-learning-workflow-for-on-device-capture-quality-7488e50b07c9?source=rss-c04c7151b891------2</link>
            <guid isPermaLink="false">https://medium.com/p/7488e50b07c9</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[omnichannel]]></category>
            <category><![CDATA[socure]]></category>
            <category><![CDATA[machine-learning-workflow]]></category>
            <dc:creator><![CDATA[Socure]]></dc:creator>
            <pubDate>Tue, 27 Sep 2022 14:02:38 GMT</pubDate>
            <atom:updated>2022-09-27T14:02:38.091Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Zq1hFNwMelESJCTR.png" /></figure><h3>(Part II) Omni Channel Deployment Focused Machine Learning Workflow For On-Device Capture Quality Models</h3><p><em>By </em><a href="https://www.linkedin.com/in/edward-li-947a3829/"><em>Edward Li</em></a><em>, Senior Manager of Computer Vision</em></p><p>In Part I of this mini series we looked at what a traditional machine-learning (ML) workflow encompasses. Now, in Part II, we’ll look at a modified Omni Channel workflow.</p><p>It’s logical to see that if our deployment target becomes edge devices, such as web browsers or cell phones, changes must be made to the workflow to ensure deployment to these edge devices is successful.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZGKoIx9HYkJYWPlh" /></figure><p>In this new flow there are two major additions to our traditional workflow:</p><p>1. Model conversion</p><p>2. On-device model benchmarking</p><p>Socure’s document verification capture apps have computer vision models on device to check for document and selfie capture quality, because user experience should be consistent — no matter the platform. Because our goal is to ensure omni-channel performance for our capture quality models, we must ensure that trained models can be converted to a format that the edge device can consume while at the same time having the same model performance in both speed and accuracy across different edge devices. This is where our team has adapted our workflow to ensure we derisk these deployment risks as early as possible ( see Figure 2).</p><p>Model conversion is a critical step in the ML workflow, as different edge inference platforms can have different implementation details that affect how specific layers and operations perform on device. One such example is the implementation of depthwise convolution. Certain frameworks in the past have converted depthwise convolution as a stack of kxkx1 convolution operations run after splitting a nxmxk input tensor to k nxmx1 tensors, followed by a concat back to n’xm’xk. Although this is a sensible solution, it’s slow on device and that can be suboptimal. Examples like this can be fairly common during the deployment phase, and some layers are even unsupported in certain deployment frameworks.</p><p>If we build our models without deployment in mind, we can end up redoing a lot of the experimentation when these issues arise. Therefore, to mitigate unforeseen conversion issues during deployment, we add model conversion to the workflow right after the model architecture candidate has been defined.</p><p>Without any trained weights we can still fully test out whether the architecture can be converted to our final edge format. Our team has built tools for converting from either tensorflow or pytorch (which is preferred, but more on that in another blog) training frameworks into our target frameworks of Core ML (iOS), TensorFlow Lite (android), and TensorFlow.js (web). This allows us to quickly adjust our model architecture, should there be any conversion issues and incompatibilities, before spending any resources on training.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/603/0*gWkahok-AzN_zLeV" /></figure><p>So if our model converts, you may be wondering, how do we make sure these models are the same, performance wise, across our different channels? This is where adding on-device model benchmarking really helps. We add this stage to our workflow in two places, each with its own purpose.</p><p>The first is right after the model conversion in the modeling phase in which we mostly benchmark for speed. Using AWS device farm and our in-house model benchmarking apps, we can benchmark the inference speed of different architecture candidates across a wide range of devices.</p><p>This gives us a clear picture of the device coverage for each architecture candidate. Should an architecture candidate be too slow for a certain framework, we need to re-evaluate the model candidate and make adjustments until we satisfy the runtime requirements. The second place where we run on-device benchmarks is right before model deployment. At this stage we know that our models can convert to our target edge platforms and we know that they are fast enough on device. At this stage we need to validate that our converted edge models can retain the same level of accuracy/loss as our originally trained model checkpoint.</p><p>For a lot of on-device frameworks, quantizations and floating point reductions can be performed on the models weights among other optimizations and simplification to make models run faster on device, this can potentially result in sacrifices to model accuracy. Therefore, before we ship the model, we run benchmarks across our validation dataset using our previously mentioned benchmarking apps and on AWS device farm to validate that the inference model does not deteriorate in accuracy across the three different inference frameworks or from our original training framework. If there are any problems, we then go back to debugging the entire pipeline or perform retraining with modifications to address this problem.</p><p>After on-device validation is complete, we ship the model to our engineering teams to be included in our capture apps and sdks, knowing that it’s performant in both speed and accuracy.</p><p>Following this workflow and keeping track of datasets, code, model checkpoints, and model conversion allows us to deliver a model to our integration partners knowing it’s performing well and as risk free as possible. While at the same time, should it become necessary to retrain and update the model, we can easily do so with the best set of hyperparameters and configs. Doing work the right way makes it easier not just for us but for colleagues in other functional orgs as well.</p><p>Building ML models is a complicated and risky process. Iteration speed is the key to produce high-quality production-grade models that satisfy both speed and accuracy targets. Doing it the right way with the right workflow and tooling can greatly derisk the process. Being deployment-focused and thinking about the result will greatly improve the throughput of your ML teams and ensure successful delivery of your ML models.</p><p>In the last part of this series, we’ll dive deep into changes we make to the Omni Channel workflow to deploy our on-device capture quality model.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7488e50b07c9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-socure-technology-blog/part-ii-omni-channel-deployment-focused-machine-learning-workflow-for-on-device-capture-quality-7488e50b07c9">(Part II) Omni Channel Deployment Focused Machine Learning Workflow For On-Device Capture Quality…</a> was originally published in <a href="https://medium.com/the-socure-technology-blog">The Socure Technology Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[(Part II) Importance of Adaptability in Cloud Software Architecture]]></title>
            <link>https://medium.com/the-socure-technology-blog/part-ii-importance-of-adaptability-in-cloud-software-architecture-16f184364c5b?source=rss-c04c7151b891------2</link>
            <guid isPermaLink="false">https://medium.com/p/16f184364c5b</guid>
            <category><![CDATA[cloud-software]]></category>
            <category><![CDATA[identity-verification]]></category>
            <category><![CDATA[cloud-architecture]]></category>
            <category><![CDATA[socure]]></category>
            <dc:creator><![CDATA[Socure]]></dc:creator>
            <pubDate>Mon, 12 Sep 2022 15:34:33 GMT</pubDate>
            <atom:updated>2022-09-12T15:34:51.405Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0DlrpamR1VNBgoefQcvZKA.png" /></figure><p><em>By Sathya Srinivasan, Senior Staff Software Engineer</em></p><h3>Recap of part one</h3><p>In part one of this article we discussed the importance of adaptability in the cloud software architecture and the challenges in achieving the same. In this article, we will discuss the several architectural principles that will help us overcome the challenges.</p><h3>Architectural Principles for Adaptability</h3><p>To make the cloud software architecture well adaptable to the future demands and requirements, the architecture must break itself down into several pieces — it will let the individual modules develop and grow independently.</p><p>The “<em>Microservices Architecture</em>” paves a guided path. It’s an architectural pattern that constructs a cloud application as a set of tiny services that are loosely coupled, independently deployable, and easily maintainable by smaller teams. However, the architecture must ensure it will not overdo (too many microservices) or underdo (too few).</p><p>To determine the right boundary to spin off a new microservice, the architecture must follow these principles.</p><h3>Single-responsibility principle (SRP)</h3><p>This strategy applies object-oriented design’s single-responsibility principle at the microservice level.</p><p>“<em>A microservice should have one and only one reason to change, meaning that a microservice should have only one job.</em>”</p><p>A microservice should not own more than one <em>functional</em> storage cluster. If a microservice ends up managing several functional clusters, its responsibilities are being overloaded. While the overloading helps to cut costs, it is not going to make the microservices adaptable and scalable.</p><p>Similarly, any microservice that involves CRUD (create, read, update, delete) operations to any destination, for example, another microservice, storage, and so on, can apply this strategy.</p><p>The downsides of meticulously applying SRP to every microservice are: increased TCO (Total Cost of Ownership), increased operational overhead, increased team size for development and maintenance, and so forth. There has to be a balance. One way to balance this is by starting with a few microservices in the beginning of the product development, and as more features are added, split those microservices further.</p><h3>Loose coupling across microservices</h3><p>Keep the interaction across microservices much less cohesive. The design and implementation of a microservice must depend on the request/response contract defined between itself and each of its downstream microservices. It must not depend on the internal design of those downstream microservices. Even if all the microservices in the dependency chain are owned by the single team, this strategy must be religiously applied. This allows the redesign of one microservice (while maintaining the existing request/response contract) to not affect the other microservices in the dependency chain. This helps with quick TTM (Time To Market), lower TCO, etc.</p><h3>Modules isolation within a microservice</h3><p>Within each microservice the module level segregation must be done. It may seem obvious, but it is largely overlooked. The interaction within modules must be more cohesive but across modules must be less cohesive. When a microservice ends up having many modules, it’s the right time to split it into one or more microservices. We must apply the SRP at module level on a lighter side.</p><h3>Growing traffic</h3><p>To support growing traffic, a simple question to ask is, “If the traffic my microservice serves today, grows by 10x or 100x, what factors of my architecture must I revisit?”. A few aspects to consider are: operational overhead, volume of tracing generated (such as logs or metrics), health monitoring difficulties, time to find the root cause of the issues in production, and so on. Being aware of these <em>dimensions</em> sets the stage for the architecture to position itself accordingly.</p><h3>Deployment frequency</h3><p><em>Deployment Frequency</em> is an important metric for a microservice. When active development is going on for new features, if a microservice involves changes and needs deployment in almost every release (weekly or whatever cadence the company follows), it falls in the firing line. Then its architecture, modularization, decomposition, and other aspects must be revisited. There may be a possibility of breaking it down. If a microservice continues to grow, adding many functionalities, it would start violating SRP.</p><h3>TCO versus SRP</h3><p>There’s always a tug of war between TCO versus SRP. The stance the business leadership takes would play a big role. Depending on the revenue, profit, scale, SLA promise, and other factors, the business leadership may want to keep the TCO at a certain level. The level of control (stringent versus lenient) gives the appropriate freedom for the architecture to apply SRP to the various microservices. Therefore, even though spawning “n” number of microservices is the right thing to do from the architecture standpoint, business leadership goals must be aligned as well.</p><p>Most of the cloud platform providers allow scalable provisioning for the underlying hardware resources consumed by the cloud software applications. They must be provisioned effectively to balance between performance and availability versus TCO.</p><h3>Summary</h3><p>There is no single hammer for all the nails. If the cloud software and its architecture have to survive across growing demands and functional requirements over a period of many years, adaptability is the key. Being aware of the several challenges discussed and aligning the cloud software architecture towards the architectural strategies will help in guiding the software architecture to be adaptable and maintainable, while continuously meeting the growing business demands and requirements.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=16f184364c5b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-socure-technology-blog/part-ii-importance-of-adaptability-in-cloud-software-architecture-16f184364c5b">(Part II) Importance of Adaptability in Cloud Software Architecture</a> was originally published in <a href="https://medium.com/the-socure-technology-blog">The Socure Technology Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>