The Artima Developer Community
Sponsored Link

Articles Forum
From JavaOne 2009: On Trust and Types

30 replies on 3 pages. Most recent reply: Oct 6, 2009 1:43 PM by art src

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 30 replies on 3 pages [ « | 1 2 3 ]
art src

Posts: 33
Nickname: articulate
Registered: Sep, 2005

Re: From JavaOne 2009: On Trust and Types Posted: Oct 6, 2009 1:43 PM
Reply to this message Reply
Advertisement
I think the real time community is more sophisticated than enterprise developers in this area. For example pre-emption - if a higher priority request arrives, a lower priority request that holds required resources could be pre-empted, and their resource released for the high priority user. I have not supplied a priority, and a timeout to file open in any environment I have used.

I notice static types adding complexity to solutions where a closure returns values. I don't see types adding anything in this area. I do see features like closures, ThreadLocal, and aspects (AOP) helping centralize resource management.

Each use point of API's like java.sql and java.io must manage resources by calling close.

Spring lets you use many paradigms for solving these problems, including using closure like objects, annotations on functions, and helper functions for special cases.

http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/ch12s02.html#jdbc-JdbcTemplate

http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/ch10s05.html#transaction-declarative-annotations

Solutions where a separate thread does resource cleanup, like garbage collection, have to be able to stall a thread which makes an allocation request, when resources are exhausted, and do a clean up. It seems like a complicated solution. An explicitly parallel resource server where one server processes close and open might work better.

Flat View: This topic has 30 replies on 3 pages [ « | 1  2  3 ]
Topic: JetBrains' Dmitry Jemerov on IntelliJ 8, Flex, and Scala Previous Topic   Next Topic Topic: Time is the New Memory

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use