Live data from Hacker News

Building a Space-Based ISP

stackoverflow.blog

21–30 of 56 posts

Re: Building a Space-Based ISP

#21

The article ends with this nugget about C++ shared memory state management, but I don't have the background to know exactly what they're referring to. Does anyone recognize this pattern and feel able to explain it to mere mortals? > “We also have different tools so that any state that is persisted through the application is managed in a very particular place in memory. This lets us know it is being properly shared be…

This is very common when controlling equipment in C++.

Technically, all C++ programs control equipment. Differences include that one program may run for weeks or even years, and is mostly the only program running, or the only one on a core. This happens from microcontrollers on up to servers with a TB of RAM running, say, high-frequency trading, and in networks of hundreds of those, running weather simulations.

The program typically does all its heap allocation at startup. There is no reference-counting std::shared_ptr. You might have lots of std::vector>, std::string, the works, but they all get provisioned in the first second or two, and then just used thereafter. If anything goes wrong, you don't try to do anything clever or sophisticated; you just kill and restart, or even re-boot, and start over from scratch. That is fine if it doesn't happen too often, so you make sure it doesn't.

For communication between programs, some of the memory set up is shared, with a header containing std::atomic sequence counters that each process can watch and compare against its last copy to know when something changed. Most commonly, actual messages show up on a ring buffer, so you don't need to act on them immediately; as long as you pick them up before they get lapped, you're good. If you get lapped, you might need to reset the whole system; so you make sure not to get lapped, by making the ring buffers big enough and by picking up messages soon enough. With big enough ring buffers and careful scheduling, you can leave all the bulk data there and just use it before it gets overwritten, avoiding expensive copies.

Often, once the program starts up, it does no more system calls at all, doing all its work by reading and writing shared memory, and maybe poking at hardware registers. On Linux one usually isolates cores doing this, with "isolcpus=..." on boot, and "nohz_full=...", "rcu_nocbs=...", "rcu_nocb_poll" etc. The ring buffers tend to live in hugepages ("hugepages=50000"), often just files opened in /dev/hugepages. This is all a simpler alternative to a unikernel/parakernel/demikernel/blatherkernel.

You might also have ephemeral processes that run just long enough to do a job and then quit, running on their own pool of cores and using their own pool of memory. This is usually how you administer the system: ssh in, look around, exit.

Re: Building a Space-Based ISP

#22
post #11

The article ends with this nugget about C++ shared memory state management, but I don't have the background to know exactly what they're referring to. Does anyone recognize this pattern and feel able to explain it to mere mortals? > “We also have different tools so that any state that is persisted through the application is managed in a very particular place in memory. This lets us know it is being properly shared be…

Essentially: They have one address range for shared (i.e. subject to syncing across all replicas) memory, and a separate one for non-shared (single-replica) memory. Cross-replica data is presumably subject to their agreement algorithm, checking that the different computers reach the same (within some error bars) results; you want to arrange things so that there are frequent checkpoints at which the conflict resolutio…

That makes sense. One part I'm still not clear on is how you accomplish a "restore" to fix the broken state of a process with a bitflip. Is it enough to simply copy all the shared state memory over as a block and jump into executing it? That seems like it would require the invariant that shared memory never references private memory, and I'm not sure how to statically enforce that.

Re: Building a Space-Based ISP

#23
post #7

