Gophercloud: A Multi-cloud Software Development Kit for Go
developer.rackspace.com
developer.rackspace.com
That's a lot of handwaving. The overlap is that both Go and Erlang have lightweight threads. But Erlang uses the (fairly) different actor model, which usages messaging between actors, supervision trees to control and monitor the life cycles of actors, remote actors, etc. Go has lightweight threads and channels to communicate between threads. Go (concurrency) shares very little with Erlang.
It's also funny that they move on to claim that Go has better concurrency support than Java, when in fact, you can use real Erlang-like actor networks in Java by adding one dependency to your Maven file. Akka actors are lightweight concurrent entities, since you can easily create hundreds of thousands or even millions of actors.
That said, it's interesting to see one API for multiple clouds.
[1] http://akka.io/
Actor model libraries exist in various states of maturity for Go, as well.
Erlang uses the actor model, while Go uses (a modified version of) CSP. Earlier versions of CSP were more like the actor model in that they did not introduce a level of indirection (the channel). But it's not the same concurrency model.
You appear to be interpreting "some attributes" as a deep-dive analysis into the unique traits of what makes Erlang,
What else am I supposed to do? Otherwise, it would be a statement as meaningless as 'Haskell shares some properties with Algol 68'. I am pretty sure it does.
That was never the intention, and I'm not sure what motivated this.
Erlang is well-known for its concurrency features and the reliability provided by the actor model (including supervision, etc.) (e.g. in telephone systems). It is quite easy to read the quoted sentence as an attempt to give a good reputation to Go by comparing it to Erlang. I only question if such a comparison is warranted.
Actor model libraries exist in various states of maturity for Go, as well.
Well, if they are available in various states of maturity, I am interested to know which one is the most mature. Does it cover most of the functionality of Erlang and Akka?
(The most interesting package that I found some time ago was a binding against the Erlang C nodes functionality.)
While we were getting Pathwright launched, we contributed a whole lot to boto, which is primarily (but not exclusively) catered to AWS. It grew Eucalyptus (not a huge jump) and Google Compute support, but they were badly documented/tested and still seem to see much less maintenance than the AWS stuff. The situation has improved slightly as Amazon has hired a few more guys to help the maintainer make boto awesome, but they're still playing catchup with the core competency (AWS). This isn't to talk badly of boto, it's more to illustrate the magnitude of the task of keeping up with even one aggressively developing vendor.
I worry that these "mega-cloud-libs" are the wrong approach. The OpenStack stuff will probably end up with excellent support, but the others are likely to see much less attention, documentation, maintenance, help. The neglected areas of the codebase get to be embarrassing and not up to the quality standards of the primary focus (OpenStack in this case). Perhaps they end up falling behind in API versions for some vendors, limiting their utility.
This is definitely not to poo-poo the effort, I think it's a really neat ideal. Personally, I'd love to see them focus on making a kick ass OpenStack Go API with top notch documentation and tests, and leave the other services to their respective communities. That alone would be noteworthy.
We (rackspace) have had great success with Fog, jclouds, pkgcloud, libcloud, and other multi-cloud toolkits. For openstack / Rackspace cloud we also have php-opencloud, openstack.net and pyrax (which uses the python-XXXX clients from openstack core).
It definitely is a fine line to walk; a good abstraction though means that you can use the most common features easily and float through providers, but you have access to the advanced features if you need or want them.
Commonly those advanced features (on a provider level) mean a greater level of vendor lock-in which is why they may not make sense to expose in the higher level abstraction.
You're right to think it's impossible to keep up; even getting this far, I've heard rumors and tremors about up-coming V3 APIs in several areas. I'm sure by the time V3 support is contributed, V4 will be on the drawing board. Thankfully, the general availability of a V3 API does not usually preclude the continuing support for V2.
All we can do is deliver value to our users in a consumable format while trying to remain aware of any changes in our ecosystem.
Yes, it is currently focused on openstack clouds, but the goal is to reach parity with Fog (ruby), jclouds (Java), Libcloud (Python), pkgcloud (node.js), and so on.
The focus is a series of clean abstractions for users to be able to build tools and programs which can talk across any cloud provider easily using a common set of names / abstractions.
fwiw. goose is LGPL.
I'm at a bit of a toss up re LCD between clouds vs exposing the underlying functionality of the clouds. The LCD apis (libcloud from experience) break down with real world usage even for simple things like net security groups, or zones spec into provider specific usage. It seems like most cross cloud apps ends up needing to redefine the abstraction layer within itself rather than attempting to reuse the same LCD code across clouds at which point its not clear that the LCD layer isn't a limitation to taking advantage of a native cloud functionality.
The LCD issue is being resolve in libcloud - we have multiple FT devs working on it right now, and does not come up as an issue with Fog, jclouds, or pkgcloud. It's possible to make an abstraction that is simple enough to start but powerful enough to access the advanced features of each individual cloud host.
I hope users and consumers will keep us honest - as we said in the post, our interest is pretty much no lock-in on an API level (hence: openstack) and no lock-in on the code level. We really want to make tools that allow our users and others to fluidly move between hosts.
I want to add some context to this.
Our current abstraction provides a relatively simple API which is guaranteed to work across multiple providers.
If you want to access provider specific functionality we offer so called extension methods and arguments. This is similar to how jclouds and other cross-provider libraries handle that as well.
We support over 30 providers and for the more popular ones this means you can usually access most of the native cloud functionality through the base API + extension methods.
Doing that will obviously make it harder and more work to switch between different providers so we always put up a disclaimer and make sure our users are aware of that.
We are trying to standardize as many APIs as possible and promote extension methods to the to top level API (proposals and patches are always very welcome and appreciated!), but sadly in a lot of cases this is not possible. Usually this is because the provider APIs are too different and the glue code needed to make it work would be to complex.
In the end it's a trade-off, pretty much like everything else in life and a lot of other things in CS (CAP anyone?).
If you want good portability and easily switch between providers you will stick to the base API. If you don't care so much about the portability you will also use the extension API.
Side note: Even though official provider client libraries exists, a lot of people still tend to use Libcloud with extension methods.
Usually the reason is that we support a variety of Python versions and we have a stricter testing policy which tends to result in less buggy code.
"I hope users and consumers will keep us honest - as we said in the post, our interest is pretty much no lock-in on an API level (hence: openstack) and no lock-in on the code level."
any api is a lock-in, openstack just happens to be opensource in implementation, but per google v. oracle, there doesn't seem to be any qualms in other opensource impls using the amazon apis (cloudstack, eucalyptus) to deliver what customers want without lock-in.
Why does everyone always forget Robert Griesemer? He might not be as involved with the public as Rob Pike, but he's the guy that made gofmt and godoc (and I'm pretty sure he's also at least partially to thank for the language being specified in such a way that it is "gofmt"-able in the first place, considering he maintains the spec). That alone counts as a pretty big positive influence on the language.
[1] https://github.com/rackspace/gophercloud/blob/master/accepta...
type AccessFn func(gophercloud.AccessProvider)
so now AccessFn describes any function that takes an AccessProvider as its sole parameter, and returns nothing. On this function type, define WithIdentity as a method (edited for brevity): func (fn AccessFn) WithIdentity(allowReauth bool) {
acc, _ := gophercloud.Authenticate(...)
fn(acc)
}
Inside of the function's method, you can invoke the function itself. Then you would define the actual AccessFn as some variable: fn := AccessFn(func(gophercloud.AccessProvider ) {
// ...
})
and then call its WithIdentity method: fn.WithIdentity(ar)
And then, if you were so inclined, you could define an interface over your WithIdentity method, so that in whatever context you're in, anything that has a WithIdentity method will do. This often (but not always) leads to code that's a bit easier to read. Nested callbacks... not always the easiest to wrap your head around.shameless plug: I've written about this in more detail here, if this sort of thing interests you: http://jordanorelli.tumblr.com/post/42369331748/function-typ...
Deeply nested closures are definitely a problem, but I usually solve that by factoring closures out into top-level functions of their own.
That said, one of Gophercloud's goals is to be as idiomatic as possible. Are you available on #go-nuts if I have questions? I'd like to play with this technique some more and get a feel for it before applying it to (and risk breaking) gophercloud's existing API.
The problem is it doesn't produce any gain in clarity for the purposes I'm using it for. I think for the acceptance tests, it's use is fine.
I can see if it were part of the public API, there's an argument that an interface could be used, but even there, I'm not sure it'd aid readability.
Semantically, however, they're of course identical.