clojure-uk

A place for people in the UK, near the UK, visiting the UK, planning to visit the UK or just vaguely interested to randomly chat about things (often vi and emacs, occasionally clojure). More general the #ldnclj
jiriknesl 2020-09-04T04:03:21.137400Z

Morning

dharrigan 2020-09-04T05:42:11.137600Z

Good Morning!

djm 2020-09-04T06:30:01.137800Z

πŸ‘‹

mccraigmccraig 2020-09-04T06:38:43.138200Z

!mΓ₯nΒ‘

thomas 2020-09-04T07:26:09.138400Z

mogge

alexlynham 2020-09-04T08:43:09.140500Z

morrrrrrrning

maleghast 2020-09-04T08:46:04.141Z

Good Morning All... Long time no see / chat... How're you all doin'?

thomas 2020-09-04T08:52:32.141900Z

fine... but summer is over. it seems here at least

2020-09-04T09:20:53.142300Z

autumn is much nicer anyway

Jakob Durstberger 2020-09-04T09:25:10.142500Z

Happy Friday πŸ‘‹

alexlynham 2020-09-04T09:35:00.142600Z

i miss summer

dharrigan 2020-09-04T09:41:39.142900Z

I don't miss the heat - trying to sleep at night was bad 😞

dharrigan 2020-09-04T09:41:46.143200Z

But I'm a colder weather type of guy anyway

alexlynham 2020-09-04T10:33:38.144100Z

i'm a fair weather cyclist so winter makes me sad

2020-09-04T12:29:12.148100Z

Morn'

2020-09-04T12:29:34.148500Z

@maleghast I'm getting a bit sucked in to the new crusader kings, I really need to try and wander around the local park today...

yogidevbear 2020-09-04T12:38:47.148700Z

Morning

yogidevbear 2020-09-04T12:39:21.148800Z

It's a bit like trail running versus running on a treadmill indoors

alexlynham 2020-09-04T12:40:21.149Z

i live on the edge of the peak district so in summer you can ride after work in the hills, actual climbs, views across manchester all the way to the sea

alexlynham 2020-09-04T12:40:29.149200Z

and then in winter you can... not do that

alexlynham 2020-09-04T12:40:32.149400Z

woo.

yogidevbear 2020-09-04T12:58:01.149800Z

haha love that description (even if it is a bit sad)

thomas 2020-09-04T13:11:49.150600Z

So, how do people think about serverless? I just talked to some one who thinks it is a bad idea...

thomas 2020-09-04T13:12:10.151Z

but as everything else, it has upsides and downsides.

mccraigmccraig 2020-09-04T13:14:42.152100Z

it's the opinion of someone who's never done it, but i think it's a great idea... i suspect @alex.lynham will be able to give you a much more nuanced view though

thomas 2020-09-04T13:22:12.152900Z

as I think we'll have very few users I see the cost advantage. but maybe that is overrated. who knows

thomas 2020-09-04T13:23:46.153400Z

so start up times might be a problem.

thomas 2020-09-04T13:23:58.153700Z

(especially if we would use clj)

alexlynham 2020-09-04T13:29:59.153800Z

ahoy hoy

alexlynham 2020-09-04T13:30:03.153900Z

i was summoned

alexlynham 2020-09-04T13:30:16.154Z

serverless is the future for basically everything but streaming imo

alexlynham 2020-09-04T13:30:49.154100Z

current gig: stood up a greenfield MVP for a project in an enterprise context in one week

alexlynham 2020-09-04T13:31:13.154200Z

now at 52 functions, 30K LOC, blue/green deploys, living the dream

alexlynham 2020-09-04T13:31:52.154300Z

costs us just over 1k$ a month iirc and we're at nationalish scale. 9/10 of that is RDS (Aurora in 3 AZs)

alexlynham 2020-09-04T13:32:35.154400Z

