3,849 karma · joined Sep 12, 2013 (13y ago) · 1,555 submissions
comment 4y ago · link · parent
I'm just not seeing anything remotely like censorship here.
comment 4y ago · link · parent
That's skirting uncomfortably close to discriminating based on medical history or a disability, which may be illegal depending on where the employer is located. Cancer survivors have a much higher chance of recurrence than others do of developing cancer for the first time, but most would probably balk at denying a job to someone whose cancer was in remission because there's a higher chance they'd need extended medical leave in the future.
comment 4y ago · link · parent
If a criminal record is an insurmountable hurdle for a specific role, then it would come up in a background check (which would almost certainly be a requirement for such a job), and the job posting should be explicit about the required clean criminal history. A gap in someone's resume is a pretty worthless signal for whether they've ever been incarcerated.
comment 4y ago · link · parent
OK, I think this is what I was misunderstanding in your comments above. You can keep pagination state in a distributed store, but it's not necessary. The implementations I've seen and worked with have all embedded all the information needed to generate the next page of results in the cursor token itself. Kind of like with a JWT or TLS session ticket, there's no need to sync pagination state or use sticky sessions. That approach also provides some resilience in case the server that generated the previous page of results becomes unreachable (something that the client needs to handle by restarting pagination if pagination state is just held in memory by the server keeping the stream connection open).
comment 4y ago · link · parent
I think we're saying the same thing but using different formulations. If you send an HTTP request for a list with 20 items, then get back a response with 10 items and a link for the next page, that is essentially the same as cosuming 20 items over a stream with flow control. The point of returning a cursor in the response and having the client send a new request for the next page is to support a stateful stream over a stateless protocol. In neither case are you waiting for the response to be complete before processing items, since your message indicates that "complete" here means the full result set has been sent to the client.
> But fine, ignoring gRPC, you could possibly tune your stack such that normal http calls achieve back pressure from network stacks and packet loss. Http is built on top of TCP streams, after all. That doesn't make it inherently stateful does it?
That's pretty much how streaming responses are implemented in TCP-based protocols (like the SQL query APIs exposed by Postgres or MySQL). TCP connections can be terminated for unrelated reasons, which is why you don't see this pattern very often in recent protocols. When a TCP connection is dropped and restarted due to, say, network congestion, you have to restart the paginated operation from the head of the list. H2 (and, vicariously, gRPC) streams are built to be more resilient to network noise.
But to answer your question, yes, that pattern is inherently stateful. Pagination has to be, since the server has to know what the client has seen in order to prepare the next batch of results. You can manage this state at the protocol level (with streams), or you can push it to the application level (with cursor tokens embedded in the messages exchanged). The streaming approach requires a stateful server and client, whereas the application-level approach only requires a stateful client.
comment 4y ago · link · parent
gRPC is able to offer powerful streaming abstractions because it utilizes HTTP/2 streams, which are cursor based rather than strictly connection oriented. The state is still there; it's just a protocol-level abstraction rather than an application-level abstraction.
> Perhaps, but the requests can be pipelined. You don't need to wait for the response to complete before asking for more.
That sort of defeats the purpose of grpc flow control, doesn't it?
comment 4y ago · link · parent
I see you mentioned gRPC streams in a sibling comment, which are a great alternative to REST-based pagination, but they are highly stateful! Streams are built into the protocol, so a generic gRPC client will handle most of the state juggling that would have been your responsibility with a REST client.
comment 4y ago · link · parent
comment 4y ago · link · parent
Duplicates or missed entries in the result set are the most likely outcome of offset-based pagination.
comment 4y ago · link · parent
Isn't this an accurate description of cursor-based pagination? You can have the server hold the cursor and associate a request for the next page based on the client ID (like in the PostgreSQL wire protocol), or you can make the flow stateless (at the network level) by handing the client a ticket for the next page.
comment 4y ago · link · parent
So, there is definitely still state, it's just stored centrally.
[0]: https://docs.microsoft.com/en-us/azure/azure-resource-manage...
comment 4y ago · link · parent
Bicep/ARM still has issues with resource deletion, though. The default deployment behavior is to ignore resources that aren't described in a deployment template, so if you remove a VM from your template and redeploy, the VM will keep running until you manually delete it. There are a couple ways around this issue, but they all rely on having state external to the resource itself.
Disclaimer: I work on Bicep/ARM and think it's pretty great, but it's not perfect.
comment 4y ago · link · parent
There are also some orgs at tech giants that work on socially impactful products (e.g., sustainable hardware teams at AWS or Azure, like the folks who work on https://natick.research.microsoft.com/), so I wouldn't rule those out entirely.
comment 4y ago · link · parent
Wire transfers are also hard to reverse, but banks have security ceremonies around them to prevent misuse, and good luck to you if you want to pay a $20MM ransom with an international wire transfer. Even if you were able to find a banker who wouldn't call the FBI on you, the recipients of the transfer are exposing themselves to significant risk of capture by interacting with their local banking system and by providing you with the details of their account.
Cash being convenient for small transactions and difficult to use for large ones is a deliberate feature. The point is to strike a balance between usability and vulnerability to misuse. E.g., you have to declare when you're moving more than $10K across an international border, and it's actually hard to smuggle that much cash due to the weight and bulk. Gold is also heavy and bulky, which is an important security feature of Fort Knox (even if you break in, how are you going to abscond with tons of gold bars?).
comment 4y ago · link · parent
comment 4y ago · link · parent
But one six month stint is fine, especially if you can explain it away with something pithy about how the economy tanked and the company shed a significant percentage of its workforce.
comment 4y ago · link · parent
comment 4y ago · link · parent
When financial instruments are primarily used for licit activity, we tend to add features that make illicit activity more difficult but accept that some illicit use will occur. That's why we still have $100 (but with serial numbers) and don't have bearer bonds any more.
comment 4y ago · link · parent
Criminals will do bad things at scale with cryptocurrency. Ransomware existed before bitcoin, but the amounts demanded were pittances compared to what can be demanded today because the difficulty of using cash or the banking system for a transaction increases exponentially as the amounts involved increase.
comment 4y ago · link · parent
It's actually pretty hard to spend dollars when you represent a sanctioned entity. A DPRK official may have a suitcase full of USD, but no western bank will accept their deposit or accept a transfer from a bank or account associated with the North Korean regime. But if they can find someone who will take their USD in exchange for no-questions-asked crypto, then they get to evade sanctions (at least for a little while).
comment 4y ago · link · parent
Although meeting in person to physically transfer gold requires a similar amount of trust, so ¯\_(ツ)_/¯
comment 4y ago · link · parent