转载:https://www.webtide.com/choose/jetty.jsp
There are several open source HTTP servers and Servlet Containers available: Jetty, Tomcat, Glassfish, Resin, so a frequently asked question is why use Jetty rather than one of these alternatives. This paper is short overview of the technical and non-technical drivers of a decision to use Jetty.
Performance
Performance is very important for every web business, no matter how many requests per second they need to serve. However, when measuring performance it is important to know which performance metrics are valid for your site and that they are being correctly measured.
Page Load Time
If a site is handling less than many 1000s of requests per second, then thoughput (requests per second) is unlikely to be an important metric. Instead, studies have shown that slow pages can reduce revenue and conversions from a web site by up to 15%, so minimising page load time is the performance metric applicable for many (most) sites.
Jetty's focus on multi-connection HTTP and features such as SPDY (and soon HTTP/2.0) can significantly reduce page load latencies without the need to re-engineer your web application.
Small Memory Footprint
Jetty has been designed to have a small memory foot print, which is an excellent basis for good all round performance and scalability. If the server users less memory, then there is more memory available for the application, threads and caches. Also having more free memory can greatly improve garbage collection and improve all round application performance. A small memory footprint allows more instances of the server to be run on virtual hardware, which is often memory constrained, making Jetty very cloud friendly.
Throughput
If your website does need to handle many 1000s of requests per second, then it is very important to understand that there is a big difference between serving 10,000 requests per second over 1 TCP/IP connection vs serving the same request rate over 10,000 connections. Many published or self performed benchmarks consist of open a few connections and sending as many requests as possible over them. This is a poor measure of throughput because it is based on a load profile which is unlike the vast majority of loads experienced by real web servers. Such tests simulate a few extraordinarily busy users, when most typical web sites will see many simultaneous users who send requests in short bursts separated by idle periods. The impact that such different load profiles can have on performance results is discussed in Lies, damned lies and benchmarks.
Jetty has been designed for scalable performance under realistic loads of many simultaneous connections and we can achieve excellent results with many 10s of thousands of HTTP connections and 100s of thousands of simultaneous websocket connections.
Most importantly, because our benchmarks are based on real applications under realistic loads, we have real users that have achieve the same results in production.
Innovation
The web is a moving target when it comes to deploying applications that will meet users expectations of usability and interactivity. There has been a continual evolution of technique and protocols frombasic web pages, CSS, javascript, Ajax, Web 2.0, Comet, Websocket, HTML5, SPDY and soonHTTP/2.0. Each new technique can dramatically change the load profile experienced by the server and new protocols must be supported by the server.
Market Share
The web has proved time and time again that users are fickle and that massive market share can be lost/gained very quickly depending on usability and availability of the latest web features. Thus in order to develop a successful web application and to keep an already successful web application current and relevant, it is vital that your server will allow you to keep up with the latest techniques and protocols.
Jetty was the first HTTP server developed in Java (1991), long before the servlet specification and has been at the fore front of web development since then. Jetty has either lead or been among the first movers on many significant innovations: HTTP/1.1, Asynchronous servlets, comet, websocket, SPDY, and soon HTTP/2.0. If you want to keep your market share from migrating away to follow the latest web developments, then using Jetty will give you a platform on which you can stay current.
Stability
Typically new advanced features are made available in the current stable release of Jetty as optional extras before being made core features in the next major release. For example, as the browser support for websockets and SPDY was rolled out through 2011 and 2012, Jetty made support for these available in Jetty-7 and Jetty-8 as additions while simultaneously we re-architected jetty-9 to have these important technologies built into the core server, not just as adjuncts. This allows your development team to experiment and innovate with new features without subjecting your application to a major version upgrade.
Collaboration
The jetty project is receptive to new ideas and is somewhere you can bring your own ideas to fruition. For example, Asynchronous servlets were first developed as a result of suggestions from the activemq project, who had been told by other open source server projects that the suggested use-case was a protocol abuse and should not be done in a java application server. Asynchronous servlets are now part of the servlet specification and activemq have enjoyed the scalability benefits longer than most by using jetty.
Standards
The flip side of innovation can be vendor lock in if a feature is only available on a single server. The Jetty project is keenly aware that we want users to use Jetty because they want to, not because they have to, thus we make every effort to adopt standards and avoid proprietary APIs and extensions. Jetty developers are active in the JCP and IETF where we participate in the development of Internet standards. This allows us to be early implementors of new standards (eg Servlet 3.0, websocket), or to work towards standardization of our own innovations (asynchronous servlets).
Currently we have deployed websocket support using a Jetty API, but are working with the JCP on a standard websocket API that will soon be supported
Architecture
The view from 20,000 feet is that Jetty and the other containers are rather similar, they are all java applications servers offering implementations of the 2.5/3.0 servlet specification with optional extras giving many JEE features. You can drop a standard WAR file into all of these servers and expect them to run, so in many ways all the servers are commodity products and for many webapps it is not important which you use.
However, on closer inspection, the architectures of the servers differ greatly, mostly because each project as historically had a different focus. Unlike the other contains, Jetty was not developed to be first and foremost and application server. Application servers have the benefit of controlling the majority of their environment and enforcing that deployed applications adhere to their conventions and standards. This is great if you want a commodity server, but can lack flexibility if you need to operate outside of the commodity box.
Jetty is first and foremost a set of software components built to offer HTTP and servlet services. These components can be assembled as needed to form a purpose built server, include as an Application server. One of the jetty design mottoes has been: "Don't put your application into Jetty, put Jetty into your Application". The benefits of this approach include:
-
One size does not fit all. While jetty can (and has been) used as the web tier of full and partial JEE stacks ( Geronimo, Jboss, Sybase EAServer, JonAS, Glassfish and Hightide), such stacks are not the only "solution" required for application servers. Thus Jetty has also been used as the basis for other application frameworks including: SIP telephony (www.cipango.org), Ajax JMS (www.activemq.org), Asynchronous SOA services (Apache Camel)
-
There is "no taxation without representation". Because features like JMX, JNDI, annotations and JEE integration are implemented as pluggable and/or extended components, then if there is no need for a particular feature then it does not need to be assembled and the server does not have to pay a memory/CPU cost for an unused feature. While other servers can also be stripped back to lighterweight cores, it is often harder to strip back complexity than it is to simply add what you need.
-
As a collection of assembled software components, it is very simple to extend and/or replace components with customized behavior. For example, when Google chose Jetty as the servlet container for AppEngine, they were able to easily plugin their own HTTP connector and session management extensions. Similarly the integration of Jetty into development tools like maven can be very flexible as the components that control the layout of a webapp can be updated to run an unassembled application from source rather than an assembled WAR. For example the mvn jetty:run plugin can be used to run a maven webapp project from source, without assembly.
-
All APIs are public. Every module of Jetty could be used by a Jetty user as part of an extended/pluggable solution. Thus there is no scope at all for Jetty developers to be lazy with their designs/implementations and under the covers, Jetty code is easily understandable and maintainable.
-
Development tools and frameworks often take advantage of the embeddable nature of Jetty: Google Widget Toolkit, Grails, Eclipse, OSGi Equinox, OSGi Felix, Maven, Continuum, Fisheye, Jruby, Xbean, Tapestry, Cocoon, Plexus etc. all either use Jetty by default or have Jetty bindings. Thus when it comes to production, it makes sense to run your application on the same server that was used to develop it.
Support and Community
Sometimes using the best technology can still be tough if you are the only one doing so and are unsupported. Jetty is an open source project with the normal community support lists, but it is also well represented in collaborative support systems like stack overflow.
For commercial support, Intalio|Webtide provides developer advice, which is focused on answering your developers questions during development so that production problems can be avoided; and production support that helps diagnose and fix any issues on your live servers. We can also assist you with custom jetty developments and extensions.
相关推荐
Part 2 guides you through a worked example, using Spring, MySQL, and Jetty. Enhanced chapters teach you how to use Selenium to drive your application and handle asynchronous Ajax calls, and new ...
How to Use this Book 2. Your Feedback 3. Font Conventions 4. Maven Writing Conventions 5. Acknowledgements 1. 介绍 Apache Maven 1.1. Maven... 它是什么? 1.2. 约定优于配置(Convention Over ...
绘制箱型图所用到的数据
# 基于PythonFastAPI框架的桌面管理系统 ## 项目简介 本项目是一个基于FastAPI框架搭建的桌面管理系统。它集成了Pydantic进行数据验证和类型安全保障,SQLAlchemy实现数据库操作,Dynaconf完成配置管理。系统涵盖用户管理、桌面管理、日志管理、数据库迁移、异常处理以及API测试等多个模块,能够为用户提供创建、查询、更新和删除桌面等功能。 ## 项目的主要特性和功能 1. 用户管理支持用户的创建、获取、更新和删除操作,同时可对用户信息进行查询和修改。 2. 桌面管理实现桌面的基本信息和状态管理,包括创建、查询、更新和删除桌面。 3. 日志管理记录操作的详细信息、时间戳、用户信息和操作结果等,支持日志的查询和记录。 4. 数据库迁移利用Alembic库进行数据库迁移,可对数据库结构进行变更和版本控制。 5. 异常处理定义多个自定义异常类,处理特定错误情况,如身份验证失败、资源未找到等。
房地产活动策划 -常州花博会 花的知识.pptx
面向个人开发人员的 Autumoon 代码库标准版。
内容概要:本文详细介绍了基于非线性磁链观测器的永磁同步电机(PMSM)转子位置估计方法及其在无传感器磁场定向控制(FOC)中的应用。主要内容涵盖相电压重构、相位补偿、观测器离散化建模以及稳定性分析。文中提供了具体的MATLAB代码片段,展示了如何处理PWM开关噪声、优化相位补偿算法、选择合适的非线性增益,并确保系统的稳定性。此外,还讨论了将MATLAB代码移植到嵌入式平台(如STM32F4)的关键技术和注意事项。 适合人群:从事电机驱动控制系统设计的研发工程师和技术人员,尤其是对无传感器控制感兴趣的从业者。 使用场景及目标:适用于需要提高永磁同步电机在低速和零速工况下转子位置估计精度的应用场合,如家电、工业自动化等领域。目标是实现高精度的位置估计,减少对外部传感器的依赖,提升系统的鲁棒性和可靠性。 其他说明:文中提到的技术细节对于理解和实现高性能无传感器FOC控制至关重要。建议读者结合实际项目进行深入研究和实践,特别是在参数调整和稳定性验证方面。
内容概要:本文详细介绍了一种基于MATLAB的疲劳驾驶检测系统的实现过程。该系统通过计算机视觉和数字图像处理技术,从视频处理开始,逐步实现了视频分帧、有效区域提取、人脸定位、人眼区域分割、二值化处理、边缘提取、去噪、闭眼率计算等功能,并最终通过GUI界面展示了检测结果。系统的核心在于通过对驾驶员的眼睛状态进行监测,从而及时发现疲劳驾驶现象,提高道路安全性。 适合人群:对计算机视觉、图像处理感兴趣的开发者和技术爱好者,尤其是有一定MATLAB基础的研究人员。 使用场景及目标:适用于交通安全管理领域,旨在通过监控驾驶员的眼睛状态,预防因疲劳驾驶引发的交通事故。具体应用场景包括但不限于长途运输、出租车管理、私家车安全辅助等。 其他说明:文中提供了详细的代码示例和优化技巧,如使用行列投影法分割人眼区域、采用自适应阈值进行二值化处理等。此外,系统还具备良好的可扩展性,支持远程调试和运行,能够根据实际需求灵活添加新功能。
# 基于Qt框架的Qt Designer插件封装工具 ## 项目简介 本项目是一个使用Qt框架开发的Qt Designer插件封装工具。它允许Qt开发者将自定义组件封装为Qt Designer插件,使得这些自定义组件能够像Qt基础组件一样在Qt Designer中直接使用。该工具提供了一套简单明了的流程,帮助开发者轻松地将自定义组件封装为Qt Designer插件。 ## 项目的主要特性和功能 1. 封装自定义组件工具支持将已开发的自定义组件封装为Qt Designer插件,使这些组件能够在Qt Designer中直接使用。 2. 支持多种Qt组件类型工具支持各种Qt组件类型,如按钮、文本框、滑块等,以及其他自定义类型的组件。 3. 自定义组件管理工具提供了一个友好的界面,用于管理已封装的自定义组件,包括添加、编辑和删除组件。 4. 生成插件代码工具自动生成Qt Designer插件所需的代码和文件,包括必要的接口定义和代码实现。
# 基于Spring Boot的翻译与语音合成系统 ## 项目简介 本项目是一个基于Spring Boot框架的翻译与语音合成系统,旨在通过调用百度翻译API实现多种语言的翻译功能,并支持将翻译结果进行语音朗读。系统还集成了用户登录和注册功能,使用户能够个性化使用翻译服务。 ## 项目的主要特性和功能 1. 翻译功能 支持多种语言的翻译,通过调用百度翻译API实现。 提供HTTP GET请求封装,方便与百度翻译API进行交互。 2. 语音合成 支持将翻译结果转换为语音输出,增强用户体验。 3. 用户管理 提供用户登录和注册功能,确保用户数据的安全性和个性化服务。 4. 安全性 使用MD5加密技术对敏感信息进行加密处理,确保数据传输的安全性。 ## 安装使用步骤 1. 复制项目 bash 2. 配置环境
# 基于Arduino和蓝牙的智能小车控制系统 ## 项目简介 本项目是一个基于Arduino的智能小车控制系统,通过蓝牙模块HC06与Android应用进行通信,实现对小车的远程控制。用户可以通过Android应用上的按钮来控制小车的前进、后退、左转、右转和停止。 ## 项目的主要特性和功能 远程控制通过Android应用实现对小车的远程控制。 蓝牙通信使用蓝牙模块HC06进行设备间的通信。 电机驱动采用L298N电机驱动模块控制小车的两个直流电机。 多功能控制支持前进、后退、左转、右转和停止等基本操作。 ## 安装使用步骤 1. 硬件组装 将所有组件安装在底盘上。 连接蓝牙模块HC06的VCC引脚到Arduino Uno的5V引脚。 连接蓝牙模块HC06的GND引脚到Arduino Uno的GND引脚。 连接蓝牙模块HC06的TXD引脚到Arduino Uno的数字引脚3。
内容概要:本文详细介绍了如何使用Python复现轴承动力学模型,重点关注内圈质心运动轨迹的计算。首先解析了核心微分方程,特别是非线性赫兹接触力的计算方法。接着展示了如何通过自定义四阶龙格库塔法求解微分方程,并讨论了常见陷阱如绝对值和符号函数的处理。文中还提供了详细的参数设置指导,包括质量、刚度、阻尼系数等,并强调了无量纲化处理的重要性。最后,通过Matplotlib进行了结果可视化,展示了不同转速下的运动轨迹和接触力时域图,揭示了系统的周期性和混沌特征。 适合人群:机械工程专业学生、从事机械设备故障诊断的研究人员以及对非线性动力学感兴趣的工程师。 使用场景及目标:①用于教学,帮助学生理解轴承内部复杂的力学关系;②作为科研工具,辅助研究人员探索轴承的动力学特性及其故障机理;③为企业提供理论支持,优化轴承设计和维护策略。 其他说明:文中提供的完整代码已托管在GitHub上,方便读者下载和实验。建议读者从简单的参数调整入手,逐步深入理解模型的工作原理。
# 基于ESP32的TinyCI Hub项目 ## 项目简介 TinyCI Hub(Tiny Communication Infrastructure Hub)是一个用于物联网(IoT)的中间件解决方案,旨在桥接IoT设备与Web平台之间的通信。通过高效地收集来自IoT设备传感器的数据,并将其传输到Web平台进行处理和分析,TinyCI Hub实现了边缘设备与Web平台的无缝连接。 ## 主要特性和功能 1. 设备发现通过扫描整个IP子网自动注册边缘设备到Hub,实现设备的自动发现和配置。 2. 配置管理允许用户通过MQTT协议对设备进行远程配置和管理。 3. 数据通信实现边缘设备与Web平台之间的数据通信,通过MQTT协议传输传感器数据。 4. WebSocket通信支持WebSocket协议,用于实时数据交互和通知。 ## 安装使用步骤 1. 下载源码下载并解压项目源码文件。 2. 硬件准备连接ESP32开发板,确保硬件要求满足项目需求。
内容概要:本文详细探讨了虚拟同步发电机(VSG)并网控制系统中小信号建模的重要性和具体实现方法。首先介绍了VSG技术在分布式发电和微电网领域的应用背景及其优势,强调了小信号建模对于评估系统稳定性和并网控制性能的基础作用。接着,通过具体的Matlab Simulink建模实例展示了如何构建VSG小信号模型,包括模型组件的选择、仿真参数的设定以及结果的分析与保存。文中还深入讨论了功率回路动态特性的线性化处理,特别是惯性时间和阻尼系数的影响,并提供了多个代码示例来辅助理解和实践。此外,文章分享了一些实用的经验技巧,如离散化控制器的设计、PWM载波频率与控制器采样率的匹配、阻抗扫描法的应用等。 适用人群:从事电力系统自动化、分布式能源管理和微电网技术研发的专业人士,尤其是对VSG技术和小信号建模感兴趣的工程师和技术研究人员。 使用场景及目标:①帮助读者掌握VSG并网控制系统的工作原理;②指导读者利用Matlab Simulink平台完成VSG小信号建模;③提高读者对VSG系统参数选择的理解,从而优化控制器设计。 其他说明:文章不仅提供了详细的理论推导和仿真案例,还结合实际操作中的常见问题给出了针对性的解决方案,旨在为相关领域的从业者提供全面的技术支持。
mac 虚拟机
# 基于Django框架的个人博客 ## 项目简介 这是一个基于Django框架的个人博客项目,旨在为用户提供一个简单易用的博客平台。项目包括后台管理界面和前台展示功能,使用MySQL数据库存储数据,并集成了CKEditor富文本编辑器,方便用户创建和编辑博客内容。 ## 项目的主要特性和功能 1. 博客创建与管理 通过后台管理界面创建、编辑和删除博客文章。 支持设置博客标题、内容、类型等信息。 管理博客类型和用户信息。 2. 博客浏览 用户可以通过前台页面浏览博客文章。 支持按类型、日期等分类查看博客文章。 3. 富文本编辑 使用CKEditor富文本编辑器,支持插入图片、链接等富文本内容。 4. 分页与排序 博客文章列表支持分页显示。 按创建时间降序排序。 ## 安装使用步骤 1. 安装依赖 确保已安装Python和Django。
内容概要:报告深入分析了2024年中国美妆个护跨境电商的发展现状与趋势。首先,概述了中国美妆个护行业的总体趋势,指出2023年国内化妆品零售额达4142亿元,同比增长5.1%,出口额为65.1亿美元,同比增长16.7%。产业集群已形成,如上海的“东方美谷”和广州的“白云美湾”。其次,报告详细探讨了中国美妆个护外贸趋势,特别是出口市场和品类,广东省在出口中占据领先地位,出口额达22.8亿美元,占全国35%。再次,聚焦亚马逊平台,作为跨境电商的龙头,亚马逊拥有超过3.1亿活跃客户,占据美国市场37.6%的份额。报告还提到,2024年Q1亚马逊彩妆和身体护理产品快速占领榜单,基础护肤品类份额被挤占,产品均价略有下跌。最后,强调了品牌建设和渠道控制的重要性,建议商家注重品牌推广,如利用TikTok和线下活动进行营销。 适合人群:从事或关注美妆个护跨境电商的企业主、运营人员、市场营销人员以及相关研究人员。 使用场景及目标:①了解中国美妆个护行业的最新发展动态和出口趋势;②掌握亚马逊平台的市场表现和竞争格局;③学习品牌推广和渠道管理的最佳实践,以提高跨境电商的盈利能力。 其他说明:报告引用了大量权威数据和案例,提供了详实的参考依据,帮助从业者更好地把握市场机会并制定有效的营销策略。
题目:多方位车距监测系统的设计与实现 主控:STM32 显示:oled 超声波*4 声光报警 按键 功能: 1.实时显示相关数据 2.任意一个方向距离障碍物距离低于阈值,启动声光报警 3.阈值可以按键修改
# 基于Thrift框架的游戏匹配系统 ## 项目简介 本项目是一个基于Thrift框架的游戏匹配系统,旨在实现高效的用户匹配和数据保存功能。系统分为三个主要部分游戏客户端、匹配系统服务端和保存服务端。通过Thrift实现跨语言的远程通信,确保系统的灵活性和扩展性。 ## 项目的主要特性和功能 1. 游戏客户端 提供用户接口,支持添加和删除用户操作。 通过Thrift与匹配系统服务端通信。 2. 匹配系统服务端 接收并处理来自游戏客户端的匹配请求。 管理用户池,当用户池中的用户数量达到匹配条件时,执行匹配操作。 匹配规则根据用户的匹配次数和分数差异进行匹配。 3. 保存服务端 接收匹配系统服务端发送的匹配结果。 调用远程服务器的接口,保存匹配数据。 ## 安装和使用步骤 ### 前提准备 安装Thrift编译器。 安装C++和Python的开发环境。
内容概要:本文详细介绍了如何使用Python进行物流数据的爬取、清洗、分析和可视化,并最终构建一个简单的Web查询系统。作者分享了多个实用的技术细节,包括使用requests和BeautifulSoup进行静态页面爬取,应对动态加载页面的策略,利用pandas进行数据清洗,以及通过seaborn、pyecharts等库进行数据可视化。此外,还展示了如何使用Flask快速搭建一个物流数据查询系统,提供了一个完整的实战案例。 适合人群:对Python编程有一定基础,希望深入学习数据爬取、清洗、分析和可视化的开发者和技术爱好者。 使用场景及目标:适用于需要处理大量物流数据的企业和个人,帮助他们更好地理解和优化物流运营。具体目标包括提高数据获取效率、提升数据分析能力、增强决策支持系统的可视化效果。 其他说明:文中提供了大量的代码片段和实战技巧,强调了在实际项目中可能会遇到的问题及其解决方案。同时,作者还提到了一些高级应用的可能性,如机器学习预测快递时效等,鼓励读者进一步探索。