The tag has no usage guidance.

learn more… | top users | synonyms

2
votes
2answers
2k views

Should we (still) consider a synced XMLHTTPRequest bad practice?

As you may know, XMLHTTPRequest can be used synchronously or asynchronously, but synchronized requests have always been considered bad practice, and I've always agreed with that. Not only is the ...
4
votes
1answer
93 views

How do async action methods maintain their network connnection?

In ASP.Net MVC, the classic (synchronous) way to write an action method is to return ActionResult. More recently, the ability to perform action methods asynchronously was added, by allowing action ...
0
votes
1answer
48 views

Call any number of different web services at different time intervals

I am creating a program that needs to retrieve data at user-specified time intervals from different devices. An analog to what I am doing, is that I am performing requests to different web services. ...
1
vote
0answers
61 views

Downloading information, but just when needed

I'm struggling with thinking of how to implement the following (in java): I try to create a program, that displays information about lots of tv series. For this i use the website "Burning Series" ...
1
vote
0answers
46 views

Idiomatic way of uploading images using async to Sharepoint from ASP.NET 5

Another title could be 'How to make an async Repository pattern with image upload in ASP.NET 5' I'm making a site with ASP.NET 5 and it uses the CSOM (ClientContext, etc) to connect to a Sharepoint ...
10
votes
2answers
562 views

Why does C# allow you to make an override async?

In C#, when you override a method, it is permitted to make the override async when the original method was not. This seems like poor form. The example that brought me to this was this — I was ...
2
votes
1answer
28 views

Remote job execution and synchronization

I have master and nodes infrastructure. Master executes remote jobs on nodes. Each job returns success/failure message back to master. So the flow of execution is the following: master receives ...
1
vote
1answer
50 views

How to find the cause of an exception in async code

I often see myself trying to follow my own code to find out where the exception came from. The typical example is when some parsing fails, and I catch the execption. Then I spend a ridiculous amount ...
3
votes
1answer
30 views

Asynchronous socket.io for lots of concurrent messages

We have a web application which currently operates like this on a typical view/page: the front has to display 100+ "previews" (in the form of base64 images) each of this preview is built on-demand ...
0
votes
1answer
130 views

Handling multiple asynchronous events - Wait for pending offers to process on new offer?

I have a programming problem, that I don't know how to solve. And while I have provided a sample of my code, I am interested in a conceptual answer on how to resolve this problem. On a tradeOffers ...
15
votes
3answers
686 views

How can I diagnose async/await deadlocks?

I am working with a new codebase that makes heavy use of async/await. Most of the people on my team are also fairly new to async/await. We generally tend to hold to Best Practices as Specified by ...
1
vote
1answer
176 views

HTTP Async/Await Task: avoid flooding server with requests?

I have a scenario where I have a Windows Store Application, there is a page with a search functionality, the user types names in a textbox and the app searches for names similar to the typed text. ...
1
vote
0answers
129 views

Is the logic behind `Asyncio.wait()` and async/await, the same, just the code is written differently (syntax)?

I'm learning Python, more specially parallel programming using Python Parallel Programming Cookbook by Giancarlo Zaccone. At the time the book was published async/await was still in the beta version ...
1
vote
0answers
169 views

What is the “async desaster” Detlef Vollmann was talking about at Meeting C++ 2014?

I found the slides of his talk there: https://meetingcpp.com/tl_files/2014/talks/executors-meetingcpp.pdf In one of the last pages, he is talking about the "async desaster" (which I, as a non-native ...
6
votes
1answer
161 views

Readiness vs. Completion Async IO Memory usage?

I was watching this talk about implementing Async IO in Rust and Carl mentions two potential models. Readiness and Completion. Readiness Model: you tell the kernel you want to read from a socket do ...
0
votes
0answers
111 views

Enforce No Multiple Async Entity Framework Operations

We are working on a large-ish MVC web application with multiple backing stores including a SQL Server database accessed via Entity Framework 6.0. We are using asynchronous operations wherever we can, ...
2
votes
2answers
279 views

Await state async

