Description
The StockTrader Order Processor Service is responsible for performing final processing of orders that are submitted by the StockTrader Client. The StockTrader Business Service receives each buy and sell order from the StockTrader Client, and then submits them directly to the StockTrader Order Processor Service. The StockTrader Order Processor Service then will retrieve the current stock price, and record the order in the StockTrader Database at the current price. All of the operations are performed asynchronously.
Table of Contents |
---|
Live Demonstrations
In December of 2009, the PHP and .NET implementations of the StockTrader Order Processor Service were ported to run on Windows Azure. These live cloud-based versions of the StockTrader Order Processor Service can be accessed using the URLs in the table below:
Implementation |
URL |
---|---|
PHP |
http://wso2wsastest1.cloudapp.net/php_stocktrader/order_processor/order_processor_svc_msec.php |
.NET |
http://stocktraderazure.cloudapp.net:8082/tradeorderprocessorservice.svc |
Service Operations
The port OrderProcessorService which exposes these operations is located under the namespace http://Trade.TraderOrderHost.
isOnline
The isOnline operation is a one-way service call that is used by clients of this service to determine if the service is running. It is employed in StockTrader load-balanced scenarios to ensure application-level failover of service-to-service remote calls to clusters running this service.
Parameter |
Type |
Description |
Direction |
---|---|---|---|
loginReturn |
Void |
N/A |
out |
SubmitOrder
The SubmitOrder operation is a one-way operation used to queue an order for asynchronous processing. The implementation controls the price of each share at processing time. This price should be the current quoted price for the stock being purchased or sold.
Parameter |
Type |
Description |
Direction |
---|---|---|---|
order |
Order which requires processing |
in |