webstackers / meetup

Information and Organization for the Tucson Web Stackers Meetup.
10 stars 0 forks source link

Real World RxJS #10

Closed LawJolla closed 5 years ago

LawJolla commented 6 years ago

RxJS is a Javascript library port of Microsoft's Reactive Extensions for functional reactive programming. Or in non-jargon, how to deal with streams of data.

Our problem:
We waste a lot of time buying vehicles at online car auctions. Most online auctions use a virtual auction system where bids are made online, in real time. Vehicles are run sequentially with each vehicle taking several minutes to complete. Thus, the virtual auction requires waiting at the computer for hours on end for various vehicles to run.

Solution Build a server that can proxy our bids. It accepts a vehicle list with a max bid amount. Then it can login to the auctions, poll the auctions for start times and lane assignments, subscribe to specific virtual auction lanes, wait until a vehicle from the list runs, and then bid virtually, like a human.

Here's a video of the bidding in action. (We didn't win this vehicle, and the annoying music is from the auction)

https://youtu.be/Kxz1MAp1plk

Our Scary Software Problem Aside from the obvious problem of the software not working and missing buys, this system has the ability to buy vehicles we don't want to own. And even worse, the program can log into every sale, every auction lane, and bid on every car. We could ruin the entire auction. The consequences are getting banned from the auction, or, more likely, a multimillion dollar lawsuit. The stakes are high.

I'm proud to say that after 1.5 years, the app has a perfect track record! (Quickly finds wood to knock on)

Most RxJS tutorials are about timers and mouse drags. If you're curious how RxJS can build something useful, I'm happy to explain what I did.

RichFromGalvanize commented 6 years ago

@LawJolla How would you feel about putting something together for July 2nd?

LawJolla commented 6 years ago

@BusyRich I’d love to but will be out of town. I’ll be back Thursday the 5th

RichFromGalvanize commented 6 years ago

KK, The search continues then.

RichFromGalvanize commented 6 years ago

@LawJolla Are you available in Sept for this talk? If so what Moondays are you free?

LawJolla commented 6 years ago

I am. Pretty much all. 👍

I see that this one and GraphQL are tied. I can give the RxJS talk or a GraphQL talk/workshop + Prisma, if time allows. Just let me know!

RichFromGalvanize commented 6 years ago

I mean a workshop would be awesome. Lets talk over slack sometime soon and hammer out the deets.