keithpage / betfairdataclient

Automatically exported from code.google.com/p/betfairdataclient
0 stars 0 forks source link

Create configuration section #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
A configuration section is needed that contains at least the following
information:
1. locale
2. timezone
3. number format
3. wich api product is used free/personal(readonly/transactional)

Original issue reported on code.google.com by ntzioli...@googlemail.com on 8 Mar 2009 at 5:57

GoogleCodeExporter commented 9 years ago
We need to distinguish between "Core System Config" and "Data Provider Config"
sections. For example a REST/XML RPC system would require different 
configuration
values to a SOAP based system. Our core configuration would ideally not be 
polluted
by data provider configuration. A clean approach would be to have links in the 
core
configuration file that points to the data providers specific configuration file
locations.

Original comment by dubdub1...@gmail.com on 8 Mar 2009 at 3:53

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Sure. The gerenal configuration that is needed to run the application should be
stored seperately from the configurations of the data providers. We would have
configuration sections for the core application and a configuration section for 
the
data providers.
Is there a specific reason you wanne have speperate files? Since if we follow 
the
provider pattern the standrad is that those sections would usually reside 
within the
same file.

Like:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="core" type="Betfair.SportDataConfigurationSection,
      BetfairDataClient, Version=1.0.0.0,
      Culture=neutral,PublicKeyToken=null" />
    <section name="sportData" type="Betfair.SportDataConfigurationSection,
      BetfairDataClient, Version=1.0.0.0,
      Culture=neutral,PublicKeyToken=null" />
  </configSections>

  <core>
    <parameter1></parameter1>
    <parameter2></parameter2>
    <parameter3></parameter3>
  </core>

  <sportData defaultProvider="BetsairAPI6SportDataProvider">
    <providers>
      <add name="BetfairAPI6SportDataProvider"
           type="BetfairAPI6SportDataProvider"
           productId="82"
           mayNumberOfConnectionsPerSecond="20"
           />
      <add name="BetfairAPI5SportDataProvider"
           type="BetfairAPI5SportDataProvider"
           productId="82"
           mayNumberOfConnectionsPerSecond="20"
           />
    </providers>
  </sportData>

</configuration>

Also the DataProviderImplementations should be in seperate assemblies to achive 
true
decoupling.

The user would then simply specify which provider he would like to use in the 
config
file. He could even create an Implementation himself and use that.

Original comment by ntzioli...@googlemail.com on 8 Mar 2009 at 6:39

GoogleCodeExporter commented 9 years ago
The file will get too big and we cannot assume we want to load all the data for 
all
the data providers when the boot loader kicks in. have a look at the xml in this
simaple example
"http://forum.bdp.betfair.com/attachment.php?attachmentid=9&d=1232529525" it is 
the
basic beginnings of what the exchange SOAP data providers config section will
looklike. and considering that you will have different paterns per sport even 
per
market it could get hairy. 
You might have hit on a point regarding decoupling and we should investigate 
that
further.

Original comment by dubdub1...@gmail.com on 8 Mar 2009 at 11:35