简体   繁体   English

如何测试和部署分布式应用程序?

[英]How to test and deploy distributed applications?

I've written a client-server application. 我已经编写了一个客户端服务器应用程序。 There is one computer running the server application, and several computers running the client application. 一台计算机运行服务器应用程序,而多台计算机运行客户端应用程序。

So far, every time I had a new version / patch of my application, I copied the binaries first through VNC to the server application, and then start a script, that performs a script on client-side, that is copying the binaries to a local folder (network execution is not working!)... Then the client application is started on every client computer... 到目前为止,每次我的应用程序有新版本/补丁时,我都首先通过VNC将二进制文件复制到服务器应用程序,然后启动一个脚本,该脚本在客户端执行脚本,即将二进制文件复制到本地文件夹(网络执行不起作用!)...然后在每台客户端计算机上启动客户端应用程序...

So what are good opportunities that can replace my old-style method? 那么有什么好的机会可以替代我的旧方法呢?

I tried creating a click-once application that is updating over http/ftp... but without success ^^ 我尝试创建一个通过HTTP / FTP更新的单击一次应用程序,但是没有成功^^

We use an open source app called Presto: http://presto.codeplex.com/ 我们使用一个名为Presto的开源应用程序: http : //presto.codeplex.com/

After doing the initial setup, there are only two manual steps with each deployment: 完成初始设置后,每个部署只有两个手动步骤:
1. Copy the binaries to a network location 1.将二进制文件复制到网络位置
2. Press the button in Presto to initiate a new deployment 2.按Presto中的按钮以启动新部署

The big win with Presto is that you use it to initially set up your apps and servers, and specify the appropriate config settings for each environment. Presto的最大优势在于,您可以使用它来初始设置应用程序和服务器,并为每种环境指定适当的配置设置。 Once you initiate a deployment, the installation happens automatically, and the correct values are written to the config files (QA gets QA values, production gets production values, etc...). 启动部署后,安装将自动进行,并且正确的值将写入配置文件(QA获取QA值,生产获取生产值等)。

With Presto, you can stop services, delete folders, copy new binaries, update config files, etc... and it's all automated. 借助Presto,您可以停止服务,删除文件夹,复制新的二进制文件,更新配置文件等,并且这些操作都是自动化的。

That's why web front-end is so popular :) 这就是为什么Web前端如此受欢迎的原因:)

Try to implement good auto-update mechanism and versioning. 尝试实现良好的自动更新机制和版本控制。 Client has hard coded server version, with first call all with each call server includes own version. 客户端具有硬编码的服务器版本,每个呼叫服务器的首次呼叫都包括自己的版本。 When version mismatch - time to auto update. 版本不匹配时-自动更新的时间。 On server - it's just endpoint to download client application installation, which is standard across versions. 在服务器上-只是下载客户端应用程序安装的端点,这是各个版本的标准配置。

So client has external updater process, that is initiated after client knows that new version exists. 因此,客户端具有外部更新程序过程,该过程在客户端知道新版本存在后启动。 Goal of updater process is to download new installation/package and that either to run installation that will update/re-install client either unpack and copy new/modified files. 更新程序过程的目标是下载新的安装/程序包,或者运行将更新/重新安装客户端的安装程序,然后解压缩并复制新的/修改的文件。

When not using some external libraries. 不使用某些外部库时。 Process looks like this. 过程看起来像这样。

Click-once is another approach and also should work. 单击一次是另一种方法,也应该起作用。

Similr question is here Similr问题在这里

Auto update .NET applications 自动更新.NET应用程序

Anyway probably your client apps need a good installer. 无论如何,您的客户端应用程序可能需要一个好的安装程序。 When you have installer just left to implement simple downloader/updater and versioning on service. 当您有了安装程序后,便可以在服务上实现简单的下载程序/更新程序和版本控制。

It is not that hard to do this with less code. 用更少的代码来做到这一点并不难。

  1. Set up a http service in your application. 在您的应用程序中设置http服务。
  2. Create a File where the current version is listed. 创建列出当前版本的文件。
  3. Set up a ftp service in your application to provide the new binaries. 在您的应用程序中设置ftp服务以提供新的二进制文件。
  4. Add a Updater.exe application to the client, this will check for new updates via http and download the new version via ftp. 将Updater.exe应用程序添加到客户端,这将通过http检查新更新,并通过ftp下载新版本。 Also a client version file should be made. 还应该制作一个客户端版本文件。

So you just have to do your old-style method just one more time and you are done! 因此,您只需要再做一次旧方法,就可以完成! Now I don't know if the client application can run the server, if that case is so, I would advice to seperate the services (http, ftp) from your server app. 现在,我不知道客户端应用程序是否可以运行服务器,如果是这样,我建议将服务(http,ftp)与服务器应用程序分开。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何测试winforms应用程序 - how to test winforms applications 如何在分布式 Windows 应用程序之间共享机密而不将其保存到程序集? - How to share a secret between distributed Windows applications without saving it to the assembly? 如何将使用Mono创建的应用程序部署到移动设备 - How to deploy applications created with Mono to mobile devices 何时/如何对CRUD应用程序进行单元测试? - When/How to Unit Test CRUD applications? 如何将Specflow测试部署到每晚构建 - How to deploy Specflow test to nightly build RAM测试应用程序如何工作? C#示例? - How do RAM Test Applications work? C# Example? 如何在IIS上为现有的asp.net应用程序正确开发和部署功能 - How to properly develop and deploy features for existing asp.net applications on IIS 在哪里可以学习如何将ASP.NET 4 MVC 2应用程序部署到IIS7? - Where can I learn how to deploy ASP.NET 4 MVC 2 applications to IIS7? 如何部署GTK#应用程序并提供依赖项。 我得到libgobject-2.0-0.dll异常 - How to deploy GTK# applications and supply dependencies. I get libgobject-2.0-0.dll exception 如何同时开发和部署应用程序的测试版本和生产版本 - How to develop and deploy both test and production version of the application at the same time
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM