Hacker News new | past | comments | ask | show | jobs | submit | southpolesteve's comments login

I worked on this project in college and went to the South Pole in 2009. Happy to see it is still making discoveries!


Please do!


Azure Cosmos DB does. There is a good video about it: https://www.youtube.com/watch?v=kYX6UrY_ooA


And here is the Github of their models: https://github.com/Azure/azure-cosmos-tla


I worked on this project in college and went down to the south pole after graduation to help install some of the detectors. Neat to see the results! ~10 years later.


Yes. bustle.com, romper.com, and elitedaily.com are all 100% serverless and do 80+ million unique visitors per month. GraphQL+AWS Lambda


Interesting. Are you using AppSync?


Nope, appsync came out a long time after we were in production and while it's very powerful, it's would require a full rewrite of our application. It's an application service/framework upon itself.

The Bustle stack looks like Redis/Elasticsearch => NodeJS Lambda GraphQL API layer => (sometimes api gateway) => NodeJS lambda render layer => api gateway => CDN. We're working towards removing all the api gateway usage if possible with smarter CDNs like cloudflare workers and Lambda at edge, but it's not currently possible.

This setup gets us an average of 70ms api response time and less than 200ms worst case rendering time. Higher than 90% of cache misses never gets the worst case as we can serve stale content in those cases. Lots of room for improvement too. =)


I'm curious on what's missing from Cloudflare Workers to allow you to remove the API Gateway usage. We're actively looking for more advanced use cases so we can make sure we prioritize upcoming features. Reply here or send me an email at <username> at cloudflare.com.



I also find `this` is terrible for linting. Most tools won't be able to figure you what you attached to `this` at runtime. It's a grab bag object ripe for bugs.


I see this comment a lot. The issues are the same with any REST API. Often they have been solved many times by the community or are baked into whatever backend framework you happen to be using. GraphQL (and community) are still converging on a set of best practices, but you can still solve the issue yourself using the same techniques from REST. Here is how we do it at Bustle:

1. Wrap the entire query execution in an auth check. This is similar to whatever happens in a REST auth flow. Check the caller is legit before moving on. Nothing graphQL specific here.

2. Check auth on fields. This is a neat thing about graphQL. You can statically analyze the fields in the query to make sure the caller is only accessing fields they are supposed to. We do this by adding an `auth` property to the standard graphQL-js field object. When we build the schema we do some fanciness to wrap the resolvers in a new function that checks that field and behaves accordingly[1]

3. Throw errors on unauthorized data. Same as you would in a REST API. If you get back data the caller can't access, check it before replying. Obviously not ideal, but sometimes this is the only option.

At someone on twitter's request I wrote up some more thoughts a while back about running graphQL in production: https://gist.github.com/southpolesteve/08edb6a481c07f66eb71e...

I also gave a talk on this at Node Interactive last week: https://youtu.be/vI9ERvz9WWU

[1] https://gist.github.com/southpolesteve/e190e9572d060b5158366...


Yes. We use the Natural Language Understanding service at www.bustle.com for doing categorization of content. It maps decently to IAB categories: https://www.iab.com/guidelines/iab-quality-assurance-guideli...


Thanks for giving an actual example. Looks like it's a tiered model, first classing into broad categories and then the specific labels? What was integration like: fairly straightforward or was there a long setup/tuning process?


Very straightforward. We send text, they send back categories. We then map those to IAB categories in our own code


Did you guys build a custom model or is the IAB mapping something Watson offers (I can't seem to find any details)?


The mapping is custom. Not something they have out of the box.


Martin Fowler's serverless post was written by Mike Roberts. It is just hosted on Martin's blog.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: