New around here? Register your SA Forums Account here!

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
Brain Candy
May 18, 2006

tbh, i kinda get why c-grogs get mad about kids these days

because people can make sprawling-business-useful thing but never learn about resource management and so that happens

Adbot
ADBOT LOVES YOU

Space Whale
Nov 6, 2014

Brain Candy posted:

tbh, i kinda get why c-grogs get mad about kids these days

because people can make sprawling-business-useful thing but never learn about resource management and so that happens

So how do you scale iis hosted poo poo, besides "lol IIS do my thing"?

To address your point: making less knowledgeable people useful is A Good Thing, for sure. The only reason this threadshit got checked in was nobody was doing code reviews, or, the people at $JOB when it was fully startup mode honestly didn't understand this - none of them.

Which scares me.

Space Whale fucked around with this message at 01:54 on Apr 19, 2019

pseudorandom
Jun 16, 2010



Yam Slacker

Space Whale posted:

The only reason this threadshit got checked in was nobody was doing code reviews, or, the people at $JOB when it was fully startup mode honestly didn't understand this - none of them.

Which scares me.

That's the dictionary definition for "startup". Unless it's started by a group of software engineers, they always start with one confident guy who builds the whole company's software with no oversight.


Then a few people are hired on, and they deal with the spaghetti and meatballs cooked by the CTO (presumably his title).

Startups live or die by the stage after that in which one hero must essentially rewrite, or completely refactor, the product to make it maintainable.

Space Whale
Nov 6, 2014

pseudorandom posted:

That's the dictionary definition for "startup". Unless it's started by a group of software engineers, they always start with one confident guy who builds the whole company's software with no oversight.


Then a few people are hired on, and they deal with the spaghetti and meatballs cooked by the CTO (presumably his title).

Startups live or die by the stage after that in which one hero must essentially rewrite, or completely refactor, the product to make it maintainable.

The guy who actually wrote the poo poo, sadly, died.

The CTO is literally just spaghetti and meatballs. I don't know what he actually does except get mad if someone runs linting on his old code now. I'm not kidding.

As far as the hero to rewrite or refactor, lol, I'm not falling on a sword like that unless someone offers me a poo poo ton of money and actual vestment. We have a new manager and he's trying to grow the team but the higher ups are basically going LA LA LA with fingers in their ears thinking it's still an engineering company despite their product being software, and the supporting services that make their iOS app work are a heavily tangled, complicated mess of some 80 monolithic web services and 30 loving databases that they think 3 people can maintain.

HAHA NO.

Bloody
Mar 3, 2013

Space Whale posted:

I'm also still just in awe that we have, in production, try/catch/gotos.

you sure youre not workin on flight software

Space Whale
Nov 6, 2014

Bloody posted:

you sure youre not workin on flight software

We make stuff that tells a pilot what settings to use, if the airplane is too heavy, if it's too hot for your altitude and weight, and engine out procedures, mostly. Also balance poo poo.

But yes Boeing can suck a fat one.

Shaggar
Apr 26, 2006

Space Whale posted:

So how do you scale iis hosted poo poo, besides "lol IIS do my thing"?

To address your point: making less knowledgeable people useful is A Good Thing, for sure. The only reason this threadshit got checked in was nobody was doing code reviews, or, the people at $JOB when it was fully startup mode honestly didn't understand this - none of them.

Which scares me.

wrt asp.net and controllers, it will basically run a thread per request and you don't need to do anything. Doing lots of work in a single thread will just increase the time the request takes.

As a general rule you should not spawn additional threads or background tasks that persist after the request you are handling. normal async calls are fine since they will complete during the normal course of the request. Launching a background worker to do something and then returning the response while the worker continues can lead to resource leaks or task failures if you don't handle edge conditions properly.

If you need to spawn a long running task from a request either run it entirely within the request and make the caller wait or submit the work item into a queue for processing by an external process.

wrt iis you can configure the number of cores available for the application process. pretty easy. read the docs

If you need to scale beyond a single IIS server you can use any of a billion load balancing solutions, but you need to take into account session management. If you are using sessions (you probably are) you either need to do a hack on your load balancers to stick clients to a single server or you need to have the session information available to all servers. consult the iis docs for this kind of thing.

