8 ms·
Build a serverless app with a serverless database
- evanweaver 10y agoIn case you are wondering what fauna is in general, it's an object-relational, temporal, geographically distributed, strongly consistent, multi-tenant, QoS-managed operational database. It's implemented on the JVM and queried via type-safe embedded DSLs like LINQ.
- riccardopa 10y agoIt's fully BuzzWord compliant then! (Sound like this is naked marketing post)
- pubby 10y agoHe's the founder, so I guess it is a marketing post.
- yellowapple 10y ago"Whooptydoo, but what does it all mean, Basil?"
- crestedtazo 10y agoIs there any way for me to contribute money or other donations to your project? Good on you for making your dreams a reality.
- evanweaver 10y agoYou can use the database, and eventually we will send you a bill for your usage. :-)
- nickpsecurity 10y agoIt worked for IBM. It then worked for Amazon. It worked for AT&T GoPhones. It can work for you, too. :)
- RubyPinch 10y agoI really wonder what possesses people to use pullquotes WHAT POSSESSES PEOPLE TO USE PULLQUOTES Its like they don't trust you to read a couple of sentences or something
- chc 10y agoA couple of reasons: 1. They don't trust people to read everything. A lot of readers drop off before the end of an article just because their attention flits away. Pull quotes are a way of saying, "Here's something coming up that I think is interesting. If you are interested, you should keep reading." 2. A lot of people have trouble with long runs of samey text. Some see it as boring, others as imposing, others as hard to navigate, but for whatever reason, long runs of text are simply hard to read for a lot of people. So pull quotes are a way to break up the text without resorting to vaguely relevant cat pictures.
- deaddodo 10y agoWell, I have to agree with OP. If anything, they turn me AWAY from an article that I otherwise may have been interested in.
- deleted 10y ago[deleted]
- RubyPinch 10y ago> "Here's something coming up that I think is interesting. If you are interested, you should keep reading." But nearly no one ever uses it to refer to what is coming up, its almost always what has just happened 1 sentence ago. > A lot of people have trouble with long runs of samey text. nothing is more samey than repeating the same sentence! pull quotes like how this article has,punishes the user for reading the article word for word. There are other methods that have the pull quotes outside of the flow! And if it is a really important sentence, then throw some slight yellow background on the text or something, like a highlighter!
- GiorgioG 10y agoMeh - led by a couple of ex-Twitter infrastructure guys. No thanks.
- tschellenbach 10y agoTwitter is possibly one of the hardest sites to scale out there. Sure they had their share of the fail whale but can you blame them?
- pg_is_a_butt 10y agouh... data limited to 140 characters with uniform record lengths?? twitter is DEFINITELY THE EASIEST sites to scale. i can blame you. you're all idiots.
- evanweaver 10y agoYou can read a little bit about our Twitter experience here: https://fauna.com/blog/welcome-to-the-jungle https://fauna.com/blog/welcome-to-the-jungle Twitter still uses the social graph and timeline databases we built years and years ago.
- brilliantcode 10y agoI was initially overly excited by AWS Lambda + API Gateway but now looking at the costs it's cheaper and less overhead to just run a highly available boxes. For large organizations, I can see the benefit of moving to serverless particularly doing away with server ops for more slower and less frequent tasks.. but for fast response and cost effectiveness, unless AWS Lambda dramatically reduces costs to match a $5 / month digitalocean instance that will respond instantly and can take quite a beating for lighter requests, I'd be more wary-AWS bills can rack up very fast.
- colinramsay 10y agoDoesn't lambda have hundreds of thousands of requests for free? Also, the convenience of lambda counts for a lot: no set up or maintenance.
- falcolas 10y agoNo set up except for the API gateway interface and the lambda function itself, as well as any IAM roles or policies you want to put in place. No maintenance except for watching for throttling by AWS, watching your billing to ensure it doesn't go out of control, watching for API Gateway errors.
- nkozyra 10y agoThe latter can be setup as part of Cloudwatch, though.
- falcolas 10y agoPlease forgive me the following: Hey, more setup! Theoretically, you could also do the entire setup via Cloud Formation; but you can also do the same with EC2 instances and ECS. What would I do instead? Set up a 1-n member autoscaling group, with rules to scale on load. Set up an ECS service which auto scales on load. Set up an ELB attached to the ECS service. Not as fancy as Lambda and AWS Gateway, but it will probably scale better, at a lower peak cost (at the expense of an up front cost of one server).
- ge96 10y agoI still don't get how you can store something without putting it anywhere. It's just "in transient" like electricity in a superconductor closed coil? hahaha Not doubting it I just don't understand. Unless you're storing through "cache" client-side or direct RAM I don't know.
- deleted 10y ago[deleted]
- nbclark 10y agoServerless just means not hosting your own infrastructure + boxes. Amazon Lambda is a good example where you run arbitrary script on their infrastructure on demand, without having always-available servers.
- altern8tif 10y agoI find the term "serverless" quite misleading. Essentially, all the code in the world has to run on a machine so there is nothing really "server-less" about it. It's probably more accurate to say something like "devops-free" since management of servers is hived off to a third party. Sounds less buzz-worthy, so maybe someone can come up with something better.
- ge96 10y agoBut there is still a database? (I realize this wasn't mentioned in the thread title). yeah "serverless" seems kind of mis-leading. I'm wondering though what "script/language" you'd write this. How to store... should probably learn how to read first. Thanks for the clarification.
- simplify 10y agoWhat's the difference between "serverless" and "cloud"?
- pavlov 10y agoIt's analogous to "functional" and "object-oriented". They're both popular buzzwords. One has been beaten to death and sometimes implemented poorly enough to gain a bad rap. The other is still new enough to serve as a vessel for software people to pour in all their vague hopes and unrealistic dreams. At some point, the new hotness will be the old tiredness, and the cycle will repeat.
- Gaelan 10y agoI'm honestly sure which description refers to functional and which refers to OOP. They fit equally well.
- mememachine 10y agoHere: >When I say serverless, I’m referring to the function-as-a-service pattern. A serverless system must scale dynamically per request, and not require any capacity planning or provisioning. For instance, you can connect to FaunaDB serverless cloud in moments, and scale seamlessly from idea to runaway hit.
- falcolas 10y ago> serverless system must [...] not require any capacity planning or provisioning So, not AWS lambda then. With their concurrency limits, one-lambda-function-per-kinesis shard architecture, gateway request per second limitations, API count limitations, payload limits...
- quaz3l 10y agoServerless apps run in reaction to an event such as a web request or a file upload. In the serverless model your app has functions that run in response to these events. The classic cloud model is you pay for a server or container that is constantly running. Its kinda equivalent to a timeshare condo vs renting a condo. Your functions only run when they are called.
- falcolas 10y agoWhat's the difference between this and AWS' DynamoDB, or Aurora if you prefer RDBMS? A HTTP endpoint as the DB API? Seems like a lot of extra overhead, unless you're hosting a "client-only" webapp (which would previously have used Firebase, IIRC). Also, this confuses me: > FaunaDB can tolerate the loss of a minority of physical datacenters in a cluster without interruption. According to the CAP theorem, FaunaDB is a CP system. CP means that consistency is favored over availability, yet "without interruption" tells me they favor availability over consistency during a partition.
- prodigal_erik 10y agoIf a partition leaves a quorum in contact with each other, why would it cause an interruption? CP means nodes not within a quorum become unavailable, and if a quorum no longer exists the whole system is unavailable. AP means minorities stay available at the risk of inconsistency.
- falcolas 10y ago> If a partition leaves a quorum in contact with each other, why would it cause an interruption? You can have a split that still has a group of machines with quorum: a 3/2 split would leave three nodes with quorum, and two without. Clients which attach to the non-quorum machines would lose the ability to read or write if it's CP, yet the clients connected to the quorum machines would retain the ability to read and write. So it would be a partial outage, until some way is found to identify quorum members and route clients back to that quorum (making the assumption that clients could talk to any node in a partition).
- lostcolony 10y agoLooks like the fact it automatically scales horizontally: with Aurora, you can only scale vertically (in terms of memory and compute), and DynamoDB requires you to manage throughput yourself (not a big deal; there are services to automatically raise and lower it based on usage). Without interruption -for a minority of nodes-. Meaning it's using a quorum to achieve consensus. In the event of partition (which looks the same to the remaining nodes as a 'loss'), the majority side will still allow reads/writes. Meaning if you can't talk to the majority, you can't read/write; hence, not AP. If it maintains distributed consistency provided there's a quorum (Raft, Paxos, etc), it's CP.
- powera 10y agoThis is a prime example of where "serverless" means "someone else's server".
- jchrisa 10y agoIf you want to skip directly to running code, these instructions (linked from the article) should get you to hello world. https://github.com/fauna/serverless-crud#installation https://github.com/fauna/serverless-crud#installation
- endymi0n 10y ago2018 will be so awesome when apps start to become clientless as well...
- personjerry 10y agoAnd in 2020 apps will become userless and feature entirely AI to AI interaction
- j_s 10y agoSMS chat bot! Actually, a growing category... :)
- earleybird 10y agoY(SMS chat bot)
- nathancahill 10y agoSounds awfully like a server to me.
- mankash666 10y agoIs this DB ACID compliant? This is a major omission from the article, as I was considering this as a replacemnt for PostGres SQL As-A-Service offerings.
- jchrisa 10y agoYes. We offer global acid transactions using the Calvin protocol. http://cs.yale.edu/homes/thomson/publications/calvin-sigmod12.pdf http://cs.yale.edu/homes/thomson/publications/calvin-sigmod1...
- deleted 10y ago[deleted]
- marknadal 10y agoSomebody else asked this, but the answer got distracted onto (reasonably so) the CAP Theorem. What is the difference between Fauna and DynamoDB? Especially since the article swaps them out (and explains the API differences). DynamoDB is going to be having a replica you can read from within physical milliseconds of your lambda function (serverless is such a bad name, makes me think of P2P, anyways...) while it seems like Fauna is gonna have to make network calls out to your service... Which when you pay per time with lambda, and you want lambda functions to be fast anyways, I don't see the point of Fauna? Note: I'm not saying Fauna is bad, it seems like a cool idea, but I'm not understanding how it is a superior alternative. So lets say you don't want to pay for DynamoDB, it still seems like you'd be better off running something like a pure NodeJS database like Parse's open source server or https://github.com/amark/gun https://github.com/amark/gun , either inside the lambda function directly or connecting to it (since it'll be on a nearby machine in AWS)?
- evanweaver 10y agoFaunaDB is hosted in several AWS regions around the world, so the latency is similar to DynamoDB if you're colocated. We will expand to more AWS regions and other cloud providers soon. The biggest operational difference between FaunaDB and DynamoDB, aside from being globally distributed, is that you don't have to pre-provision capacity in FaunaDB. DynamoDB requires you to provision capacity per table and you have to pay for whatever you don't use. If you go over the provisioned capacity your app stops working. FaunaDB is delivered like a utility; you just pay as you go. Also FaunaDB supports joins, transactions, unique indexes, views, etc., and you can install it on-premises if you want.
- marknadal 10y agoThanks for the answer!
- Gys 10y agoI understood that Lamda just freezes the code between calls. So any connection to a database just continues when the next call comes in. Only problem might be the server time-out for the connection if the time between calls is longer. I never tried (yet) but if I need something like Fauna then my assumption was wrong ?