13,486 karma · joined Jun 1, 2016 (10y ago) · 4,896 submissions
comment 6y ago · link · parent
I suspect it is not so simple as "Rust's safety ensures malicious rust code can't access data".
comment 6y ago · link · parent
It's both a good and bad thing that rust has these sort of deep areas where 95% of users won't ever have to go - Pin being another example. I think it's much more good than bad though.
comment 6y ago · link · parent
I have no answer, it's just the only interesting part of that discussion imo. Everything else is just details of an issue that's too weird to really fully understand for me, and not novel or interesting enough to invest into understanding, anyway.
comment 7y ago · link · parent
> "Shor's algorithm is the attack that was developed in the absence of a quantum computer,” Frincke said. “It's hard to predict what people will actually do with one."
Once QC actually manifests we may find new properties and new approaches to attacking existing algorithms, and being 'quantum hard' before that point is impractical.
I'm not a cryptographer by any means, so I have no idea if this is actually the case. Perhaps we understand the fundamentals so well that we can truly say an algorithm today can hold up in a QC world - I have no idea, that certainly sounds bold, but we do already have purported 'quantum hard' algorithms.
comment 7y ago · link · parent
These are both trivial things to do though. I don't see how it's any more complex than monitoring a circuit breaker, or setting up CI/CD.
> Tracing requests is harder b/c now your logs are scattered around the worker fleet, so debugging becomes harder.
Correlation IDs work just as well in a queue based system as a sync system.
> You need more APIs for the client to poll the async state, and you need some data store to track the async state (and now you've got to worry about maintaining and monitoring that data store).
Not sure what you mean. Again, in the Amazon Cart example, your state is just the cart - regardless of sync or async. You don't add any new state management at all.
comment 7y ago · link · parent
I don't find it very complex at all. You send a message to a service. You want to get some state after, you query for it.
> but anything that deals with the cart - things like checkout, removing from cart, updating quantities, etc. Adding to cart has to be mindful of queued checkout attempts.
How so? Those pages just query to get the cart's state. You'd do this even in a sync system. The only difference is that on the backend this might be implemented via a poll. On subsequent pages you'd only poll the one time, since the 'add-to-cart' call was synchronous.
> But by using asynchronous comms you're actually introducing more state into your application than synchronous comms.
I don't see how. Again, with the cart example, there is always the same state - the 'cart'. You mutate the cart, and then you query for its state. If you have an expectation of its state, due to that mutation, you just poll it. You can trivially abstract that into a sync comm at your edge.
def make_sync(mutation, query):
mutation()
while not expected_state(query()):
# handle retry logic/ timeoutscomment 7y ago · link · parent
Usually you have a sync wrapper around async work, maybe poll based.
As an example, I believe that Amazon's "place in cart" is completely async with queues in the background. But, of course, you may want to synchronously wait on the client side for that event to propagate around.
You get all of the benefits in your backend services - retry logic is encapsulated, failures won't cascade, scaling is trivial, etc. The client is tied to service state, but so be it.
You'll want to ensure idempotency, certainly. Actually, yeah, that belongs in the article too. Idempotent services are so much easier to reason about.
So, assuming an idempotent API, the client would "send", then poll "check", and call "send" again upon a timeout. Or, more likely, a simple backend service handles that for you, providing a sync API.
Going from Sync to Async usually means splitting up your states explicitly.
For example: Given two communication types: Sync (<->) Async (->)
We might have a sync diagram like this:
A <-> B
A calls B, and B 'calls back' into A (via a response).
The async diagram would look like one of these two diagrams:
A -> B -> A
or:
A -> B -> C
Whatever code in A happens after what the sync call would have been gets split out into its own handler.
If your system is extremely simple this may not be worth it. But you could say that about anything in the article, really.
comment 7y ago · link · parent
If you use queue-based services your clients can 'fire and forget', and then your error handling logic can be encapsulated by the queue/ consumers.
This means that if you deploy broken code rather than a cascading failure across all of your systems you just have a queue backup. Queue backups are also really easy to monitor, and make a great smoke-signal alert.
The other way to go, for sync comms, would be circuit breakers.
My current project uses queue-based communications exclusively and it's great. I have retry-queues, which use over-provisioned compute, and a dead-letter for manually investigating messages that caused persistent failures.
Isolation of state is probably the #1 suggestion I have for building scalable, resilient, self-healing services.
100% agree with and would echo the content in the article, otherwise.
edit: Also, idempotency. It's worth taking the time to write idempotent services.
comment 7y ago · link · parent
So, now I drop the apostraphe.
In high school my school ID was completely broken. It printed <first half of last name> <first letter of last name> <middle name> <first name>.
They ended up putting a quotation mark instead of the apostraphe - somehow the machine handled that fine. That was the workaround.
Hotel wifi systems tend to break if they ask for a last name to connect. Again, training me to reserve the hotel under a 'fake' last name.
I actually notice it every time I write my last name. I'm like "is this a system that will break" and now I'm inclined to just never use the "real" spelling because then I'll get a mismatch later on.
This is something I've really noticed over the last decade. The older I get, and the more systems become a part of my life, the more systems I have to give a fake name. Paper records will show my true name, but I wonder if at this point, given digital records, what it would appear to be.
comment 7y ago · link · parent
Chrome had a massive advantage over Firefox, security wise, for quite a long time.
comment 7y ago · link · parent
Sandboxed flash was huge at the time. People forget so quickly that only a decade ago the internet was a lot more malicious. Exploits hosted on compromised ads were not uncommon at all. These days all of the big exploit kits rely on social engineering.
Those were very appealing things for many people, rightfully so.
comment 7y ago · link · parent
You can even express algorithmic complexity in a language.
But it's a bit more complex than that, really. You will have a harder time saying "this loop will block the event system for longer than I'd like".
comment 7y ago · link · parent
I know lots of other people who are petrified of losing their job because they aren't as healthy as I am.