仅对使用原语编码的java程序的引用 [英] References to java programs coded using primitives only

查看:88
本文介绍了仅对使用原语编码的java程序的引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我听说过具有严格等待时间要求的Java程序,其中新指令从未 - 或很少使用过(因为没有新的=>没有对象 - >没有GC =>改进的延迟)......而是所有业务逻辑是使用原语处理的。



我不能在网上找到这种技术的参考,尽管...任何指向讨论这种技术或代码片段的网页的链接都将非常感谢。更新(2012年3月):尽管没有公开声明可用,但似乎Oracle已经关闭了他们的JavaRTS group。



你应该看的两个主题是 Java实时规范(JSR-1, JSR- 282 )和 Java安全关键规范(JSR-302) ,( aonix页面)。 RTSJ提供了资源,用于在你的问题中进行仔细的内存管理,虽然RTSJ的大多数用户可能容忍比全基元方法更大的抖动(并且,为了这种容忍,他们获得了通过使用RTGC GC的好处)。对于有限分配类型(限制何时/何地/多少次可以使用 new )的一些示例,搜索rtsj作用域内存规则,这里是一个关于该主题的示例学术论文。您还应该查看eventrons作为试图以(相对)干净的方式解决Java中的这些高频率,低延迟的约束。

对于使用交易上下文中的JavaRTS,请参阅此处。有关如何从JavaRTS中获取最多确定性行为的说明特别是,请看这里



安全关键用户更可能有这些种类的限制,并且SC-Java(部分可能)部分是RTSJ的缩小版本。您可以在 Doug中查看专家组正在查看的一些示例Locke的2007年状态从JTRES幻灯片



几个人生产用于此环境的JVM。 Aonix / Atego的PERC ; aicas'JamaicaVM ; Apogee的Aphelion 。 Sun / Oracle JavaRTS的目标更多地是针对能够容忍(并受益于)较不严格约束的大型应用程序。

虽然您引用的全原始方法是这种类型的编程的极端形式,你最有可能在上面的引用中找到有关这个主题的资源。



对于基元中的业务逻辑?除了我之前的反对者,请注意,大量的IRS税务业务逻辑是在IBM汇编程序中实现的,并且像Java这样的许多企业层正在考虑用于包装(而不是替代!)该逻辑。



我不能在这里引用任何细节,但有一些使用Java的防御应用程序(通常是RTSJ的味道)对内存分配有非常严格的约束,并且大部分代码是静态分配的,并且是原始的。信号处理等......我在系统上搜索了开源资料,这些文档(特别是参考文献部分)指出了这些应用的一些具体例子。




I've heard of Java programs with strict latency requirements where "new" instructions are never -or very rarely- used (because no new=>no objects->no GC=>improved latency)... instead all business logic is handled using primitives.

I couldnt find references to this technique online though... any link to a webpage discussing this technique or snippets of code would be much appreciated.

解决方案

Update (March 2012): While there is no public announcement available, it appears Oracle has shut down their JavaRTS group.

The two topics you should look at are the Real-Time Specification for Java (JSR-1, JSR-282) and the Safety-Critical Specification for Java (JSR-302), (aonix page). RTSJ provides the resources for doing the type of careful memory management you are talking about in your question, though most of the users of RTSJ probably tolerate greater jitter than an "all-primitives" approach would (and, for that tolerance, they get the benefits of GC by using an RTGC). For some examples of the kinds of limited allocation (limiting when/where/how many times you can use new) search for "rtsj scoped memory rules", and here's an example academic paper on the topic. You should also look at "eventrons" as an example of trying to solve these high-frequency, low-latency constraints in Java in a (relatively) clean way.

For a specific new story on the use of JavaRTS in trading contexts, see here. For some instructions on how to get the most deterministic behavior out of JavaRTS in particular, see here.

Safety-Critical users are more likely to have these sorts of constraints, and SC-Java is (expected to be) partially a downscoped version of RTSJ. You can see some examples of what the expert group is looking at in Doug Locke's 2007 status slides from JTRES.

Several folks produce JVMs intended for use in this environment. Aonix/Atego's PERC; aicas' JamaicaVM; Apogee's Aphelion. The Sun/Oracle JavaRTS is targeted more towards larger applications that can tolerate (and benefit from) less stringent constraints.

While the "all-primitives" approach you cite is an extreme form of this type of programming, you are most likely to find resources around this topic at one of the above references.

For the "business logic in primitives?" naysayers above me, note that substantial amounts of IRS tax business logic is implemented in IBM assembler, and a number of "enterprise" layers like Java are being looked at to wrap (not replace!) that logic. Put that in your pipe and smoke it.

I can't cite any specifics here, but there are a number of defense applications using Java (usually a flavor of RTSJ) that have very tight constraints on memory allocation, and much of the code is statically-allocated, primitive focused. Signal processing, etc... I did a search for open source materials on systems I'm aware of, and these documents (see especially the references sections) point the way to some specific examples of these applications.

这篇关于仅对使用原语编码的java程序的引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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