Wicket:“内存占用很大!”、“Wicket 是否可以扩展?”等等

发布于 2024-11-09 11:18:59 字数 300 浏览 3 评论 0原文

Wicket 大量使用会话,这对于具有大量页面的大型应用程序来说可能意味着“大量内存占用”(如一些开发人员所述)。如果您要向财富 500 强的一群 CTO 解释他们必须为他们的大型网络采用 Apache Wicket应用程序部署以及他们对 Wicket 扩展问题的担忧只是错误的假设;你会争论什么?

PS:

  • 问题仅涉及 缩放。
  • 技术细节和现实世界 例子非常受欢迎。

Wicket uses the Session heavily which could mean “large memory footprint” (as stated by some developers) for larger apps with lots of pages. If you were to explain to a bunch of CTOs from Fortune 500 that they have to adopt Apache Wicket for their large web application deployments and that their fears about Wicket problems with scaling are just bad assumptions; what would you argue?

PS:

  • The question concerns only
    scaling.
  • Technical details and real world
    examples are very welcomed.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

失去的东西太少 2024-11-16 11:18:59

IMO 的 Apache Wicket 在超大规模部署中的可信度通过以下 URL 得到满足: http://mobile.walmart.com 查看源代码。

另请参阅http://mexico.comhttp://vegas.com< /a>、http://adscale.de,然后使用 Alexa 查找这些域以查看其排名。

所以,是的,使用 Wicket 构建互联网规模的应用程序是很有可能的。但无论您是否使用 Wicket、Struts、SpringMVC,或者只是普通的旧式 JSP:互联网规模的软件开发都是困难。没有任何框架可以让您轻松做到这一点。没有任何框架可以为您提供具有为 500 万用户提供服务的下一步完成向导的软件。

IMO credibility for Apache Wicket in very large scale deployment is satisfied with the following URL: http://mobile.walmart.com View the source.

See also http://mexico.com, http://vegas.com, http://adscale.de, and look those domains up with alexa to see their ranking.

So, yes it is quite possible to build internet scale applications using Wicket. But whether or not you are using Wicket, Struts, SpringMVC, or just plain old JSPs: internet scale software development is hard. No framework can make that easy for you. No framework can give you software with a next-next-finish wizard that services 5M users.

英雄似剑 2024-11-16 11:18:59

好吧,首先解释一下足迹从哪里来,主要是PageMap

下一步是解释页面映射的作用、用途以及解决什么问题(例如后退按钮和弹出对话框)。必须手动解决的问题,内存成本相似,但开发成本和风险要大得多。

最后,告诉他们如何影响页面映射、二级页面缓存中的内容,以及如何控制大小。

显然,您也可以向他们展示基准测试,但可能更好的选择是给 Martijn Dashorst 留言(尽管我相信他无​​论如何都会阅读这篇文章:))。

无论如何,我会尝试强调两点:

  1. Wicket 存储在内存中的任何内容都是您不必存储在内存中的。它只是组织得更好、更容易开发、保持一致和测试。
  2. Java 本身意味着您总是不可避免地背负着一些超重的包袱。如果他们如此担心足迹,也许 Java 根本不是他们想要使用的语言。有数百个大型流量网站是用其他语言编写的,因此这是一个完全可行的解决方案。他们能做的最糟糕的事情就是选择 Java,承担过多的包袱,然后利用高级框架带来的优势。

Well, first of all, explain where the footprint comes from, and it is mainly the PageMap.

The next step would be to explain what a page map does, what is it for and what problems it solves (back buttons and popup dialogs for example). Problems, which would have to be solved manually, at similar memory costs but at a much bigger development cost and risk.

And finally, tell them how you can affect what goes in the page map, the secondary page cache and thus how the size can be kept under control.

Obviously you can also show them benchmarks, but probably an even better bet is to drop a line to Martijn Dashorst (although I believe he's reading this post anyway :)).

In any case, I'd try to put two points across:

  1. There's nothing Wicket stores in memory which you wouldn't have to store in memory anyway. It's just better organised, easier to develop, keep consistent, and test.
  2. Java itself means that you're carrying some inevitable excess baggage around all the time. If they are so worried about footprint, maybe Java isn't the language they want to use at all. There are hundreds of large traffic websites written in other languages, so that's a perfectly workable solution. The worst thing they can do is to go with Java, take on the excess baggage and then not use the advantages that come with an advanced framework.
梦醒灬来后我 2024-11-16 11:18:59

Wicket 保存会话中的最后 N 页。这样做是为了能够在需要时更快地加载页面。主要在两种情况下需要它 - 使用浏览器后退按钮或在 Ajax 应用程序中。
后退按钮很清楚,我想不需要解释。
关于Ajax - 每个ajax请求都需要当前页面(会话缓存中的最后一个页面)来查找其中的组件并调用其回调方法,更新某些模型等。
从他们看来,会话大小完全取决于您的应用程序代码。对于任何 Web 框架来说都是一样的。
要缓存的页面数量(上面的 N)是可配置的,即根据您的应用程序的类型,您可以根据需要进行调整。即使没有内存缓存(N = 0),页面也会存储在磁盘中(再次可配置)并且将再次找到该页面,只是速度会慢一些。

关于一些参考资料:

  1. http://fabulously40.com/ - 拥有许多用户的社交网络,
  2. 几个教育网站 - 我知道两个一个在美国,一个在荷兰。他们也有相当多的用户,
  3. 目前我正在做一个项目,预计有几百万用户使用。无论我们在哪里找到热点,Wicket 1.5 都会得到改进。

将此发送给您的首席技术官;-)

Wicket saves the last N pages in the session. This is done to be able to load the page faster when it is needed. It is needed mostly in two cases - using browser back button or in Ajax applications.
The back button is clear, no need to explain, I think.
About Ajax - each ajax requests needs the current page (the last page in the session cache) to find a component in it and call its callback method, update some model, etc.
From their on the session size completely depends on your application code. It will be the same for any web framework.
The number of pages to cache (N above) is configurable, i.e. depending on the type of your application you may tweak it as your find appropriate. Even when there is no inmemory cache (N=0) the pages are stored in the disk (again configurable) and the page will be find again, just it will be a bit slower.

About some references:

  1. http://fabulously40.com/ - social network with many users,
  2. several education sites - I know two in USA and one in Netherlands. They also have quite a lot users,
  3. currently I work on a project that expects to be used by several million users. Wicket 1.5 will be improved wherever we find hotspots.

Send this to your CTO ;-)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文