News for hackers. Stuff that matters.

nij4uyr

This website is using pagination with OFFSET/LIMIT but it's fast

Hey guys,First, here's the linkhttps://gall.dcinside.com/board/lists/?id=baseball_new8&page=270000As you can see from the URL, it's specifying the page number. And as the characteristic of OFFSET pagination, the page result is unstable when new items are inserted (which is what I want)I can't believe the performance cuz the website has > 16M records and still the performance is blazing...

( Read More... | no comments | 2 points | on HN )
Money is just paper, and my ass too
Re:Cadence: Uber's Workflow Orchestration Engine on Tuesday April 23, 2019 @09:30PM (#19734781)
Wow. Thanks for the extra explanation about when the different approach can benefit.

I love you. Will definitely give bus-workflow a thorough shot.

And a very last question if you could spare a bit more time..

Again the user signup & event flow,

When Workflow calls EmailService.sendEmail (given that the communication is via RPC and EmailService.sendEmail is an async operation that will resolve if the email was sent successfully), should Workflow wait for the sendEmail operation to resolve and complete the flow? Or should EmailService dispatches an event EmailSent so that Workflow can complete the flow?

This is a bit off the topic but I've been sticking with RPC style call rather than Events but still don't know yet what the best practice is.

Many Thanks

Re:Cadence: Uber's Workflow Orchestration Engine on Tuesday April 23, 2019 @08:40PM (#19734499)
Thank you very much for your reply! I wonder if the flow can start from Workflow not from UserService.

E.g., 1. Browser requests with UserSignup event (or API gateway receives it, do not call UserService but emits event)

2. Workflow receives the event, then calls UserService.signupUser activity

3. UserService creates a user then return the call back to Workflow

4. Workflow resolves the call(singupUser) then calls EmailService.sendEmail

5. EmailService.sendEmail sends an email then calls back to Workflow

6. Workflow resolves the call(sendEmail) then the flow is completed

The difference is that Every workflows will be defined inside Workflow and Services won't serve requests directly, which I believe this gives a complete view to the flow.

However there must be something that I'm missing here since what I'm describing seems like an anti pattern.

Re:Cadence: Uber's Workflow Orchestration Engine on Tuesday April 23, 2019 @07:35PM (#19734100)
redact207, could you please tell me if I understood it correct?

Say, I have two services deployed individually working in their own domains.

UserService and EmailService

When the task is a simple user signup & welcome email

1. Workflow requests UserService.signupUser

2. UserService.signupUser creates User, then dispatches UserCreated event.

From my understanding, this is where it's different between having Workflow and not having it.

3. Workflow receives UserCreated event, then requests EmailService.sendEmail

IF I did not have Workflow in my design, then EmailService will be listening to UserCreated event from UserService directly.

It sounds almost same as having an orchestration service called UserSignup Service, and do the same thing what Workflow does.

Can you say my understanding correct? Thanks!

Re:VPN – Very Precarious Narrative on Monday April 08, 2019 @02:17AM (#19602587)
wow man thanks. I'm reading your Privacy Guides and they're quite quality materials!
Re:VPN – Very Precarious Narrative on Monday April 08, 2019 @12:21AM (#19602052)
What VPN provider would you guys recommend?