we're running 2 stacks of our fns for like a couple hundred $ a month and the usage we're paying for is tiny

alexlynham 2020-09-04T13:33:12.154500Z

and we've got it to the point where we can clojure-style test our endpoints like they were normal async functions

alexlynham 2020-09-04T13:33:40.154600Z

with cljs & shadow this is even nicer, but typescript was the best compromise available to me at the time

alexlynham 2020-09-04T13:35:15.154700Z

if you want to use JVM CLJ then startup times are going to kill you though, don't bother i think people have had some luck with graal mind you but yeah, just use cljs, the ecosystem and tooling is better anyway, there's the serverless framework, sls-offline and all sorts of useful dev tools

alexlynham 2020-09-04T13:36:24.154800Z

* don't bother being like, Just My Opinion man, but there's no way in heck i would do it myself or argue for it when node is so fast and the tooling/mindshare is there (even if i'm not wild about the node platform)

thomas 2020-09-04T13:43:28.158Z

I have build 3 or 4 test function using node. It works and they are all tiny.

mccraigmccraig 2020-09-04T13:44:05.159Z

i'll go harder and say it could be the future of streaming too - a streaming-as-a-lib thing like kafka-streams could work well with serverless, and while kafka-streams is jvm-only, startup times aren't a concern

alexlynham 2020-09-04T13:48:27.159300Z

but at that point if it's constantly up the pricing will eventually exceed dedicated instances

alexlynham 2020-09-04T13:48:38.159400Z

it'll probably just be easier from a maintainance standpoint

alexlynham 2020-09-04T13:49:13.159500Z

doing anything with serverless is low maintainance, high pissing about in the AWS console IME

alexlynham 2020-09-04T13:49:24.159600Z

and ooft when you hit a platform bug in AWS

alexlynham 2020-09-04T13:49:50.159700Z

like, your IAM roles getting detached in prod (real bug, real sitation, root cause: essentially a wontfix from amazon)

mccraigmccraig 2020-09-04T13:50:47.160200Z

errr.... wat ? gotta love IAM!

alexlynham 2020-09-04T14:00:38.160300Z

the fix was even better

alexlynham 2020-09-04T14:00:54.160400Z

for Reasonsβ„’ this couldn't be done via CLI or automation but

alexlynham 2020-09-04T14:01:26.160500Z

you go to the console, unattach all perms from the lambda, hit save, reattach the perms, hit save, MAGIC :male_mage:

alexlynham 2020-09-04T14:01:40.160600Z

gruuuhhh

alexlynham 2020-09-04T14:03:44.160700Z

it's documented in our DR playbook as 'if this and this and this have gone wrong, then you need to do THE SWITCHEROO'

thomas 2020-09-04T14:19:05.161200Z

Graal is an interesting option, hadn't thought about that (yet)

thomas 2020-09-04T14:21:00.162200Z

and funny that you mention maintenance, that was mentioned as one of the downsides by the guy I was talking to

alexlynham 2020-09-04T14:22:20.162500Z

in what way?

thomas 2020-09-04T14:24:01.163200Z

not sure, I think the bottom line is that this team has never done serverless and therefore advice against it.

thomas 2020-09-04T14:24:40.163800Z

proposing Spring Boot and Hybernate instead 😱

thomas 2020-09-04T14:24:59.164200Z

So we might have to look for a different vendor...

alexlynham 2020-09-04T14:26:51.164300Z

that's super weird. my experience has been whole classes of maintenance problems just cease to exist, but that your methodology needs to modernise e.g. use cloud CI, deploy more often, have a rolling dev deploy, do trunk-based development -> all help in various ways to go with the grain of the tech

alexlynham 2020-09-04T14:27:03.164400Z

what's the project trying to build? what's the problem domain?

thomas 2020-09-04T14:27:46.165700Z

on a technical level, just storing a bit of text and a few pics in a DB.

dominicm 2020-09-04T14:27:49.166Z

I think serverless benefits can be achieved by vendors without much effort. Ions is a great example.

thomas 2020-09-04T14:28:01.166300Z

later a few reports (PDF generation)

alexlynham 2020-09-04T14:28:57.166700Z

we've got some image processing stuff where we pretty much deployed the aws serverless template for image resizing etc and stuck it in our vpc

alexlynham 2020-09-04T14:29:00.166800Z

πŸ‘Œ

dominicm 2020-09-04T14:29:49.168Z

I dunno, seems to me that serverless was way more fiddly than an auto scaling group with a web server on.

2020-09-04T14:30:38.168600Z

I'm really interested if anyone does a good example / breakdown blogpost of this @alex.lynham πŸ˜ƒ...

2020-09-04T14:30:52.168900Z

I've done it a bit for ml tasks...

thomas 2020-09-04T14:35:49.169700Z

there was a talk at the Dutch CLojure Days a few years ago about a team in Sweden doing serverless with great success.

alexlynham 2020-09-04T15:26:39.169800Z

i've done bare metal, managed instances, k8s and serverless and serverless (for simple web apps) is definitely the least pain

alexlynham 2020-09-04T15:26:52.169900Z

but you trade some of your regular pain for platform bugs

alexlynham 2020-09-04T15:27:21.170Z

like, no more messing around with k8s dasboards or ssh'ing onto instances but when things are borked, expect to crawl aws docs etc etc

Conor 2020-09-04T15:27:22.170100Z

The shared responsibility for making your life difficult model

alexlynham 2020-09-04T15:27:29.170200Z

lol

alexlynham 2020-09-04T15:27:30.170300Z

yes

alexlynham 2020-09-04T15:28:23.170400Z

@folcon only got a short blog i wrote for mainly internal folks at current place https://the-frey.github.io/2020/06/15/functional-serverless-typescript on current typescript project (and it's a lil out of date already)

1
alexlynham 2020-09-04T15:29:12.170500Z

i need to update the cljs/shadow-cljs serverless workshop thing i did the other year but realistically i won't get around to it until a) i need it for a project or b) i'm using it for a talk/workshop which doesn't seem on the cards rn :/

maleghast 2020-09-04T17:32:54.171300Z

Anyone got any good advice for how to "see" what's going on with a long running evaluation in CIDER..?

mccraigmccraig 2020-09-04T17:34:18.171900Z

logging 😬

mccraigmccraig 2020-09-04T17:34:32.172300Z

or a debugger, or yourkit or visualvm depending on what you need to see

maleghast 2020-09-04T17:34:37.172500Z

yeah, I realise that no...

maleghast 2020-09-04T17:35:09.173Z

I just want to see the interim state of the atom that's being updated..

maleghast 2020-09-04T17:35:16.173200Z

Can I connect a second REPL?

mccraigmccraig 2020-09-04T17:36:10.173500Z

yes, you can usually connect a second repl

maleghast 2020-09-04T17:36:25.173800Z

ok cool, will try that - thanks!

maleghast 2020-09-04T17:53:11.174200Z

@mccraigmccraig - Thanks, that worked a treat!

maleghast 2020-09-04T17:53:12.174500Z

πŸ™‚

dharrigan 2020-09-04T18:10:46.175400Z

So, anyone got any recommends for a distributed k/v store that works well with clojure? Some usual suspects are amazon dynamodb, consul, vault, etcd.

dharrigan 2020-09-04T18:11:30.176100Z

The values are likely to be configuration (maps?) but not just clojure stuff, but configuration as json docs, yaml docs etc.

dharrigan 2020-09-04T18:11:38.176400Z

should have a nice interface, RESTful if possible πŸ™‚

dharrigan 2020-09-04T18:12:16.177200Z

and by works well with clojure, I mean, it also has to work well with other languages, like Kotlin, Go etc... (I suppose if it has a RESTful interface, that would make it agnostic)