I just took a look at ODBC Socket Server, which I had never seen before.
Pretty interesting! Here's some comments.
1) It looks like socket server opens a new socket for processing every
request. In this respect, it goes against one of the benefits of
database adapters, which keep a persistent connection.
2) Architecturally, socket server is very similar to web services. See
the fishbowl proposal at dev.zope.org for more info. Thus, the approach
that Zope would do for web services might have some similarity to what
you'd like to do. Alternatively, take a look at the adapter for
Ultraseek search engine at
http://www.zope.org/Members/brianh/UltraseekDA. It gives a model that
might be useful to you.
3) Zope's approach of having separate objects that handle database
connections provide the benefit that regular objects can't just fire up
socket connections. You want a model that helps prevent all of Zope's
threads from being stuck waiting on responses to socket requests.
4) SQL Methods provide some useful and important machinery for your
socket server approach. First, I think you want site developers to
think your thing is exactly the same as a regular SQL Method. Also:
- You likely want to keep the arguments list approach, to
prevent people from inserting malicious data into the SQL requests.
- Even more than with current database adapters, you want to
retain the caching feature in SQL Methods.
- Shoving the results into the Recordset code is something
you might want to keep.
Good luck, this looks like a useful project!
> I have got several questions here,and maybe you can give me some advice.
> What I am trying to do is write a product which can communicate with ODBC Socket
> a win32 server application that allow applications to have access to Data Sources
>managed by Windows ODBC
> DataSource Administrator. And now a class written in python can communicate with
>ODBC Socket Server.
> BTW,the class mentioned above handles the connection to the server,sending SQL
>statement,and Receiving results.
> As far as I know, in Zope,to access Data Sources,one must create a Database
> ZSQLMethods associated with it to get the results. (but I have doubt about this,
> IMHO,there must be some other way to do so,but what is it.).
> Now,I am rather confused about how to solve the problem.
> First,is what I need to write a DA? or just a common product?
> Second,if it's a DA, how can I use the existing class? I have read the article named
>"how to write a DA" in the how-tos,but it is quite abstract to me.
> Third,where can I find more about the DataBase Connection and ZSQLMethod ?
>especially on how they work together to access databases.
> OK,I am not sure whether I have made me understood, in fact,I am not quite clear
>myself. if you have any questions about that,I will reply ASAP.
> thanks for your great patience,I will be grateful if you can give me some advice.
> thank you!
> Best Wishes
> yours sincerely
> Steven Lee
Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -