ixtreon / ml-market

11 stars 3 forks source link

Interface for market management and agent control. #1

Open ixtreon opened 9 years ago

ixtreon commented 9 years ago

We talked about implementing a way to communicate programmatically with the market application with the goal of simulating agents in the markets. I've examined two possible approaches to this problem:

First one would be for the developer to include and use the models defined in the ml-market application. This allows for creation and modification of markets, accounts and orders. The downside of this approach is that it requires all code to run locally. There may also be issues dealing with transaction atomicity: django includes such mechanisms but I haven't looked at them in detail.

I could also introduce a RESTful interface to allow for remote management of the markets. Django has a stable REST framework which can be easily plugged in to the existing app to provide such an interface in a way similar to the admin module.

gngdb commented 9 years ago

You mean a RESTful interface for the models to interact with the market, right? Would expect that to be much more useful than the models running locally along with the market.

ixtreon commented 9 years ago

Yeah. I mean a RESTful API for agents to place orders, but also for administrators to create and edit markets programmatically (instead of doing it by hand in the admin module).

I can also see the former being useful but what do you think about the second part? There should be an easy way to get data to (and from) the database and such an interface would be one way of doing it. Another approach would be to add (de)serialization routines for markets and data sets. But then we'd have to stop on a format and schema to use.

gngdb commented 9 years ago

Programmatic admin of the markets would be pretty much necessary for scripting and simulation.

What's the advantage to ther serialization way of dealing with this? Seems like quite a roundabout way of doing it.

ixtreon commented 9 years ago

I thought it would be nice to have markets and data sets for them as e.g. XML documents. So setting up and running a given data set on a market becomes trivial.

I mentioned it to @amosstorkey yesterday and I agree it is unnecessary at this point. I will look into the REST approach and leave the ticket open in case we need it later.