<?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 Adam Fletcher on Medium]]></title>
        <description><![CDATA[Stories by Adam Fletcher on Medium]]></description>
        <link>https://medium.com/@adam_bitdotio?source=rss-fc1d9ed7195d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*P5LwSQplqHmxCxMpExdotw.jpeg</url>
            <title>Stories by Adam Fletcher on Medium</title>
            <link>https://medium.com/@adam_bitdotio?source=rss-fc1d9ed7195d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 01:05:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@adam_bitdotio/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[What’s Next For bit.io]]></title>
            <link>https://blog.bit.io/whats-next-for-bit-io-joining-databricks-ace9a40bce0d?source=rss-fc1d9ed7195d------2</link>
            <guid isPermaLink="false">https://medium.com/p/ace9a40bce0d</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[startup]]></category>
            <dc:creator><![CDATA[Adam Fletcher]]></dc:creator>
            <pubDate>Tue, 30 May 2023 15:50:35 GMT</pubDate>
            <atom:updated>2023-05-30T16:20:07.246Z</atom:updated>
            <content:encoded><![CDATA[<p>The bit.io team is <a href="https://www.databricks.com/blog/welcoming-bit-io-databricks-investing-developer-experience">joining Databricks</a>. We started bit.io with the mission of making individuals and teams immediately productive with data via a great developer experience and data-centric product principles. Databricks shares that vision with us, and we’re thrilled that our team will be joining Databricks to deliver an incredible experience for developers on the Lakehouse.</p><p><strong>As part of this transition, we’re sunsetting our database product.</strong></p><p>We’re committed to making the transition process as easy as possible. Here’s what you need to know:</p><ol><li><strong>The timeline:</strong> You have until <strong>July 29th</strong> <strong>to migrate your data off of bit.io.</strong> We recommend you do it earlier.</li></ol><ul><li>Until <strong>June 29th</strong>, you will have the option to manually initiate the migration process using <a href="https://www.postgresql.org/docs/current/app-pgdump.html">pg_dump</a> and <a href="https://www.postgresql.org/docs/current/app-pgrestore.html">pg_restore</a>. You can also generate a pg_dump export on our website or you can also use a database migration service. During this time, all databases will run normally, but we recommend that you wind down usage as soon as is feasible.</li><li>After June 29th, your database will shut down, and you’ll receive a link to your final database dump.</li><li>You will then have until July 29th to download your data via that email link.</li><li>You can read more about how to complete the migration <a href="https://docs.bit.io/docs/sunset">here</a>.</li></ul><ol><li><strong>Downtime:</strong> Migrating your database may require some downtime. We recommend making sure your app works with your new database provider before you start migrating data. If you have Pro databases with some significant potential downtime (one minute or more), we’ll reach out to help you with the migration process.</li><li><strong>Where to go from here:</strong> Your decision on which new database provider to migrate your database to is highly dependent on your needs, and each option comes with tradeoffs. We have <a href="https://docs.bit.io/docs/sunset#alternative-postgres-providers">a list of suggested options for you to start from</a>.</li><li><strong>For help:</strong> You can let us know on Discord or community.bit.io if you need support on your account or support with the migration process. Discord will also sunset on June 29th and cease to be available, and at that time community.bit.io and docs also will enter read-only mode and remain available until July 29th.</li></ol><p>Thank you for using bit.io and the opportunity to support your needs. If there’s anything we can do to help make this transition easier, please let us know.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ace9a40bce0d" width="1" height="1" alt=""><hr><p><a href="https://blog.bit.io/whats-next-for-bit-io-joining-databricks-ace9a40bce0d">What’s Next For bit.io</a> was originally published in <a href="https://blog.bit.io/">bit.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[We Are Better Than You At Releases]]></title>
            <link>https://blog.bit.io/we-are-better-than-you-at-releases-3c85cb5d4698?source=rss-fc1d9ed7195d------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c85cb5d4698</guid>
            <category><![CDATA[engineering-mangement]]></category>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Adam Fletcher]]></dc:creator>
            <pubDate>Fri, 07 Apr 2023 18:16:28 GMT</pubDate>
            <atom:updated>2023-04-07T19:09:28.798Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*7vt2xhha5Cm9rSvY7CFqVw.png" /></figure><p>We’ve had a busy 2023 so far. We’ve shipped a lot of major features, in addition to making our product incrementally better every week. An incomplete list is: <a href="https://blog.bit.io/ai-powered-text-to-sql-translation-in-bit-io-1fbcf32fd586">AI text-to-SQL translation</a>, <a href="https://blog.bit.io/global-read-replicas-on-bit-io-10a0e6a6d76e?source=collection_home---6------2-----------------------">global read replicas</a> (and our <a href="https://innerjoin.bit.io/exploring-cloud-datacenter-latency-e6245278e71b">latency map</a>), <a href="https://blog.bit.io/supporting-18-sql-dialects-on-bit-io-7a93cb3ecb0b">SQL syntactic translation</a> in 18 languages if AI isn’t your thing, a <a href="https://blog.bit.io/bit-ios-new-pricing-8366d12afddd">new pricing model</a> with guaranteed availability, multi-cloud, and <a href="https://blog.bit.io/manage-credential-scope-with-service-accounts-a18b4acd3180">service accounts</a>, plus more integrations and other cool stuff.</p><p>You may think that’s because we spent 2022 heads down prepping for these launches. <a href="https://blog.bit.io/laying-the-groundwork-for-frictionless-data-collaboration-a4fffc1edc6">That’s not the case</a> (and in some cases would have been impossible). We didn’t even spend the end of the year working on most of the new features: we had a major release in Q4 (read more about serverless postgres, immediately available with no waitlist <a href="https://blog.bit.io/bit-io-launches-serverless-postgres-4db33ef4a2cc?source=collection_home---6------4-----------------------">here</a>) plus regular updates to improve experience and performance.</p><p>We don’t do it by overworking our engineers — we have a four day work week — or by accepting shoddy code or buggy releases. We do it by setting up processes that optimize for speed and catch problems early. Here are the principles that guide these processes at bit.io and how we apply them.</p><h3><strong>Nothing happens in a vacuum.</strong></h3><p>We don’t have many (any?) releases that are delayed at the last minute due to unexpected issues or bugs. We plan ahead, sure, but we’re still a startup. We finish features and ship them as soon as they’re ready. But, our dev-to-launch cycle is pretty short, even for major launches.</p><p>Our devs work fast because we built an environment prioritizing productivity and iteration speed (and because they’re awesome, but we’ll get to that). They’re able to move quickly with fast CI, fast local testing, and fast image building. A developer’s environment is the same as prod minus the data. We run the whole system locally (see more below on our use of Kubernetes).</p><p>We also work on a monorepo. You can make this all work in multiple repos, but why? Our system has many services, but they don’t exist in a vacuum and a mono repo ensures compatibility concerns. So, what tech makes this work?</p><ul><li><strong>Pre-commit hooks:</strong> We enforce formatting standards, type checking (in Typescript &amp; python), Dockerfile, Makefile &amp; bash linting, and more:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cAvwE-J_Dmm4wFsq" /></figure><ul><li><strong>Pinned versions:</strong> We use each languages’ native pinning when possible; for python we use poetry.</li><li><strong>Dockerized everything:</strong> Our “build” process really is just making a lot of dockerfiles and running them in k8s.</li><li><strong>Infrastructure as code:</strong> We use pulumi &amp; helm for this.</li><li><strong>CI autotriggering on any</strong> git push: We run the full test suite (unit &amp; integration tests) via github actions.</li></ul><p>This means when we’re ready to test, we don’t run into many surprises. We already have a pretty good idea on how each commit will land, and the transition from dev to prod is smooth. That’s not to say we don’t have bugs — we just mostly have bugs that were us being a little stupid, not totally wrong. When we do have big problems, we’re able to catch them early.</p><p>Plus, with a monorepo, we can use find | xargs grep and be sure we’re searching all our code (okay, only I do that; everyone else has a sane development environment that isn’t ‘old unix commands and vi’).</p><p>We know people Have Feelings about a monorepo, so feel free to comment below on how we are absolutely correct in choosing a monorepo or how you are Doing It Wrong with your multiple repos.</p><h3><strong>Be disciplined about infrastructure.</strong></h3><p>We can churn out features quickly at this point because we built a solid foundation and processes. We have a complex microservice system that rarely breaks, and that’s because we have good unit testing, and our CI does integration testing (which of course you can run locally).</p><p>We also use Kubernetes. It’s a meme that you don’t need the complexity of k8s, but for us it is critical (we do a lot with the k8s API). We use vclusters from Loft Labs, and our system only relies on 2 cloud-specific features — external LBs and storage, both of which we represent in virtual clusters. Finally: infrastructure as code. With Pulumi &amp; helm, we can spin up a production region in 30 minutes for AWS or GCP.</p><p>All our infrastructure and code has observability, either via automatic tracing in a framework and/or via manual annotations. We also use structured logging whenever possible and ship the logs to a central location. When CI breaks after a git push or even when something is busted locally during development, the developer can use these tools to debug what is wrong. It’s pretty great.</p><h3><strong>Hire really good people.</strong></h3><p>Even with all of the processes and testing protocols in the world, most teams would not be able to do this. We have seven engineers who are incredibly productive, and while they are technically skilled, that’s not what makes them great. They are curious folks who own problems and solutions, and love what they are building. They stay close to the problem we’re solving and the people who use the product every day (this includes talking to customers, spending time on call for technical issues and support, and building personal projects on bit.io).</p><p>By keeping that as the North Star, the whole team has focus, clarity, and stakes beyond making money so they still have jobs. We’ll write more about hiring an eng team later. For now, I’m just going to say that I’m super proud of the whole team and what they’ve accomplished.</p><p><em>Want to learn more about bit.io? Sign up for our </em><a href="http://eepurl.com/hvI9Yr"><em>newsletter</em></a><em>, or talk directly to the team on </em><a href="https://discord.com/channels/821227827743162388/821227827743162392"><em>Discord</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c85cb5d4698" width="1" height="1" alt=""><hr><p><a href="https://blog.bit.io/we-are-better-than-you-at-releases-3c85cb5d4698">We Are Better Than You At Releases</a> was originally published in <a href="https://blog.bit.io/">bit.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring Cloud Datacenter Latency]]></title>
            <link>https://innerjoin.bit.io/exploring-cloud-datacenter-latency-e6245278e71b?source=rss-fc1d9ed7195d------2</link>
            <guid isPermaLink="false">https://medium.com/p/e6245278e71b</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[latency]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Adam Fletcher]]></dc:creator>
            <pubDate>Tue, 10 Jan 2023 02:17:46 GMT</pubDate>
            <atom:updated>2023-01-10T02:17:46.851Z</atom:updated>
            <content:encoded><![CDATA[<p>Measuring, mapping, and exploring network latency to cloud provider datacenters</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7xtRxIhQXVMskOg-gquixw.png" /><figcaption>bit.io/latency</figcaption></figure><p>Users leave slow sites. A tenth of a second — 100 milliseconds — <a href="https://www.nngroup.com/articles/the-need-for-speed/">matters</a>. So when we at <a href="https://bit.io/">bit.io</a> started to think about which datacenters to use for our replicas, we wanted to make sure we were providing the fastest database experience to the most users.</p><p>As usual, we wanted to make the decision on which data centers to use by looking at data. The plan was to explore the expected network latency on a per-datacenter, per-cloud provider basis. I wanted to know, for example, where in the world is 75 milliseconds away from us-east-1 (an AWS datacenter in Virginia, USA)? What about GCP’s europe-west-2, in Belgium? But, no tool existed.</p><p>This isn’t just a math problem. We know the general theoretical ping time — basically, the speed of light distance between one location and the location of the datacenter — but in practice we never see that speed. It’s delayed by the medium (copper, fiber, satellite) the internet travels on, there’s never really a straight line path between one location and a datacenter, and there’s many routers, switches, and other network infrastructure between a location and the datacenter.</p><p>I wanted the network latency <em>in practice</em>. So, I built a tool that lets you explore the network latency of all the data centers in GCP and AWS. You can select any datacenter locations you want and see the latency to those locations from anywhere in the world. You can adjust the latency; if you want to know where in the world is 50ms from us-east-1 in AWS, you can use this tool to learn it.</p><p>This tool is available at <a href="https://bit.io/latency">bit.io/latency</a>. The source code is on github at <a href="https://github.com/bitdotioinc/cloud-latency-map">github/bitdotioinc/cloud-latency-map</a> the data is available on <a href="https://bit.io/adam/cloud_latency_map">https://bit.io/adam/cloud_latency_map</a>. The data is updated daily.</p><h3>Do I Need This?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ypxTdFkubo84rjoWCEo1WA.png" /><figcaption>75 milliseconds of latency, us-central1 in GCP</figcaption></figure><p>Naively, I could have simply said, “Where do my current and future users live? Let’s just pick data centers near there.” I’d probably have been fine from a <em>latency</em> standpoint, but there are some subtleties beyond latency that we need to think about.</p><p>Cost: not all datacenters cost the same. A unit of compute or storage is priced differently per datacenter; some datacenters are far more expensive than others. This is typically due to the price of electrical power, cooling, and other infrastructure in that locale.</p><p>Features: not all datacenters have all the services provided by each cloud provider.</p><p>Politics: The nearest datacenter might be in a restricted area (China, Russia), or have other legal restrictions (GDPR) that impact that location.</p><p>This tool doesn’t address these issues (yet! Pull requests welcome!). It <em>does</em> give you some important information you need to make the right decision for your use case.</p><h3>How I Built This</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oWf8YXfcXYIOh7ANfGBCkg.png" /><figcaption>75 milliseconds of latency from everyone’s favorite datacenter, us-east-1 in AWS</figcaption></figure><p>To get the network latency I needed to send a packet from as many points as I could to all the datacenters and measure that latency. The internet changes all the time, impacting the latency of traffic, so to get the typical working latency, I needed to repeat this a lot at various times and compute the median latency.</p><p>The first approach I took was to try to ping from as many proxy or vpn endpoints as I could to each datacenter. This didn’t work well — it’s hard to get very many proxy or VPN endpoints, and it’s expensive. Plus, I’d need known IPs at each datacenter that didn’t advertise themselves at other datacenters.</p><p>Instead, I chose to flip this around. I decided to gather a large list of IPs spread throughout the world and traceroute to those IPs from each datacenter. This way, I get the latency not just to the target IP, but also for each router hop on the way to the target IP, adding to my overall collection of locations with latency measurements.</p><p>The process:</p><ol><li>Get a bunch of IPs that have known (or geolocatable) locations, spread throughout the world. Store those in a bit.io database.</li><li>Write code to grab a random IP from that bit.io database and traceroute to the IP from the datacenter the code is running in. Record each hop’s source datacenter, latency &amp; IP address. Geolocate all the IPs (hops &amp; target) and record the latency in a bit.io database.</li><li>Package the code into a container image.</li><li>Deploy that container to every single datacenter in GCP, AWS, and Azure, and schedule it to run daily.</li><li>Make a pretty-ish, interactive map where you can pick a latency and see the alphashape (concave hull) of the latency for each datacenter.</li><li>Profit! (Or not. It’s not cheap to run this infrastructure.)</li><li>Open source it all.</li></ol><h3>Building the tracer</h3><p>Traditional traceroute libraries often block waiting on network I/O, which makes them unsuitable for tracing a lot of IP addresses quickly. The `mtr` package has a nice parallel traceroute and python bindings for the same, so I use that in the tracer code. Additionally, the code is all async/await when possible.</p><p>The general flow of the tracer is:</p><ol><li>Figure out where the tracer is running (which cloud provider &amp; region, and the lat/long of same).</li><li>Grab all the target IPs &amp; their locations from the bit.io database of target IPs.</li><li>Randomize the list.</li><li>Spawn a bunch of tracers, each of which does 3 parallel traceroutes to the target IP.</li><li>Gather up the results.</li><li>For each IP in the results, check to see if we know the IP’s geolocation. If not, geolocate it (in two passes — first with the open MaxMind database, then if we don’t get a hit, use the commercial IPInfo service).</li><li>Record the IP, location, median latency, source cloud provider, source datacenter region, and geodesic distance between the target IP’s location and the datacenter’s location in a <a href="https://bit.io/adam/cloud_latency_map">bit.io database</a>.</li><li>Schedule all this code to run in every cloud provider from every datacenter in that cloud provider on a staggered schedule (for details, see the appendix).</li></ol><p>I did have to write some code to verify that the geodesic distance made sense given the latency we found. Geolocation is not exact; IPs change location all the time. Sometimes I’d get a distance of 13000 kilometers but a latency of 2 milliseconds. That is impossible. I ended up writing a quick function that checks if the latency makes sense:</p><pre>def distance_makes_sense(distance_in_km, latency_ms):<br>   if (distance_in_km &gt; 0) and (latency_ms / distance_in_km &lt; 0.0095):<br>       return False<br>   return True</pre><p>The 0.0095 number comes from plotting a regression curve of all the latencies and distances I’d recorded thus far. It’s not perfect, but it works.</p><p>I think there are improvements that could be made — threading would give me more throughput, at the cost of more complex code and state management — but this info was critical in determining where we should place our read replicas. I wanted to get it done quickly and didn’t want to get into the complexity of threading. It’s all open source, so pull requests welcome 🙂</p><h3>Mapping The Network Latency</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Aln3u8x9ZBohRh2QQksclQ.png" /><figcaption><a href="https://en.wikipedia.org/wiki/Alpha_shape">https://en.wikipedia.org/wiki/Alpha_shape</a></figcaption></figure><p>Once the tracer was running in every region we had plenty of data to map.</p><p>I’m not a front end person. There should be laws preventing me from building websites. Horizontally and vertically centering a div in pure CSS is the hardest problem in computer science. So, this was the hardest part of this project. Luckily, we cared more about it being usable than being pretty.</p><p>I wanted the map to be interactive and fast. I didn’t want the map to require any access to the database as that would have prevented the tool from being a static web page. Given that, I built another scheduled job that queried the bit.io database of latencies &amp; locations and computed the concave hull (basically, take all the locations, put them on a map, and draw a shape around them — technically this called an <a href="https://en.wikipedia.org/wiki/Alpha_shape">alphashape</a>) and wrote out a geojson file that we could serve with the map.</p><p>For the application itself we have <a href="https://leafletjs.com/">leaflet.js</a> load all the geojson and put a few controls on the map to let the user filter by latency. Note that we’re limited by our target IP set; just because an area is not inside a polygon doesn’t mean that area is slower than the target latency. It may just be that we’ve traced to an IP in that region.</p><p>Done! You can check out the application on <a href="https://bit.io/latency">bit.io/latency</a> and explore.</p><h3>Use Cases &amp; Caveats</h3><p>A caveat here is that we only cover network latency to the major datacenters for each provider. We don’t cover the latency to every provider’s point of presence (PoPs; often a smaller data center that does things like content caching) or network entry point. This matters; if you’re building a web page or serving video the major cloud providers offer ways to push your content to those PoPs which will drastically improve your latency. Enabling those edge caching services can often eliminate <em>network</em> latency issues for all of your users (latency issues in your application are your problem :) ).</p><p>bit.io, as a database provider, can’t use those edge caches.</p><p>We used this map to pick which datacenters we should place our read replicas in, and we ended up picking 2 additional datacenters in GCP and 1 in AWS, giving the majority of current and expected users under 75ms of latency to bit.io.</p><p>If you needed to pick cloud providers and wanted to optimize for latency, the map allows you to filter by provider. You can also filter down to specific continents; this is especially useful when you know you need to, eg, pick a location in the EU due to EU-specific data locality/privacy laws.</p><p>It’s also cool to see what the network latency you might expect to see from your home to each datacenter so that when you lose at CS:GO you can now use data to prove that it truly was the lag that made you lose.</p><p><a href="https://docs.bit.io/docs/read-replicas">bit.io’s read replica feature</a> is available to all bit.io users on a per-database basis. With one click your database read speeds increase drastically for users around the world. Sign up today!</p><h3>Appendix: Scheduling, and why we don’t have Azure</h3><p>All three cloud providers have different ways to schedule tasks that run in containers.</p><p>In GCP, it’s easy. You use CloudRun to specify the container and task as a named job, then set up a scheduler entry using cron syntax, and you’re done. You can do this all via the command line with no need to write any JSON or YAML. Also, the GCP scheduler can run jobs in another region, so you can have all the schedules run in the same region while the tasks themselves run in their own regions. Easy to script in a shell.</p><p>In AWS, you need four JSON files, sed, jq, and other tools, and you need to set up IAM roles &amp; policies. It is <em>not</em> easy to script in bash, but I did it. I’m not proud of that. Please don’t judge.</p><p>You cannot use Lambda to run these tracers for two reasons: The mtr python module requires the mtr binaries to be installed, so it can’t be done as a pure python function, and you can’t use lambda’s container runtime because AWS does not give the containers the capability to open raw sockets (which are needed for ICMP-based traceroutes). Had we been able to use Lambda this would have been much easier.</p><p>Instead, in AWS, they really want you to use their new scheduler. Which I can’t do, since that service is in a limited number of regions. So I ended up using EventBridge events, which are in every region (and actually require less JSON).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZD6PwJK2yRiuwC3TBWM-7A.png" /><figcaption>I asked what specific security reasons, and was told that was confidential</figcaption></figure><p>Now, in Azure, it turns out you cannot send outbound ICMP ECHO requests. They say it is for “security” but this makes zero sense to me. Using TCP or UDP traceroute doesn’t get us as much useful data as we don’t see the routers between the datacenter and target IP, and most target IPs aren’t listening on whatever port we are trying to connect to, leaving us with no data. This latter problem kills the usefulness of tracerouting to Azure — in practice, with TCP traceroute we only get responses from 7–10% of the target IPs. So, no Azure in the map.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e6245278e71b" width="1" height="1" alt=""><hr><p><a href="https://innerjoin.bit.io/exploring-cloud-datacenter-latency-e6245278e71b">Exploring Cloud Datacenter Latency</a> was originally published in <a href="https://innerjoin.bit.io/">The Inner Join</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Best Stuff in Data, 2022]]></title>
            <link>https://innerjoin.bit.io/best-stuff-in-data-2022-f517981096d4?source=rss-fc1d9ed7195d------2</link>
            <guid isPermaLink="false">https://medium.com/p/f517981096d4</guid>
            <category><![CDATA[best-of-2022]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[postgres]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Adam Fletcher]]></dc:creator>
            <pubDate>Fri, 16 Dec 2022 14:47:47 GMT</pubDate>
            <atom:updated>2022-12-19T20:01:05.165Z</atom:updated>
            <content:encoded><![CDATA[<figure><a href="https://bit.io/?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=best-data"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Amh-HhPp6RrxY5okhNcnzQ.png" /></a></figure><p>We had a big year in data. At <a href="https://bit.io/?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=best-data">bit.io</a>, we launched <a href="https://innerjoin.bit.io/introducing-pgsqlite-a-pure-python-module-to-import-sqlite-databases-into-postgres-bf3940cfa19f">pgsqlite</a> and <a href="https://bit.io/?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=best-data">serverless Postgres</a>. But we aren’t the only ones who shipped cool stuff in 2022. From the <a href="https://bit.io/?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=best-data">bit.io</a> team, here is the best stuff in data this year (that we didn’t build ourselves).</p><h4><strong>Huge diversity in storage engines in Postgres and other databases</strong></h4><p>There used to be just the storage engine that shipped with Postgres or MySQL, but now there are a ton of options for your storage engine, so you can match your storage engine to your data. Got columnar data and want to use Postgres? No problem — Alloy it is. Want a modern general purpose storage engine? Try Oriole! Timeseries? Timescale! We’re in a golden age of new Postgres database storage engines and I love it.</p><p><em>Why it’s cool: </em>Postgres is super stable, and that’s a big part of the appeal. You don’t want your database to have <em>any</em> reliability issues. That said, the nature of the hardware the database runs on and the nature of how we use RDBMs has changed since Postgres came out, and what was optimal in the past is no longer optimal now. Even some of the core assumptions — fsync actually syncs to the hardware, for example — can no longer be assured. It’s cool that the open source and commercial communities have stepped up to make sure Postgres keeps up with the change in hardware and the changing use cases for Postgres.</p><p>— <a href="https://twitter.com/WriteAheadLog"><em>Adam</em></a><em>, CEO</em></p><h4><strong>Changes afoot in AI</strong></h4><p>This year we saw <a href="https://the-decoder.com/openais-chatgpt-breaks-user-records-see-these-11-great-demos/">chatGPT</a>, <a href="https://stability.ai/blog/stable-diffusion-v2-release">stable diffusion</a>, and GitHub <a href="https://github.com/features/copilot">Copilot</a> and all have gotten marked adoption by technical and non-technical folks. Last year we saw GTA5 encoded directly into a neural network. The advances are accelerating and what we see this year is a big change from the early days of toy chat AIs or ML applied to very specific image recognition tasks (e.g., plant identification).</p><p><em>Why it’s cool: </em>These technologies show that AI will become an incredible force multiplier to existing technical users and will open up access to traditionally technical tasks to non-technical people. Very exciting — a lot is going to change and not even ChatGPT can predict how.</p><p><em>— Jonathan, CTO</em></p><h4><a href="https://julialang.org/blog/2022/02/10years/"><strong>Ten-Year Anniversary of the Julia Programming Language</strong></a></h4><p>Julia, a language built with the ambition to have “the speed of C with the dynamism of Ruby” and to be “as usable for general programming as Python, as easy for statistics as R” celebrated its 10th anniversary earlier this year.</p><p><em>Why it’s cool: </em>Julia isn’t slowing down. Data teams <a href="https://juliahub.com/#:~:text=JULIA%20USERS%20AND%20JULIAHUB%20CUSTOMERS">are using it</a>. We’ve used it in some of our Inner Join posts. It’s getting <a href="https://www.tiobe.com/tiobe-index/">more popular</a>. This is a language built from the ground up for data-intensive scientific computing, and its future looks exciting.</p><p><em>— </em><a href="https://twitter.com/danjliden"><em>Daniel</em></a><em>, Data Scientist</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*0wTpChy_b3P7f1YD.png" /><figcaption><em>AdaTest consists of two loops: a testing loop that generates and organizes tests optimized for the model being tested (the target model) and a debugging loop that iteratively refines the model based on test failures. (credit: </em><a href="https://www.microsoft.com/en-us/research/blog/partnering-people-with-large-language-models-to-find-and-fix-bugs-in-nlp-systems/?OCID=msr_blog_AdaTest_TW"><em>Microsoft</em></a><em>)</em></figcaption></figure><h4><a href="https://www.microsoft.com/en-us/research/blog/partnering-people-with-large-language-models-to-find-and-fix-bugs-in-nlp-systems/?OCID=msr_blog_AdaTest_TW"><strong>AdaTest: Semi-Automated NLP Debugging</strong></a></h4><p>AdaTest uses large language models to generate NLP model test suites in collaboration with a human curator. In the “inner” debug loop, the developer guides the model through a semi-automated process generating test cases. In the “outer” debug loop, the developer improves their application model to pass the new tests.</p><p><em>Why it’s cool: </em>Fully-automated processes get a lot of buzz, but the researchers behind AdaTest have thought a lot about how humans can maximize their leverage by collaborating with automation.</p><p><em>— Andrew, Software Engineer</em></p><h4><a href="https://www.oreilly.com/radar/sql-the-universal-solvent-for-rest-apis/"><strong>Steampipe: Query APIs conveniently via SQL</strong></a></h4><p>Steampipe is an ever-growing open-source project that aims to add a common, easy to use SQL interface to many commonly used REST APIs, in addition to cloud resource and logging APIs (and much more!).</p><p><em>Why it’s cool: </em>Steampipe lets you query for all sorts of crucial business data quickly and easily, and makes cross referencing that data from your terminal a breeze. And since Steampipe uses SQL, you don’t have to “learn” different syntaxes and tools for your different cloud providers, social media accounts, and monitoring platforms. Steampipe uses Postgres under the hood, too!</p><p><em>— Steve, Software Engineer</em></p><h4><a href="https://arrow.apache.org/blog/2022/02/16/introducing-arrow-flight-sql/"><strong>Arrow Flight SQL</strong></a></h4><p>A new client-server protocol developed by the Apache Arrow community for interacting with SQL databases that makes use of the Arrow in-memory columnar format and the Flight RPC framework.<br><em>Why it’s cool:</em> If it’s adopted, it could allow databases to use a much higher throughput client/server protocol than the ones traditionally used in RDBMSs. Also the fact that it ships with Arrow means that applications can just use Arrow as a serialization format without having to use yet another language specific object serialization format. Then again…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*rXnpoxNmCt90tY4_.png" /><figcaption>credit: <a href="https://xkcd.com/927/">xkcd</a></figcaption></figure><p><em>— George, Senior Software Engineer</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f517981096d4" width="1" height="1" alt=""><hr><p><a href="https://innerjoin.bit.io/best-stuff-in-data-2022-f517981096d4">Best Stuff in Data, 2022</a> was originally published in <a href="https://innerjoin.bit.io/">The Inner Join</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Benchmarking Autoscaling Postgres]]></title>
            <link>https://innerjoin.bit.io/benchmarking-autoscaling-postgres-66d3c16266d?source=rss-fc1d9ed7195d------2</link>
            <guid isPermaLink="false">https://medium.com/p/66d3c16266d</guid>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[saas]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[postgres]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Adam Fletcher]]></dc:creator>
            <pubDate>Wed, 26 Oct 2022 15:04:59 GMT</pubDate>
            <atom:updated>2022-10-26T15:04:59.689Z</atom:updated>
            <content:encoded><![CDATA[<figure><a href="https://bit.io/?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=autoscale"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sfHgm2k2m9kbrmI32hTA2Q.png" /></a><figcaption><em>Scaling a bit.io database from 0 to more than 20,000 TPS</em></figcaption></figure><p>Today, <a href="https://bit.io/?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=autoscale">bit.io</a> enabled powerful autoscaling functionality that allows all of our pro and enterprise tier <a href="https://bit.io/?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=autoscale">serverless postgres databases</a> to handle tens of thousands of TPSs across thousands of connections. We wanted all databases on <a href="https://bit.io/?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=autoscale">bit.io</a> to be blazing fast under any load. To reach this goal, we had to pressure test <a href="https://bit.io/?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=autoscale">bit.io</a> databases and the new autoscaling functionality and be able to observe the results.</p><p>This isn’t as easy as it may sound. “Pressure testing” can mean a lot of different things, and optimizing for the wrong metrics can have serious performance consequences. The tools for measuring postgres performance aren’t entirely straightforward, either, and the results can easily lead careless users astray.</p><p>One of the things we really wanted to be sure our autoscaling could accomplish is high throughput as measured by TPS (transactions per second). We absolutely needed our system to scale up to 20,000 TPS with &lt; 50ms transaction latency. To make sure it could get there, we needed a benchmark. We turned to <a href="https://www.postgresql.org/docs/current/pgbench.html">pgbench</a>, which “runs the same sequence of SQL commands over and over, possibly in multiple concurrent database sessions, and then calculates the average transaction rate (transactions per second).”</p><p>This sounds great — but the postgres docs <a href="https://www.postgresql.org/docs/current/pgbench.html">caution</a> that “It is very easy to use pgbench to produce completely meaningless numbers.” And we needed to be sure the benchmark simulated the kinds of real-world conditions the new autoscaling capability would have to handle.</p><p>In this post, we’ll describe how we set up the pgbench benchmark to push the autoscaling system to the limits — and we’ll discuss the results (Spoiler: the new functionality was more than capable of keeping up with the load.).</p><h3>Getting Started: Goals and Environment</h3><p>When load testing, defining goals is critical. The best way to do that is to understand the expected workload. High throughput is what we went with, but it isn’t the only goal we could have chosen. We may, for instance, have been interested in how the autoscaling system handles sudden changes or spikes in usage or shifts in the ratio of database reads/writes.</p><p>It pays to be explicit when defining goals. We chose the goal of supporting 20,000 TPS because this significantly exceeds the maximum load of our current users and we want to make sure new and existing users have a lot of room for growth. We could have just said “go fast” or “handle lots of load” — but what is “fast” and what is “lots of load”? We couldn’t know whether we’d achieved our throughput goals without putting numbers behind them.</p><p>It’s also important to properly set up a testing environment. There are two key components to this environment: the database server (which receives traffic) and the load generator (which runs pgbench and applies load to the database server). One potential pitfall is underprovisioning the load generator: a load generator with insufficient RAM and CPU cores may cause a bottleneck. In some cases, it makes more sense to use multiple load generators instead of just one.</p><p>It helps to have the load generators as close to the database under test as possible — ideally in the same network/VPC. First, keeping the load generators and database close drastically reduces network latency/speed of light latency. Second, close physical proximity mitigates the effects of slower network links that may lie in the path between the load generator and the database server. Third, latency results are more reliable as they are less likely to be impacted by network issues.</p><p>Our load generators were set up in the same cloud project as our Kubernetes cluster to minimize the network hops between the load generators and the load balancer for our service. This way, we avoided the unpredictable latency seen on the internet at large.</p><h3>Using pgbench</h3><p>We have a goal, and we have a test environment. Now comes the fun part: putting the database under load and seeing how it performs. As mentioned above, we used pgbench for benchmarking our autoscaling system. The default “TPC-B-like” benchmark essentially tries to run as many transactions as possible as quickly as possible against a set of tables generated by pg_bench (figure 1). Note that the row counts indicated in figure 1 correspond to a scale factor of 1 (more on scale below).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_A6j9Tm5kw4PM1ds" /><figcaption><strong><em>Figure 1: </em></strong><em>Number of rows in the test tables built by pgbench with a scale factor of 1.</em></figcaption></figure><p>There are many pgbench configuration options, but we stuck to a few basic ones:</p><ul><li><strong>Scale:</strong> how large the tables are</li><li><strong>Clients:</strong> how many connections to make</li><li><strong>Threads:</strong> how many load creation threads to use</li></ul><h3>Scale</h3><p>The “scale” pgbench option (the -s option to pgbench -i) determines the amount of data involved in the benchmark: the numbers of rows in each of the tables shown in figure 1 are multiplied by the “scale” option. It is important to have enough data to be representative of a real database, but figuring out a) what a “real” database looks like and b) what that means in terms of pbench’s scale option is tricky.</p><p>It’s easy to set the scale option in such a way as to generate misleading results. A low scale with many database connections may result in situations where many clients try to update the same table row, leading to lock contention and artificially deflated throughput.</p><p>Setting a very high scale, on the other hand, will prevent lock contention but result in a lot of time spent hitting the disk on the target server, possibly more than might be realistic, again artificially deflating throughput.</p><p>The problem goes the other way, as well. Real workloads <em>do</em> sometimes result in lock contention and time waiting on disk I/O. It’s tempting to look for the scale option that maximizes the metric of interest, but this scale is unlikely to best reflect the real-world workflow of interest.</p><p>The <a href="https://www.postgresql.org/docs/current/pgbench.html">pgbench docs</a> state that scale “should be at least as large as the largest number of clients you intend to test (-c); else you’ll mostly be measuring update contention.” In practical testing, we found that following this recommendation still resulted in more lock contention than we wanted in this particular test, so we set the scale option to 1.25 times the number of clients.</p><h3>Threads and Clients</h3><p>Picking good values for threads and clients is a bit simpler. First, threads should match the CPU count on the load generation machine. Clients should match the number of concurrent connections expected on the database server (if more than one load generating machine is used, the clients should be split among those machines in a ratio that reflects the number of threads on each load generating machine).</p><h3>Running the Benchmark</h3><p>Actually running the benchmark was not 100% straightforward: we ran pgbench until the point of saturation — that is, until the database server could not support more TPS at our target latency. This triggered the autoscaling mechanism, which resulted in a brief drop in the connection which terminated the benchmark. After each time this occurred, we re-started pgbench with a higher load (higher TPS and more connections).</p><p>We ran the benchmark until we hit our target of 20,000 TPS. Note that, for the purposes of this benchmark, we disabled WAL archiving. However, as seen in figure 2, we did <em>not</em> disable <a href="https://www.postgresql.org/docs/current/routine-vacuuming.html#AUTOVACUUM">autovacuuming</a>, a routine automated database maintenance process that, among other things, recovers disc space from updated and deleted table rows, resulting in the brief drops in TPS seen in the results.</p><h3>Results</h3><p>The <a href="https://bit.io/?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=autoscale">bit.io</a> database we ran the benchmark on scaled from 0 to more than 20,000 TPS with no intervention required from the user (figure 2). Recall that pgbench runs a sequence of queries against the database as fast as possible. As the TPS increased, so too did the number of CPU cores used by the database server, enabling it to handle the increased load — automatically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZO1J6lOHTODsB6-IswsKhQ.png" /><figcaption><strong><em>Figure 2: </em></strong><em>Increasing load triggered the bit.io autoscaling mechanism, enabling the database to exceed our goal of 20,000 TPS with &lt; 50ms latency.</em></figcaption></figure><p>This benchmark and others like it give us a lot of confidence in our autoscaling capabilities because we set them up to reflect various challenging real-world usage scenarios. For context, on October 24, 2022, <a href="https://www.nasdaqtrader.com/Trader.aspx?id=DailyMarketSummary">Nasdaq</a> processed 30,293,529 trades, or 1,295 trades per second. From June 2021-June 2022, <a href="https://usa.visa.com/dam/VCOM/global/about-visa/documents/aboutvisafactsheet.pdf">Visa</a> averaged about 8,100 transactions per second. These aren’t exactly the same measures, but they should give a sense of scale: 20,000 TPS is <em>a lot</em>.</p><h3>Some Notes on Postgres Benchmarking</h3><ul><li>There are many other Postgres benchmarking tools available, and they can run a wide variety of benchmarks. We recommend starting with pgbench because it ships with postgres, it is easy to start using, and there are all kinds of great guides online on how to use it.</li><li>We did not see much difference in using pgbench’s TPC-B-like benchmark versus other benchmarks when benchmarking bit.io, but your experience will depend on your specific use case and configuration.</li></ul><p>If benchmarking and all of the above seem like a huge pain, just use <a href="https://bit.io/?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=autoscale">bit.io</a>! As we showed, <a href="https://bit.io/pricing?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=autoscale">bit.io pro and enterprise</a> databases will scale up and down to meet your database’s workload. You don’t need to know anything about pgbench and resource consumption and postgresql.conf values; we take care of all of that automatically.</p><p>More importantly, our <a href="https://bit.io/pricing?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=autoscale">pricing model</a> hasn’t changed. Pricing is based on the number of rows read, not on the server resources. To be clear: the price per row queried stays the same even when the autoscaling system increases the database server resources. <a href="https://bit.io/pricing?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=autoscale">Sign up for bit.io pro or enterprise</a> and give it a try!</p><p>Co-authored with <a href="https://medium.com/u/450a3b16aa2e">Daniel Liden</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=66d3c16266d" width="1" height="1" alt=""><hr><p><a href="https://innerjoin.bit.io/benchmarking-autoscaling-postgres-66d3c16266d">Benchmarking Autoscaling Postgres</a> was originally published in <a href="https://innerjoin.bit.io/">The Inner Join</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[bit.io Launches Serverless Postgres]]></title>
            <link>https://blog.bit.io/bit-io-launches-serverless-postgres-4db33ef4a2cc?source=rss-fc1d9ed7195d------2</link>
            <guid isPermaLink="false">https://medium.com/p/4db33ef4a2cc</guid>
            <category><![CDATA[saas]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[postgres]]></category>
            <category><![CDATA[launch]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Adam Fletcher]]></dc:creator>
            <pubDate>Wed, 26 Oct 2022 14:55:47 GMT</pubDate>
            <atom:updated>2023-03-20T15:59:50.898Z</atom:updated>
            <content:encoded><![CDATA[<figure><a href="https://bit.io/?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=serverless-launch"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-weqhPs077UEM8tfYzPDaA.png" /></a></figure><p>Today, we launched <a href="https://bit.io/?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=serverless-launch">serverless Postgres</a>! Honestly, it’ll take you less time to just <a href="https://bit.io/?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=serverless-launch">try it out yourself</a> than it will to read this blog post — you can do that <a href="https://bit.io/?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=serverless-launch">here</a> — but our marketing team says that’s “not how you launch a product.” So, here’s a little more on what <a href="https://bit.io/?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=serverless-launch">serverless Postgres</a> is, what you can do with <a href="https://bit.io/?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=serverless-launch">bit.io</a>, and how this launch fits into the bigger picture of what we’re building.</p><p>But first, if you’re new to us, here’s a quick intro to the product.</p><p><a href="https://bit.io/?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=serverless-launch">bit.io</a> is the fastest way to get a database. It takes one click to launch a new database, or you can drag-and-drop a local file to spin up a cloud database in seconds. From there, you can query using SQL with your favorite language or BI tool, or even right from your browser.</p><figure><a href="https://bit.io/?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=serverless-launch"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o5L_2y4mTJOQrhyb6TzWQQ.gif" /></a></figure><p>We launched <a href="https://bit.io/?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=serverless-launch">bit.io</a> as a Postgres database with drag-and-drop data ingestion. This reduced time-to-database to literally seconds and set the bar for how committed we are to ease of use. Since then, we’ve constantly increased our coverage of supported Postgres functionality; added dozens of integrations with popular data tools and programming languages; developed best-in-class online database sharing and permissions capabilities; and offered a transparent <a href="https://bit.io/pricing?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=serverless-launch">usage-based pricing model</a>.</p><h3><strong>What is serverless Postgres</strong></h3><p><a href="https://bit.io/?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=serverless-launch">Serverless Postgres</a> is actually a misnomer. We still use servers — you just never have to think about them.</p><p><a href="https://bit.io/?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=serverless-launch">bit.io serverless Postgres</a> makes the whole process of working with data even easier by handling all the work it takes to run a Postgres database automatically. No need to manage, deploy, scale, or secure your database. Our databases automatically scale up and down with demand. We add resources to keep your queries performing regardless of load — from zero to thousands of TPS — with no manual intervention required.</p><figure><a href="https://bit.io/?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=serverless-launch"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8uIZPhDoOGsmbUTJZJXHmg.png" /></a></figure><p>Serverless lets us charge around usage rather than over provisioning. You can learn more about our pricing <a href="https://bit.io/pricing?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=serverless-launch">here</a>. The long and short of it: it’s flexible based on your needs without any upfront investment. And, it’s a <em>lot</em> cheaper than other cloud-based data platforms.</p><p>Going serverless also gives users the ability to share data or make databases public without worrying about cost. Once you’ve shared a database, it costs you nothing when other users query against it. You only pay for the value you get — no paying for resources like CPU/RAM/etc. that you aren’t using. This incentivizes collaboration and sharing public data — it literally doesn’t cost you anything to share your work. Autoscaling ensures that performance stays high, regardless of how many queries the database is getting.</p><p>Getting to similar outcomes with legacy products requires a lot more overhead, both in terms of cash and engineering time to set it up and manage complexity. And, they don’t address the sharing problem. With bit.io, you can go from data to query to sharing in minutes, the same way you can create and share a Google Doc, without making a single support ticket.</p><h3><strong>What it means for bit.io</strong></h3><p>Our vision in launching this company two years ago was to make data easy to share and collaborate on. Launching serverless Postgres is one big step in getting us there. With the addition of autoscaling, <a href="https://bit.io/?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=serverless-launch">bit.io</a> becomes the only <a href="https://bit.io/?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=serverless-launch">shareable serverless Postgres database</a> on the market and generally available today. (Waitlists don’t count.)</p><p>While we’re the first, we don’t anticipate being the only for long. Luckily, while we’re incredibly proud of <a href="https://bit.io/?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=serverless-launch">serverless Postgres</a>, spinning up a serverless database is only step one in working with data on <a href="https://bit.io/?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=serverless-launch">bit.io</a>. Other functionality includes:</p><ul><li><strong>One-Click Postgres: </strong>Users can single-click to get an empty database, or simply or drag and drop a sqlite, XLS, CSV, or JSON file to get a populated, typed, Postgres database. No sign-up is required.</li><li><strong>One-Click Sharing:</strong> Users can add collaborators, make databases public, or share a link to their private repository with specific access levels.</li><li><strong>Web-Based SQL Editor: </strong>Use a secure browser to edit and collaborate on a database with the full feature set of <a href="https://bit.io/?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=serverless-launch">bit.io</a> and Postgres.</li><li><strong>Hundreds of Integrations:</strong> If it supports Postgres, we support it — including all major programming languages, data science notebooks, BI tools such as Tableau and PowerBI, and ETL tools such as Airbyte, Airflow, and Dagster.</li><li><strong>Secure by default:</strong> We went long <a href="https://innerjoin.bit.io/the-majority-of-postgresql-servers-on-the-internet-are-insecure-f1e5ea4b3da3">here</a> on why that matters, but the long and short of it is, your data is secure without you having to do anything about it.</li><li><strong>High-availability by default:</strong> We’ve always been fast, but now we’re faster. We continue to make improvements on speed and performance, with high availability included by default.</li></ul><p>We’re built for SaaS and low code/no code. Since we launched our private beta in 2021, we’ve reached 15,000 users, with users creating more than 30,000 Postgres databases. Developers for companies including Ford, Visa, NHS, P&amp;G, and Morgan Stanley used <a href="https://bit.io/?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=serverless-launch">bit.io</a> for OLTP workloads, building web applications, low-code/no-code backends, data analysis, and mobile applications.</p><h3><strong>What we need from you</strong></h3><p><strong>Import data!</strong> Seriously, you don’t even have to sign up (but it’d be cool if you did). Our free tier covers three databases and querying billion rows, no credit card required. Sign up for Pro and Enterprise for our new serverless Postgres functionality.</p><p><strong>Tell us what you’re working on.</strong> <a href="/service/mailto:support@bit.io">Email us</a> or tweet us <a href="https://twitter.com/bitdotioinc">@bitdotioinc</a> to talk to us about your projects and what we can do to help.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4db33ef4a2cc" width="1" height="1" alt=""><hr><p><a href="https://blog.bit.io/bit-io-launches-serverless-postgres-4db33ef4a2cc">bit.io Launches Serverless Postgres</a> was originally published in <a href="https://blog.bit.io/">bit.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing pgsqlite: a pure python module to import SQLite databases into Postgres]]></title>
            <link>https://innerjoin.bit.io/introducing-pgsqlite-a-pure-python-module-to-import-sqlite-databases-into-postgres-bf3940cfa19f?source=rss-fc1d9ed7195d------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf3940cfa19f</guid>
            <category><![CDATA[database]]></category>
            <category><![CDATA[postgres]]></category>
            <category><![CDATA[sqlite]]></category>
            <dc:creator><![CDATA[Adam Fletcher]]></dc:creator>
            <pubDate>Thu, 22 Sep 2022 02:46:06 GMT</pubDate>
            <atom:updated>2022-09-22T02:50:05.101Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/883/1*vTyoB1CntM_3aWDEHoybIQ.gif" /></figure><p>SQLite is the most <a href="https://www.sqlite.org/mostdeployed.html">popular database in the world</a>. Native support for SQLite in Python makes SQLite a popular database to start a project with, with most projects eventually needing to migrate to a database they can deploy on the network. That migration is challenging, as the databases themselves don’t support importing other database formats.</p><p>Until today. <a href="https://bit.io/?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=pgsqlite">bit.io</a> now supports importing SQLite files into our serverless Postgres — just drag &amp; drop the sqlite file onto <a href="https://bit.io/?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=pgsqlite">bit.io</a> and you’ve got a Postgres database. You get all your tables, columns, indexes, keys, &amp; data in Postgres, saving you a ton of time and hassle. I made this happen via a small python module bit.io is open sourcing called <a href="https://github.com/bitdotioinc/pgsqlite">pgsqlite</a> — a pure python module &amp; command line tool that makes it simple to migrate SQLite to Postgres.</p><p>Naively, I thought this would be easy. Hey, they’re structured data, well documented, easy to implement, with plenty of existing libraries to use. It was just a simple matter of programming. Plus, there’s prior art, <a href="https://pgloader.io/">pgloader.io</a>, which is a command line tool &amp; LISP library that can import a variety of formats into Postgres. Unfortunately, pgloader wouldn’t work for me as I needed a python module to use in our python-heavy stack. That said, pgloader exists, and there’s tons of libraries for working with Postgres and SQLite. I thought this would be a quick weekend project.</p><p>Here’s how and why I was wrong.</p><p>I had a few issues to overcome: types, identifier quoting, SQL language differences, and SQLite’s far more forgiving SQL parsing. I’ll go through each one and discuss the issues, solutions, and compromises made to build pgsqlite. I<strong>n general, I take a philosophy of don’t change any of the source data if I cannot preserve the original meaning; instead, error out and tell the user what went wrong</strong>.</p><p>The end result is <a href="https://github.com/bitdotioinc/pgsqlite">pgsqlite</a>, a pure python module &amp; command line tool that makes it simple to import a SQLite database into Postgres, hopefully saving you a ton of time and hassle.</p><p>Here’s how I built pgsqlite.</p><h3>Typing Differences</h3><p>First, SQLite and Postgres use different types. For example, SQLite has a type (well, an affinity) called NVARCHAR which Postgres doesn’t have, and there’s a few others such as AUTOINCREMENT(SQLite) which is SERIAL in Postgres. I use the parse/transpile feature of the excellent <a href="https://github.com/tobymao/sqlglot">sqlglot</a> module to handle type conversion.</p><p>sqlglot takes care of changing the column definition’s type, but it doesn’t handle the differences in what literal values are allowed in each type in Postgres vs. the same in SQLite.</p><p>In SQLite, the number 1and the number 0are valid values in a BOOLEAN column, but in Postgres they are not. In other words, the SQL to create a table may be the same in SQLite and Postgres:</p><pre>CREATE TABLE foo (<br>  bar BOOLEAN,<br>);</pre><p>But the data stored in bar may be different and incompatible! In sqlite it could be integer values 1or 0but in Postgres it would be the ASCII characters &#39;1&#39; and &#39;0&#39;. Or null, if your column allows that. I got burned by this on the very first test database I tried to convert. It’s not a simple fix, either, since we’re talking about the actual <em>data</em> in the rows.</p><p>In <a href="https://github.com/bitdotioinc/pgsqlite">pgsqlite</a>, I handle this by adding transformer hooks so that when I am writing the data to Postgres I can examine the literal data in that column &amp; row and transform that data per any rules in the transformer for that column type. This slows the importing down a bit but is required to maintain the semantic meaning of the data while complying with the constraints of Postgres.</p><p>But even trickier, SQLite will try to convert any data given to the column’s data type, but if it cannot, sqlite will insert a string of that data. This lax enforcement of types can be an issue with strings as well, specifically, it can be an issue with the empty string &#39;&#39;. Should this be a NULL or should it be an empty string? In a more strict RDBMS, NULL is the literal ASCII null value when used in string columns — that is, \0. And in some programming languages a programmer may insert &#39;&#39;thinking it will be NULL in the database (and the library may make it so), but in SQLite it’ll end up as an empty string.</p><p>In pgsqlite, I assume that an empty string is a NULL value in any none-string-typed column that allows NULLvalues. For string-typed columns (TEXT, VARCHAR, etc), I insert whatever value SQLite gives us. This assumption may be wrong for the input database! I think it’s the right thing to do here — remember, pgsqlite takes a philosophy of “don’t change any of the source data if I don’t have to.” The user can always “fix” the data afterwards if they meant those empty strings to be null values.</p><p>Given that philosophy, another rule I have for pgsqlite is that if I find string data in a non-string column I error out. It’s safer and requires the user to deal with this data in the source database, rather than leaving the user with a potentially incorrect target database.</p><h3>Identifier Quoting</h3><p>I have a lot of experience in Postgres, and some in SQLite, but until this project I had not seen table names like [foo] and [bar] — in Postgres you’d use double quotes (and you can in SQLite). I ran into this problem in the <em>second</em> database I tried to import with pgsqlite. This database was based on the MS Access classic Northwinds example database and used the square bracket notation, which I had never encountered before. On what was maybe the fourth or fifth database I tried, I ran into identifiers surrounded by backticks — this is also totally valid in SQLite.</p><p>Identifiers also don’t have to be quoted at all. In Postgres, identifiers like table names, database names, etc, are limited in their length (a system setting) and in the characters you can use in the identifier, unless you surround the identifier in double quotes. If you use double quotes you can use <em>anything</em> that isn’t the ASCII NULL value or the closing quote (unless you escape it with another double quote. It’s quotes all the way down.)</p><p>This is a problem for many Java applications where the application’s author assumes you can create a JDBC URL by concatenating the database name to the end of the URL without URL encoding the database name. You <em>must</em> URL encode the database name, since quoted identifiers in Postgres can and do contain non-URL safe characters.</p><p>The fix for this was pretty simple — I replace the unsupported quoting characters with double quotes in the schema SQL — but this solution is fragile. In the future, I plan to move to sqlglot’s transpiler function to make this far more robust.</p><h3>Forgiving SQL Parsing</h3><p>SQLite is also okay with syntax errors in some SQL statements, while Postgres (and sqlglot!) are not.</p><p>For example, this is a valid create table command in SQLite:</p><pre>CREATE TABLE Customer_Ownership(<br>  customer_id INTEGER NOT NULL,<br>  vin INTEGER NOT NULL,<br>  purchase_date DATE NOT NULL,<br>  purchase_price INTEGER NOT NULL,<br>  warantee_expire_date DATE,<br>  dealer_id INTEGER NOT NULL,<br>  FOREIGN KEY (customer_id) REFERENCES Customers(customer_id),<br>  FOREIGN KEY (vin) REFERENCES Car_Vins(vin),<br>  FOREIGN KEY (dealer_id) REFERENCES Dealers(dealer_id)<br>  PRIMARY KEY (customer_id, vin)<br>);</pre><p>Notice that it is missing a comma at the end of the second to last line. SQLite is happy to parse this statement with no issues, and it’ll even give this syntactically-incorrect SQL back to you when you ask for the create table SQL via .schema.</p><p>My compromise here is to simply error out. I can’t automatically fix all the syntax errors in the schema, so pgsqlite errors out and returns to the user the error.</p><h3>Tradeoffs &amp; Consequences</h3><p>You really can’t just take the output of sqlite’s schema and run it on a Postgres database. You need to:</p><ul><li>Map types from their native SQLite to Postgres types</li><li>Decide what to do about NULLs on a per-type basis, recognizing that you may then need to modify the actual data in the database as you move it from SQLite to Postgres</li><li>Decide what to do about BOOLEAN literals</li><li>Find any type issues in VIEWs, TRIGGERs, CHECKs, etc, and fix them</li><li>Decide how to deal with syntax issues that SQLite accepts but Postgres does not accept</li><li>Copy the data over and hope that no value is a string when it shouldn’t be</li></ul><p>In pgsqlite, I made the following tradeoffs:</p><ul><li>BOOLEAN literals that are the integer 1, 0 in sqlite is turned into the ASCII characters ‘1’, ‘0’ when being inserted into Postgres.</li><li>Empty strings are turned to NULL in any column that doesn’t have a not-null constraint.</li><li>CHECK, TRIGGER, and VIEW are not yet implemented. I’ve a path to this, using sqlglot to extract the parse tree and then find any literals, match them to their column definitions, and do a translation as needed.</li><li>AUTOINCREMENT is replaced with SERIAL, with the consequence being that pgsqlite assumes the 4-byte version of SERIAL.</li><li>Throw an error when the SQL for the schema has a syntax error, with the consequence being that the import doesn’t work.</li><li>Throw an error when the row has data of the wrong type in a column and pgsqlite doesn’t have a translation function that can map that type to the Postgres column type with the consequence being that the import doesn’t work.</li></ul><p>These tradeoffs (aside from the VIEW/CHECK/TRIGGER one) seem reasonable for the sqlite databases I’ve seen so far.</p><p>You get all your tables, columns, keys, indexes, and data, and soon you’ll get your views, triggers, and checks.</p><h3>Try it today!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uOT92Gwk-eWic-VvBCK-lg.gif" /></figure><p>Ingestion of SQLite files into <a href="https://bit.io/?utm_source=medium&amp;utm_medium=blog&amp;utm_campaign=pgsqlite">bit.io</a> is in beta now. There’s no indication yet on the site you can do this, but you can! Please reach out with any problems.</p><p>Huge thanks to the authors of <a href="https://pgloader.io/">pgloader.io</a>, <a href="https://github.com/simonw/sqlite-utils">sqlite-utils</a>, and <a href="https://github.com/tobymao/sqlglot">sqlglot</a>. All of these were tremendously helpful in building pgsqlite.</p><p>Interested in contributing to <a href="https://github.com/bitdotioinc/pgsqlite">pgsqlite</a>? I want all your issues and pull requests!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf3940cfa19f" width="1" height="1" alt=""><hr><p><a href="https://innerjoin.bit.io/introducing-pgsqlite-a-pure-python-module-to-import-sqlite-databases-into-postgres-bf3940cfa19f">Introducing pgsqlite: a pure python module to import SQLite databases into Postgres</a> was originally published in <a href="https://innerjoin.bit.io/">The Inner Join</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[bit.io’s values, and why we set them early]]></title>
            <link>https://blog.bit.io/bit-ios-values-and-why-we-set-them-early-94de51065cd?source=rss-fc1d9ed7195d------2</link>
            <guid isPermaLink="false">https://medium.com/p/94de51065cd</guid>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[values]]></category>
            <category><![CDATA[company-culture]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Adam Fletcher]]></dc:creator>
            <pubDate>Tue, 26 Oct 2021 17:22:23 GMT</pubDate>
            <atom:updated>2021-10-26T17:22:23.637Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P2kdlBuyy_-TjSuCelk6Hg.png" /><figcaption>No, not those kind of values</figcaption></figure><p>In case it wasn’t obvious from our previous blog posts on how we work at bit.io, we believe in codifying what’s important to us. My co-founder Jonathan and I are building a company around instant productivity with data, so it’s internally consistent that we whiteboard everything and set regular cadences to evaluate performance (we are fun at parties, I promise).</p><p>We brought this intentionality to our initial partnership during founder dating to make sure our own values and concepts of what a functional company is were aligned. From there, we identified six core values as the bedrock of our culture (using a complex numerical system to rank the top candidates, of course).</p><blockquote>At bit.io, we are outcome-oriented, scientific, curious, respectful, resilient, and inclusive.</blockquote><p>We decided to set our values as a team of two because these are things we think about anyway. Before we even had a product or formal partnership, we thought about what kind of company we wanted to build. Writing our values down early ensured we were making our all-important early hires with value alignment in mind and set a system of accountability for leadership. As leaders, if we aren’t living our values, then they aren’t our values, just window dressing on our website.</p><h4><strong>How we use our values</strong></h4><p><strong>Decision-making.</strong> We use our values as a lens through which to see problems. Some decisions are easy, like choosing a service that does applicant phone screening blind over one that doesn’t. For others, though, our choices can put our values in direct competition with each other. This tension is healthy. It requires us to better defend our decisions and explicitly identify tradeoffs.</p><p><strong>Put language to behavior.</strong> Operating with a shared value set gives us language to have difficult conversations. Luckily, we haven’t had any major issues, but even in day-to-day conversation, we reference our values to reign each other in or give ourselves a little freedom. Asking if we’re being outcome-oriented can pull meetings back on track, while curiosity gives us permission to be more creative.</p><p><strong>Accountability.</strong> We meet once a month to formally check in on each of our values. Did we model them? Did the team live up to them? We look for both positive and negative examples. We highlight the positive because it reinforces good behaviors, whereas the negative is a great place for problem solving. By checking in regularly, we can talk through problem areas before they get worse without having to gauge whether an incident meets the threshold of a meeting.</p><p><strong>Hiring.</strong> Values are set by who is hired and who is fired. In the founder’s screen, we ask questions to check for the soft skills required for a functional workplace. Some of our values, like respect, ideally should be relevant to any workplace, but others, like curiosity, are specific to our workplace. Others, like resilience, are mission-critical. Startups are in a perpetual state of crisis in the early stages. Hiring someone <em>without</em> our values would set both the company and the individual up for failure.</p><h4><strong>What’s next</strong></h4><p>As leaders, Jonathan and I talk to each other about our values a lot. But, we’re a small team and we honestly don’t expect our team to think about our values that much (right now, the co-founders are the only people managers). Aside from our check-ins, we don’t have a lot of structure around values. At this point, we don’t think that putting a ton of processes in place would meaningfully change anything. Plus, we’re busy building a product!</p><p>As we scale and start hiring people managers, though, we will need to be more intentional about communicating and measuring our values. A company’s values aren’t what the leadership purports them to be, but what the company actually says and does. We’ll collect more data points to ensure that we’re modeling and rewarding the right behavior.</p><p>As an early stage startup, it’s important that we keep focus, but I don’t see values as a distraction. Rather, values are something we do every day to maintain the health of the organization. It’s never too early to care about that.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=94de51065cd" width="1" height="1" alt=""><hr><p><a href="https://blog.bit.io/bit-ios-values-and-why-we-set-them-early-94de51065cd">bit.io’s values, and why we set them early</a> was originally published in <a href="https://blog.bit.io/">bit.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fighting COVID-19 With Data Engineering]]></title>
            <link>https://innerjoin.bit.io/fighting-covid-19-with-data-engineering-8a8cfef55a9c?source=rss-fc1d9ed7195d------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a8cfef55a9c</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[volunteering]]></category>
            <category><![CDATA[covid19]]></category>
            <dc:creator><![CDATA[Adam Fletcher]]></dc:creator>
            <pubDate>Fri, 18 Jun 2021 16:41:15 GMT</pubDate>
            <atom:updated>2021-06-22T23:12:44.195Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qGdRvFva8X2y7sGGA7IfEA.png" /></figure><p>Early in the pandemic, my co-founder Jonathan and I took a break from bit.io to work with <a href="https://www.usdigitalresponse.org/">US Digital Response</a> (USDR) to help governments with any pandemic-related data needs. Below is the story of our work; originally written in April 2020 as a summary for USDR, I wanted to post this here to encourage others to work with USDR by going in to some detail about what the works is and what the impact can be.</p><h3>RTCOVIDStatus, Pennsylvania, and Data Automation</h3><p>April, 2020</p><p>State leaders need accurate, up-to-date information about their state’s healthcare assets to make decisions that protect public safety. From tracking available beds to predicting staffing needs, data drives these decisions. The time it takes to get from collecting data to insight, though, comes at a real human cost. This was especially evident in the early stages of the COVID epidemic. We had systems producing data almost immediately, but it wasn’t easy to work with. Data collection is a tedious, manual process, and, ultimately, researchers shouldn’t be the ones collecting data anyway. It’s data engineering’s job to provide the information they need to make critical decisions. The process urgently needed streamlining. Reducing time to insight in responding to the COVID crisis can literally save lives.</p><p>Recognizing the urgency of this problem, a team of volunteers from <a href="http://usdigitalresponse.org/">US Digital Response</a> partnered with the Commonwealth of Pennsylvania to automate the collection of hospital data. Pennsylvania was already doing an excellent job of recording hospital resource data (hourly, from all hospitals, in CSV format to a central SFTP server) and reporting (via ArcGIS dashboards). However, they lacked resources and time to improve the ingestion, transformation, and analysis stages of the data lifecycle. RTCOVIDStatus, as the project was called, was able to help.</p><p>The RTCOVIDStatus team excels at the whole lifecycle of data — recording, ingestion, transformation, analysis, and reporting. We were able to help localities with any aspect of this lifecycle; in this case, we automated COVID-19-related data ingestion and processing for Pennsylvania at the state level.</p><p>The project enabled Pennsylvania to launch an online dashboard to track the number of available hospital beds and ventilators on a county-by-county basis. Access to this data saved staff dozens of hours per week. One of the core tenets of RTCOVIDStatus was to not require any additional time or intervention from healthcare workers, so those hours saved went directly back to the front lines.</p><h4>Background</h4><p>At the beginning of the COVID-19 crisis, Pennsylvania mandated that all hospitals report resource availability every hour. The resources tracked include all beds by type, PPE by type, ventilators, ECMO, NP specimen supplies, employee availability, and COVID-19-specific data, including number of patients diagnosed with or suspected of having COVID-19. PA has roughly 280 hospitals reporting this information (this number changes as temporary hospitals open or close, hospitals are renamed, and so on).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t_AggijINXAxhVvm89o6IQ.png" /><figcaption>Some of the 170+ columns of data used by PA</figcaption></figure><p>This data is reported into a master CSV file with 170+ columns and one row per hospital. The most recent file along with all historical hourly submissions are available on an FTP server.</p><p>Before RTCOVIDStatus was involved, the process the GIS team in Pennsylvania had for generating an ArcGIS report from this data was mostly manual and a time-sink. They had to manually download the latest file, apply transformations on the file (mostly column renames, as ArcGIS’ CSV parser is fragile, and fixing some incorrect latitude/longitude information), upload the file to ArcGIS by overwriting the previous CSV file, and generating a map from the CSV file. The GIS team did this a few times per day when they had free time available. As a result, the dashboard often lagged behind the data. Further, the manual process took a significant portion of a GIS engineer’s time. Instead of finding insights in the data, the engineer was busy moving data around.</p><h4>RTCOVIDStatus’s Contribution</h4><p>After discussing needs and challenges with PA’s GIS and emergency response team, RTCOVIDStatus suggested it could replace the manual process with an automated one — a high-value offering that wouldn’t interrupt the workflows of the GIS engineers. To provide that automation, the team at RTCOVIDStatus accomplished the following:</p><ol><li>Built python scripts to download the latest data from the SFTP site</li><li>Transform that data into a format which ArcGIS could parse</li><li>Upload that data into ArcGIS to be used in a dashboard</li><li>Trigger this whole flow once every 15 minutes via Google Cloud Platform’s Cloud Functions and Cloud Scheduler</li></ol><p>By automating away manual work for GIS engineers, the team freed the PA GIS engineers up to do value-added work and the automation ensured that the dashboard was always up-to-date.</p><p>The GIS team in Pennsylvania quickly followed with more requests. Since the start of our engagement, RTCOVIDStatus has:</p><ul><li>Built a historical database (in ArcGIS) of all the data gathered since the start of PA’s gathering processes</li><li>Added summary analysis tables in ArcGIS</li><li>Added county information to the hospital data</li><li>Summarized data by hospital for the public release of the dashboard</li><li>Built a database of PA hospitals, past and present</li></ul><p>The code is all open-source and available <a href="https://github.com/RTCovid/PADataIngestion">here</a>.</p><h4><strong>The Impact</strong></h4><p>Automating the data ingestion and processing saved hundreds if not thousand of human hours during the course of the pandemic. To highlight the value of our contribution, in the first month RTCOVIDStatus was live, there were 1.7 million total views of the live-updating dashboard that the (now) live-updating data underpins (‘<a href="https://patch.com/pennsylvania/lansdale/s/h2rld/pa-launches-hospital-coronavirus-preparedness-database">PA Launches Hospital Preparedness Database</a>’ announcement).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*873Ex-j6ZqCgNsAH" /></figure><p>We collaborated directly with Pennsylvania’s GIS team led by Carrie Tropasso. We cannot say enough good things about what this team has achieved over the course of the last fifteen months. Carrie’s work and guidance was critical to our effort; our team built on top of PA’s work.</p><p>Pennsylvania itself deserves praise for their overall data-driven response to COVID-19. They used current, relevant data to make public health decisions in uncertain, volatile times. Knowing what we know now, it’s hard not to think about what we could have done differently, both individually and as a global community. This partnership highlights what I want to see more of in the data community going forward: more immediate productivity with data so key stakeholders like policy makers and researchers can take decisive action that has a real impact on the world.</p><h4>[Back to Today] Some Lessons</h4><p>I don’t go into this in the original summary of work above, but I feel it’s important to mention some of the realities of working with the data that cropped up.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/357/1*txyD0EGpCzjZesfFtcu74Q.png" /><figcaption>Hospitals are more mobile than you might expect.</figcaption></figure><p><strong>Hospital data </strong>— literally the list of hospital names &amp; addresses — was surprisingly dirty. The 290+ hospitals in PA would frequently change addresses, names, and locations, and some reported data would use a different name for the same hospital. Oh, and some hospitals split county lines, and we were rolling up data by county, so the numbers would change depending on which entrance to that hospital was used in that hour’s reporting.</p><p><strong>Columns</strong> — we started this in March 2020, right when the pandemic was taking off. It was not clear to anyone what data was needed for response to the pandemic so the column counts, names, and data types were changing on a daily basis as everyone learned what data might be useful for pandemic response.</p><p><strong>Bad CSVs </strong>— as usual with CSVs, some were broken. There’s a subtle bug in the ArcGIS CSV importer where double quoted strings with certain other features would break the importer and some columns would shift in the middle of the data. We had to figure out these issues and write code to handle bad CSVs on ingestion, and push for the upstream providers to generate ArcGIS-compatible CSVs.</p><h4>Go Volunteer!</h4><p>If you’re reading this blog, you have the technical expertise to make an impact in the world around you. <a href="https://www.usdigitalresponse.org/volunteers/">Volunteering with USDR</a> or similar groups, writing open source software, even simply applying your programmer’s mindset to working on social problems can have tremendous benefits.</p><p>Today, reach out to USDR. Reach out to your local volunteer groups and take some time to listen to what their top technology problems are, and get in there and solve those problems. You’ll be happy you did.</p><p>I’d love to hear similar stories; have you used data to have a social impact? Reply below and tell me about it!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a8cfef55a9c" width="1" height="1" alt=""><hr><p><a href="https://innerjoin.bit.io/fighting-covid-19-with-data-engineering-8a8cfef55a9c">Fighting COVID-19 With Data Engineering</a> was originally published in <a href="https://innerjoin.bit.io/">The Inner Join</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Predicting The Data Industry In Five Years]]></title>
            <link>https://blog.bit.io/predicting-the-data-industry-in-five-years-b275a68bc0?source=rss-fc1d9ed7195d------2</link>
            <guid isPermaLink="false">https://medium.com/p/b275a68bc0</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[future-of-work]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Adam Fletcher]]></dc:creator>
            <pubDate>Tue, 15 Jun 2021 05:20:41 GMT</pubDate>
            <atom:updated>2021-06-15T15:47:23.577Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ri2akJAy5_zkrxwS" /></figure><p>Part of being a CEO and co-founder of a startup is looking ahead at the future of the industry. Making predictions is an act of hubris that is both part of the job and a ton of fun.</p><p>Of course, software is a huge industry. At <a href="https://bit.io/?medium_5">bit.io</a>, we’re specifically interested in technology around big data. There’s the old joke that what makes data “big data” is that it’s too large to fit in Excel. That’s the kind of data I’m talking about, the kind that humans can’t fully consume just by reading it and need tools beyond a spreadsheet to understand.</p><p>So, let’s speculate. Where will data be in five years?</p><h4><strong>Querying</strong></h4><p><strong><em>Is there a new query language?</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MmuNE9TafrtiurkDti7Dww.png" /><figcaption>The undisputed champion of query languages</figcaption></figure><p>I think the standard query language remains SQL, SQL, and probably some more SQL — with each SQL meeting the ANSI standard and yet having extensions that add language features and introduce syntactic and semantic incompatibilities (so, business as usual in the SQL world). Now, that SQL is wrapped in data frames, or it is wrapped in an ORM, or written in a notebook surrounded by Python. There are new query languages coming out all the time, but the critical mass around SQL (where ‘critical mass’ means ‘I can get an answer to my question on Stack Overflow’) is unstoppable, especially in a world in which switching databases is a huge business risk. I’m grateful for the explorations folks are doing into modern querying languages, but I don’t think any will overtake SQL in the next 5 years.</p><p>GraphQL will be the language to mesh together APIs, but I still think that the source of truth will be databases queried with SQL. The players in the space are likely to be the current RDBMS vendors and cloud instances of their products, plus BigQuery, Snowflake, Databricks via SparkSQL, and, of course, bit.io.</p><h4><strong>Data Discovery</strong></h4><p><strong><em>Has someone solved the data discovery problem?</em></strong></p><p>No.</p><p>I’d love to say this problem will be solved in five years — in fact, part of the reason we are building bit.io is to solve this problem — but the incentives for the businesses doing this work still aren’t aligned with the data.</p><p>That being said, I think we’re going to be doing far better than we are now. I think we’ll have far more data, and it’ll still be fractured, but:</p><ul><li>Businesses that exist solely to be data catalogs will be gone.</li><li>Distributed data cataloging standards won’t have taken off, because they don’t allow for reliable and secure permissioning of the data, and businesses built on hosting the data itself don’t have the right incentives to share their data on the distributed catalog.</li><li>Services that have data catalogs will have to offer more value than just the data (see the first point) — and they will. You’ll search bit.io, Databricks, Snowflake, and of course Google to find data and will use the data right where you find it (so, in Google’s case, in BigQuery) which leads to</li><li>Those services will use unique and interesting data as a way to draw users into their other data-related products. The services will also offer some minimum level of needed data sets — e.g., census data and similar (data that data scientists will assume is there and queryable).</li></ul><p>All of this to say, data catalogs as a business will be dead. Data discovery still won’t be easy, but we’ll have made progress in making data more findable and usable.</p><h4><strong>Visualization</strong></h4><p><strong><em>Will there be a visualization standard?</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*X8HvHRWoP60XoWBQqiKEhg.jpeg" /><figcaption>John Snow’s cholera map, made in 1854; can you do this with your visualization tool? via Wikimedia Commons.</figcaption></figure><p>Visualization is one of my favorite parts of working with data — I’m an avid follower of <a href="https://reddit.com/r/dataisbeautiful">r/dataisbeautiful</a>, and my <a href="https://www.edwardtufte.com/tufte/">Tufte</a> books are always on display behind me in a Zoom call to make it look like I know what I’m doing. That said, I think visualization has three parts:</p><ul><li>The fundamentals techniques of expressing information in visual form</li><li>The style of the visualization</li><li>The ease of going from data to visualization</li></ul><p>I think of the first bullet as the science of visualization — the idea that, stripped of all the bells and whistles, you grok what the creator is saying with the visualization. This is an area of academic research and will move the industry forward, but it isn’t changing at a pace that will impact us in five years.</p><p>The latter two are constantly evolving. The style of visualization is just that: style. And, like fashion, it changes constantly and at the whims of personal taste. No business can be successfully built just on new visualization styles.</p><p>The ease of going from data to visualization will be dominated by the open source world and will change rapidly. I’ll still maintain my undying love for <a href="https://ggplot2.tidyverse.org/">ggplot</a>. However, I do think that all data tools will need to be able to cover the basics of visualization, regardless of style; humans need to see a picture of the data to understand the data.</p><h4><strong>Notebooking</strong></h4><p><strong><em>Are we all working in notebooks?</em></strong></p><p>For this, let’s ask Jakub @ <a href="https://deepnote.com/?bi_5_years">Deepnote</a>:</p><blockquote>I think the future here is serverless, with data scientists no longer thinking about the scale of the computation or the underlying servers, but platforms figuring this out for them.</blockquote><blockquote>With simplicity of the setup and interface, notebooks become more ubiquitous, an entry way into Python scripting for anyone.</blockquote><blockquote>Closer to spreadsheets than programming, they’ll be parts of the Microsoft Office and Google Workspace rather than cloud products, taking on a portion of Excel’s role as shadow IT.</blockquote><blockquote>Notion and Coda might take inspiration from the interface, and allow code execution in their documents.</blockquote><blockquote>As working with data becomes essential for every business function, notebooks will be the interface that democratizes the access and manipulation of data in various tools.</blockquote><p>Thanks Jakub! In 5 years, I know I’ll be using Deepnote.</p><h4><strong>Storage &amp; Compute</strong></h4><p><strong><em>Where does the storage and compute we use live?</em></strong></p><p>The store and compute we use will live in the cloud, whether directly in the cloud (GCS/S3/disks on EC2 instances) or via a SaaS product that runs in one of the major cloud vendors.</p><p>I think there’s a small possibility that we move some kinds of data processing locally (we’ve seen the endless cycles of local computer versus remote in this industry) but I’m confident in the staying power of cloud compute. We need our compute next to our data, and our data is growing faster than internet bandwidth to local sites is growing (e.g., your work &amp; home internet isn’t going to be fast enough to have the storage or compute in different locations).</p><p>More critically, we need our data to be accessible over the network, reliably, from anywhere in the world. The controls around that kind of access will still not be easy for the home user or small business to implement on-site.</p><p>There is some subtlety here. There are always going to be special cases where you want the low latency and ease of use of local compute and are willing to deal with the network time, or the data is small enough (and “small enough” is a number that is growing every day). Or, it’s possible that people will start working on more statistically similar samples of the data, which is my hope for very large data sets.</p><h4><strong>Security</strong></h4><p><strong><em>Will data be any more secure in five years than it is today?</em></strong></p><p>Not that much; this is the state of the world and I bet it’ll be the same in five years:</p><ul><li>People still leave data unsecured in s3/GCS buckets.</li><li>There are still a million no-password or default-password databases exposed to the internet.</li><li>Breaches are far more common, and yet the laws around the world still don’t have the teeth required to incentivize companies to secure their data stores because the complexity of securing said datastores is still too hard for the general public (unless they use bit.io, of course :) ).</li></ul><p>Security was not designed into the popular RDBMSs of today, and unless you break those systems up into their major components and rebuild a new, security-first RDBMS, we’re not going to start making a dent in the problem of insecure databases leading to massive breaches. Even as new technologies like bit.io do the work from the start, legacy databases will remain in place for decades to come, so we’ll continue to suffer breaches.</p><p>I also believe that the best security solution for a modern data store is to kill the single database user &amp; password used by the whole company. At bit.io we designed this in from the start: no longer do you rely on one password to access the production database. The authentication store has moved outside the database. Most of the cloud RDBMS offer this as well (although it’s often via the far more confusing IAM/RBAC, two technologies whose complexity add more problems then they fix).</p><h4><strong>Privacy</strong></h4><p><strong><em>Has the data industry solved privacy in our tools?</em></strong></p><p>No, but you knew that. We haven’t solved it technically, since it is really <a href="https://notatechnologyproblem.com/">not a technology problem</a>, and we haven’t solved it legally, either, since the law can’t keep up with the speed with which technology innovation uncovers new privacy complexities.</p><p>In five years, there still won’t be laws in the US that correctly protect our privacy. In the EU and other countries, these laws will be stricter, but law is not technology nor does making a law magically fix any privacy issues.</p><p>A number of the security points above will play into the privacy story. The winners in the privacy realm in five years will be the ones that take the security section seriously, and the ones that give the users simple controls over the privacy of their (or their customers’) data. Legacy companies who have to bolt on privacy &amp; security will be at a competitive disadvantage here — if you don’t build in privacy from the beginning, it’s costly to add later.</p><h4><strong>Hot Takes</strong></h4><p><strong><em>Synthetic Data</em></strong>: I think there’s going to be a great open source solution for taking a table of data and using ML to generate high-quality synthetic data, given enough source data. I’d like to think in five years we offer this inside bit.io, but I don’t think there’s a business here.</p><p><strong><em>Homomorphic Encryption</em></strong>: Still a research project.</p><p><strong><em>Something Something Blockchain</em></strong>: Blockchain is not the solution to your problem, and don’t try to make it so. It’s like saying quick sort solves all your problems; it’ll sort your data, and that’s about it.</p><h4><strong>What’s Next</strong></h4><p>How confident am I in these predictions? Well, I’m building a company around it.</p><p>bit.io is, conceptually, a single, giant Postgres database for public and private data without any hassle. You can create your private database (i.e., data repo) instantly by dragging &amp; dropping a file on bit.io. You can share that data individually with the click of a button or make it public for everyone. You can securely cross join your private data with all the public data using just SQL. And, any tool or programming language works with us since we’re fully Postgres compatible. Zero maintenance — no worrying about machine types, open network ports, encryption, IAM/RBAC, backups, or any of that.</p><p>My final hot take: Like Google Docs killed .doc, we’re killing .csv. It will not be missed.</p><p>Think I’m totally wrong? Let us know on Twitter <a href="https://twitter.com/bitdotioinc">@bitdotioinc</a>.</p><p>Interested in trying out <a href="https://bit.io/?medium_5">bit.io</a>? You don’t even have to sign up — just drag some data onto the home page. We also have tons of open data sets you can join with your data; you can check out our featured repos <a href="https://bit.io/explore/?medium_5">here</a>.</p><p>Need a great notebooking platform? We love <a href="https://deepnote.com/">Deepnote</a> — it’s fast, easy to use, and has real-time collaboration built right in. You can find them <a href="https://twitter.com/deepnotehq">@DeepnoteHQ</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b275a68bc0" width="1" height="1" alt=""><hr><p><a href="https://blog.bit.io/predicting-the-data-industry-in-five-years-b275a68bc0">Predicting The Data Industry In Five Years</a> was originally published in <a href="https://blog.bit.io/">bit.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>