Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Billpl
Yak Posting Veteran
71 Posts |
Posted - 2004-07-14 : 14:12:42
|
| Any experts in calling extended procedures in TSQL?I'm currently working on a stock market based project that uses a 3rd party stock quote feed which passes XML data back and forth via HTTP. Right now all the quote updates are handled through the business tier that connects through WinSock. I'm thinking it would be faster and more efficient if SQL could call directly to the feed instead. (knock out the middleman) Trouble is...I don't know the first thing about calling external components from TSQL, other than the fact it can be done.Questions:Can Winsock be called directly by SQL without a COM wrapper? If so is it stable enough?Do you know of any 3rd Winsock based components that have been proven stable in SQL?Any one have sample code?BTW paying for advice or outside work is not a problem for this project.Thanks |
|
|
ehorn
Master Smack Fu Yak Hacker
1632 Posts |
Posted - 2004-07-14 : 14:29:18
|
| XMLHTTP would be a more current approach to this (Over WinSock). Perhaps the following links will stimulate some thought. http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=30519http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=35900Email me if you would like a resource for this ;) |
 |
|
|
MichaelP
Jedi Yak
2489 Posts |
Posted - 2004-07-14 : 14:32:47
|
| Personally, I try to stay away from SQL server calling COM objects or EXE's (sp_OACreate and xp_CmdShell respectivly). I've run into situations where I've locked up SQL server due to these commands.I'd let your business tier handle this and let your data tier handle the data, and not GETTING the data.Let me ask this. What's wrong with your existing Business tier solution? YOu mentioned you want something faster and more effecient, but I don't think moving it to SQL server will make it very much faster. By allowing SQL server to send and recieve data via HTTP to the outside world you are opening yourself up for worms etc. I think you shoudl keep your SQL server on an internal network, and let your business tier talk to the outsite world.HTH,Michael<Yoda>Use the Search page you must. Find the answer you will.</Yoda> |
 |
|
|
Billpl
Yak Posting Veteran
71 Posts |
Posted - 2004-07-14 : 15:39:47
|
| It has more to do with the "actual" business rules rather than the "programming" business rules. We're building our project not only to work with our own interface but with other 3rd party client's custom interfaces. We plan to use XMLHTTP (calling strictly SP's) with as little or no BO's or web services stuck in the middle. In fact I've been able to eliminate the majority of the BO logic with data driven logic inside SQL itself. Well the quote server is one of the obstacles. While most of the calls are strictly used only in our interface, fine where they are, the symbol validation and the price updates are required by the database. If I can stick it directly in the SP layer...One more thing out of the loop. :) |
 |
|
|
Billpl
Yak Posting Veteran
71 Posts |
Posted - 2004-07-14 : 20:25:18
|
| I'm going to clarify my above post, if for nothing more than argument sake. The quote server supplies both general data (bid,ask,volume,hi,lo,etc.) that is only relevant to the user/client and specific data such as market prices and symbol validation which is required by the server. Right now both are processed through the BO's on the front end, but I want some systems to be able to bypass the front end and go directly to the data access layer. So what I really need is the server to get the price and symbol data from a backend process that can be hopefully be triggered by the front end, (we only update prices etc. on demand for accounts in current use). The backend process technically could be anything as long as it has HTTP access. In fact the component could be set up to have it's own data and http access, so to query and update on it's own. All the SP would do is call to it and wait for a message that the update is complete. |
 |
|
|
|
|
|
|
|