使用哪种 Delphi 技术? [英] Which Delphi technology to use?

查看:26
本文介绍了使用哪种 Delphi 技术?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用 Delphi 编写的客户端/服务器应用程序.基本上所有应用程序所做的就是在服务器应用程序和连接的客户端之间传输 xml 数据流.我目前正在使用 Indy TIdTCPServer 组件.但是服务器端应用程序在我的一些分期付款中不断崩溃.而且调试起来非常困难.所以我想知道是否有一些我应该使用的架构"来完成所有的 tcp/ip 连接管理和数据库连接池,让我可以专注于业务逻辑.

I have a Client/Server application written Delphi. Essentially all the application is doing is transferring xml data streams between a server application and connected clients. I am currently using the Indy TIdTCPServer component. But the server side application keeps crashing on some of my installments. And it has been extremely difficult to debug. So I am wondering if there is some "architecture" I should be utilizing which does all the tcp/ip connection management and database connection pooling, allowing me to concentrate on the business logic.

这里有更多细节:

  • 客户端必须保持持久"连接.有时服务器必须通知所有连接的客户端并向其发送数据.
  • 客户使用无线网卡从笔记本电脑进行连接.所以网络掉线"很常见.
  • 后端数据库是 SqlServer.
  • 一次最多可以同时连接 100 台计算机.当服务器获得新连接 (TCPServer.OnConnect) 时,我会实例化我自己的对象,其中包含它自己的 SqlServer 数据库连接.当 tcp 连接被删除时,我又会释放这些对象(以及相关的数据库连接).
  • 客户端应用程序内置了一个 TTimer.他们定期向服务器发送心跳.如果他们断开"/失去"连接,他们会在网络恢复后自动建立新连接.

有人对这里的最佳方法/架构有什么建议吗?
我认为 Indy 组件可以工作,但同时我觉得我正在重新发明轮子"来管理连接.

Anyone have any suggestions on the best approach/architecture here?
I presume the Indy component would work, but at the same time feel I am "reinventing the wheel" with respect to managing the connections.

推荐答案

我知道的三个组件集将为您处理客户端服务器应用程序的基本技术方面:

Three component sets I am aware of that will take care of the nitty gritty technical aspects of client server applications for you:

您可能需要重新设计您的应用程序以利用这些组件集的工作方式,但假设您已正确分离层,这应该不会太麻烦,并且会为您带来经过充分测试和广泛使用的优势用于您的客户端服务器工作的代码.

You may have to rework your applications to take advantage of the way these component sets work, but assuming you have properly separated layers that shouldn't be too much of a hassle and will buy you the advantage of well tested and widely used code for your client server work.

这篇关于使用哪种 Delphi 技术?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