Skipping data in winsock?
Is it possible to skip a portion of the incoming data on a TCP stream socket, instead of having to read it into a buffer? Preferably, I'm looking for something that also works asynchronously. ...
Is it possible to skip a portion of the incoming data on a TCP stream socket, instead of having to read it into a buffer? Preferably, I'm looking for something that also works asynchronously. ...
When I try to add 3D-content to a Viewport3D, asynchronously, this results in "This API was accessed with arguments from the wrong context." in a TargetInvocationException. The 3D-content is generated from the data of a 3D-scanning device. The communication&calculations needed for that are done in a separate thread. First, I tried to a...
Hi guys! Please help! I call a threading.timer from global.asax which invokes many methods each of which gets data from different services and writes it to files. My question is how do i make the methods to be invoked on a regular basis let's say 5 mins? What i do is: in Global.asax I declare a timer protected void Application_Start() ...
Hi I'm designing code for downloads manager, and i wonder if there is good known patterns for the async operations? I asking it because i just started develope my own pattern. Download a single file itself is an async operation with start, stop, pause, cancel, showing progress and speed. Download one big file can actually download man...
Hello. I have a short lock guarded section in a method (that serves the request entirely) that makes all initializations (etc. log-related). So only 1 thread can be there at time. In this section I also load system data from database if not loaded. This is naturally executed only on 1st request and it does not matter it takes time and n...
I would like to provide a large number of inhouse .net applications with a lightweight way to announce that they are being used. My goal is to keep track of which users might benefit from support check-ins and/or reminders to upgrade. This is on an inhouse network. There is definitely IP connectivity among all the machines, and probab...
Is there any way to make non-blocking SOAP requests within EventMachine? I'm creating a ruby application which interacts with the google adwords api (which is SOAP based), using the adwords4r gem. The application uses EM to receive messages over a stomp connection, and then processes those messages by making SOAP calls to the adwords a...
I have several laptops in the field that need to daily get information from our server. Each laptop has a server2go installation (basically Apache, PHP, MySQL running as an executable) that launches a local webpage. The webpage calls a URL on our server using the following code: $handle = fopen( $downloadURL , "rb"); $contents = strea...
A (long) while ago I wrote a web-spider that I multithreaded to enable concurrent requests to occur at the same time. That was in my Python youth, in the days before I knew about the GIL and the associated woes it creates for multithreaded code (IE, most of the time, its not really multithreaded!)... I'd like to rework this code to mak...
How can you combine AIO and epoll together in a single event loop? Google finds lots of talk from 2002 and 2003 about unifying them, but its unclear if anything happened, or if it's possible. Has anyone rolled-their-own with an epoll loop using eventfd for the aio signal? ...
We have some code that uses a third party component to generate a PDF from a URL that we pass it (the URL being a page within our application). In the code, we instantiate the PDF generator and it creates the PDF in an asynchronous fashion. The problem I have is that if the URL that we pass it has a problem, there is no indication of t...
Is it possible to have cached queries asynchronous, so that no frontend user actually has to wait for a heavy query to finish? (I.e. heavy query is running as background thread, while (expired) data is delivered from cache. Use case: A web page displaying data, needing some time (too long to wait for when requesting a page) to be collec...
Hello, I'm building a very high performance Linux server (based on epoll, non-blocking sockets, and async disk IO [based on io_submit/io_getevents/eventfd]). Some of my benchmarks show that the way I handle sockets isn't efficient enough for my requirements. In particular, I'm concerned with getting data from the userspace buffer to the...
I am not a huge JavaScript performance guru. Simply wondering, can I make the following code anymore compact? Not as in packing or compressing it, but in the way it's written. (function() { var jq = document.createElement('script'); var an = document.createElement('script'); var cm = document.createElement('script'); var...
I am trying to run a function or procedure in Delphi asynchronously, but without using a component, is there a way to do it with delphi core functions? ...
I’m looking for the best way of using threads considering scalability and performance. In my site I have two scenarios that need threading: UI trigger: for example the user clicks a button, the server should read data from the DB and send some emails. Those actions take time and I don’t want the user request getting delayed. This scen...
Background: http://www.hanselman.com/blog/HanselminutesPodcast188ASPNETMVC2BetaWithPhilHaack.aspx Start from 27:15,RenderAction has been discussed at 28:43 that a RenderAction will not be part of Asynchronocity as an asyncronous action method called. (Let's say your home portal index action calling 1.GetNews 2.GetWeather 3.GetStock as...
We have a form with five <input type="file"/> elements that is in production and working great. We get request timeouts and MaxRequestLength exceeded errors on occasion. To prevent these errors, I planned to write some Javascript to upload the files one-at-a-time instead of all at once. Here is how I planned on doing this... On docu...
Today Google announced the support for asynchronous Google Analytics tracking. The asynchronous tracking is achieved using the async directive for the <script> tag. Which browsers support the async directive (<script async="true" />) and since which version? ...
/// <summary></summary> private Byte[] _ReceiveBytes(Int32 size) { MemoryStream memory = null; SocketAsyncEventArgs args = null; EventHandler<SocketAsyncEventArgs> completed = null; Exception exception = null; Int32 last_update = Environment.TickCount; Boolean finished = false; Int32 count = 0; Int32 rec...