For speed we sometimes return response to consumer before state is saved in DB. Sometimes (Mostly for our automated consumers) this can break because the want to make actions on the saved data before ...
0
votes
2answers
503 views

Too many REST API calls on a page?

A web app designed with highly modular, small components (in this case using AngularJS directives but could just as easily be WebComponents, ReactJS components, or any other technology). Components ...
3
votes
3answers
647 views

What is meant by XML/XSLT/XPath and asynchronous programming?

I understand that (1) XML/XSLT/XPath and (2) asynchronous programming may not be related to one another. My questions are: When a C# developer job is advertised saying: "the following skill is ...
3
votes
2answers
240 views

Async library guidance

I'm creating a library that contains a class that exposes several Async methods: public class MyClass { public async Task<Foo> DoFooAsync() { /*...*/ } public async Task<Bar> ...
4
votes
1answer
429 views

C# async/await: Pedantry vs. the Debugger

I'm playing around with async and await, and they seem pretty intuitive, but some of the things I'm reading about these keywords doesn't make sense to me. In fact, some of it seems to me to be ...
1
vote
1answer
96 views

Is async keyword an ultimate replacement for asyncio module?

Recently, there was a rise of interest toward asynchronous programming in Python community. First prominent expression of this interest was the appearance of Asyncio —codenamed Tulip— framework [PEP ...
3
votes
1answer
87 views

Connection between futures and exceptions?

Is there a connection between futures and exceptions? async-await looks very similar to throw-catch.
2
votes
1answer
98 views

What are the underlying patterns in systems allowing asynchronous operations?

Say I'm working with a system that allows async, nonblocking operations. If I queue up a set of those operations and specify their result buffer references: nonblocking_write( message, write_buffer ...
1
vote
1answer
749 views

Is “lazy loading” factories in AngularJS using this $q.defer method good practice

I guess I don't believe in myself as a good programmer but I found out this method on my own (not suggestion I'm the first one to do it, but I didn't follow a guide) so it must be broken somehow. $q ...
1
vote
1answer
133 views

Mixing reactive programming with non-reactive return requirements

Variable context from an initial non-reactive caller The whole application cannot be reactive i.e. this method needs to return a result here public string GetTextOfInterest() { var ...
3
votes
1answer
868 views

Implementation of Asynchronous function call in C

I took it upon myself recently to work towards making a general-purpose Translator to automatically translate js programs into C, but I got stuck when thinking of asynchronous behaviour. Using ANSI / ...
1
vote
0answers
61 views

Job queue dispatching based on resource constraints

We have a job-queue shaped hole in our architecture, but it isn't immediately obvious that there's a piece of existing software to fill it. There may be a reason for this, or there might not, so let ...
5
votes
1answer
6k views

Async Controllers in ASP.NET MVC: Real Advantages / How Achieved?

I have been working through an article about asynchronous controller methods in ASP.NET MVC (http://visualstudiomagazine.com/articles/2013/07/23/async-actions-in-aspnet-mvc-4.aspx) and I think I may ...
0
votes
2answers
123 views

When are nonblocking read or receive operations useful?

Regardless of library, language, or spec, asynchronous send/write operations make sense to me, because code later in the execution path may not have any dependency upon the success or failure of the ...
1
vote
1answer
117 views

GUI concept for a reactive, asynchronous graphical editor

I think I could describe this problem in an abstract way, but I suppose it will be easier to understand when I describe it in a real world environment. The Problem Imagine a graphical editor where ...
3
votes
1answer
321 views

Why do browsers clamp timeouts and intervals?

I've been working on some abstractions of setTimeout and setInterval in order to process large sets of data without blocking the event loop in the browser. Upon this, I have discovered that browsers ...
1
vote
1answer
93 views

excute Vs excuteOnExecutor [closed]

There are two ways to execute AsynTask, i.e., execute and executeOnExecutor. I already know that execute works serially and executeOnExecutor works in parallel. So my question is: Which one to use? ...
0
votes
1answer
109 views

Is there a standard to imitating an async filestream

Im trying to replace an async filestream method, which is reading data from a Hid Device and feeding it to the UI. Ive considered writing the output into a log and then importing that log again, but ...
2
votes
1answer
816 views

Use cases and usage patterns of futures vs callbacks

I've become interested in futures lately, mostly due to their inclusion in standard C++ - but I see there is an active debate over futures vs. callbacks in many programming areas, such as Node.js. ...
0
votes
2answers
419 views

What are the advantages of using async JavaScript modules (like AMD) for traditional sites?

This is specific to JS in the browser for a traditional multi-page site (i.e. not a single-page app). For single-page apps, the advantages are pretty clear: the main view page is going to be ...
22
votes
5answers
3k views

Asynchronous Programming in Functional Languages

I'm mostly a C/C++ programmer, which means that the majority of my experience is with procedural and object-oriented paradigms. However, as many C++ programmers are aware, C++ has shifted in emphasis ...
2
votes
0answers
190 views

Callback pattern handling exceptions - Best practices in .NET 3.5

I am looking to implement the callback pattern with error handling such that error is caught and pass to the callback code with the response. Since I am using .NET 3.5, I cant use Task (TAP) pattern ...
3
votes
2answers
353 views

Data Access Layer with Asynchronous services like MQ

I am tasked with creating a development, design and architecture guide for a large multi-year project. I have to dictate best design practices for a number of architectural perspectives. See the ...
6
votes
1answer
937 views

Blurring the lines between async and regular functions in C# 5.0

Lately I can't seem to get enough of the amazing async-await pattern of C# 5.0. Where have you been all my life? I'm absolutely thrilled with the simple syntax, but I'm having one small difficulty. ...
3
votes
5answers
605 views

Why can't a server continue to act on a request after sending the response?

Say for example I've got a RESTful webservice, and I need to support creating a widget via a POSTed http request. I need to Deserialize the POSTed widget. Validate the deserialized widget. Persist ...
2
votes
2answers
529 views

What to Return with Async CRUD methods

While there is a similar question focused on Java, I've been in debates with utilizing Task objects. What's the best way to handle returns on CRUD methods (and similar)? Common returns we've seen ...
5
votes
1answer
388 views

What are the benefits of Android way of “saving memory” - explicitly passing Context objects everywhere?

Turned out, this question is not easy to formulate for me, but let's try. In Android, pretty much any UI object depends on a Context, and has defined lifetime. Android can also destroy and recreate UI ...
19
votes
3answers
9k views

What determines which Javascript functions are blocking vs non-blocking?

I have been doing web-based Javascript (vanilla JS, jQuery, Backbone, etc.) for a few years now, and recently I've been doing some work with Node.js. It took me a while to get the hang of ...
2
votes
0answers
67 views

What happens differently when you add a task Asynchronously on GAE?

Google's doc on async tasks assumes knowledge of the difference between regular and asynchronously added tasks. add_async(task, transactional=False, rpc=None) Asynchronously add a Task or a list ...
0
votes
2answers
1k views

How to present asynchronous state change in chart or diagram?

I started to study about state transition chart. As I see, it assumes all state transition is done instantly with no time consuming. But in most of my case, I'm heavily depending on asynchronous I/O, ...
6
votes
1answer
1k views

Designing interfaces and async

Suppose I have created interface IFolderRepository with methods like that: IEnumerable<Folder> GetAllFolders(); Folder GetFolderWithId(int id); void AddFolder(Folder newFolder); void ...
3
votes
2answers
748 views

Converting event-based asynchrony to C#5 async

We currently have an interface for an asynchronous video decoder that runs on its own thread. Basically you feed it some data and it'll eventually call you back on its thread through some events, like ...
3
votes
3answers
3k views

How to optimize calls to multiple APIs at once and return as one set?

I have a web app that searches across 2 APIs right now. I have my own Restful web service that I call, and it does all the work on the backend to asynchronously call the 2 APIs and concatenate them ...
1
vote
0answers
1k views

Best method for async initialization of view model in MVVM pattern (WPF)

I'm working on a business application (C#, WPF, EF, MVVM). I need to load a bunch of items from database, create view models for them and put them in a window. Is there a way to create the view model ...