Re: Regarding Base Functionality in Core Services

Trevor.Conn@...
 

Dell Customer Communication

Taking the Docker/Moby tree as an example, if you look in "pkg" you'll find packages used throughout the application that don't contain any of the primary functionality of the application. When I think of Docker, I think about OS virtualization and not "parser", "directory", "fsutils" and so on. For example, a container is a primary entity of Docker:

https://github.com/moby/moby/blob/master/container/container.go

The above file references many smaller utility packages in a "pkg" folder. These utilities are used throughout the system but are not primary application entities. They facilitate the primary application entities, and that's how I understood the comment from the ReadMe.

Trevor

-----Original Message-----
From: edgex-golang-bounces@... [mailto:edgex-golang-bounces@...] On Behalf Of Drasko DRASKOVIC
Sent: Friday, March 9, 2018 10:08 AM
To: Steve Osselton <steve@...>
Cc: Conn, Trevor <Trevor_Conn@...>; edgex-golang@...; Dejan Mijic <dejan.mijic@...>
Subject: Re: [Edgex-golang] Regarding Base Functionality in Core Services

"pkg/ is a collection of utility packages used by the Moby project **without being specific to its internals**."

I was convinced that we are speaking about exactly opposite thing - where to put the "common" files that are part of the system internals and used across many/all system packages.

BR,
Drasko DRASKOVIC
Mainflux Author and Technical Advisor

www.mainflux.com | Industrial IoT Cloud
-------------------------------------------------------------------
Engineering Division | Paris, France

LinkedIn: https://www.linkedin.com/in/draskodraskovic
Twitter:@draskodraskovic

On Fri, Mar 9, 2018 at 5:02 PM, Steve Osselton <steve@...> wrote:
+1

On 9 March 2018 at 15:58, <Trevor.Conn@...> wrote:

Dell Customer Communication

Here's something I found in the Docker tree structure

https://github.com/moby/moby/tree/master/pkg

From the readme:

"pkg/ is a collection of utility packages used by the Moby project
without being specific to its internals."

Kubernetes does the same:
https://github.com/kubernetes/kubernetes/tree/master/pkg

This is exactly what I'm talking about. We don't know how many of
these packages we'll wind up having and to just put them in the root
will dilute the overall structure of the project. We need to group
them somewhere. I think "pkg" is good based on the rather mature and
widely adopted projects referenced above.

Trevor

-----Original Message-----
From: edgex-golang-bounces@...
[mailto:edgex-golang-bounces@...] On Behalf Of
Drasko DRASKOVIC
Sent: Friday, March 9, 2018 8:02 AM
To: Fede Claramonte <fclaramonte@...>; Dejan Mijic
<dejan.mijic@...>
Cc: edgex-golang@...
Subject: Re: [Edgex-golang] Regarding Base Functionality in Core
Services

On Fri, Mar 9, 2018 at 2:11 PM, Fede Claramonte
<fclaramonte@...> wrote:
What about putting that files in the root?
+1 for root. These common files should belong to `edgex` package
living in the root.

You can see example here:
https://github.com/mijicd/mainflux/tree/mainflux-159 - for example
`messages.go` that is used in other packages sits in the project
root, and belongs to "central" `mainflux` package:
https://github.com/mijicd/mainflux/blob/mainflux-159/messages.go#L1

We did similar for export services previously:
https://github.com/edgexfoundry/export-go

Best regards,
Drasko DRASKOVIC
Mainflux Author and Technical Advisor

www.mainflux.com | Industrial IoT Cloud
-------------------------------------------------------------------
Engineering Division | Paris, France

LinkedIn: https://www.linkedin.com/in/draskodraskovic
Twitter:@draskodraskovic
_______________________________________________
EdgeX-GoLang mailing list
EdgeX-GoLang@...
https://lists.edgexfoundry.org/mailman/listinfo/edgex-golang
_______________________________________________
EdgeX-GoLang mailing list
EdgeX-GoLang@...
https://lists.edgexfoundry.org/mailman/listinfo/edgex-golang



--
Technical Director
IOTech Systems Ltd.
_______________________________________________
EdgeX-GoLang mailing list
EdgeX-GoLang@...
https://lists.edgexfoundry.org/mailman/listinfo/edgex-golang

Join EdgeX-GoLang@lists.edgexfoundry.org to automatically receive all group messages.