"Starlink is currently in orbit at 340 miles" Can we please stop using miles etc :( I am tired when people makes mistake like this.

Yes, the useful unit is light-milliseconds:

  $ units
  You have: 340 mi
  You want: light ms 
          * 1.8251859
          / 0.5478894
So, 3.6 ms round-trip. In practice, the route will be slanted, so could just exceed 5 ms.

  $ sudo apt install units
Once the constellation is mature, certain very-high-paying subscribers will get the packets forwarded from one satellite to the next via laser links, across oceans, before being downlinked, and get there a few ms before packets dawdling along on fiber links below 0.7c, to trigger securities trades ahead of the crowd acting on now-ancient information. The time by fiber from Singapore to New York is on the order of 90 ms, where Starlink ought to get them there in well under 70 ms, leaving a good 20 ms to arbitrage. In investment banking, they say "a microsecond is an eon, a millisecond is an eternity".

Even just between New York and London, they can gain a few ms headway, enough to dominate.

It would not be surprising if the US military, and maybe some others, will have access to satellite-to-satellite routing. (They have their own WGS, "Wideband Global SATCOM", but it is GEO, thus high-latency.)

AFAIK, only the polar-orbit nodes have inter-satellite laser links, thus far, so this is a phenomenon of the near future, not the present. Other things to expect in the near future are lofting them with a few TB of storage, to minimize uplink bandwidth by edge-serving Disney and Netflix blockbusters; and multicast downlinks for real-time soccer games and maybe even time-binned shows.

Re: Building a Space-Based ISP

#24
post #2

Puff piece. Starlink is fundamentally not about providing broadband to anyone. It’s landgrabbing a finite resource - low-earth orbit space - before it’s worth is recognised by those who should be regulating it. The broadband itself might be nice or it might be awful. It doesn’t actually matter because that was never the point.

> Starlink is fundamentally not about providing broadband to anyone. This reply brought to you over a robust, fast, low latency and reliable Starlink connection.

Wait til you have 1000 neighbors vying for bandwidth.

Re: Building a Space-Based ISP

#25
post #3

Starlink is super exciting from an emerging technologies perspective —— (relatively) cheap satellite production, commercialized laser links, commercialized phased-array tx/rs, among others. These open up very interesting possibilities down the road. These posts always have a thread about people wanting to work for spacex, but because of my pseudo-anonymity, I don’t feel bad about starting it: Does anyone know if spac…

https://www.spacex.com/internships/

Re: Building a Space-Based ISP

#26
post #2

Puff piece. Starlink is fundamentally not about providing broadband to anyone. It’s landgrabbing a finite resource - low-earth orbit space - before it’s worth is recognised by those who should be regulating it. The broadband itself might be nice or it might be awful. It doesn’t actually matter because that was never the point.

Right, it's not about taking a major share & expansion of a trillion-dollar industry with payout starting immediately, it's about staking out a thin fraction of (literally) empty space and waiting decades for others to start needing small portions of it.

Because $99/month * 12 months * 10 years * 1,000,000,000 customers = $11.88T isn't the point to a man who literally needs a trillion dollars to pull off the grandest mega-project ever.

Re: Building a Space-Based ISP

#27
post #23
post #7

"Starlink is currently in orbit at 340 miles" Can we please stop using miles etc :( I am tired when people makes mistake like this.

Yes, the useful unit is light-milliseconds: $ units You have: 340 mi You want: light ms * 1.8251859 / 0.5478894 So, 3.6 ms round-trip. In practice, the route will be slanted, so could just exceed 5 ms. $ sudo apt install units Once the constellation is mature, certain very-high-paying subscribers will get the packets forwarded from one satellite to the next via laser links, across oceans, before being downlinked, and…

Why was this downvoted though?

Re: Building a Space-Based ISP

#28
post #16
post #12

Earlier quoted context omitted.

Kilometers. If they're writing for a US audience and absolutely need miles, put one or the other in parens after the "main" one.

People who get irritated over units of measure are themselves irritating. It is not so hard to round, double it 4 times and then divide by 10.

For practical purposes, I get by 99% of the time with 1 (statute) mile == 1.5km.

Re: Building a Space-Based ISP

#29
post #2

Puff piece. Starlink is fundamentally not about providing broadband to anyone. It’s landgrabbing a finite resource - low-earth orbit space - before it’s worth is recognised by those who should be regulating it. The broadband itself might be nice or it might be awful. It doesn’t actually matter because that was never the point.

> Starlink is fundamentally not about providing broadband to anyone. This reply brought to you over a robust, fast, low latency and reliable Starlink connection.

And cheap. $99/mo for competitive data service literally anywhere is amazingly cheap.

Re: Building a Space-Based ISP

#30
post #23

Earlier quoted context omitted.

Yes, the useful unit is light-milliseconds: $ units You have: 340 mi You want: light ms * 1.8251859 / 0.5478894 So, 3.6 ms round-trip. In practice, the route will be slanted, so could just exceed 5 ms. $ sudo apt install units Once the constellation is mature, certain very-high-paying subscribers will get the packets forwarded from one satellite to the next via laser links, across oceans, before being downlinked, and…

Why was this downvoted though?

This one guy watches and downvotes everything I post, lately.
Post reply on HN