Live data from Hacker News

Google pub/sub released an ordering feature

cloud.google.com

21–30 of 114 posts

Re: Google pub/sub released an ordering feature

#21
post #18

Earlier quoted context omitted.

What's a use case where strict ordering is critically important?

Consider processing two events without guaranteed ordering: - Create A - Delete A In one ordering, A is created and then deleted as expected, in the other, the delete fails but then A is created and remains.

Does adding timestamps not handle this case?

Re: Google pub/sub released an ordering feature

#22
post #15
post #13

Earlier quoted context omitted.

Given cloud vendors low respect for their customers, the proper stance is to own your own infrastructure.

The company I work for had the same stance 5 years ago. We regretted it a hundred times and now we stand the gaff. Nothing better than maintaining an EC2 based Cassandra cluster instead of simple using DynamoDB, huh...

I don't believe I advocated for the use of Cassandra. Owning vs being owned by, we are not arguing about the same things.

Stances are not strategies, when we use another's API we form a bond but the the other is free to break it so we are automatically at a weaker position. We have acquiesced. But if we choose a strategically worse choice, we have not only acquiesced, but done self-harm.

Re: Google pub/sub released an ordering feature

#23
post #15
post #13

Earlier quoted context omitted.

Given cloud vendors low respect for their customers, the proper stance is to own your own infrastructure.

The company I work for had the same stance 5 years ago. We regretted it a hundred times and now we stand the gaff. Nothing better than maintaining an EC2 based Cassandra cluster instead of simple using DynamoDB, huh...

[deleted]

Re: Google pub/sub released an ordering feature

#24
post #21
post #18

Earlier quoted context omitted.

Consider processing two events without guaranteed ordering: - Create A - Delete A In one ordering, A is created and then deleted as expected, in the other, the delete fails but then A is created and remains.

Does adding timestamps not handle this case?

If events are generated by different processes you cannot really guarantee that time is exactly the same for them, unless you do something fancy to ensure that.

Re: Google pub/sub released an ordering feature

#26
post #22
post #15

Earlier quoted context omitted.

The company I work for had the same stance 5 years ago. We regretted it a hundred times and now we stand the gaff. Nothing better than maintaining an EC2 based Cassandra cluster instead of simple using DynamoDB, huh...

I don't believe I advocated for the use of Cassandra. Owning vs being owned by, we are not arguing about the same things. Stances are not strategies, when we use another's API we form a bond but the the other is free to break it so we are automatically at a weaker position. We have acquiesced. But if we choose a strategically worse choice, we have not only acquiesced, but done self-harm.

I understand. I’m just saying that in my my professional experience, nothing good came out of religously avoiding lock-in but the opposite.

Re: Google pub/sub released an ordering feature

#28

I'm floored by this. Last I spoke with that team the response was a few (but not everyone) in leadership getting it and everyone else asking why we would care. How far to come. GCP just got substantially more interesting. Edit: by this I only mean to say well done to the Google team.

By the way, in addition to ordered messages, Pub/Sub has recently gotten a number of new features including message filtering, dead letter queues, and retry policy (some GA, some beta). You can find out more here: https://cloud.google.com/pubsub/docs/release-notes Disclaimer: I work on Pub/Sub

[deleted]

Re: Google pub/sub released an ordering feature

#29
post #18

Earlier quoted context omitted.

What's a use case where strict ordering is critically important?

Consider processing two events without guaranteed ordering: - Create A - Delete A In one ordering, A is created and then deleted as expected, in the other, the delete fails but then A is created and remains.

There are a couple of options without needing guaranteed ordering:

- jobs can have ever increasing ids, workers record the last seen id in one place, and ignore jobs with ids less than last seen

- job results are returned for each job to a supervisor. if a job result doesn't match current expected state, resend job. jobs should be idempotent in case a job is sent multiple times

If the create job is expensive, the latter solution would be less ideal, though.

Re: Google pub/sub released an ordering feature

#30
post #21
post #18

Earlier quoted context omitted.

Consider processing two events without guaranteed ordering: - Create A - Delete A In one ordering, A is created and then deleted as expected, in the other, the delete fails but then A is created and remains.

Does adding timestamps not handle this case?

Now you need to queue up events for some time, reorder them using the timestamp, and then process them. It’s possible, but has overhead in both performance and custom code you’ll have to maintain. If there is no guarantee of order, two separate systems consuming those same events also might get different results, depending on the implementation, that can be problematic
Post reply on HN