News for hackers. Stuff that matters.
Re:In Defence of Monoliths by vskarine on Friday October 23, 2015 @03:29PM (#10440793)
don't you think 150LOC is a bit extreme on the low side? I don't see how this is possible unless you compose services out of other services... and in that case it's probably a nightmare to debug anything. Can you elaborate a bit on types of things that this worked great for you?
Re:In Defence of Monoliths by DanielBMarkham on Friday October 23, 2015 @03:51PM (#10440914)
I can't walk through a solution to a complex domain inside of a HN comment, but I can provide an overview of the theory.

Take a large monolithic app or framework. What I've found is that if a problem is properly coded, while you may have tens or hundreds of thousands of LOC, the actual code doing the work is quite small, on the order of hundreds or thousands of LOC. The rest of it is all "wiring".

Moving to pure FP means that a lot of the code structure of OOP disappears and you're left with just the critical pieces. This consists of composed functions performing translations on immutable chunks of data. Your functions become microservices and the composition of functions, scheduling, and moving around of data become Net/Dev Ops.

There are many ways to fall off the path here. You start using mutable data, you start associating services with business domains, you start coupling microservices together more tightly than necessary -- there's a ton of ways you can accidentally screw up, and then you're probably better off with a monolithic app.

Microservices should be like ls, cat, or chmod -- small pieces of composable functions that run directly in the O/S. They don't blow up the system when they fail, they do one thing and only one thing, they're configurable using command-line switches, they're transport-independent, and so on.

Re:In Defence of Monoliths by emilyst on Friday October 23, 2015 @04:28PM (#10441113)
From GNU coreutils:

$ wc -l src/ls.c

    4980 src/ls.c 
$ wc -l src/cat.c

     768 src/cat.c 
$ wc -l src/chmod.c

     570 src/chmod.c
Re:In Defence of Monoliths by codahale on Friday October 23, 2015 @04:34PM (#10441136)
Obviously, those are monoliths in dire need of decomposition.
Re:In Defence of Monoliths by thwarted on Friday October 23, 2015 @09:58PM (#10442127)
they do one thing and only one thing, they're configurable using command-line switches,

The more command line switches the more code paths. The more code paths the less of doing one thing and only one thing.