Saikat - +1 for the effort.

typically we organize the API and implementation based on the language

/api/src/java/com/twitter/heron/streamlet - is for java

/api/src/scala/com/twitter/heron/streamlet - could be for scala

within the java you could have multiple targets - one for interface (by 
grouping the files) and the other implementation.

In the Scala implementation you can organize in a similar way and link the 
appropriate targets. 

This organization will reduce the number of directories, keep the original 
namespace and still keep the separation between interfaces and implementation

Thoughts

cheers
/karthik

> On Jan 6, 2018, at 10:09 PM, Saikat Kanjilal <[email protected]> wrote:
> 
> Hi Heron Folks,
> 
> I wanted to run something by the dev list, for the initial scala port of the 
> streamlets API I am targeting building scala interfaces using the java to 
> scala tool and having the interfaces invoke the java implementations, now the 
> way the packaging is setup all the java implementations currently live inside 
> /Users/saikat.kanjilal/code/heron/heron/api/src/java/com/twitter/heron/streamlet/impl,
>  in Intellij I have made the scala directory an additional source directory 
> and am planning on adding the bazel rules file to create a scala library.
> 
> 
> Now my question is this, should we move the java implementation package to a 
> central location so that the implementations can easily be accessed by both 
> the java and scala interfaces, I really don't want to have 2 copies of the 
> implementation files, and it seems awkward to leave the java implementations 
> living where they currently do.
> 
> 
> Here's a possible idea I was thinking about:
> 
> 
> top level directory:  /api/src/java/com/twitter/heron/streamlet
> 
> java interface directory: /api/src/java/com/twitter/heron/streamlet/java
> 
> scala interface directory: /api/src/java/com/twitter/heron/streamlet/scala
> 
> implementation directory: /api/src/java/com/twitter/heron/streamlet/impl
> 
> 
> With the above strategy I can tell Intellij to make the streamlet 
> subdirectory be the src, not sure this actually matters when building a bazel 
> related project.
> 
> 
> Would love to have some input on this.
> 
> Thanks in advance.

Reply via email to