Fork me on GitHub
#off-topic
<
2020-02-21
>
jlmr08:02:39

Hi, can anyone recommend articles/books dealing with design decisions on how to divide a software system into different applications/services? I’m facing such a decision for the first time at work and am looking for tips and ideas on which factors I can/should take into account. Would be great to read about some methods and examples.

hindol08:02:14

You can try #architecture as well.

jlmr08:02:49

Thanks, will post there too.

mloughlin10:02:03

I read http://shop.oreilly.com/product/0636920033158.do years ago to understand why everyone was talking about Microservices, it delves into DDD/Bounded Contexts

mloughlin10:02:32

It's a well written book.

gklijs12:02:05

Lot's of concerns there. Personnaly I find it helpfull the think in -illities to find the best solution. Like deployability, evolvability, scalibility, testability, how does extracting some code to a deplyable unit affect those, and which of those are more important.

jlmr15:02:22

I will look at it, thanks!

hindol16:02:23

Is there a inter-language benchmark competition where anyone can participate? And where Clojure is one of the supported languages?

souenzzo18:02:45

my point Is more important a language with a good abstraction, that allow you to test/select/swap a module/funcion/datastructure to find the fast one for your use-case, then a language that is "fast by default"

hindol18:02:27

That's a fair point. I just want to do this for fun though. Optimizing Clojure code has become my favourite pass time.

hindol18:02:07

I don't do Clojure at work. All of this is my hobby.

gklijs21:02:35

I build https://graphql.gklijs.tech/results/graphql-servers/transactions-per-second but Clojure is already the best. That being said, happy for any pr. Still waiting for subscriptions to hit the rust GraphQL server to add rust.

alexmiller17:02:36

there is https://benchmarksgame-team.pages.debian.net/benchmarksgame/index.html and I spent a lot of time making the Clojure solutions there good

alexmiller17:02:44

and then one day the maintainer deleted it

hindol17:02:55

I Googled and found the history of that. Is there another?

alexmiller17:02:53

I’ve had some conversations with him. I respect his desire to spend his time how he wants.

andy.fingerhut18:02:49

I am sure he has spent many many hours fielding requests from various people to replace which benchmark program is used, or to remove ones because they don't follow the game rules (I have asked about a few programs myself years ago, when actively writing programs for the site for Clojure, and trying to understand how other programs worked -- he often responded in a timely fashion).

andy.fingerhut18:02:12

His advice is sound: If you want a web site that publishes results for a particular set of languages, create one.

andy.fingerhut17:02:12

That site does not publish the Clojure versions any more. I dug up a copy of the latest Clojure versions of the programs and put a copy here: https://github.com/jafingerhut/clojure-benchmarks/tree/master/2017-mar-31-benchmarks-game-site-versions

👍 2
hindol17:02:03

That's cool. They are great as references.

alexmiller19:02:37

the versions that were posted that I worked on are all at https://github.com/clojure/test.benchmark

👍 2
alexmiller19:02:28

iirc, a lot of the "how to run" stuff in there is likely to be old and/or kind of bespoke

alexmiller19:02:34

and/or broken

alexmiller19:02:18

if you want to see a lot of funky clojure perf tricks, they're all in there :)

hindol19:02:47

Yeah, mainly interested in the funky tricks, 🙂

alexmiller19:02:35

fix reflection, fix boxing, use primitives, use deftype/definterface, use array packing when you can't pass enough primitives, primitive constants, etc

alexmiller19:02:08

but for most of the places I did the tricks, in real life, I would just write the damn loop in Java

alexmiller19:02:12

a lot of my interim revisions and notes are squirrelled away in the archive directory

alexmiller19:02:03

pidigits is probably the worst hack, although I merely polished that one - it uses clojure.asm (NOT a public api) to just write, compile, and load bytecode directly

👏 1
hindol19:02:44

The pidigits one sounds like cheating to me, 🙂

alexmiller19:02:46

iirc there was really only one reason to do so, something to do with marking native methods, which I made a ticket for but not sure ever got fixed.

alexmiller19:02:00

oh, that's totally cheating the spirit

hindol19:02:35

I did not get the array packing trick.

alexmiller19:02:29

you can only pass 4 primitives in a function with primitive type hints

alexmiller19:02:41

for the rare case you need more, you can pack them in a mutable Java array

alexmiller19:02:09

in general, mutable Java arrays are the swiss army knife of Clojure hacks :)

hindol19:02:24

Oh, cool trick. 👍

alexmiller19:02:59

assuming you're single-threaded, they are very memory efficient, very fast, stateful references

alexmiller19:02:40

and hotspot can do wonders....

andy.fingerhut23:02:57

This is way off topic, I guess, but my wife recently received an email claiming that they had hacked her computer, and giving a cryptocurrency account to transfer money into if you wanted them not to publish videos they took of you via your computer's camera. They were even helpful enough to give links to why your anti-virus software didn't catch them. It looks bogus to me, since some of the things they are claiming she did, she never did. Seems pretty clever, though, in that it might be a kind of phishing that might get people to part with some of their money, for nothing but sending the right email.

😮 1