Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "scheduler"
-
I just want to say FUCK YOU to the guy who had the great Idea of putting the EDIT button 10 pixels away from the DELETE button on this internal batch processing scheduler tool.5
-
Okay, story time.
Back during 2016, I decided to do a little experiment to test the viability of multithreading in a JavaScript server stack, and I'm not talking about the Node.js way of queuing I/O on background threads, or about WebWorkers that box and convert your arguments to JSON and back during a simple call across two JS contexts.
I'm talking about JavaScript code running concurrently on all cores. I'm talking about replacing the god-awful single-threaded event loop of ECMAScript – the biggest bottleneck in software history – with an honest-to-god, lock-free thread-pool scheduler that executes JS code in parallel, on all cores.
I'm talking about concurrent access to shared mutable state – a big, rightfully-hated mess when done badly – in JavaScript.
This rant is about the many mistakes I made at the time, specifically the biggest – but not the first – of which: publishing some preliminary results very early on.
Every time I showed my work to a JavaScript developer, I'd get negative feedback. Like, unjustified hatred and immediate denial, or outright rejection of the entire concept. Some were even adamantly trying to discourage me from this project.
So I posted a sarcastic question to the Software Engineering Stack Exchange, which was originally worded differently to reflect my frustration, but was later edited by mods to be more serious.
You can see the responses for yourself here: https://goo.gl/poHKpK
Most of the serious answers were along the lines of "multithreading is hard". The top voted response started with this statement: "1) Multithreading is extremely hard, and unfortunately the way you've presented this idea so far implies you're severely underestimating how hard it is."
While I'll admit that my presentation was initially lacking, I later made an entire page to explain the synchronisation mechanism in place, and you can read more about it here, if you're interested:
http://nexusjs.com/architecture/
But what really shocked me was that I had never understood the mindset that all the naysayers adopted until I read that response.
Because the bottom-line of that entire response is an argument: an argument against change.
The average JavaScript developer doesn't want a multithreaded server platform for JavaScript because it means a change of the status quo.
And this is exactly why I started this project. I wanted a highly performant JavaScript platform for servers that's more suitable for real-time applications like transcoding, video streaming, and machine learning.
Nexus does not and will not hold your hand. It will not repeat Node's mistakes and give you nice ways to shoot yourself in the foot later, like `process.on('uncaughtException', ...)` for a catch-all global error handling solution.
No, an uncaught exception will be dealt with like any other self-respecting language: by not ignoring the problem and pretending it doesn't exist. If you write bad code, your program will crash, and you can't rectify a bug in your code by ignoring its presence entirely and using duct tape to scrape something together.
Back on the topic of multithreading, though. Multithreading is known to be hard, that's true. But how do you deal with a difficult solution? You simplify it and break it down, not just disregard it completely; because multithreading has its great advantages, too.
Like, how about we talk performance?
How about distributed algorithms that don't waste 40% of their computing power on agent communication and pointless overhead (like the serialisation/deserialisation of messages across the execution boundary for every single call)?
How about vertical scaling without forking the entire address space (and thus multiplying your application's memory consumption by the number of cores you wish to use)?
How about utilising logical CPUs to the fullest extent, and allowing them to execute JavaScript? Something that isn't even possible with the current model implemented by Node?
Some will say that the performance gains aren't worth the risk. That the possibility of race conditions and deadlocks aren't worth it.
That's the point of cooperative multithreading. It is a way to smartly work around these issues.
If you use promises, they will execute in parallel, to the best of the scheduler's abilities, and if you chain them then they will run consecutively as planned according to their dependency graph.
If your code doesn't access global variables or shared closure variables, or your promises only deal with their provided inputs without side-effects, then no contention will *ever* occur.
If you only read and never modify globals, no contention will ever occur.
Are you seeing the same trend I'm seeing?
Good JavaScript programming practices miraculously coincide with the best practices of thread-safety.
When someone says we shouldn't use multithreading because it's hard, do you know what I like to say to that?
"To multithread, you need a pair."18 -
Most ignorant ask from a PM or client?
Migrated to SharePoint 2016 which included Reporting Services, and trying to fix a bug in the reporting services scheduler, I created a report (aka, copied an existing one) 'A Klingon Walks Into a Bar', so it would first in the list and distinct enough so the QA testers would (hopefully) leave it alone.
The PM for the project calls me.
PM: "What is this Klingon report? It looks like a copy of the daily inventory report"
Me: "It is. The reporting service job keeps crashing on certain reports that have daily execution schedules."
PM: "I need you to delete it"
Me: "What? Why? The report is on the dev sharepoint site. I named the report so it was unique and be at the top of the list so I can find it easily."
PM: "The name doesn't conform to our standards and it's confusing the testers."
Me: "The testers? You mean Dan, you, and Heather?"
PM: "Yes, smartass. Can you name the report something like daily inventory report 2, or something else?"
Me: "I could, but since this is in development, no. You've already proofed out the upgrade. You're waiting on me to fix this sharepoint bug. Why do you care what I do on this server? It's going away after the upgrade."
PM: "Yea, about that. We like having the server. It gives us a place to test reports. Would really appreciate it if you would rename or delete that report."
Me: "A test sharepoint reporting services server out of scope, so no, we're not keeping it."
PM: "Having a server just for us would be nice."
Me: "$10,000 nice? We're kinda fudging on the licensing now. If we're keeping it, we will be required to be in compliance. That's a server license, sharepoint license, sql server license, and the dedicated hardware. We talked about that, remember?"
PM: "Why is keeping that report so important to you? I don't want to explain to a VP what a Klingon is."
Me: "I'm not keeping the report or moving it to production. When I figure out the problem, I'll delete the report. OK?"
PM: "I would prefer you delete the report before a VP sees it."
Me: "Why would a VP be looking? They probably have better things to do."
PM: "Jeff wants to see our progress, I'll have to him the site, and he'll see the report."
Me: "OK? You tell Jeff it's a report I'm working on, I'll explain what a Klingon is, Jeff will call me a nerd, and we all move on."
PM: "I'm not comfortable with this upgrade."
Me: "What does that mean?"
PM: "I asked for something simple and I can't be responsible for the consequences. I'll be documenting this situation as a 'no-go' for deployment"
Me: "Oookaayyy?"
I figured out the bug, deleted the 'Klingon' report, and the PM couldn't do anything to delay the deployment.4 -
Me: develops my first android app with firebase by google.
Me: finishes app, tests it and it works.
Firebase after 3 months: we were first going to scale our servers on our own based on how many people are simultaneously using your app. But now fuck you, we will have a cap of 100000 simultaneous users.
Me: fuck this kills my app if it scales. Have to Shard everything on the db side and overhaul the entire app to work will multiple db instances. Takes a month.
Android after 6 months: dude your app is working fine without any hiccups. Let me fuck it up. We will stop all your services when your app is not running or backgrounded. Also we will make it illegal to start services in this case and we will throw exceptions.
Me: what the actual fuck. They now want me to focus on a JobScheduler, fine... But now even intent services won't work properly. So use a job scheduler to start a JobIntentService which is essentially another job scheduler for queuing. wtf android.
Ps solved it and works again.
PS: WAITING FOR ANDROID TO FML WITH ANOTHER NEW VERSION. Maybe they'll say you can't run your app at all now4 -
Last week one of my clients asked me to visit their HQ to take a look at some report tool that has stopped to generate reports. This tool was not made by me, it has zero documentation, but WTH, I can take a look.
So I went to the HQ. When a guy that has called me told me that someone else will be here any second to talk to me, I began to be a little suspicius.
It turned out they want a new app. Not going into detail something that will read bar codes, do some stuff in a database, generate some reports etc. And he need it made in 2 weeks. I have reminded him I am involved in another project that I need to deliver in a month, and it is virutally impossible for me to develop what they want in this time. I offered them that maybe we should hire a team or at least another developer. Hi nodded and ignored what I've said. Well, he said we have maybe 2 weeks more, but that's it. Ok..
So, while working on the other project wich ramained a priority for me, I've began to do some thinking, some research on how to deliver what they want as fast as possible.
Today morning I went to the HQ again to finally take care of that report tool. But never mind that, I also had a chance to talk about the new app. So we made some Agile, wrote down epics, stories, talked about hardware etc. After two hours, it turned out, that more than this bardcode reading app the need something else! Barcode reading yes, but even more they need a scheduler for their emloyees, custom functionalities, plus some HR tools, other fancy stuff. But they don't even have a full concept yet. And it needs to be done until end of the month (9 days), maybe two weeks later.
So again I told them I will not be able to deliver this in set timeframe. That possibly we need to hire someone and even then it's questionable if this will be possible given all circumstances, time needed test, to deploy (in 14 diffrent locations all over the country). Actually if I had all software ready today the deployment, tests, training... So I offered that maybe we can figure out some temporary solution based on third party software.
At this point my requests and suggestions have been ignored again. Sadly my contract with them states I can not pass this to someone else, it all have to go trough them. And tehy don't want to spend extra money (??) etc.
Also from what I understand, this whole company's (~1000 employees) be or not to be can be affected by this project.
Sometimes I just don't understand business.1 -
Well I FUCKING FINALLY managed to build a program that makes my dad's printer print automatically.
Have ranted about this on my previous rant.
My recent approach was actually overengineered all over the top. I was using pyautogui to simulate the mouse that would call the settings window on Windows, which would print a nozzle test (the translation for "Düsentestmuster" according to google?). The more I worked with it, the more I would have had to care about edge cases when calling the settings and god knows what else...😖
So I left the idea.
What I came up with was a python script with some copy-pasted code of an example from the win32print api that printed an image that I specified, so it would use all inks. Somehow it works perfectly...
After that I used the win32api. ShellExecute() with ghostscript to print a PDF for the PGBK ink.
Finally a batch script to run this python script on the task scheduler. No converted .exe as dependencies and whatnot let it all go to hell.😒
It's not quite what I had originally anticipated as a solution but IT FINALLY FUCKING WORKS!!
...😪 It took way longer than expected and although I somehow couldn't manage to print all on 1 paper, I'm still satisfied that it really works.
That's all, had to vent my frustration and share this personal success.12 -
Just found this absolute 5 head, galaxy brain implementation in a piece of code which is called in a loop by a background scheduler which has performance issues.
There are 20+ properties, some which are recursively calling other properties with the same implementation style in this class.
Constant out of memory errors have been reported for this software, I wonder why...15 -
We'd just finished a refactor of the gRPC strategy. Upgraded all the containers and services to .Net core 3, pushed a number of perf changes to the base layer and a custom adaptive thread scheduler with a heuristic analyzer to adjust between various strategies.
Went from 1.7M requests/s on 4 cores and 8gb ram to almost 8M requests/s on the same, ended up having to split everything out distributed 2 core instances because we were bottlenecking against 10gb/e bandwidth in AWS.2 -
The Windows update task scheduler: "I'll make 19 very very important, 20 very important, 12 important, 0 really important and 400 optional updates. And when you are currently at a meeting in the next room, I'll gonna restart in 15 minutes and make 451 updates, when you want to show the demo. "
-
one fucking day of coding
[master bf2b7e5] implement scheduler that process next lbmm every few minutes
29 files changed, 3741 insertions(+), 841 deletions(-)
fuck ya
and its all cleaner than a... uh, something that's really clean4 -
Hey curious... what motivates everyone to code?
I've actually finished a few apps to get rid of some pain points at work...
and cuz i wanted to do some real coding...
https://github.com/allanx2000/...
https://github.com/allanx2000/...
Actually this may be the first time I've actually written any personal code this year...
So I guess for me I just have to be pissed off enough to actually bother trying to fix something.9 -
Spent 15min automating our Spotify playlist.
Task Scheduler runs a PowerShell script at system startup and 15:00, based on the time it will either start our "daily music" or "shitty memes" playlist using the Spotify API. -
I wrote driver to a research OS as a university project. The system behave weird in some subtle ways, and I assumed that's my fault, as an inexperienced programmer.
After two sleepless weeks of chasing ghosts, I've realized that for some reason there is a context-switch that *did not* involve the scheduler! Further investigation led to the actual bug: the main trap code in the kernel was maskerading as different process just to be able to work on its virtual address, but never put that mask off!
It could have been found easily by a static analysis tool, given that a non-volatile global variable was only written to and never read; but we didn't use any.2 -
I was working for a project with one of the project managers. Despite several discussions, he was not ready to have provisioned for procurement of couple of extra drives for database backups. Also because it's always how they worked, developers were allowed to make changes to the production databases directly.
Since I knew it was going to be burning some day, despite his negligence, I ran a script to take full database backups every night, compress, and remove old backups all to do in the drives we had on server. Sat it automated using scheduler.
One day it happened that one of the junior developers deleted one major table taking whole production down. Next thing you know everyone went crazy. Since I felt bad for the managers and users, I was able to restore database using backup from last night.
You know who jumped in first before senior management to take credit of all this and got some nice kudos..that project manager. Also, you know who got burned..it would not be a rant if I did not got schooled for not following on the wisdom of project manager.
Anyways, we are still not taking database backups (as per project manager) -
Status: Got off hour+ long call with provider teir2 tech support because their "sync service" isn't syncing. "It's all cloud controlled" they tell me. Whatever.
It does have the ability to install a Windows service to do the needful! 🎉
However the program that does the actual syncing is the "launcher" application, and the service's only job is to tell the launcher to run. 🤦♂️
Their assumption is that there will be a user that gets smacked in the face with a UAC prompt when they first log in and just shrug it away. Which is the Launcher application.
The sync service is not capable of running the sync application without a desktop session I guess?
MOTHERTRUCKERS do you understand what the point of a Windows Service is?!?
I tried relating this situation to how Windows Update works: It will update whenever the fuck it wants without the user doing anything because of the Service, and you only configure the service with the Control Panel/Settings App. You don't need the Control Panel/Settings App running in order for Windows Update to work, but it's there for status info and configuration.
Anyways, this software does not do that. It apparently *requires* both the service AND the launcher program running in order to work. Not work properly, to work *at all*.
Anyways, It's installed on a computer that's not normally logged into, but is always on (where other "always needs to be running" programs live). Normally the hackaround would be to launch the program via Scheduled Task.
This program apparently does not want to run as a scheduled task, or the Task Scheduler is being stupid and can't figure out "Hey, it's time to run this program. Do it!". Naturally it runs if told manually.
The fact that I'm even doing this at all is stupid, but even more infuriating is that it's just not working unattended. You know, what the service should be doing. But no, the service runs happily all alone, doing nothing of note, while Task Scheduler sucks its stick running OneDrive installer but not the launcher program.
Pluckin' donuts...2 -
Gahhhh!!!! I just finished a project that let every kid in my school have a perfect class scheduler, gradebook, etc., in java. Now I have no idea what to do. I want to do something in java because I want to have a very strong base in the language. Do you guys have any ideas?4
-
Context: ive been porting a single threaded D.A.G scheduler into a lockless multithreaded one. Point is its an objectively complicated project where theres lots of overlap in the code and architectural boundaries are very fuzzy.
My boss: "Can you just make new branches for every 'large' change youve done. Its too hard to merge this one giant branch youve got"
Me: "Fuck bro, but this is 2 months worth of significant refactoring where the commits are not atomic and you told me way back then that it was cool to work in my own repo. Now ive got to go redo half my work"
Boss: "Well yea but isnt it so much better to work with clearly seperated histories"
Me: "yea its great if you tell me thats the workflow you want upfront. This is gonna suck but ill but my balls and dive into this pit of lava if u say." -
A game taking place inside an operating system. Like Tron but needs to have much more solid analogies. User's body as tty process. Some representation of scheduler priority and memory allocation. Forking. Children and zombies. Init.
Some process-ownable token representing file handles.
Network ports as portals through which data may be sent by acquiring a file handle and using it.
/proc, /mem, etc are extreme stretch goals.
Never really started because I couldn't decide how to represent all the different parts so they would all be consistent *and* entertaining
As an extension of the extreme stretch goals, a multiplayer functionality where players can shell into each other's game worlds ("computers") -
I'm calling you out, Asus, fix your absolutely shitty piece of software or I'm never buying a motherboard from you again.
A little explanation: my PC woke up from sleep like this. On another occasion before I could take the screenshot, the CPU was sitting almost idle at 45 degrees C. The CPU fan senses that it has to spin up, but never actually does so.
I've had the opposite thing before - a case fan spinning up not wanting to spin down even if the temps are fine - which is preferable because it only causes a little bit of noise. But this here could potentially cause damage to the CPU if I put some load on it without looking at the temperature. I've partly remedied the issue by writing a batch script that kills and resets the fan control service and is triggered by Task Scheduler on resume from sleep - a thing every average Joe should do, right?
It's a shame for top-notch hardware to have to go together with such crappy piece of software. This is the X99 Sabertooth that cost me 450 EUR originally.15 -
Expanding a batch system on production
Set reservation to block the new nodes
Apply changes and restarted scheduler
(Reservation quietly lost, as it should persist)
Client called because jobs start to fail on new nodes…
Gahhhhhhh!!!!!! -
-Recently started a new job so I’m new to the infrastructure-
Spent the vast majority of the day trying to SSH into one of my company servers to sort some random bug out on the website & the connection kept being rejected despite the day before it working when passing the .pem key into the SSH along with the ip & my username, nothing new there.
Anyway, everyone’s mad busy so I don’t wanna bother anyone to ask why, so I check confluence, no documentation for SSHING into our scheduler or the code the server I need to access. Never-mind.
Spend another couple hours trying debug it on my own, no luck. Never-mind.
Finally seize my opportunity and ask for help; ‘Oh the server IP changes daily so you need to run a task through our scheduler that you need to SSH into to return the list of IPS and that dynamically changes so that’s how you get the IP’
Oh ok. Why is there no documentation for that again? I mean. Thats generally some pretty important information you’d pass onto your starters.
At least I can say I won’t be making that same mistake again.5 -
Some of my rants are about a previous dev who, to be nice, didn't play by the rules and did his own thing. Yesterday, I discovered a legacy app he had written that was essentially his own hand rolled version of Task Scheduler. From what I can tell, there's no functionality that isn't already handled by Task Scheduler, this guy just liked making his life impossibly hard.1
-
Making distributed scheduler that queue and run tasks on containers or other executors in future and also pulls new tasks from defined git repositories.
Tasks are added based on simple yaml configuration.
Need that for my side projects that gather data from multiple sources from time to time.
k8s looks to heavy for that and airflow can’t be configured like I want it to be so I started writing my own on Monday.
Nearly finished poc version.2 -
Setting up a task with windows task scheduler is fucking confusing if you need time-based repetition. At least if you're not doing it in english. Some options seem like the same thing, some are probably badly translated.2
-
How often should I worry about keeping an engine, non-enterprise, at arms with the existing frameworks if all I need is an event scheduler and animation possibility?
I have the need for task, animation and secure through the use of executables. Why should my engine be larger than 3mb in code? -
Called in for an interview for graphic design, didn't get it. Same company contacts me a few months later for a web design opening. I get the job. They were behind on graphic design work, so my first few months were helping them to catch up. One day they asked how the web site was going. I was like, uh, you've been scheduling me graphic design since I started. It took a few more months to get my plate cleared completely but I was able to finally build out their site and a photo appointment scheduler that we could all love.
-
This one may be obvious but I thought I'd share it:
By default, Windows uploads analytical data of your machine to Microsoft via the Telemetry processes. These are quite the unnecessary and annoying resource hogs.
Well, you can turn that off by searching for Task Scheduler, looking for the Microsoft Compatibility Telemetry tasks and disabling them. Some of them are called Application Experience and Compatibility. I'm sure you'll find it.
As a side note, you can reschedule all of those tasks as you see fit. Some of them are useful and necessary but some aren't, causing bloat. For the useful ones, you can reschedule them once a month or something and not every day.
Pragmatism advised.4 -
lol
found an old config file on my external drive for all my torrent files. awyisss. my SSD died out of nowhere last year and I thought I lost all my torrent configs! I had hundreds of TV series and stuff and I kept track which ones I watched and didn't in the client. so when the SSD died I lost all my knowledge of my progress. but I found this config file just now and imported it. omg booyah. I think I got one show since this backup. godsend
decided to export settings again and it said I can set it on a schedule. go to the scheduler tab in the settings and I have no clue what's going on. nothing about exporting settings, it just has schedule configurations that seem to conflict. then I realized. the main client maybe has a schedule tab icon. bam am right. so in settings I turn on scheduler and then the main app gives me access to the scheduler tab and if I go there I can click "add" and then I can schedule regular config backups
bruh this UI is so jank. but it actually is impressive. because. while I have experience in designing websites, when I played around with making a GUI in rust, which would be native, I have absolutely no clue how to make an app on this tech. now I'm looking at this complex torrent client with its bazillion features in absolute awe.
*takes notes*
I can only aspire to be so genius as to allow you to turn on and remove tabs in the settings menu. now it makes sense why all the windows always had awkwardly sized panels. this genius man.
however did he come up with that?! ALL THESE NEW STANDARDS
honestly somehow it never occurred to me that native apps and web apps would have totally different ergonomics. I feel like I've found some kind of lost art from the ancient world. aaaaaaa -
could anyone help me calculating costs for AWS and Google Colab Services? I find it quite intransparent...
i would like to host 1x Python App which runs once a day or week (API call, enrichment uf JSON, JSON 2 CSV, FTP transfer). runtime is probably a few seconds, something between 1 and 5.
in AWS i created a Lambda function and for scheduling i guess i need CloudWatch. what really grind my gears is the combination of free contingent and paied service - i really don't have an overview right now, so my question here: how could i calculate it and what would be the monthly/yearly costs?
in Google Colab created a notebook and for scheduling i would need Google Cloud Scheduler. as far as i understand the hosting of the notebook is for free and the costs of cloud scheduler is $0.10 per job per project per month. 3 are for free. so 1 project, 1 job = scheduler for free?
Also, i'm open for other services such as digital ocean droplets or similar.
thx in advance for your help!8 -
I got situation here,
I am getting 524 error from cloud fare. I sent some data using AJAX, process it and then return the result. Since the data is large and have some SQL manipulation on it so it take a lot of time. I put the process in back end. But still even for 10k records it took 4-5 minutes to process, Issue is everything works fine but since cloud fare response time is 1-2 minute so it through 524 error (as it does not getting any response within its time frame). How I am suppose to tackle this. May be using job scheduler now ? My client simply refuse to send small data. My Friend is suggesting don't use ajax, simply reload the page. But again data is too much so page loading will also through 524 error. Kindaa stuck here. Any idea/suggestion how I can proceed.
Language I am using PHP. Database, MySQL and SQL.
Hmm Here is some more explanation
https://github.com/marcialpaulg/...
But not working
Here is also something
https://stackoverflow.com/questions...
But I am thinking why redirecting ? It doesn't make sense to me7 -
Spent two days writing an automated UAC bypass via the task scheduler because most customers are litteraly too stupid to press the yes button....