using a priority queue - stack

You are developing the help desk application of a company. Request of issues will be stored to be served on a priority basis. For each issue, the name of the employee and the description will be stored. Make sure to add an integer to save priority. Insert issues and make the lowest priority be at the beginning of the queue. Implement a priority queue using C++ for issues. Create a menu with the options to add a new issue, service the issue with minimum priority number and any other relevant options. Use a priority queue for this.

Related

Question on sprint blocker and scope change

I've had three items assigned to me for the current sprint, two of them categorized as "blockers." The third item, in 'done status,' had a requirement change today.
I checked on what "blockers" mean, and they are things preventing you from getting a task done, right? So how can a goal itself be a blocker?
Also, I've been forced to do a lot of context-switching this week in the past. This is due to support for a couple of projects. However, it keeps me from settling into the blocker tasks.
By the way, I did get one blocker task reclassified as "major" due to effectively going over the Scrum Master's head. However, it was a non-customer-facing pilot project that I had been pulled into a call on. So both of the blockers came about this way.
The third project had a scope change due to a bug discovered (not my code), which affected me.
I'm not clear how to handle all this. Any ideas?
The word 'blocker' does sometimes get used as a way to describe a very high priority task.
e.g. This ticket is a blocker for another team, so we must get it urgently fixed.
I agree this can be confusing!
When a task (Task_1) is a 'blocker', it means that without solving it, another task (Task_2) in the team cannot be completed.. so 'blocker' tasks usually have a high priority.
So you can imagine both tasks have to be done in series, like in an Airflow DAG:
Task_1 >> Task_2

Different DispatchQueue for different requests

I want to have different priorities for different http requests and I want to be able to stop/pause some requests immediately and to execute only some of them if I have a request with High priority. I was going to use different approaches, but it seems that all of them are deprecated now:
1) To use AFHTTPRequestOperation, so I can create different OperationQueue base on DispatchQueue and add operations there, but it's deprecated in a new version of AFNetworking
2) To use different DispatchQueues with different priorities for different Synchronous requests (using NSURLConnection.sendSynchronousRequest) (so I can stop some queues if I have highest priority operations and I can cancel operations immediately). But as far as I understand according to Stackoverflow Question , this way is deprecated, so I can't send a Synchronous request.
I understand that there are ways where Requests seem to be Synchronous using semaphores, but that's only an illusion, because all the requests will be executed in the queues I can't control.
Are there any ways to control the DispatchQueue (or OperationQueue) where the request is executed?
You should/could use NSURLSessionTask/URLSessionTask subclasses to grab data from the network. You could easily encapsulate them inside one NSOperation/Operation subclasses (see this slide.
You would just need to add cancellation support to it. You can find information about cancellation inside the Responding to the Cancel Command section of the NSOperation documentation.
To play with priorities you have several tools:
To handle priorities between OperationQueue instances, you can attribute them different qualityOfService values.
To handle priorities between Operation instances, you can attribute them different qualityOfService, queuePriority or threadPriority values.
Some additional explanation about those parameters can be found in the Prioritize Work with Quality of Service Classes section of the Energy Efficiency Guide for iOS Apps.

Notifications on background tasks in NewRelic

I'd love to be notified when any of my background tasks causes an error. We use DJ on heroku and NewRelic is monitoring it very well, i can even see the errors themselves, i'm just not sure how to create a rule for an alert or a notification for these specific transactions (or for any background task error for that manner)
Thanks a bunch!
For the agents, .Net, PHP, Java, and the like, New Relic alerts on only two events: downtime events and low Apdex scores. The best you could do is pull a specific transaction out as a Key Transaction which would allow you to assign it an Apdex threshold that is different (usually lower) than the main application so that if a small number of errors do occur it will lower the Apdex enough to create an alert. Since key transaction Apdex scores feed into the main application Apdex score it will lower that one as well as a side effect.

How do i retrieve the tasks for a project under the priority heading?

How do i retrieve the tasks for a project under the priority heading?
For example i have recruitment project, i want to retrieve tasks under "Interviewed" heading (priority heading)
Thanks
There isn't currently a way to only get tasks in a given section, so the only way to do this at the moment is to fetch all tasks for the project and then filter on your side. Fortunately, the API will return the tasks in the appropriate order such that all the tasks in a given section appear after it.
It's clunky, and we do intend to provide better support for sections at some point in the future, but it's not on our immediate roadmap so I'd definitely recommend this workaround for now. If the response is simply too large, one hack could be to get the ID of the "Interviewed:" task, then fetch only the IDs from the project (GET /projects/.../tasks?opt_fields=id), and then iterate over the tasks by ID. I'd only recommend this approach if the project is genuinely too big to fetch at once, though.

Multithreading IOS concepts to explore

i am working in a very complex application in which,i need to improve the performance.
i have keen interest in Multithreading and have studied docs of GCD and Blocks.
Although, i have improved the performance quite a bit.
i am searching for few answers :-
We have global queue in iOS -> how to check what other tasks they execute or these are vacant queue made for us to use.
If we make our custom queue
what priority it has wrt already existing global concurrent queues.
How we can set priority of our custom queue, if we make >2.
If we make custom serial/concurrent queues -> how to set priority statically or dynamically if possible.
Thanks, if anybody has answers...

Resources