HackerTrans
TopNewTrendsCommentsPastAskShowJobs

rprospero

no profile record

comments

rprospero
·4 anni fa·discuss
It was a neutron detector that stored the the position, energy, and time stamp into the database. The design spec was 10,000 neutrons per second, so that was the origin of the time limit.

Of course, half those neutrons arrived within a 20ms window, so we had a buffer to handle the load. However, however, if the average remained above the limit, the buffer would fill up. There was a brief discussion of just ignoring events when the buffer was full, but that could introduce systematic errors in the data that would be impossible to detect, so it was better for the database to just crash.

The solution was to tighten the slits on the neutron beam to lower the count rate to the point that we never filled the buffer. Granted, we were testing a high flux technique that, so that was a bit of a disappointment. Everything else in the instrument could handle an order of magnitude more neutrons, except this database.

By the way, to be fair to the database designers, they were working with Clinton era tech and were probably told that the flux rate would never be a SUSTAINED 10,000 events per second.
rprospero
·4 anni fa·discuss
As I said in another part of the thread, I was in a scenario where we were performed millions of inserts into a table of four integers, one row at a time. Generating the string and parsing it again wound up being enough to blow our 10µs time budget.
rprospero
·4 anni fa·discuss
Not the OP, but I can give two gains. First off, by passing an AST, instead of just an SQL string, we cut out a huge number of possibly SQL injection attacks. Second, in most of the projects where I've used of SQL, there's been some kind of database object that builds the actual query, which it then converts to a string. The database then takes that string and parses it into an AST. There's some performance gains to be made by skipping the middle man and just creating the AST directly.

Many years ago, I was on a project that needed to add rows to a database with a hard 10µs limit. Each rows was just four integers, so the writing part was trivial. However, allocating the string, formatting the integers to strings, then parsing the resulting string often put us over the time limit. Every time the time limit was breached, we lost about five grand. Why we were using an SQL database for this at all is a story for a different time.
rprospero
·4 anni fa·discuss
I briefly worked on a game like this in space. It was a 4X game where the primary mechanic was the hard speed of light. Not only did it take years for your message to reach a colony, your knowledge of the state of the colony was equally out of date.

Part of the idea was that each player would never see the absolute coordinates of any star or another player’s names for anything, so it would be nearly impossible for two players, talking outside the game, to figure out if they were allies or enemies in game.

What killed it was that players basically had to be able to send free form messages in game, to handle the complexity of negotiations this situation would require, but it would be far too easy and rewarding for two players to just share an email address, which would allow FTL communications and break the game. The only effective solution was a human GM filtering every message, which was awkward when the timing of message delivery was THE core mechanic.
rprospero
·14 anni fa·discuss
If a racer was going to use science to perform optimally, why didn't he just buy a motorcycle? 19th century thermodynamics would push him far past anything he could achieve with 21st century biology.

You might argue that it's against the rules to ride a motorcycle, but so was doping. It's also against the spirit of the sport, but so was doping.

If the objective was to use the best available science to compete at the highest level, then they failed horribly.