Space Whale
Nov 6, 2014

Shaggar posted:

wrt asp.net and controllers, it will basically run a thread per request and you don't need to do anything. Doing lots of work in a single thread will just increase the time the request takes.

As a general rule you should not spawn additional threads or background tasks that persist after the request you are handling. normal async calls are fine since they will complete during the normal course of the request. Launching a background worker to do something and then returning the response while the worker continues can lead to resource leaks or task failures if you don't handle edge conditions properly.

If you need to spawn a long running task from a request either run it entirely within the request and make the caller wait or submit the work item into a queue for processing by an external process.

wrt iis you can configure the number of cores available for the application process. pretty easy. read the docs

If you need to scale beyond a single IIS server you can use any of a billion load balancing solutions, but you need to take into account session management. If you are using sessions (you probably are) you either need to do a hack on your load balancers to stick clients to a single server or you need to have the session information available to all servers. consult the iis docs for this kind of thing.

So basically just loving rip the thread bullshit out and yell until someone lets me test that fix, gotcha.

Seems to be basically what I was expecting. What the gently caress was going on before I got here?

HoboMan
Nov 4, 2010


HAHA, no wait, load balancing software?
you working on that system that went down a couple weeks ago and got my loving flight delayed by a couple hours?

Space Whale
Nov 6, 2014

HoboMan posted:

HAHA, no wait, load balancing software?
you working on that system that went down a couple weeks ago and got my loving flight delayed by a couple hours?

Nah.

But, lol. God. Aviation is full of "engineers and management making GBS threads on software and devs" though!

Brain Candy
May 18, 2006

Space Whale posted:

So how do you scale iis hosted poo poo, besides "lol IIS do my thing"?

To address your point: making less knowledgeable people useful is A Good Thing, for sure. The only reason this threadshit got checked in was nobody was doing code reviews, or, the people at $JOB when it was fully startup mode honestly didn't understand this - none of them.

Which scares me.

a hard lesson that you might learn after you leave this job; code reviews by the ignorant will only catch the things that should have been caught by a linter

Brain Candy
May 18, 2006

Shaggar posted:

wrt asp.net and controllers, it will basically run a thread per request and you don't need to do anything. Doing lots of work in a single thread will just increase the time the request takes.

also lmao that windows doesn't have a good epoll in TYOL 2019

Plorkyeran
Mar 21, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

Brain Candy posted:

also lmao that windows doesn't have a good epoll in TYOL 2019

iocp is awkwardly different from epoll in ways that make porting code written for epoll to it hard, but it isn't really inherently worse.

Plorkyeran
Mar 21, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

Space Whale posted:

We make stuff that tells a pilot what settings to use, if the airplane is too heavy, if it's too hot for your altitude and weight, and engine out procedures, mostly. Also balance poo poo.

But yes Boeing can suck a fat one.

these sound like things that could result in a crashed plane if you gently caress up enough

Space Whale
Nov 6, 2014

Plorkyeran posted:

these sound like things that could result in a crashed plane if you gently caress up enough

Oh, very much so.

:q:

Thankfully we don't give wrong info so much as just crash the computer trying to figure out the info and get calls wherein "why is X slow." Because, you see, iterating over flap settings and temperatures is bad, make mxn threads instead!!!!one

One time someone used us, got a landing distance for a dry day. It was valid. He landed in the rain, and never bothered asking us how much longer his wet/contaminated distance would be. He ended up going past the end of the runway, which is a big deal, but nobody hurt. There was an investigation but it just evaporated when it was made clear he didn't bother realizing "wet tires don't grip as well as dry ones." Guess it didn't have reverse thrust either.

pseudorandom
Jun 16, 2010



Yam Slacker

Plorkyeran posted:

these sound like things that could result in a crashed plane if you gently caress up enough



Space Whale posted:

Oh, very much so.

:q:




Side gig idea: start a website where for a few bucks a search you tell me if I should be afraid of taking certain flights. :wink:

Edit: more afraid than my baseline fear for putting my life in the hands of software.

Space Whale posted:

So basically just loving rip the thread

:rip:

