andrewducker: (Default)
[personal profile] andrewducker
This weekend I did some exploration into what technology to use to replace the now-defunct Daily Link Poster.

(Sophia is now happy to spend longer entertaining herself, with the result that Jane even got to play some Sims at the same time, while the tiny beast crawled about the floor, occasionally hauling herself up the side of the sofa to demand a few minutes of attention and bubble blowing.)

Anyway, the thing about the poster is that, unless millions of people decide that it fixes an itch for them, it's going to be a tiny app. Literally all it needs to store for each person is the source of their links (exclusively Pinboard at the moment, as Delicious finally died a few years ago), a destination (LJ,DW, and Wordpress), the date/time of the next posting (so that it knows when the cutoff is for the links), and the formatting to apply (with/without tags, for instance).

That's probably less than 1k per posting, maybe up to 2k if I'm really lax with how I store stuff. And I've never had more than about ten people using it. So my needs are trivial. And, up until now, free. Because Google allows people using their AppEngine tools to have a free amount of some resources before the charges kick in, and I've never come anywhere near hitting it.

So, I went looking at the various large Cloud Computing suppliers, to see what their current offerings were, and what would make most sense. I fancied trying out the current Serverless technologies, to see what they're like to work with.

(Serverless doesn't mean "Has no server", it means "You don't need to think about the server they're on". You write code, and the platform makes sure that code runs in the situations you define. It might be on a Raspberry Pi under someone's desk, it might be on a mainframe, it might be on a cluster on unix machines - it's none of your business, or problem.)

Anyway, I quickly got a simple bit of "Hello World" code running on Microsoft's "Azure Functions" platform, went to go and see what I'd need to do to store some data, and discovered that there was absolutely nothing I could do without $5/month for a database. Which I was going to be using about a thousandth of the minimum resources they were willing to sell me.

This feels self-defeating to me. I know that Microsoft is firmly aiming at the corporate market, but one of the ways you get market share is by letting them build toy projects, getting used to the code, and then telling their boss "Yeah, I can do this really easily, using this technology I'm now used to." But clearly that's not a direction Microsoft are wanting to take Azure in.

So, to make sure I wasn't missing anything, I did a quick survey of the data storage capabilities of the big three - Microsoft, Google, and Amazon. And I'm sharing it with you in case anyone can point out something I've missed, or finds it useful themselves.

All three of them have two basic kinds of data storage:
1) Your very own MySQL (or other traditional database) server, charged for by the hour that it's active. And, for a website, it needs to be up 24/7, so I looked at the costs of that.
2) Their own database, which you can just fire requests at and it stores them in their own backends, and you don't have to worry about configuring a server, or anything like that. These tend to be a lot more scaleable, and also you get charged by usage rather than "just having a server up". Except, actually, some of them you get charged for that too.

Microsoft Azure
===============
Basic MySQL database, $5/month. This gives me a 2GB MySQL database constantly up and ready to be used. It's massive overkill.
Cosmos. This isn't a database all of my own, it's basically access to store data in their general database. 1GB of storage is $0.25/month. And then I have to sign up for 4 "Response Units". Which basically means 400 calls per second. Or about 395 more than I'll need at peak times. And 400 more than I'll need 99% of the time. For $24/month. Again, massive overkill.

Azure summary: Not aimed at hobbyists who want to run something small and get experience of how their systems work. Which is a shame, because I set up a Serverless Function in 10 minutes, and had great fun playing with it.

Google Cloud
============
Micro MySQL database. $7.67/month for 3GB MySQL database. Again with the overkill.
BigTable. Charges per node. Minimum of 3. About $2/hour for that. Ahahahaha.
Spanner. Charges per node. About $1/hour. Also ahahahahaha.
FireStore. Charges per read/write/delete, and for storage. Looks like I'd easily fit inside the free limits, and if not, the costs are really cheap. Basically, what I was already doing (but upgraded - I'm using DataStore, and it's being upgraded to FireStore).

Google Cloud summary: Tons of options, one of which will work for me.

Amazon
======
Micro MySQL database. $8/month for the server, plus $0.11 per month for the storage.
DynamoDB. First 25GB is free. $1.50/month for a million reads and a million writes. So not quite as cheap as Google's FireStore, but not bad.

Amazon summary: Multiple options, and DynamoDB looks workable.

Next up, looking at different languages which they both support. Because I've just spotted that for Google Cloud Functions I'd be doing the backend in Javascript, and...I really don't fancy that. Although a second look shows that you can do them with Typescript, which I've fancied playing with for some time. More thinking required!

Date: 2019-02-03 09:25 pm (UTC)
agoodwinsmith: (Default)
From: [personal profile] agoodwinsmith
Go Andrew!

Date: 2019-02-04 04:48 am (UTC)
marahmarie: (M In M Forever) (Default)
From: [personal profile] marahmarie
Don't personal websites come with MySQL databases? And aren't a lot of them available for free up to a certain amount of data or bandwidth used each month? And if the answer to the first two questions is Yes, and you're rolling your own solution, could it not be done low-cost or no-cost from just such a website?

Other than that, yeah, Google's FireStore and Amazon's DynamoDB do sound the best. And I'm willing to chip in on any small amount of billing that comes up as long as I'm still using the tool that's created by whatever means you choose. :)

Date: 2019-02-04 10:32 am (UTC)
xenophanean: (Default)
From: [personal profile] xenophanean
I'd go with Google Cloud. It's the easiest of the three to use, and probably the most interesting. Might be worth investigating Cloud Functions as well, as I think that's essentially designed for doing tiny servlets of the type your posting app sounds like it might be.

My experiences with these platforms:

AWS is clunky but serviceable, feels like the Linux of Cloud Services to me. It'll do what you tell it to, in its way it's quite impressive, but expect to have to learn hard what it does, and expect its systems to do odd stuff which require hours of you reading StackOverflow to figure out why.

Azure is initially easier to use, but I've heard that for smaller projects it throws up roadblocks later on in projects, they are (despite their protestations) still very much focussed on huge enterprise clients.

Google Cloud - Seems to be focused on usability and new distributed systems technology projects. Been on it a bit, I like working with it so far.
Edited Date: 2019-02-04 10:34 am (UTC)

Date: 2019-02-04 12:06 pm (UTC)
cmcmck: (Default)
From: [personal profile] cmcmck
Getting to the mobile stage eh?

Now it starts to get to the locking everything and moving everything breakable stage! :o)

April 2019

S M T W T F S
 1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 181920
21222324252627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Apr. 18th, 2019 06:30 pm
Powered by Dreamwidth Studios