[ 
https://issues.apache.org/jira/browse/STONEHENGE-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12723913#action_12723913
 ] 

Avantika Agrawal commented on STONEHENGE-67:
--------------------------------------------

Just a few additional points to note for anyone who in interested in testing 
this:

In order to dynamically update the configuration using the database (without 
requiring restarts), each function in the BS and OPS make dynamic calls to the 
ConfigService each time they are called.  

This patch makes a lot of changes to all of the services in the .net 
implementation of StockTrader. Namely:
- There is an additional solution called the ConfigServiceSolution and it 
contains all the code for a new ConfigService. This is started up in 
RunServices.bat (I have updated this) and it automatically runs a test for the 
ConfigService in the ConsoleHost when it starts up.

- Make sure that you also run the new scripts I have attached to this issue. 
This creates the DBConfig, ClientToBs, BsToOps, Services tables in the 
database. The structure of these tables is almost identical to the tables 
required by PHP. The only change is that new rows have been added for 
DOTNET_CLIENT and DOTNET_BS. I have also added a SEC column to the services 
table which reflects whether or not the service uses secure messaging. This is 
not used in this ConfigService, but it was a part of the ConfigResponse object 
as defined in the PHP ConfigService so I have added it. I would be interested 
to understand how the PHP uses the Sec attribute of ConfigResponse and how they 
have been retrieving the information without this column.

- I have not deleted much code - most of the methods which look up OrderMode 
and AccssMode from the config files still exist, but these lookups are used to 
make default settings. 

- Once the services are up and running, they dynamically look up their 
configuration in the database with each function call. To do this, most of the 
files in OrderProcessorImplementation and BusinessServiceImplementation have 
been altered.

- The App.config and Web.config files have been changed to include the 
endpoints of ConfigService

- I also have developed a ConfigClient which is common to the OPS and BS - put 
this in the common folder for dotnet.

- Since BasicClient is now being used by more than just the BusinessService, I 
took out an unused reference in it for BusinessServiceContract .

I tried to document most of the code changes but in case anybody has any 
confusion about other changes I may have made, let me know.
I have added testing feedback which may be useful in determining whether the 
.NET BS and OPS are being used to process a particular order. If they are, they 
should write out messages to their respective consoles which the details.

There are a bunch of TODOs in the code, which may be changes that we want the 
PHP to include as well. I am pushing most of these back for Phase II of this 
configuration service. These include:
- Setting this up to work with more than one kind of database. At the moment I 
am using a hardcoded value of the DAL i.e. "Trade.DALSQLServer" and the DBName 
in - DBConfig is not being used at all
- Enabling this to work with multiple clients - this is what was discussed 
earlier in the issue regarding a "unified configuration system"
- Possibly streamlining the process of adding new endpoints, etc.
- Once this has been tested and committed I can of course update the Wiki on 
the Interop Walk Through. It's quite a bit simpler now - all you have to do is 
modify the info in the database. In fact, we could even upload SQL scripts for 
each InteropWalkThrough scenario, which updates rows of CLIENTTOBS and BSTOOPS, 
to make it even easier for first-time users.
- Also we would want to create these tables without a sql script - probably 
within SetupActions for .NET


> Setup .NET Client/BS/OPS to get Active BS/OPS from config service 
> ------------------------------------------------------------------
>
>                 Key: STONEHENGE-67
>                 URL: https://issues.apache.org/jira/browse/STONEHENGE-67
>             Project: Stonehenge
>          Issue Type: New Feature
>            Reporter: Avantika Agrawal
>         Attachments: AssemblyInfo.cs, InsertScript.sql, SQLHelper.cs, 
> Stonehenge-67.patch, Table Creation.sql, test-67.patch
>
>
> Once the config service is created, hook up the .NET Client/BS/OPS to find 
> the endpoints from the database
> i.e. configuration should happen from the database rather than the config 
> files - replicating the functionality of the PHP implementation

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to