Java:与批处理服务器通信的最佳技术是什么? [英] java: what are the best techniques for communicating with a batch server?

查看:64
本文介绍了Java:与批处理服务器通信的最佳技术是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个WEB应用程序(带有纯Java servlet),该应用程序具有大量的计算工作,并且具有数据库访问权限,可以在异步模式下完成。
我打算使用专用服务器来执行此类批处理作业,并且我想知道在WEB服务器中的servlet与新专用服务器中的批处理作业之间使用哪种工具/技术/协议进行通信。
我正在查看JMS。这是正确的选择吗?
有行业标准和/或被广泛采用的技术吗?
我还需要同时处理多个作业的队列和优先级。

I've a WEB application (with pure Java servlet) that have some heavy computational work, with database access, that can be done in asynchronous mode. I'm planning to use a dedicated server to execute such batch jobs and I'm wondering which tools/techniques/protocols to use for communication between servlets in the WEB server and batch jobs in the new dedicated server. I'm looking at JMS. Is it the right choice? There are industry standard and/or widely adopted techniques? I need also queue and priority handling for multiple simultaneous jobs.

推荐答案

JMS是一个非常标准的解决方案。高端平台(例如,Sun的JCAPS)大量使用JMS来划分和管理Web服务的工作负载。

JMS is a pretty standard solution. The high-end platforms (Sun's JCAPS, for example) makes heavy use of JMS to partition and manage the workload of web services.

购买高端产品有很多优势Sun(或IBM或Microsoft)的JMS实施。首先,您将获得可靠的消息队列之类的东西,这些消息队列已备份到文件系统。没有消息会丢失。其次,您将获得一些监视和管理工具。

There are many advantages to buying a high-end JMS implementation from Sun (or IBM or Microsoft). First, you get things like reliable message queues that are backed to the file system. No message can get lost. Second, you get some monitoring and management tools.

一件很酷的事情是拥有一个(可能)有多个订户的JMS队列来进行工作负载平衡。

One cool thing is to have a JMS queue with (potentially) multiple subscribers to do workload balancing.

另一个很酷的事情是拥有JMS主题,该主题具有日志记录过程以及已订阅的实际工作过程。日志记录过程将挑选出消息并仅记录开始和停止作业的基本阶段。

Another cool thing is to have JMS topic which has a logging process as well as the real work process subscribed. The logging process picks off the messages and simply records the essential stages of the job being started and stopped.

这篇关于Java:与批处理服务器通信的最佳技术是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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