Giter Site home page Giter Site logo

advdb's Issues

Sync next item with bidder after an item is discarded/awarded

In the current implementation, the client keeps an internal list of items which is supplied after a connect - acknowledge handshake (in a separate message). New items cannot be added to it throughout the whole auctioning process.
This makes it harder for new items to be added on the fly (possibly via bidder submission or an external source). A method for item synchronization which would allow dynamic modification of the auction list would consist of the following steps:

  • send a stop_bid message after an item is successfully awarded or discarded.
  • send the next item's information (item id, description, etc.) in a separate message.

Auctioneer timeouts not updated

Upon a successful bid on an item from a bidder, the auction server does not reset the item's timeout counter.
The counter should also be reset when receiving a SyncPriceMsg for the specified item.

Modify auctioneer to read items from file

The specification dictates that both auctioneers should populate their item list from a text file in the form

<L> # delay 
<Price 1> <Description 1>
...
<Price N> <Description N>

Control Messages Integration

For the client, those messages should be integrated:

  • auction complete: results in closing the session
  • start_bidding: received when the auction shifts to new item. Can possibly(?) be discarded, as the client's eligibility for bidding is updated automatically when receiving a stop_bid message.

For the auctioneer:

  • i_am_interested: possibly obsolete, depends on interface implementation.
  • quit: self-explanatory

Configuration file

Implement a "driver" component - essentially a script that initiates the whole process. It should receive its parameters from a config file, possibly in XML or JSON format.

Multiple stop_bid messages on deletion

Upon deletion of an item due to timeout expiry, a stop_bid message is sent from each server to its clients and the other server. For sync reasons, a servers that receives a stop_bid message must forward it to its clients as well.

As a result, clients may receive more than 1 stop_bid message for the same item.
This is temporarily handled by putting the item deletion snippet inside try...except blocks (or using membership checks).

Update Readme

The current version is incomplete and lacks essential information about the auctioneers' synchronization scheme.

Status attribute for bidder client

For effective use by the client user interface, the bidder client should contain a status data attribute with info relevant to the auction (current item, price, etc.).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.