Questions tagged [latency]

24 questions
64
votes
10 answers

How do I mitigate a scenario where a user goes to pay, but the price is changed mid-request?

This is kind of similar to the Two Generals' Problem, but not quite. I think there is a name for it, but I just can't remember it right now. I am working on my website's payment flow. Scenario Alice wants to pay Bob for a service. Bob has quoted…
turnip
  • 1,657
  • 2
  • 15
  • 21
33
votes
2 answers

Writing low latency Java

Are there any Java-specific techniques (things which wouldnt apply to C++) for writing low latency code, in Java? I often see Java low latency roles and they ask for experience writing low latency Java- which sometimes seems a little bit of an…
user997112
  • 1,469
  • 2
  • 19
  • 24
22
votes
11 answers

Does low latency code sometimes have to be "ugly"?

(This is mainly aimed at those who have specific knowledge of low latency systems, to avoid people just answering with unsubstantiated opinions). Do you feel there is a trade-off between writing "nice" object orientated code and writing very fast…
user997112
  • 1,469
  • 2
  • 19
  • 24
16
votes
3 answers

Low Latency Unix/Linux

Most low latency/high frequency programming jobs (based on job specs) appear to be implemented on unix platforms. In a lot of the specs they make particular request for people with "low latency linux" type of experience. Assuming this does not mean…
user997112
  • 1,469
  • 2
  • 19
  • 24
11
votes
8 answers

Is Java much harder to "tweak" for performance compared with C/C++?

Does the "magic" of the JVM hinder the influence a programmer has over micro-optimisations in Java? I recently read in C++ sometimes the ordering of the data members can provide optimizations (granted, in the microsecond environment) and I presumed…
user997112
  • 1,469
  • 2
  • 19
  • 24
7
votes
6 answers

Is it worth learning C++ in depth JUST for a career in low latency trading?

I am interested in ultra high frequency trading and Java is the language I know best. I was always under the impression I would have to perfect my C++ skills in order to work within the ultra high frequency domain (no pun intended) because a lot of…
user997112
  • 1,469
  • 2
  • 19
  • 24
6
votes
2 answers

How do I optimize a web application for high-latency users?

Basically, I have an application that does searches and requests results from a backend via long polling. It connects to the backend which collects results for 500 ms then sends them back to the client (I'm simplifying things here a bit of course).…
Jason Baker
  • 9,625
  • 8
  • 44
  • 67
5
votes
1 answer

Low latency TCP sockets in .NET

Is it possible to optimize a .NET application running on a server version of Windows for near-zero latency TCP communication? Or will there always be unpredictable/unavoidable delays? For example, while searching for low-latency open source apps I…
5
votes
1 answer

Do you have a metaphor for cache/data latencies?

From this answer about latencies, we have some numbers (yes, caveat caveat) for latencies when coding (slightly edited): L1 cache reference 0.5 ns Branch mispredict 5 ns L2 cache reference 7 ns Main memory reference 100 ns Send 2K bytes over 1 Gbps…
Phil H
  • 209
  • 1
  • 5
5
votes
2 answers

DbFirst vs Code First? what should I use if I rely on Stored procedures

This question is asked many times, and I always prefer code-first as I like to keep the logic in code. But now I have a challenge to load screen under 5 seconds and very little time to do things. I have large set of records, and I'm possibly going…
5
votes
2 answers

Designing a web app that will be used from distant geographic locations

I have designed/built a number of small web apps. Most have been used by clients who operate in a specific geographic area, mostly within the same state/province. For these I would follow best practices but normally didn't worry too much about…
3
votes
2 answers

Writing requirement for Response Time from Hosted Server

We are contracting with a group to create some cloud services for us, and would like to write a requirement for them stating that a particular API call will provide results within X seconds. They are pushing back, saying such a requirement can't be…
Betty Crokker
  • 558
  • 2
  • 5
  • 10
3
votes
3 answers

To what extent could Java be used over C++ for ultra high frequency systems?

Could Java ever match C++ with regards to programming ultra high frequency systems? Has the JVM improved enough to allow this? From a theoretical or practical point is it possible? Is C++ used in most UHF systems simply because out of habit? If you…
user997112
  • 1,469
  • 2
  • 19
  • 24
2
votes
1 answer

How do you reduce geographic latency in web application (MVC ASP.net) backed by a single database

I'm working on a modest sized web application that receives circa 30k unique users per day, this is an MVC C# application hosted on 3 web servers and backed by a single SQL server, everything is hosted in one data center. The issue is we are seeing…
Dan
  • 161
  • 3
1
vote
0 answers

Speeding up read write intensive operation on large files in cloud (Azure)

I am using Azure Storage Blobs to persist certain models per tenant. While processing items for each tenant these models have to be pulled to memory, used for certain operation, updated and pushed back to blob storage. With time the size of models…
mebjas
  • 119
  • 2
1
2