latency

how to dispatch network requests to the (geographically) closest server

拈花ヽ惹草 提交于 2019-12-05 23:16:54
问题 I'm a Java coder and not very familiar with how networks work (other than basic UDP/TCP connections) Say I have servers running on machines in the US, Asia, Latin America and Europe. When a user requests a service, I want their request to go to the server closest to them. Is it possible for me to have one address: mycompany.com, and somehow get requests routed to the appropriate server? Apparently when someone goes to cnn.com, they receive the pictures, videos, etc. from a server close to

ZeroMQ - pub / sub latency

耗尽温柔 提交于 2019-12-05 22:46:31
I'm looking into ZeroMQ to see if it's a fit for a soft-realtime application. I was very pleased to see that the latency for small payloads were in the range of 30 micro-seconds or so. However in my simple tests, I'm getting about 300 micro-seconds. I have a simple publisher and subscriber, basically copied from examples off the web and I'm sending one byte through localhost. I've played around for about two days w/ different sockopts and I'm striking out. Any help would be appreciated! pub lisher: #include <iostream> #include <zmq.hpp> #include <unistd.h> #include <sys/time.h> int main() {

Dojo on a CDN vs own install

纵饮孤独 提交于 2019-12-05 14:21:28
I use quite a lot of Dojo, but to date I've only used it by including from a CDN such as AOL/Google. Are there advantages to hosting a copy of Dojo rather than using it via a CDN? I don't have much need to alter the code base, but I imagine there are other advantages/disadvantages? by hosting your own Dojo env. you are for example able to make a custom build of dojo. So you only need to load one *.js file. That saves traffic used by the xhr requests. -jstr Disadvantage to hosting anything externally is that you don't have control over it. You won't get this with the Google/AOL CDN but you

Google Web-fonts vs Actual font files - For all devices

只谈情不闲聊 提交于 2019-12-05 07:27:28
I'm looking to use Joesfin Sans. It's listed on Google web fonts. I also have the .eot, .svg, .ttf and the .woff. This means full compatibility with the files (as far as I know). My main question is: which is better? Does Google Fonts load faster? Is it more compatible? Or should I stick with the files? If you want the quick and easy solution, embed the font loader code and move on. Google is frequently adding more options/features to their service. Personally, I prefer to download the files from Google and work with them manually. Since there is a Google UI specifically for downloading your

kAudioDevicePropertyBufferFrameSize replacement for iOS

久未见 提交于 2019-12-05 07:13:58
问题 I was trying to set up an audio unit to render the music (instead of Audio Queue.. which was too opaque for my purposes).. iOS doesn't have this property kAudioDevicePropertyBufferFrameSize .. any idea how I can derive this value to set up the buffer size of my IO unit? I found this post interesting.. it asks about the possibility of using a combination of kAudioSessionProperty_CurrentHardwareIOBufferDuration and kAudioSessionProperty_CurrentHardwareOutputLatency audio session properties to

How to reduce CUDA synchronize latency / delay

亡梦爱人 提交于 2019-12-05 05:27:32
This question is related to using cuda streams to run many kernels In CUDA there are many synchronization commands cudaStreamSynchronize, CudaDeviceSynchronize, cudaThreadSynchronize, and also cudaStreamQuery to check if streams are empty. I noticed when using the profiler that these synchronize commands introduce a large delay to the program. I was wondering if anyone knows any means to reduce this latency apart from of course using as few synchronisation commands as possible. Also is there any figures to judge the most effecient synchronisation method. that is consider 3 streams used in an

USB: low latency (< 1ms) with interrupt transfer and raw HID

微笑、不失礼 提交于 2019-12-05 05:17:10
问题 I have a project that requires reading an external IMU gyroscope data at regular interval and sending the data over to an Android phone. I am using a teensy 2.0 board to query the IMU via I2C and send it over USB using raw HID. I am using RawHID variable which is declared in usb_api.h of usb_rawhid of teensyduino. I have read that a full-speed USB using interrupt transfer can have a 1ms maximum latency and would like to achieve this 1ms maximum latency. I am not sure what to look for to

(How) Can I reduce socket latency?

爱⌒轻易说出口 提交于 2019-12-05 03:43:12
问题 I have written an HTTP proxy that does some stuff that's not relevant here, but it is increasing the client's time-to-serve by a huge amount (600us without proxy vs 60000us with it). I think I have found where the bulk of that time is coming from - between my proxy finishing sending back to the client and the client finishing receiving it. For now, server, proxy and client are running on the same host, using localhost as the addresses. Once the proxy has finished sending (once it has returned

Latency between different sounds in iPhone application

妖精的绣舞 提交于 2019-12-05 02:46:28
问题 I’m trying to make a small iPhone application with some buttons to play WAV sounds. My buttons works, but I have a small latency (~ 0,5 sec). This is my .m file : #import "buttonSoundViewController.h" @implementation buttonSoundViewController //@synthesize player; -(IBAction) playSoundA:(id)sender{ NSString *path = [[NSBundle mainBundle] pathForResource:@"a" ofType:@"wav"]; AVAudioPlayer* theAudio = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL];

Howto take latency differences into consideration when verifying location differences with timestamps (anti-cheating)?

爷,独闯天下 提交于 2019-12-05 02:00:04
问题 When you have a multiplayer game where the server is receiving movement (location) information from the client, you want to verify this information as an anti-cheating measure. This can be done like this: maxPlayerSpeed = 300; // = 300 pixels every 1 second if ((1000 / (getTime() - oldTimestamp) * (newPosX - oldPosX)) > maxPlayerSpeed) { disconnect(player); //this is illegal! } This is a simple example, only taking the X coords into consideration. The problem here is that the oldTimestamp is