指定时间实时数据库更新

发布于 2024-10-29 01:24:22 字数 320 浏览 1 评论 0原文

给定一个数据库,其中有一个名为 [Bid Transactions] 的表,其中包含当前在 ASP.net 网站上运行的所有可用拍卖的记录.. 类似于 Ebay.com,当拍卖截止日期过去时,我应该关闭该拍卖,向物品所有者和竞标获胜者发送通知消息以通知他们。

我应该如何跟踪所有公开拍卖?我如何监控所有结束时间并将拍卖状态实时更新为“已结束”? ..

(1) 使用 SQL 作业? ..这应该会降低系统性能..不是吗?

(2) 运行在服务器上并使用线程的后端服务? ..我对该解决方案没有明确的背景,但它应该有帮助吗?

还要别的吗 ? ..哪种解决方案更好?

Given a Database that has a table Called [Bid Transactions], which contains records of all available auctions that are currently running on an ASP.net website .. something similar to Ebay.com, when the deadline of the auction passed, I should close that auction, Send a notification message to both the item owner and the bidding winner to inform them.

how should I keep track of all open auctions? how could I monitor all their ending time and update the Auction status to be "Closed" on Real-time basis? ..

(1) Using SQL jobs ? .. that should reduce system performance .. shouldn't it ?

(2) A back-end service that is running on the server and uses Threading ? .. I have no clear background about that solution, but should it help ?

anything else ? .. which solution would be better ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

幸福%小乖 2024-11-05 01:24:22

我现在会让项目类进行检查>在该项目的每个浏览量上显示拍卖结束时间,然后相应地显示拍卖状态。这可以确保在拍卖结束时间之后查看该页面的任何人都将其视为已关闭。

然后,我将运行一个后端服务,每隔一分钟左右检查数据库是否有过期的拍卖,并更新拍卖状态并发送通知等。

它不必“实时”发生。如果查看该页面的每个人都能看到正确的拍卖状态,并且通知在一分钟内发出 - 这已经足够快了。

I would have the item-class do a check for now > auctionendtime on every pageview of the item and then display the auctionstatus accordingly. That makes sure that anyone viewing the page after auctionendtime sees it as closed.

Then I would run a back-end service that checks the database for expired auctions every minute or so and updates auctionstatus and sends out notifications etc.

It doesn't have to happen "real time". If everyone who views the page sees the correct auctionstatus and notifications gets sent out within a minute - that would be fast enough.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文