Building a Space-Based ISP
144 points by dinosaurs 4 years ago | 55 comments- HALtheWise 4 years agoThe 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 between the computers. What you don’t want is a situation where one of the computers takes a radiation hit, a bit flips, and it’s not in a shared memory with the other computers, and it can kind of run off on its own.”
- azernik 4 years agoEssentially:
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 resolution system can say "a bad write happened at this point, I should disregard whatever this computer said from that point until it recovers".
i.e. you want local memory to use as scratch space for performance reasons, but to make sure that there isn't a long runway for errors to happen and decisions to be made before the shared-memory checker notices a mistake. To ensure this happens, you want manual control over which memory allocator handles which data.
- HALtheWise 4 years agoThat 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.
- azernik 4 years ago"Restore" is reboot. Usually these are called "watchdog circuits", which you may have heard of from more mundane embedded applications.
Once you've rebooted, yeah, you need to copy over the shared state from another of the processes.
- ncmncm 4 years agoYou probably have hardware that watches ECC flags. For a correctable one-bit flip, it triggers a read-and-then-write. For a two-bit flip, it might just kill and restart the process, or reset the whole machine. As long as it doesn't happen too often, it's fine: the whole system (constellation and ground nodes) are designed to accommodate such events.
- azernik 4 years ago
- HALtheWise 4 years ago
- ncmncm 4 years agoThis 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::unique_ptr<T>>, 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<std::uint64_t> 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.
- azernik 4 years ago
- nynx 4 years agoStarlink 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 spacex does fall or spring embedded software internships?
- p1mrx 4 years agoI think the most exciting part is their use of electric ion propulsion to maintain low earth orbit. If SpaceX ever goes bankrupt or something, the satellites will passively deorbit within 5 years or so.
- marsokod 4 years agoNo need for that actually. They will deorbit within a year if left completely dead, and within a couple of month if they have a single button "start deorbiting" that uses the electric propulsion.
But more importantly, their propulsion allows them to launch at a very low orbit. This is a very good method for a constellation as they can see all the early failures (the beginning of the bathtub curve) happen at a very low orbit and reduce the cost of ground testing.
Their orbital debris management strategy is one of the best I have seen.
- Robotbeat 4 years agoYup, and I think this could be improved further by using even lower orbits. Improves latency, debris, and reduces visible time (i.e. closer and closer to only visible during twilight... plus the closer distance increases apparent angular speed and thus reduces dwell time per pixel) for ground telescopes. Requires a bigger propulsive burden, but this is worth it, IMHO.
- cryptonector 4 years agoAnd launching to lower orbits means higher payload to orbit per launch which means they can launch more of their constellation per launch. (Although they probably a larger constellation at those orbits just due to how short the orbital periods are.)
- Robotbeat 4 years ago
- marsokod 4 years ago
- lutorm 4 years ago
- nynx 4 years agoUnfortunately, it still says summer 2021.
- nynx 4 years ago
- p1mrx 4 years ago
- cute_boi 4 years ago"Starlink is currently in orbit at 340 miles"
Can we please stop using miles etc :( I am tired when people makes mistake like this.
- ncmncm 4 years agoYes, the useful unit is light-milliseconds:
So, 3.6 ms round-trip. In practice, the route will be slanted, so could just exceed 5 ms.$ units You have: 340 mi You want: light ms * 1.8251859 / 0.5478894
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".$ sudo apt install units
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.
- nonameiguess 4 years agoMilitary already has this: https://en.wikipedia.org/wiki/Wideband_Global_SATCOM
The SpaceX edge here is making this kind of thing cheaper and scalable to the point that a global community of hundreds of millions of users can multiplex signals on it, but for a sufficiently well-funded organization with fewer users, it was already possible.
- izend 4 years agoThe military system is orbiting at 32,000km, the latency is much higher than Starlink.
- izend 4 years ago
- cryptonector 4 years agoWhy was this downvoted though?
- ncmncm 4 years agoThis one guy watches and downvotes everything I post, lately.
- ncmncm 4 years ago
- new_realist 4 years agoYou forgot about the latency of going through the atmosphere, and the Manhattan distance between the satellites.
- ncmncm 4 years agoI cited the latency going through the atmosphere, 1.8 to 2.5 ms, in the very post you clicked "reply" on, very evidently without, you know, reading it. (Not reading saves time, but you know what else does? Not posting.)
And there is no "manhattan distance". Satellites (will) have a laser pointing to the next one in their orbit, and one pointing back. That's all.
- ncmncm 4 years ago
- nonameiguess 4 years ago
- VWWHFSfQ 4 years agowhat should they use
- azernik 4 years agoKilometers.
If they're writing for a US audience and absolutely need miles, put one or the other in parens after the "main" one.
- krapht 4 years agoPeople 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.
- krapht 4 years ago
- azernik 4 years ago
- ncmncm 4 years ago
- mnd999 4 years agoPuff 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.
- zlynx 4 years agoIt is about making money. Starlink is a money generating system that makes use of low cost launch made possible by SpaceX.
If it does use up most of the low orbit space it is because SpaceX is the only company that is even capable of launching that many satellites and making money on it. Until there is another challenger there is zero point in complaining, because competition is not even an option.
Since it is low orbit it is self limiting problem. Any low orbit satellite has a limited lifetime of a few years without power.
- Diederich 4 years ago> Starlink is fundamentally not about providing broadband to anyone.
This reply brought to you over a robust, fast, low latency and reliable Starlink connection.
- ctdonath 4 years agoAnd cheap. $99/mo for competitive data service literally anywhere is amazingly cheap.
- kevin_thibedeau 4 years agoWait til you have 1000 neighbors vying for bandwidth.
- benlivengood 4 years agoThe most pessimistic estimate I've seen paid for by the cable industry is here: https://ecfsapi.fcc.gov/file/10208168836021/FBA_LEO_RDOF_Ass...
Only if each subscriber is using an average of 15-20 Mbps during peak times will about 50% of subscribers see some throttling.
Interestingly they only showed a single graph of average bandwidth over time from a cable company to estimate needs for SpaceX. No clue if they actually separated it out by time zone for each coverage area in their actual analysis.
- Diederich 4 years agoStarlink isn't about directly competing against high density fiber connected internet. It's about everyone else.
- benlivengood 4 years ago
- ctdonath 4 years ago
- ctdonath 4 years agoRight, 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.
- cryptonector 4 years agoIt's not clear what you're saying. Are you saying that SpaceX will end up consuming too much of a precious resource? Or something else?
Anyways, I don't buy that SpaceX will end up consuming too much of a precious resource. Even if it were so, what would be a fair way to share that resource, and who even with?! There's only one announced competitor to Starlink at this time, and they're not even remotely close to being operational. What makes SpaceX able to put up Starlink at such low cost (compared to its earning potential) is that SpaceX has lowered launch costs for itself (and others) by a lot, and they're working to lower those costs even more. What is "fair" when a company works so hard to lower costs and increase availability? Is it to punish them so others get a chance to compete at higher costs??
- ctdonath 4 years agoSorry about the mess, that comment was dripping with sarcasm.
1. There's a lot of room up there, and actually claiming & using it is a normal process for civilizing frontiers.
1b. Handwaving about "underappreciated precious resources" is a waste of opportunity. I get the sentiment, but belongs in the 3rd part of the aphorism "lead, follow, or get out of the way."
2. Saying "SpaceX isn't in it for the money" is ridiculous, considering they could gross >$10T in the next decade with it, at ridiculously low expenditure.
2b. In that timeframe, other businesses would be just barely starting to seek out a small fraction of that "precious resource".
- wmf 4 years agoI guess orbital space could be auctioned instead of homesteaded but SpaceX could probably afford to outbid Kepler and OneWeb anyway.
- ctdonath 4 years ago
- cryptonector 4 years ago
- wmf 4 years agoSo what is the high-value use of low-earth orbit other than broadband and why doesn't SpaceX do that directly?
- admissionsguy 4 years agoIs it scarce, though? Couldn't you put more constellations at the same orbits +/- a couple of kms? In any case, I would expect the spectrum rights to be much scarcer than the space, and they are well regulated.
- cryptonector 4 years agoExactly, spectrum is the scarce resource here, and it already is regulated. There is no need for additional regulation regarding that, and there already is regulation of orbits between FCC and FAA.
- cryptonector 4 years ago
- generalizations 4 years agoIt's a cynical perspective, but the downvotes are unwarranted. It's worth comparing to McDonalds, where a large proportion of the corporation's worth is in the real estate they hold.
- lucb1e 4 years agoOkay but it's not as if mcdonald's bought the land under false pretenses and now uses it for any purpose since it's theirs. Claiming that the internet access is just a pretense for "land" grabbing when the company neither owns the space afterwards nor can switch businesses to something more nefarious and lucrative with the existing devices... it makes no sense.
- lucb1e 4 years ago
- 3gg 4 years agoDon't know about your specific claims, but I also had the same reaction.
"This is the world SpaceX’s Starlink program, which has set a goal to provide high-speed broadband internet to locations where access has been unreliable, expensive, or completely unavailable."
Can we be honest for once and be up-front about a corporation's real goals? As if <insert technology here> was going to do anything about the gaping inequality and other social problems that actually matter to people. That your comment gets down-voted is certainly telling about the audience here.
- jsharf 4 years agoThe alternative is waiting literally 10-20 years for anyone else to catch up.
- cryptonector 4 years agoOr, hey! slow SpaceX down with regulation!1!!
- bcrl 4 years agoWho is even trying to catch up at this point?
- cryptonector 4 years ago
- zlynx 4 years ago