teecode's avatar

Automated Negotiation System

Which method is suitable for building an automated negotiation system for an ecommerce app already built with Laravel and VueJS?

The negotiation function for now will accept user offerPrice from a form and compare with product lastPrice then return approved or rejected (after many attempts) based on a given condition.

Should the algorithm be on

  1. Client side (vuejs) -- accepts the offerPrice and begins the negotiation on the client side. Is this better? Is it secure?

  2. Laravel -- negotiate function on the server side. Vuejs sends the OfferPrice from customer to the server every time an offer is made. Is this better? If in future, lot of users negotiate at the same time, is the performance going to make sense? Do I need something like pusher or firebase for the real time communication?

Or is there any better way to achieve this?

Thanks in anticipation.

0 likes
2 replies
jaspercreel's avatar

I wouldn't trust this to happen client side. The idea with negotiation is that you have multiple parties. When everything is on the client, there is one party. You have a proxy for a second party, but that proxy is still under client control and if the client is savvy they can influence that proxy.

1 like
teecode's avatar

@jaspercreel Thanks so much for the response. I really appreciate. If am to go for the second option as you suggested, how strategy would you suggest in case of heavy traffic (i.e. when we have too much users negotiating with the system at the same time). For each user, a request is sent to the server per bidPrice (i.e. each user negotiates 20 times at the same time and we have 1M users). Am just trying to think ahead. Thanks

Please or to participate in this conversation.