`
RednaxelaFX
  • 浏览: 3015450 次
  • 性别: Icon_minigender_1
  • 来自: 海外
社区版块
存档分类
最新评论

JavaOne 2010感想——草稿篇

    博客分类:
  • misc
阅读更多
本来是想专注记录JavaOne北京2010的见闻,无奈北京站比起旧金山的原版缩水太多,不拉上原版感觉很不够力,所以把JavaOne 2010整体拿来写个感想系列。

那啥……这篇东西不发出来的话搞不好要跟另外400+篇草稿一样就这么烂在草稿箱里了。
跟“新年快乐”帖一样,总之先发出来占个位吧。等真的有空了再把这组资料整理成系列发出来。照片也等整理的时候一起发。

9月在美国的JavaOne上,Oracle用的宣传口号还是:

SOFTWARE. HARDWARE. COMPLETE.

到12月的巴西和中国JavaOne的时候,口号也升级了:

Hardware and Software
Engineered to Work Together


哈哈

几位同事老大们的北京JavaOne 2010见闻:

华黎:JavaOne 2010 北京 Session的评价
晓锋:2010年北京JavaOne大会总结
庄远:2010北京JavaOne之旅点滴纪要
坤谷:JavaOne2010北京
孟铸:2010北京JavaOne之行随笔

先前美国JavaOne 2010的见闻:
毕玄:JavaOne美国之行–走势篇
毕玄:JavaOne美国之行–Session篇
毕玄:JavaOne美国之行–大会组织篇
毕玄:JavaOne美国之行–硅谷公司交流篇
以及毕玄老大上传的一些资料的下载地址:
JavaOne 2010 Slides

Oracle的JavaOne Conference Blog:
JavaOne Beijing Photos

===========

Java核心平台的趋势:重获生机,迅速现代化

与.NET的关系:殊途同归,有些功能是在相似的时间点上做出了相似的设计(例如文件系统API、TPL? <-> Java版Grand Central Dispatch),有些是适应环境的改变而变得更像.NET了(delegate <-> MethodHandle、P/Invoke <-> 新native code interface)

要调查,GCD与ForkJoin TPL之间的关系
http://en.wikipedia.org/wiki/Grand_Central_Dispatch
http://www.baptiste-wicht.com/2010/04/java-7-more-concurrency/#comment-83672468

===========

JavaOne Keynote

2011年7月28日! JDK7!

JDK 7/8新功能列表

发布计划
JDK 7
引用
2010/12/23 Feature Complete (M11)
2011/02/17 Developer Preview (M12)
2011/04/12 Rampdown start: P1-P3 bugs only
2011/04/28 API/interface changes: Showstoppers only
2011/05/11 All targeted bugs addressed
2011/05/18 Bug fixes: Showstoppers only
2011/06/02 Last scheduled build (M13)
Final test cycle starts
2011/07/28 General Availability


Henrik Ståhl: 2010-11-10
Oracle's JVM Strategy

以HotSpot为主,将JRockit的优秀功能合并到HotSpot中

模块化
不但要为Java平台内建模块化的支持,同时也要讲Java的核心部分做得模块化,方便部署

==============

Java时间线

日期 事件
2010-09-19 - 2010-09-23 JavaOne 2010
2010-09-20 Mark Reinhold 宣布JDK7开发计划采用Plan B
2010-09-27 Stephen Chin 宣布 Visage计划,延续JavaFX Script
2010-10-11 IBM宣布加入OpenJDK的开发
2010-10-26 Doug Lea 宣布退出JCP EC
2010-11-02 JCP EC选举宣布结果Hologic竞选失败
2010-11-12 Apple宣布加入OpenJDK的开发
2010-11-16 Oracle提交JDK 7/8的JSR
2010-12-07 JDK 7/8的JSR获得JCP EC批准
2010-12-07 Tim Peierls 宣布退出JCP EC
2010-12-07 - 2010-12-09 JavaOne Sao Paulo 2010
2010-12-10 Apache软件基金会宣布退出JCP EC
2010-12-13 - 2010-12-16 JavaOne Beijing 2010
2011-04-12 - 2011-04-13 JavaOne Moscow 2011
2011-05-10 - 2011-05-11 JavaOne Hyderabad 2011


==============

IBMAzul等JVM开发的重量级参与者,IntelAMD等JVM发展的重要协助者,都没来

AMD Java Labs在原版JavaOne上好歹还有个session
Performance and Debugging Advancements in OpenJDK

JavaOne keynote上重点提到OpenJDK将得到IBM与Apple的鼎力支持,并感谢RedHat一直以来的支持(IcedTea

Oracle的声明 Oracle and Apple Announce OpenJDK Project for Mac OS X
Apple的声明 Oracle and Apple Announce OpenJDK Project for Mac OS X

Oracle的声明 Oracle and IBM Collaborate to Accelerate Java Innovation Through OpenJDK
IBM的声明 Oracle and IBM Collaborate to Accelerate Java Innovation Through OpenJDK 2010-10-11
IBM SDK for Java 7.0: Update on Java7 Beta
引用
Dear Beta Participants,

We hope you've seen the recent announcement from IBM and Oracle (http://www-03.ibm.com/press/us/en/pressrelease/32708.wss). We are very excited by this new level of collaboration and feel it will offer significant advantages to our customers and the broader Java community, both around improved compatibility between JREs and in an anticipated accelerated rate of innovation. Needless to say, this marks a very significant strategy change and will directly impact the content of the IBM Java 7 SDK. Most immediately we will be revisiting the amount of Harmony code used in the SDK and shift towards using more code from OpenJDK.

We expect this to have a very significant impact in the technical content of the release. The ultimate quality of the release will be the same (or better, with closer fidelity to the reference codebase), but represents a lot of meaningful change to the various code paths and algorithms used.

We are currently working on a revised plan for subsequent beta drops and would provide updates on that shortly.

Best Regards
(Manohar M.)
Beta Manager


QotD: Adam Messinger on GPL & OpenJDK
Adam Messinger 写道
Our intent is to continue with GPL and so with all of the work, essentially, is going into the OpenJDK project, along with IBM's and Apple's contributions there. I don't see that changing anytime. I think it's working great for us. It's working great for a number of our customers. Red Hat consumes these bits into their IcedTea distribution. That's all working well. I think GPL's really interesting to us because it encourages people to give back. So if you take the bits and you make a change to them you're obliged to contribute those back to the community.

Just as we contributed the IP in the first instance, people who use it downstream are required to contribute back. I think that's part of why we're comfortable with that licensing arrangement.


Apache Harmony
今年9月JavaOne上关于开源的宣传里还提到了Harmony,JavaOne里也确实有Harmony的讲演,但到北京的JavaOne就已经没下文了

Sun开发者技术日 2009

周二在JavaOne里听的JVM session相对来说还是比较酱油。不过问到了一些关于JVM convergence相关的消息,还算是有收获。而且才知道原来Kindle的电子书程序是Java写的,跑的是CDC/FP;正在有限beta的Kindle Developer Kit也是Java ME的
Kindlet <= Applet
Amazon Kindle SDK (KDK) uses CDC Personal Basis Profile

其实我对Java ME.next还是相当有期待的。如果所谓horizontal/vertical API的划分能解决平台分裂问题的话就太好了

在JavaOne展览区的Java展台逛,得到Oracle工作人员的热情介绍,看到跑Java TV的机顶盒,据说明年(现在已经是“今年”了,2011)可能可在国内看到产品;看到跑Java SE Embedded的智能电表,芯片是ARM;看到跑JavaCard的SIM卡…不禁让人想到Java的原点Oak,参考产品是跑在Star7上的PDA

那个智能电表里甚至还在运行数据库…没听清楚跑的是啥,不过应该是类似SQLite的类型
Berkeley DB?

Java SE Embedded里的所谓“headless”把AWT啊Swing之类的都砍掉了,省不少空间。

LG BD530 Blu-Ray Player
Java ME $79.99

What is inside the Livescribe Pulse SmartPen

=====================

JRockit StringBuilder/StringBuffer优化:通过EA确定安全后,把StringBuilder操作自动转变为所谓“StringMaker”操作,与我的StringAppender不谋而合

JRockit的开发Staffan Friberg在合并到HotSpot组来了之后果然表示miss Mission Control a lot

Oracle对JavaScript的投入超乎想像。结合先前看到的招聘消息。
制作一个新的JavaScript引擎,替代来自MozillaRhino
John Rose Great Thundering Rhinos! (an expedition into JavaScript optimization)
Another Open OpenJDK-related Software Developer Position At Oracle
引用
Job: IRC1431651

Responsibilities:
  • Design and implement dynamic and scripting language interpreters (JavaScript, Python)
  • Work with the openJDK community to develop a new JavaScript interpreter on the JVM
  • Work through the JCP process to specify and standardize new Java platform extensions to support dynamic and scripting languages
  • Work closely with the rest of the engineering team to develop new scripting language interpreters and ensure optimum JVM execution performance
  • Working with QA team to build test harnesses for JavaScript interpreter
  • Ensuring timely software releases by improving efficiency, productivity and consistency through software development

Webkit的整合(JavaFX, Java ME)

LWUIT
HTC 非智能手机 Java ME应用

总体来说,硬件性能在提升而价格在降低,所以整个Java平台都朝着更高性能、更充分利用硬件的方向发展。CDC要更接近桌面HotSpot,CLDC要更接近以前的CDC,连JavaCard都可以跑数据库

新的CLDC将支持反射。这在老的KVM里是不支持的,而在老的CLDC HotSpot Implementation已经可以通过ENABLE_REFLECTION编译参数来添加上反射支持。

==============

周二上午在展览区见到龙芯做OpenJDK的四人组

龙芯中科团队的OpenJDK MIPS移植项目
不是源于Reservoir LabsUltraViolet™
移植了解释器C1编译器

代码库:http://icedtea.classpath.org/hg/openjdk6-mips/

这个回头要重点宣传一下。草稿里只写这么几句太可怜了……抱歉

==============

NIO.2参考资料
Oracle: The Java™ Tutorials:
File I/O (Featuring NIO.2)
IBM developerworks:
An NIO.2 primer, Part 1: The asynchronous channel APIs
An NIO.2 primer, Part 2: The file system APIs

JSR-203 NIO.2 new file system API, 能进入JDK7
java.nio.file包

page 6: resolve(other), relativizee(other): not string conparisons, but real path comparisons.
page 11: permissions set at the same time as file creation
page 15: specific exceptions for some situations, e.g. DirectoryNotEmptyException (which extends IOException)
page 17: DirectoryStream is alike the new file APIs in .NET 4, where the directory entries are returned lazily; but has convinient glob and grep => page 20
page 27: can read all file attrs in one file system access, improved perf
page 31: can tag extra data onto files
page 33: use native file system notifications, better perf, less mess
Velocity listens to file changes, if it uses NIO.2, things would be much easier to impl
page 36: watcher.take() is blocking

C POSIX library]dirent.h
readdir()每次返回一项
DirectoryStream的名字来源于此?

Win32 FindFirstFile, FindNextFile, FindClose

.NET 4的新文件API,枚举目录与文件的方法

java.nio.file.Path的封装方式挺不错的。.NET将文件与目录分别表现为FileInfo与DirectoryInfo有时候很方便,但有时候也很麻烦。还是有个抽象的“路径”概念方便些,.NET的System.IO.Path类则是个静态类,对字符串操作

一个有趣的应用场景:自己实现一个FileSystem遮蔽掉系统原本的,用于拦截文件操作并做日志。

===========

联通3G SIM卡是JavaCard
移动正在谈

===========

@SafeVarargs 新鲜出炉
Joseph D. Darcy Project Coin: Safe Varargs

=========

Netbeans c1visualizer Ideal Graph Visualizer问题,联系Geertjan

=========

phoneME port to PSP
http://developers.sun.com/learning/javaoneonline/j1sessn.jsp?sessn=TS-4010&yr=2009&track=embedded
http://sourceforge.net/projects/pspme/ << 这个貌似不是的?
这位很热心的关注淘宝的Java ME客户端是否还在支持,是否还可用之类的

=========

JRockit VE引起兴趣。
JRockit VE暂时还不能mount本地磁盘

Oracle JRockit: Advances ...那个session基本上讲的内容没有超出Oracle JRockit书的范围,有兴趣的同学读一下书收获更大

JRockit VE与Azul Zing的联系(要注意

问了speaker关于JRockit的使用license问题,他说也不太肯定,不过JRockit没有单独的license,而是跟Oracle的别的web服务一起license的;单独在生产环境使用应该没啥限制,不过Mission Control和RealTime的使用则貌似是要另外买license的。需要确认

Mission Control通过JMX与VM连接并获取数据

=========

Azul Pauseless GC
Pauseless GC in the Azul JVM™
2005
The Pauseless GC Algorithm
Managed Runtime Initiative

=========

Sun SPOT
Small Programmable Object Technology

Microsoft SPOT => .NET Micro Framework
Smart Personal Objects Technology

莫简豪
Sun SPOT alarm demo
http://www.youtube.com/watch?v=bH_9htUfodQ

======

Solaris 11
新特性

========

JSR 310 Date and Time API
Stephen Colebourne
这个在JDK 8看来有指望

========

Oracle's JVM Strategy

这个session是给我信息量最大的,所以详细写点。

HotSpot与JRockit的合并
本来就有越发展越相似的趋势——殊途同归
逃逸分析(escape analysis)

字符串压缩(Java 6 Update 21 Performance Release开始)
总是试图使用byte[]来保存实际数据,当遇到非ASCII字符的时候膨胀为char[]
在CJK环境下需要谨慎使用该优化

compressed pointer
HotSpot: 3段式,< 4GB;~ 26GB;~ 32GB
JRockit: 3段式,< 4GB;~ 32GB;~ 64GB (JRockit书98页) Understanding Compressed References
J9: 4段式,< 4GB;…左移1位/2位/3位 ~ 32GB 根据-Xmx以及平台/机器/用户环境自动选择压缩模式
"CR mode"
-Xcompressedrefs
Java SDK5, SDK6 and Beyond: A Performance Update


JavaOne 2010另外一个session,“A Journey to the Center of the Java Universe”也有相关信息
引用
64-bit Compressed Oops
- Use 32-bit offset instead of 64-bit object pointer
- Fast add offset, no-shift method when heap < 4GB
- Add offset, shift method when heap < 32 GB
- 25-30% faster than 64-bit wide object pointers
- 3-5% faster than 32-bit JVM
- On by default in JDK 6 Update 21 and later


MVM意味着可以尝试内存共享(与GCIH的关联?)
object pinning与GCIH可能的关系?
CDS的改进,原本只支持rt.jar,以后要支持应用的类的CDS
AOT的目标是静态初始化器,因为它在启动阶段“贡献”很大,把它编译掉的话(即使编译不优化)启动速度可以大幅提升

新的本地代码接口用于替代JNI。JNI在设计之初就故意做得很难用,以此鼓励大家尽量用纯Java来实现功能。不管初衷是好是坏,事实上它对平时工作是有不利影响的。这次要一口气解决掉。

这里vectorization的思路是loop unroll后用更宽的单元loop reroll,同时应用上SIMD之类的指令

原版JavaOne上也有人问了Mission Control相关的hook会不会带到OpenJDK里,答案是肯定的——Oracle也还没决定具体怎么做,大致的方向是会把埋点留在OpenJDK里。不过,埋点是留着,但这些埋点很可能只用于支持将instrumentation信息打到日志文件里,而Mission Control可能会用别的更高效方式来抽取这些数据,而这种“更高效”的方式则可能维持私有。

PermGen转到native memory当然不能解决所有问题,如果原本就有元数据泄漏的话,去掉PermGen也终究还是会导致OOM的。Paul指出,一个可能的方向是抛弃掉使用频度极少的类数据,保留一个占位对象在堆里,当该类真的被用到的时候再重新解析Class文件把数据恢复过来

2011年可以开始看到JRockit的一些合并过来的代码推到OpenJDK代码库里

==============

要写出低延迟的程序,首先要知道延迟都发生在什么地方了。这就需要些顺手的工具

Intel VTune
AMD CodeAnalyst

OProfile可以通过JVMTI与JVM交互,以便跟踪JIT代码。

==============

Showdown at the JVM Corral

recommended GC policy:

Paul (HotSpot): depends on what your goal is
  low pause time/good predictability: CMS now, G1 in future to scale
  high throughput: pretty much solved with parallel collectors
  64bit default heap size up to 32GB

John (J9): for most people, "generational concurrent"
  really great performance for workloads that create a lot of garbage, a lot of short lived garbage especially, crappy Java programs do a lot of short lived garbage. cleans up before the objects get into tenured space.

Patrik (JRockit):
  "generational parallel", partial compaction so low pauses

real-time GC:

Paul (HotSpot): depends on how you define real time

GC future:

I think you're gonna see maybe multi memory domains, too, where you're trying to make a bunch of JVMs look like a single JVM, so you have parts of the heap that are shared between VMs,

i-CMS是给单核机器用的,别用这个模式的CMS!
  • 大小: 171.2 KB
分享到:
评论
5 楼 lurker0 2011-04-23  
很想知道400+篇草稿都是什么 
引用
那啥……这篇东西不发出来的话搞不好要跟另外400+篇草稿一样就这么烂在草稿箱里了。
4 楼 kyfxbl 2011-01-06  
排版略显凌乱。。所以我就不往下看了。。还是回头看你的那篇《JVM分享》吧。
3 楼 花花公子 2011-01-06  
果然草稿不再藏在草稿箱了
2 楼 RednaxelaFX 2011-01-05  
lwwin 写道
你最近对JAVA似乎关注度又回升了么=v=+

生计所迫啊
1 楼 lwwin 2011-01-05  
内容好多=x=

似乎JAVA并没有想象中那样会衰退下去,你最近对JAVA似乎关注度又回升了么=v=+

相关推荐

Global site tag (gtag.js) - Google Analytics