HN user

andrewbarba

968 karma

Head of Engineering @BarstoolSports

Building @SwiftCloudApp

https://swift.cloud

https://github.com/AndrewBarba

http://abarba.me

Posts49
Comments76
View on HN
github.com 6mo ago

Show HN: Specli – compile any OpenAPI spec to an agent optimized executable

andrewbarba
1pts0
aws.amazon.com 1y ago

Amazon S3 Vectors

andrewbarba
48pts6
status.npmjs.org 1y ago

NPM blocking all packages with the word "camel"

andrewbarba
5pts2
world.hey.com 2y ago

Apple Rejects the Hey Calendar from Their App Store

andrewbarba
147pts77
prettier.io 3y ago

Prettier 3.0: Hello, ECMAScript Modules

andrewbarba
2pts0
redis.com 3y ago

The ChatGPT Memory Project

andrewbarba
3pts0
swift.cloud 3y ago

Deploy server side Swift applications on Vercel

andrewbarba
3pts1
turbo.build 3y ago

Turbo – an incremental bundler and build system optimized for JavaScript

andrewbarba
4pts0
twitter.com 3y ago

Halide – iPhone 14 Pro 48mp RAW

andrewbarba
3pts0
www.hackingwithswift.com 4y ago

What’s New in Swift 5.7

andrewbarba
1pts0
www.mongodb.com 4y ago

MongoDB Releases Queryable Encryption Preview

andrewbarba
120pts67
www.mongodb.com 4y ago

MongoDB Announces New Time Series Capabilities Coming for MongoDB 6.0

andrewbarba
4pts0
barstool.engineering 4y ago

A real-world comparison between Cloudflare and Fastly

andrewbarba
23pts5
www.nytimes.com 5y ago

Jerry Seinfeld: So You Think New York Is ‘Dead’

andrewbarba
2pts0
www.mongodb.com 6y ago

MongoDB for VS Code

andrewbarba
2pts0
swift.org 6y ago

Swift 5.2

andrewbarba
155pts41
www.mongodb.com 6y ago

Hasta La Vista, DB

andrewbarba
2pts0
www.theverge.com 6y ago

Tesla’s Smart Summon feature is already causing chaos in parking lots

andrewbarba
1pts1
inessential.com 7y ago

The Next Era Ends, the Swift Era Begins

andrewbarba
3pts0
aws.amazon.com 7y ago

Introducing AWS Client VPN to Securely Access AWS and On-Premises Resources

andrewbarba
3pts0
dd.meddle.mobi 7y ago

US Net Neutrality Stats

andrewbarba
1pts0
aws.amazon.com 8y ago

Amazon DynamoDB Announces 99.999% Service Level Agreement for Global Tables

andrewbarba
1pts0
forums.swift.org 8y ago

“Swift for TensorFlow” to be developed on “tensorflow” branch on apple/swift

andrewbarba
1pts0
heartbeat.fritz.ai 8y ago

Building Not Hotdog with Turi Create and Core ML – in an Afternoon

andrewbarba
9pts0
mongolytics.io 8y ago

Show HN: Mongolytics – Native BI for MongoDB

andrewbarba
1pts1
nodejs.org 8y ago

HTTP2 – Node.js v8.4.0 Documentation

andrewbarba
2pts0
github.com 8y ago

Swift 5 – Swift Programming Language Evolution

andrewbarba
4pts1
github.com 8y ago

Node.js: Initial experimental implementation of HTTP/2

andrewbarba
146pts18
bitcoin.stackexchange.com 8y ago

Cryptocurrency Arbitrage – What do I need to know? (Comment)

andrewbarba
5pts0
developer.apple.com 9y ago

What's New in Xcode 9

andrewbarba
3pts1
Pasta Cooking Time 10 months ago

This math doesn't account for the time it takes to get the water to a boil. Probably closer to 40% savings. Still, quite good!

Worth noting:

- We lost two tweeters (7 down to 5)

- We lost two mics (6 down to 4)

Really curious how the sound compares to the original.

