services, take 1
Hinkmond Wong
hinkmond.wong at oracle.com
Tue Dec 20 15:28:27 PST 2011
On 12/20/2011 5:04 AM, Alan Bateman wrote:
> On 20/12/2011 11:00, Neil Bartlett wrote:
>> ...
>>
>> With respect to dynamics, there is an argument for adding API to
>> support registration and unregistration, along with corresponding
>> events and listeners, even if they are never used in Jigsaw. Frankly
>> I don't see dynamics being relevant in Jigsaw or the JDK8 module
>> system so long as modules are static and services are statically
>> declared through META-INF/services/* files. When a dynamic system
>> like OSGi must supply a service to a static system like Jigsaw, we
>> can use the standard fallback of a proxy that internally rebinds to
>> the real service.
>>
> In a container environment with managed services then dynamic
> registration, life cycle events, etc. are obviously important but
> maybe a bit beyond (or further up the stack) from what we are doing here.
For the Embedded market, it's not just about the registration and life
cycle part of a container environment (such as OSGi on an embedded
device) that is important, but also the minimal required runtime dynamic
memory and static footprint size that is very important in being the
smallest size possible (better even if it can dynamically grow and
shrink depending on what services are running).
When real-world embedded customers mention their desires for Jigsaw, it
typically involves the ability to dynamically adjust the size of the
underlying Java platform core libraries according to the needs of the
runtime environment, possibly requiring the modules to be more dynamic
and to minimize the platform's impact to device resources.
Thanks,
Hinkmond
>
> On "findability" then in this first patch the linker has already
> linked modules that require a service to those that provide
> implementations of the service and this is what ServiceLoader uses at
> runtime. Clearly there a bit of an API mismatch and that's what we
> need to work through. There aren't any additions to ModuleClassLoader
> or other APIs at this time.
>
> -Alan.
>
>
>
--
Oracle <http://www.oracle.com>
Hinkmond Wong | Consulting Member of Technical Staff
Phone: +1 408.276.7618 <tel:+14082767618> | Fax: +1 408.276.7674
<fax:+14082767674>
Oracle Java Embedded
4210 Network Ci., M/S USCA22-rm2364 | Santa Clara, CA 95054
Green Oracle <http://www.oracle.com/commitment> Oracle is committed to
developing practices and products that help protect the environment
More information about the jigsaw-dev
mailing list