Upspin's Project Layout

192 views
Skip to first unread message

Patrick Young

unread,
Jul 26, 2018, 12:57:52 AM7/26/18
to Upspin
Hi all,

I'm really curious to learn from the principles that govern Upspin's project layout.  Just about the only advice I've found on laying out a Go project is from Peter Bourgon, but I figured the Upspin authors might have a few thoughts on the matter and its always nice to have real examples of software in the wild.

As a side, I really enjoyed Rob Pike's post on error handling in Upspin.

Thanks for any elucidation!
Patrick


Andrew Gerrand

unread,
Aug 5, 2018, 7:40:21 PM8/5/18
to Patrick Young, Upspin
What is it that you're curious about?

The most notable, and perhaps novel, thing about our project layout is separate repositories for different cloud providers. We built abstraction layers inside upspin.io/cloud and pluggable server wrappers inside upspin.io/serverutil, and then provide concrete implementations of those abstractions and servers in cloud-specific repos such as gcp.upspin.io. It has worked pretty well and let us scale to a variety of cloud services pretty quickly.

Andrew


--
You received this message because you are subscribed to the Google Groups "Upspin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to upspin+unsubscribe@googlegroups.com.
To post to this group, send email to ups...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/upspin/fa0996b9-ca6c-4796-a00b-f556bd115384%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Patrick Young

unread,
Aug 8, 2018, 3:52:57 PM8/8/18
to Upspin
Thanks Andrew, 

What jumped out at me is that a lot of the packages have subpackages and some of those do as well.  It seems pretty fine grained and I figured there is a principle governing when to split things out.  

Patrick

On Sunday, August 5, 2018 at 5:40:21 PM UTC-6, Andrew Gerrand wrote:
What is it that you're curious about?

The most notable, and perhaps novel, thing about our project layout is separate repositories for different cloud providers. We built abstraction layers inside upspin.io/cloud and pluggable server wrappers inside upspin.io/serverutil, and then provide concrete implementations of those abstractions and servers in cloud-specific repos such as gcp.upspin.io. It has worked pretty well and let us scale to a variety of cloud services pretty quickly.

Andrew

On 26 July 2018 at 14:37, Patrick Young <patrick.mck...@gmail.com> wrote:
Hi all,

I'm really curious to learn from the principles that govern Upspin's project layout.  Just about the only advice I've found on laying out a Go project is from Peter Bourgon, but I figured the Upspin authors might have a few thoughts on the matter and its always nice to have real examples of software in the wild.

As a side, I really enjoyed Rob Pike's post on error handling in Upspin.

Thanks for any elucidation!
Patrick


--
You received this message because you are subscribed to the Google Groups "Upspin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to upspin+un...@googlegroups.com.

Rob Pike

unread,
Aug 8, 2018, 5:45:53 PM8/8/18
to Patrick Young, Upspin
What do you mean by "subpackage"? Go does not have subpackages.

-rob


To unsubscribe from this group and stop receiving emails from it, send an email to upspin+unsubscribe@googlegroups.com.

To post to this group, send email to ups...@googlegroups.com.

Andrew Gerrand

unread,
Aug 9, 2018, 12:08:05 AM8/9/18
to Patrick Young, Upspin
As Rob says there is no such thing in Go as a "sub-package" but I know what you mean in this case.

In general we split things at package boundaries when it makes sense at an API or code re-use level.
Examples:
The dir/server was split into a few packages to make the implementation cleaner.
The client and client/clientutil packages are separate because there were other parts of the system that needed to use parts of the client package. 

Happy to answer any other questions you have about specific packages.

To unsubscribe from this group and stop receiving emails from it, send an email to upspin+unsubscribe@googlegroups.com.

To post to this group, send email to ups...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages