Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
redleader
Aug 18, 2005

Engage according to operational parameters
elasticsearch is hipster poo poo. just use a real rdbms

Adbot
ADBOT LOVES YOU

Luigi Thirty
Apr 30, 2006

Emergency confection port.

redleader posted:

elasticsearch is hipster poo poo. just use a real rdbms

like Oracle op

abigserve
Sep 13, 2009

this is a better avatar than what I had before

Kevin Mitnick P.E. posted:

i would fight tooth and nail at work to use elasticsearch over timescaledb unless elasticsearch was totally unfit. that's down to us having decent experience running ES and 0 with timescaledb or even postgresql. learning how to operate a new db and dealing with its poo poo when you put a nontrivial workload on it (i.e. more than fits on a dev's laptop) is extremely expensive in man-hours

does your infra team get a lot of suggestions to implement DBs that reached 1.0 less than two months ago?

Yeah in prod use whatever you are most comfortable with. Timescale is good because I reckon more people are familiar with postgres over a document store like elasticsearch

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


Kevin Mitnick P.E. posted:

i would fight tooth and nail at work to use elasticsearch over timescaledb unless elasticsearch was totally unfit. that's down to us having decent experience running ES and 0 with timescaledb or even postgresql. learning how to operate a new db and dealing with its poo poo when you put a nontrivial workload on it (i.e. more than fits on a dev's laptop) is extremely expensive in man-hours

does your infra team get a lot of suggestions to implement DBs that reached 1.0 less than two months ago?

more than you'd probably expect as we slowly catch up on technologies everyone else has had for years like elastic which only got "authorised" like a month ago, side effect is all sorts of weird poo poo getting used

anyway the one use case I was thinking of was a specific type of financial data query but now that I've sobered up a bit I remembered that their main problem was that they had more attributes that could be queried than elastic allowed as indexed properties rather than the old time range problem.

still, I'm totally going to go "hmmm, have you considered timescale db?" at some point to pretend I'm hip, in the mean time though:

redleader posted:

elasticsearch is hipster poo poo. just use a real rdbms

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
elasticsearch is fine just use it for storing logs

Nomnom Cookie
Aug 30, 2009



elasticsearch is good if you need an inverted index and don’t need transactions or much consistency at all really. elastic is pushing it for all kinds of poo poo though. gotta take over the world before funding runs out

Beamed
Nov 26, 2010

Then you have a responsibility that no man has ever faced. You have your fear which could become reality, and you have Godzilla, which is reality.


to be fair es had amazon totally pull the rug out from under em lol

Nomnom Cookie
Aug 30, 2009



to be even fairer giving away your product for free and trying to make money from accessories is really dumb

Schadenboner
Aug 15, 2011

by Shine

Kevin Mitnick P.E. posted:

to be even fairer giving away your product for free and trying to make money from accessories is really dumb

TBF, the business model has worked out pretty well for ur mum?

Nomnom Cookie
Aug 30, 2009



Schadenboner posted:

TBF, the business model has worked out pretty well for ur mum?

that is extremely debatable

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
I solved every AOC problem in less than 24h this year! :toot:

VikingofRock
Aug 24, 2008




Symbolic Butt posted:

I solved every AOC problem in less than 24h this year! :toot:

Congrats!

FlapYoJacks
Feb 12, 2009

Symbolic Butt posted:

I solved every AOC problem in less than 24h this year! :toot:

Alexandria Ocazio-Cortez can solve her own problems thank you very much. :colbert:

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

Blinkz0rz posted:

elasticsearch is fine just use it for storing logs

When I last used es, we used it as a full-text index for our nosql backend. It was pure dogshit in terms of uptime and was extremely unstable. Since then, I've only ever used it as part of elk and it still manages to be a huge pita.

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
how in the world are you screwing up an es cluster?

how are you getting any sort of downtime?

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

CRIP EATIN BREAD posted:

how in the world are you screwing up an es cluster?

how are you getting any sort of downtime?

running it on aws, pumping hundreds of thousands of log-lines per second through it, then losing a node and/or having a shard/shards reallocate

es is great when it works but man it takes a lot to keep it operating as a near-realtime store for operational logging from a few hundred microservices + sidecar services

Arcsech
Aug 5, 2008

Blinkz0rz posted:

running it on aws, pumping hundreds of thousands of log-lines per second through it, then losing a node and/or having a shard/shards reallocate

es is great when it works but man it takes a lot to keep it operating as a near-realtime store for operational logging from a few hundred microservices + sidecar services

if you're getting downtime from that i suspect you are substantially underprovisioned

this is one of the problems with es: it's actually pretty good at handling more steady-state load than it really should, then people get surprised when it gets a little bit more load and it falls over, even though they've been redlining it for months. sizing is hard

that plus the whole "the jvm gets fucky if you give it too much memory" thing, which effectively limits the size of each node, which is really easy to cut yourself with

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
yep that's exactly right. it's hard to tell what an appropriate capacity for an es cluster is based on volume/storage needs until you tip it over, adjust, tip it over again, and then keep adjusting. there are some ok tools for understanding shard allocation and replication but no real silver bullet for any of it.

distortion park
Apr 25, 2011


my experience with ES is that it's good at what it does but it's really hard to use as a primary data store. As long as you can recreate the indexes from a more reliable source it's fine

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
any idea why poll(2) would not actually return -1 with errno set to EINTR when a signal occurs? this is on NetBSD 8

I’m using an INFTIM (infinite) timeout, and it does return for activity on the file descriptor I care about

I’ve also verified my signal handler’s getting called, by having it write(2) a message to stderr from within the handler, so it’s not a matter of the signal mask blocking them or something

I feel like there’s something I’m just forgetting about this stuff, it’s making me wish for CFRunLoop

MrMoo
Sep 14, 2000

Try pollts instead?

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
yeah, that’s going to be my next step

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

eschaton posted:

any idea why poll(2) would not actually return -1 with errno set to EINTR when a signal occurs? this is on NetBSD 8

the default on BSD is to automatically resume syscalls interrupted by signals. make sure to use sigaction (relevant flag: SA_RESTART) instead of signal to set the signal handler

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
it turns out that wasn’t the issue after all

after the call to poll (and then pollts) I had one branch I didn’t cover with a log, and of course that was where the hang actually was: poll indicated POLLOUT for my descriptor, so I called DNSServiceProcessResult on its associated DNSServiceRef, which then blocked in recv

I think I just need to solely request POLLIN for that descriptor

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
that was almost it, I also had to invert the sense of the signal mask passed to pollts

all the docs just say “signal mask,” they don’t say whether the mask is to indicate signals to block or signals to allow; turns out in this case it means signals to block

with this my little “register the mDNS advertisements in this file” daemon will now reload when it gets SIGHUP like every other daemon

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


Well, pretty sure I've created a monster here. the mega generated form pages used to capture data in the app now allow an item Foo to be of a type called "orderedlist " that can then parent a list of IFoos of arbitrary length and type , that can themselves parent IFoos, and auto render an editor modal to add or edit existing items by storing a json serialisation of every item in the list in a hidde input that is passed to the editor and deserialised when needed

needless to say, the page is getting pretty loving large when you have a lot of stuff in the list

all this because usrs want to be able to make hundreds of changes before saving instead of saving as they go

MrMoo
Sep 14, 2000

8am I found out this news via spider tingly sense. This is a NYSE relaunch (~9:36am) and yet their own system thinks it's trading as normal pre-open. Took them 1½ hours to publish that NYSE wasn't actually trading.

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

eschaton posted:

all the docs just say “signal mask,” they don’t say whether the mask is to indicate signals to block or signals to allow; turns out in this case it means signals to block

oh yes the mask blocks, "everyone knows this". think of signals as an abstraction of interrupts: there's a "mask" of pending signals (not literally a mask because signals carry a little more data than a simple pending/clear bit - see siginfo_t) and a per-thread (originally per-process) mask of blocked signals. the fact that pending signals are a mask is very important: if a signal is already pending, sending it again will have no effect. unless the OS implements sigqueue (I believe they all do nowadays) and the source of signals uses that instead of kill

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

what is it about awful.app users and the trump thread? like half the bug reports and feature requests come in from people who read basically only that

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

carry on then posted:

what is it about awful.app users and the trump thread? like half the bug reports and feature requests come in from people who read basically only that

they probably want to feel like they have power over something in this stupid world

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
i'm working through this years AOC in various languages and right now I'm doing one in haskell.

i've done a lot of FP since the last time I messed with it ages ago. the language is much smaller than i remember -- it's tiny compared to scala. feels much less powerful in some ways, specifically around typeclasses.

anyhow haskellers why isn't this doing what I want:

code:

type GuardId = Int
data Shift = Shift GuardId [LogEntry] deriving (Show)

groupById :: Shift -> Shift -> Bool
groupById (Shift a _) (Shift b _) = a == b

*Day4> let shifts = [(Shift 1 []), (Shift 2 []), (Shift 1 [])]
*Day4> groupBy groupById shifts
[[Shift 1 []],[Shift 2 []],[Shift 1 []]] // Why isn't this [ [Shift 1 [], Shift 1 [] ], [Shift 2 [] ] ]  ???

e: oh, it needs to be sorted first

double edit: also parsec is cool. way better than regex.

DONT THREAD ON ME fucked around with this message at 23:19 on Dec 29, 2018

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
I bet you'll have fun with day 8 in haskell

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
nice maybe i'll skip to that one

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



carry on then posted:

what is it about awful.app users and the trump thread? like half the bug reports and feature requests come in from people who read basically only that

i have no doubt in my mind that half the forums traffic is the trump thread

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Krankenstyle posted:

i have no doubt in my mind that half the forums traffic is the trump thread

I think it’s this plus the trump thread exercises some pathological usage patterns e.g. having a million twitter embeds in a single post

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



yea ive noticed that taxes the app a bunch lol

ps thx for the app again

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Symbolic Butt posted:

I bet you'll have fun with day 8 in haskell

you were right, this was a good challenge. it obviously wants you to use recursion, but it's not super straightforward. here's my solution if anyone has tips:

https://gist.github.com/daviswahl/84068630a48174374ee52f5a01409ad4

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

DONT THREAD ON ME posted:

i'm working through this years AOC in various languages and right now I'm doing one in haskell.


Symbolic Butt posted:

I bet you'll have fun with day 8 in haskell

hey, this is fun. thx for bringing it up, first time i've seen it

i'm doing them in ruby cuz im a douchebag

urea
Aug 18, 2013

DONT THREAD ON ME posted:

you were right, this was a good challenge. it obviously wants you to use recursion, but it's not super straightforward. here's my solution if anyone has tips:

https://gist.github.com/daviswahl/84068630a48174374ee52f5a01409ad4

day 8 is basically designed for parser combinators

code:
num = A.decimal <* (void A.space <|> A.endOfInput)

parseTree = do
  numChild <- num
  numData <- num
  flip Node <$> A.count numChild parseTree <*> A.count numData num

Adbot
ADBOT LOVES YOU

gonadic io
Feb 16, 2011

>>=

DONT THREAD ON ME posted:

i'm working through this years AOC in various languages and right now I'm doing one in haskell.

i've done a lot of FP since the last time I messed with it ages ago. the language is much smaller than i remember -- it's tiny compared to scala. feels much less powerful in some ways, specifically around typeclasses.

anyhow haskellers why isn't this doing what I want:

e: oh, it needs to be sorted first

double edit: also parsec is cool. way better than regex.

Groupby is really dumb (as in, implemented simply and isn't very powerful, check out its source to see it). If you want arbitrary bags by a given key you need Data.Map.fromList (with a custom Ord instance) or like you say sorting it so the keys are all adjacent.

Parsec is great yes it wasn't the first but imo it brought a resurgence of parser combinators into the industry now most languages have them. gently caress yacc and Co and especially gently caress regex

gonadic io fucked around with this message at 10:18 on Dec 30, 2018

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply