reef-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Chung <afchun...@gmail.com>
Subject Re: REEF Services
Date Tue, 02 Feb 2016 01:11:15 GMT
Hi Julia,

There was no link in the previous email, it was simply `ContextRuntime
dot java`. Sorry about the confusion!
Services are not cloned, but a `ServiceConfiguration` can be submitted
on top of another context, thus it seems like a Service is related to
a Context and will not be `closed` until the related Context is
closed.

Thanks,
Andrew

On Mon, Feb 1, 2016 at 4:51 PM, Julia Wang (QIUHE)
<Qiuhe.Wang@microsoft.com> wrote:
> The link below doesn't work.
>
> Can you describe the clone scenarios below? Do you mean attach a service to a context,
when closing one context, clone it for next context in the stack? What's the difference for
sharing the service?
>
> Thanks,
> Julia
>
> -----Original Message-----
> From: Andrew Chung [mailto:afchung90@gmail.com]
> Sent: Monday, February 1, 2016 4:25 PM
> To: dev@reef.apache.org
> Subject: REEF Services
>
> Hi All,
>
> Recently, I have been going over the .NET Evaluator code to implement various missing
features and have been cross comparing the code with Java code.
>
> I have come across a few potential issues and questions with regards to REEF Services:
> 1. What is the scope of a REEF Service? Are they tied to a Context?
> According to the way the code is currently structured (see https://na01.safelinks.protection.outlook.com/?url=ContextRuntime.java&data=01%7c01%7cQiuhe.Wang%40microsoft.com%7c38f6984e74c04f76f9e408d32b676778%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=4xcfRtqd4O7bSk9bqRjrDGghRQEWAPq88QFABupfdLQ%3d),
I believe this is the case.
> 2. Currently, the Java code does not use the variable `services` from `serviceInjector.GetInstance`.
I believe it is possible for certain implementations of JVM JIT compilers to optimize away
services, so users may end up not having the Services created at all.
>
> If a REEF Service is tied to a Context and is only visible by it and its children Contexts,
I believe we should do the following:
> 1. Create a `Service` interface that extends `AutoCloseable` and expose the method `Start()`.
> 2. Make `ContextRuntime` implement `AutoCloseable`.
> 3. Close `Service` only when `ContextRuntime` is closed.
>
> How does this sound? Note that this may require modifications to the `ServiceConfiguration`
API we expose now.
>
> Thanks,
> Andrew

Mime
View raw message