Space Whale
Nov 6, 2014
We don't do things for the big boys. We literally can't right now. Maybe after I defuckulate our services we could. Queues are loving magic apparently.

Private operators, smaller groups, owner operators, or ultra rich fucks love us though. So for now unless you fly tankers putting out forest fires or hang with Sultans or ex presidents you'll never fly our poo poo.

Carthag Tuek
Oct 15, 2005

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



pls crash all the private planes with rich assholes

jk

but not really

:wink:

Aramoro
Jun 1, 2012




I'm not sure if this is the case at Boeing but here lots of companies like that, Ferranti, BAE etc had loads of really great Electrical engineers etc who learnt a bit of coding to do their jobs but slowly morphed into the Development dept, just all cross trained electrical engineers, except without the training. Can lead to some interesting architectural decisions.

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?

Bloody posted:

synstructure, syn, quote, and proc_macro

i have these structs, and for all of them i keep writing this long mess of extremely boilerplate code, and i want to not do that, but i don't know what i'm doing, so it's going very poorly

you should write a macro so you don’t have to write that boilerplate

Corla Plankun
May 8, 2007

improve the lives of everyone
reading about the new language 'Bosque' and getting really upset about the inclusion of what they call "Reference Parameter Threading" and what I, a terrible programmer, call "loving with my values in the most deceptive way possible"

the overview doesnt seem to think that its weird that the initial premise that "All values in the Bosque language are immutable!" is immediately contradicted by

quote:

0.3 Reference Parameter Threading

In addition to allowing multiple assignments to variables, the Bosque language also allows developers to thread parameters via ref argument passing. This alternative to multi-return values simplifies scenarios where a variable (often some sort of environment) is passed to a method which may use and update it. Allowing the update in the parameter eliminates the extra return value management that would otherwise be needed:
code:
function internString(ref env: Map<String, Int>, str: String): Int {
    if(env.has(str)) {              //use the ref parameter
        return env.get(str);
    }

    env = env.add(str, env.size()); //update the ref parameter
    return env.size();
}

so maybe i'm just misunderstanding

gonadic io
Feb 16, 2011

>>=

Corla Plankun posted:

reading about the new language 'Bosque' and getting really upset about the inclusion of what they call "Reference Parameter Threading" and what I, a terrible programmer, call "loving with my values in the most deceptive way possible"

the overview doesnt seem to think that its weird that the initial premise that "All values in the Bosque language are immutable!" is immediately contradicted by


so maybe i'm just misunderstanding

said mutable values are clearly marked. it depends if you can turn anything into a ref value later (which would be bad), or if you have to declare them as ref in the first place (in which case it's clear that they may get changed)

Shaggar
Apr 26, 2006

Brain Candy posted:

also lmao that windows doesn't have a good epoll in TYOL 2019

that's a simplified description and also the threading occurs inside the .net virtual machine, so its not windows specific.

Asleep Style
Oct 20, 2010

Forgive me if I'm stating the obvious re: unmanaged resources and the billion processes, but if I recall correctly in .NET Process implements IDisposable. If you had a process factory that wrapped these processes in a using block they should get GC'd when they go out of scope.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

gonadic io posted:

said mutable values are clearly marked. it depends if you can turn anything into a ref value later (which would be bad), or if you have to declare them as ref in the first place (in which case it's clear that they may get changed)

it's not clear from the docs whether it's clearly marked at the call site. If it is clearly marked then yeah that's totally fine, but if it's not apparent at the call site then that's a big whoof.

Shaggar
Apr 26, 2006

Asleep Style posted:

Forgive me if I'm stating the obvious re: unmanaged resources and the billion processes, but if I recall correctly in .NET Process implements IDisposable. If you had a process factory that wrapped these processes in a using block they should get GC'd when they go out of scope.

its not so much about unmanaged resources used by the long running task (though you absolutely need to worry about them), but more about the task itself. You need to manage the total number of those long running tasks which is definitely doable, but its one more thing to remember to do properly in your code. Plus your long running tasks need to be incredibly durable as the application pool may terminate at any time and its not going to wait for your tasks to finish (unless you do some kind of hacky stuff).

The design of asp.net is centered around requests being totally independent of other requests. When you adhere to this design it makes things much easier to maintain. Its not designed to handle long running tasks, so there are no mechanisms to handle them built into the framework. This means you need to design them yourself which, while possible, is more code to maintain in a system not designed for what you're doing.

Aside from the code maintenance benefits of separating short and long running tasks, you make it easier to understand the performance profiles of your 2 systems. This makes it easier to scale the overall system since you've separated 2 totally different task profiles into totally different subsystems.

Bloody
Mar 3, 2013

is your poo poo governed by DO-178C and/or should it be

Sapozhnik
Jan 2, 2005

Nap Ghost
epoll isn't good either tbh

Shaggar
Apr 26, 2006
I don't think its even relevant to this discussion but idk enough about linuxes

Share Bear
Apr 27, 2004

Powerful Two-Hander posted:

select em all 1989, I am ANSI man, 27193736 returned rows

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

Sapozhnik posted:

epoll isn't good either tbh

actually its very good. kqueue is better but whatever.

Luigi Thirty
Apr 30, 2006

Emergency confection port.

I ran an epoll and it came back 99% ron Paul

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

Luigi Thirty posted:

I ran an epoll and it came back 99% ron Paul

lol

Asleep Style
Oct 20, 2010

Shaggar posted:

its not so much about unmanaged resources used by the long running task (though you absolutely need to worry about them), but more about the task itself. You need to manage the total number of those long running tasks which is definitely doable, but its one more thing to remember to do properly in your code. Plus your long running tasks need to be incredibly durable as the application pool may terminate at any time and its not going to wait for your tasks to finish (unless you do some kind of hacky stuff).

The design of asp.net is centered around requests being totally independent of other requests. When you adhere to this design it makes things much easier to maintain. Its not designed to handle long running tasks, so there are no mechanisms to handle them built into the framework. This means you need to design them yourself which, while possible, is more code to maintain in a system not designed for what you're doing.

Aside from the code maintenance benefits of separating short and long running tasks, you make it easier to understand the performance profiles of your 2 systems. This makes it easier to scale the overall system since you've separated 2 totally different task profiles into totally different subsystems.

Thanks for posting this, it's super helpful. Truly I am in the right thread

Lutha Mahtin
Oct 10, 2010

Your brokebrain sin is absolved...go and shitpost no more!

Luigi Thirty posted:

I ran an epoll and it came back 99% ron Paul

pseudorandom name
May 6, 2007

CRIP EATIN BREAD posted:

actually its very good. kqueue is better but whatever.

https://idea.popcount.org/2017-02-20-epoll-is-fundamentally-broken-12/ https://idea.popcount.org/2017-03-20-epoll-is-fundamentally-broken-22/ :toot:

also https://medium.com/@copyconstruct/the-method-to-epolls-madness-d9d2d6378642

pseudorandom name fucked around with this message at 21:56 on Apr 19, 2019

AggressivelyStupid
Jan 9, 2012

Luigi Thirty posted:

I ran an epoll and it came back 99% ron Paul

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

Shaggar posted:

its not so much about unmanaged resources used by the long running task (though you absolutely need to worry about them), but more about the task itself. You need to manage the total number of those long running tasks which is definitely doable, but its one more thing to remember to do properly in your code. Plus your long running tasks need to be incredibly durable as the application pool may terminate at any time and its not going to wait for your tasks to finish (unless you do some kind of hacky stuff).

The design of asp.net is centered around requests being totally independent of other requests. When you adhere to this design it makes things much easier to maintain. Its not designed to handle long running tasks, so there are no mechanisms to handle them built into the framework. This means you need to design them yourself which, while possible, is more code to maintain in a system not designed for what you're doing.

Aside from the code maintenance benefits of separating short and long running tasks, you make it easier to understand the performance profiles of your 2 systems. This makes it easier to scale the overall system since you've separated 2 totally different task profiles into totally different subsystems.

.NET Core 2 added IHostedService and 2.1 added GenericHost so there is tooling built in for running long-running tasks in the background now

Shaggar
Apr 26, 2006
cool.

Adbot
ADBOT LOVES YOU

Brain Candy
May 18, 2006


listen, i didn't say linux had a good epoll in 2015

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