How could you possibly say this is doing it wrong? The only way you could batch requests in the way you describe is if you have 1 (or very small number) compute nodes. You would need all those requests to hit same node so you could try and batch. With serverless compute infrastructure (which is what this blog is demonstrating by using lambda) you can have 1 isolated process per request and therefore need a database that can actually handle this kind of load.

Thanks so much.

And short answer - Yes.

My guess is it's a matter of 'when' I have to deal with this. I've had the domain for a while, and this is something I've wanted to build for such a long time. Things fell into place when I was able to build a Swift SDK for Fastly's platform back in January this year. The stubborn engineer in me went ahead and used the domain anyway and launched what you see today.

This is a shameless plug, but I built Swift Cloud to help people build scalable backends in Swift: https://swift.cloud

Behind the scenes we compile Swift to WASM and deploy to Fastly's edge network, Compute@Edge. At my day job we are using this in production and serving thousands of requests per second on our Swift app. Overall it's a lot of fun to deploy Swift on server, but the developer UX still leaves a lot to be desired. Running and testing locally is still non-trivial.

Are there plans to release an HTTP API to make it easier to use with services like Fastly Compute@Edge and Cloudflare Workers? And if so would the API be global or region specific?

One thing I haven't seen with "serverless" databases is an easy way to dictate where data is stored. Mongo has a pretty clever mechanism in their global clusters to specify which regions/nodes/tags a document is stored in, and then you simply specify you want to connect to nearest cluster. Assuming your compute is only dealing with documents in the same region as the incoming request, this ends up working really well where you have a single, multi-region db, but in practice reads/writes go to the nearest node if the data model is planned accordingly.

A real world example of how I am using this in Mongo today: I run automated trading software that is deployed to many AWS regions, in order to trade as close to the respective exchange as possible. I tag each order, trade, position, etc. with the exchange region that it belongs to and I get really fast reads and writes because those documents are going to the closest node in same AWS region. The big win here is this is a single cluster, so my admin dashboard can still easily just connect to one cluster and query across all of these regions without changing any application code. Of course these admin/analytics queries are slower but absolutely worth the trade off.

One important piece missing from this article is that on Vercel you do not get global Serverless functions on any plan except the Enterprise plans. By default you can pick one preferred region for your Serverless functions and that's the region that's always used. In practice, assuming you have a somewhat decent caching strategy, this doesn't really matter as far as latency is concerned. Where it could potentially matter is that AWS region having an outage and now you can't fallback to another. We deploy all our functions to at least two regions and Vercel does handle region failover in this case.

Disclaimer: I'm a Vercel enterprise customer

This is very wrong. I worked as an intern at WhatsApp in 2013 and they had over 30 employees, a lot were actually customer support. And “customer support” doesn’t do it justice. Every feature shipped was translated across 30 languages and CS was made up of people who could do a lot of the translation in house as well as provide actual support. I was an engineer on the website that dealt with all the support articles and translation, but the platform teams were all two engineers per platform, and then the backend engineers who worked magic with erlang.

That's like saying: Could you imagine having a function with many arguments and trying to find the return type?

Swift already uses the space at the end of the function declaration for things like throw and generic constraints. I personally don't see an issue with where it is other than I also write a lot of JavaScript and the context switching between languages might take a couple seconds.

Tesla Cybertruck 7 years ago

Does he kill the guy who designed the glass or the guy who suggested trying it again on the rear window?

Netlify Analytics 7 years ago

The funny thing about this is tons of developers are using Netlify for SPA's and therefore only that first request will be caught by their edge nodes, all subsequent page views will be missed.

This appears to require the new Checkout product in order to enable it. What happens if we have a percentage of sales coming from a native iOS or Android app? Are we not allowed to enable protection? Or would just the web transactions be covered?

Security Update 7 years ago

He/she is making a joke. No user data was accessed so the assumption is questions may have been, a couple pluses changed to minuses could cause a lot of damage (headaches?) when copy pasting.

Strange, the title felt pretty accurate to me. I had a good sense of what I was about to read (basically guessed it would handle TypeScript from the title), and then was impressed with the additional features.