Maintaining Scala and Java APIs consistencies?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Maintaining Scala and Java APIs consistencies?

Henry Saputra
Hi All,

How does Flink maintain the Scala and Java consistencies and check
whether new API in Java also expose or implemented in Scala?

Thanks,

Henry
Reply | Threaded
Open this post in threaded view
|

Re: Maintaining Scala and Java APIs consistencies?

Fabian Hueske
Right now, both APIs are independently developed.
Of course we aim to provide the same functionality (in a similar way if
possible) with both APIs but we do not have a formal process to achieve
this.
The core set of functionality is covered by some example programs which are
implemented for both APIs.

I think this will become a more important issue in the future, esp. if we
add more APIs (Python is on the way).
Are there any best practices to maintain API consistency?

Fabian


2014-06-26 8:05 GMT+02:00 Henry Saputra <[hidden email]>:

> Hi All,
>
> How does Flink maintain the Scala and Java consistencies and check
> whether new API in Java also expose or implemented in Scala?
>
> Thanks,
>
> Henry
>
Reply | Threaded
Open this post in threaded view
|

Re: Maintaining Scala and Java APIs consistencies?

Henry Saputra
Hi Fabian,

Nothing in particular about API consistency, but I want to make one of
them (maybe Java or Scala) as the "source of truth" and the other as
the replica so we could run some kind of tool check to make sure APIs
are consistent. Maybe through reflection or some sort.


- Henry

On Thu, Jun 26, 2014 at 12:34 AM, Fabian Hueske <[hidden email]> wrote:

> Right now, both APIs are independently developed.
> Of course we aim to provide the same functionality (in a similar way if
> possible) with both APIs but we do not have a formal process to achieve
> this.
> The core set of functionality is covered by some example programs which are
> implemented for both APIs.
>
> I think this will become a more important issue in the future, esp. if we
> add more APIs (Python is on the way).
> Are there any best practices to maintain API consistency?
>
> Fabian
>
>
> 2014-06-26 8:05 GMT+02:00 Henry Saputra <[hidden email]>:
>
>> Hi All,
>>
>> How does Flink maintain the Scala and Java consistencies and check
>> whether new API in Java also expose or implemented in Scala?
>>
>> Thanks,
>>
>> Henry
>>
Reply | Threaded
Open this post in threaded view
|

Re: Maintaining Scala and Java APIs consistencies?

Ufuk Celebi

> On 26 Jun 2014, at 23:21, Henry Saputra <[hidden email]> wrote:
>
> Hi Fabian,
>
> Nothing in particular about API consistency, but I want to make one of
> them (maybe Java or Scala) as the "source of truth" and the other as
> the replica so we could run some kind of tool check to make sure APIs
> are consistent. Maybe through reflection or some sort.

Sounds great. :) I think source of truth would be the new Java API at the moment.
Reply | Threaded
Open this post in threaded view
|

Re: Maintaining Scala and Java APIs consistencies?

Stephan Ewen
Agree, the Java API is where the main dev goes right now. We will try to
sync the Scala API up soon.

The goood thing is that most of the code we wrote for the Java API is not
really part of the Java API, but rather part of the common type system,
utilities, and so on.

The Scala API will benefit from that as well.
Reply | Threaded
Open this post in threaded view
|

Re: Maintaining Scala and Java APIs consistencies?

Henry Saputra
Cool, thanks guys! I will create ticket and work on it to add
"validation" tool for consistencies of the APIs.

- Henry

On Fri, Jun 27, 2014 at 2:40 AM, Stephan Ewen <[hidden email]> wrote:
> Agree, the Java API is where the main dev goes right now. We will try to
> sync the Scala API up soon.
>
> The goood thing is that most of the code we wrote for the Java API is not
> really part of the Java API, but rather part of the common type system,
> utilities, and so on.
>
> The Scala API will benefit from that as well.