Re: [openstack-dev] [tc] supporting Go

2016-05-20 Thread Clint Byrum
Excerpts from Thomas Goirand's message of 2016-05-20 12:42:09 +0200:
> On 05/11/2016 04:17 PM, Dean Troyer wrote:
> > The big difference with Go here is that the dependency work happens at
> > build time, not deploy/runtime in most cases.  That shifts much of the
> > burden to people (theoretically) better suited to manage that work.
> 
> I am *NOT* buying that doing static linking is a progress. We're back 30
> years in the past, before the .so format. It is amazing that some of us
> think it's better. It simply isn't. It's a huge regression, for package
> maintainers, system admins, production/ops, and our final users. The
> only group of people who like it are developers, because they just don't
> need to care about shared library API/ABI incompatibilities and
> regressions anymore.
> 

Static linking is _a_ model. Dynamic linking is _a_ model.

There are aspects of each model, and when you lay different values over
any model, it will appear better or worse depending on those values.

Debian values slow, massively reusable change. Everyone advances at
around the same pace, and as a result, the whole community has a net
positive improvement. This is fantastically useful and is not outdated
in any way IMO. I love my stable OS.

But there is more software being written now than ever before, and that
growth does not have a downward curve. As people write more software,
and the demands on them get more intense, they have less reasons to
reuse a wider set of libraries, and have more of a need to reuse a
narrow subset, in a specific way. This gives rise to the continuous
delivery model where one ships a narrow subset all together and tests it
deeply, rather than testing the broader tools in isolation. That means
sometimes they go faster than the rest of the community in one area,
and slower in others. They give up the broad long term efficiency for
short term agility.

That may sound crass, like it's just fast and loose with no regard for the
future. But without the agility, they will just get run over by somebody
else more agile. When somebody chooses this, they're choosing it because
they have to, not because they don't understand what they're giving up.

Whichever model is chosen, It doesn't mean one doesn't care about the
greater community. It simply means one has a set of challenges when
contributing along side those with conflicting values.

But it's not a regression, it is simply people with a different set of
values, finding the same old solutions useful again for different reasons.

So, I'd urge that we all seek to find some empathy with people in other
positions, and compromise when we can. Debian has done so already,
with a Built-Using helper now for go programs. When libraries update,
one can just rebuild the packages that are built using it. So, rather
than fighting this community, Debian seems to be embracing it. Only
tradition stands in the way of harmony in this case.

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-20 Thread Fox, Kevin M
Containers are popular right now for the same reason statically linking is. But 
it gives you something half way in between. Static linking is really hard to do 
right. Even go's "static link all the things" is incomplete. if you run ldd on 
a go binary, it isn't actually static. Containers ensure the stuff inside 
really is statically linked.

So these days, I'd rather use docker for gaining the static linking like 
functionality rather then try really hard to get a single ".exe" that has 0 
dependencies. Its very hard.

That being said, the distro's have a big point about deps being handled 
dynamically so that the problem of vulnerability/bug patching is tractable. At 
the moment, Docker or any statically linking thing doesn't have a good solution 
to the problem. The importance of this issue can't be understated.

It can be fixed, but there isn't a project I'm aware of yet to commonly solve 
it.

Building containers using distro packages I think is a part of the solution. 
You can then much more easily find which containers are out of date/have 
vulnerabilities. but you still need machinery to scan for updates, rebuild 
containers, and a way to push them out to all the places that need updating.

Until those things are solved, or you have operators that very very carefully 
pay attention, traditional distro's have a strong thing going for them in the 
security realm.

Go's statically linking everything is an anti-feature in my opinion, better 
left to systems like Docker.

Thanks,
Kevin


From: Dean Troyer [dtro...@gmail.com]
Sent: Friday, May 20, 2016 5:48 AM
To: OpenStack Development Mailing List (not for usage questions)
Subject: Re: [openstack-dev] [tc] supporting Go

On Fri, May 20, 2016 at 5:42 AM, Thomas Goirand 
<z...@debian.org<mailto:z...@debian.org>> wrote:
I am *NOT* buying that doing static linking is a progress. We're back 30
years in the past, before the .so format. It is amazing that some of us
think it's better. It simply isn't. It's a huge regression, for package
maintainers, system admins, production/ops, and our final users. The
only group of people who like it are developers, because they just don't
need to care about shared library API/ABI incompatibilities and
regressions anymore.

I disagree, there are certainly places static linking is appropriate, however, 
I didn't mention that at all.  Much of the burden with Python dependency at 
install/run time is due to NO linking.  Even with C, you make choices at build 
time WRT what you link against, either statically or dynamically.  Even with 
shared libs, when the interface changes you have to re-link everything that 
uses that interface.  It is not as black and white as you suggest.

And I say that as a user, who so desperately wants an install process for OSC 
to match PuTTY on Windows: 1) copy an .exe; 2) run it.

dt

[Thomas, I have done _EVERY_ one of the jobs above that you listed, as a 
$DAY_JOB, and know exactly what it takes to run production-scale services built 
from everything from vendor packages to house-built source.  It would be nice 
if you refined your argument to stop leaning on static linking as the biggest 
problem since stack overflows.  There are other reasons this might be a bad 
idea, but I sense that you are losing traction fixating on only this one.]

--

Dean Troyer
dtro...@gmail.com<mailto:dtro...@gmail.com>
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-20 Thread Adam Young

On 05/20/2016 08:48 AM, Dean Troyer wrote:
On Fri, May 20, 2016 at 5:42 AM, Thomas Goirand > wrote:


I am *NOT* buying that doing static linking is a progress. We're
back 30
years in the past, before the .so format. It is amazing that some
of us
think it's better. It simply isn't. It's a huge regression, for
package
maintainers, system admins, production/ops, and our final users. The
only group of people who like it are developers, because they just
don't
need to care about shared library API/ABI incompatibilities and
regressions anymore.


I disagree, there are certainly places static linking is appropriate, 
however, I didn't mention that at all. Much of the burden with Python 
dependency at install/run time is due to NO linking.  Even with C, you 
make choices at build time WRT what you link against, either 
statically or dynamically.  Even with shared libs, when the interface 
changes you have to re-link everything that uses that interface.  It 
is not as black and white as you suggest.


And I say that as a user, who so desperately wants an install process 
for OSC to match PuTTY on Windows: 1) copy an .exe; 2) run it.


dt

[Thomas, I have done _EVERY_ one of the jobs above that you listed, as 
a $DAY_JOB, and know exactly what it takes to run production-scale 
services built from everything from vendor packages to house-built 
source.  It would be nice if you refined your argument to stop leaning 
on static linking as the biggest problem since stack overflows.  There 
are other reasons this might be a bad idea, but I sense that you are 
losing traction fixating on only this one.]


Static linking Bad.  We can debate why elsewhere.

Go with dynamic linking is possible, and should be what the 
distributions target. This is a solvable problem.


/me burns bikeshed and installs a Hubcycle/Citibike kiosk.




--

Dean Troyer
dtro...@gmail.com 


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-20 Thread Dean Troyer
On Fri, May 20, 2016 at 5:42 AM, Thomas Goirand  wrote:

> I am *NOT* buying that doing static linking is a progress. We're back 30
> years in the past, before the .so format. It is amazing that some of us
> think it's better. It simply isn't. It's a huge regression, for package
> maintainers, system admins, production/ops, and our final users. The
> only group of people who like it are developers, because they just don't
> need to care about shared library API/ABI incompatibilities and
> regressions anymore.
>

I disagree, there are certainly places static linking is appropriate,
however, I didn't mention that at all.  Much of the burden with Python
dependency at install/run time is due to NO linking.  Even with C, you make
choices at build time WRT what you link against, either statically or
dynamically.  Even with shared libs, when the interface changes you have to
re-link everything that uses that interface.  It is not as black and white
as you suggest.

And I say that as a user, who so desperately wants an install process for
OSC to match PuTTY on Windows: 1) copy an .exe; 2) run it.

dt

[Thomas, I have done _EVERY_ one of the jobs above that you listed, as a
$DAY_JOB, and know exactly what it takes to run production-scale services
built from everything from vendor packages to house-built source.  It would
be nice if you refined your argument to stop leaning on static linking as
the biggest problem since stack overflows.  There are other reasons this
might be a bad idea, but I sense that you are losing traction fixating on
only this one.]

-- 

Dean Troyer
dtro...@gmail.com
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-20 Thread Thomas Goirand
On 05/11/2016 04:17 PM, Dean Troyer wrote:
> The big difference with Go here is that the dependency work happens at
> build time, not deploy/runtime in most cases.  That shifts much of the
> burden to people (theoretically) better suited to manage that work.

I am *NOT* buying that doing static linking is a progress. We're back 30
years in the past, before the .so format. It is amazing that some of us
think it's better. It simply isn't. It's a huge regression, for package
maintainers, system admins, production/ops, and our final users. The
only group of people who like it are developers, because they just don't
need to care about shared library API/ABI incompatibilities and
regressions anymore.

Cheers,

Thomas Goirand (zigo)


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-19 Thread Ben Meyer
On 05/18/2016 06:42 PM, Eric Larson wrote:
>
> Dmitry Tantsur writes:
>
>> This is pretty subjective, I would say. I personally don't feel Go
>> (especially its approach to error handling) any natural (at least no
>> more than Rust or Scala, for example). If familiarity for Python
>> developers is an argument here, mastering Cython or making OpenStack
>> run on PyPy must be much easier for a random Python developer out
>> there to seriously bump the performance. And it would not require
>> introducing a completely new language to the picture.
>
> In one sense you are correct. It is easier for a Pythonista to pick up
> Cython and use that for performance specific areas of code. At the
> same time, I'd argue that OpenStack as a community is not the same as
> Python at large. There are packaging requirements and cross project
> standards that also come into play, not to mention operators that end
> up bearing the brunt of those decisions. For example, Debian will
> likely not package a PyPy only version of Designate along with all its
> requirements. Similarly, while 50% of operators use packaged
> versioned, that means 50% work from source control to build, test, and
> release OpenStack projects.
>
> You are correct that my position is subjective, but it is based on my
> experiences trying to operate and deploy OpenStack in addition to
> writing code. The draw of Go, in my experience, has been easily
> deploying a single binary I've been able to build and test
> consistently. The target system has doesn't require Go installed at
> all and it works on old distros. And it has been much faster.
True as long as your Kernel is new enough.

There are some issues with Go on older kernels, so you can only go so
far back.

For a product I'm working on (outside of OpenStack) I chose Go for an
updater so we could move forward against Python3 (our Python2-based
updater wasn't portable to Python-3, and no hope of making it so).
I had kept it simple, but after I finished discovered Go didn't
officially support CentOS/RHEL5 due to kernel issues - example
https://github.com/golang/go/issues/8445 (closed as "unfortunate"), see
also http://dave.cheney.net/2013/06/18/how-to-install-go-1-1-on-centos-5
which *might* help get things working, but is not guaranteed.

That said, my CentOS/RHEL binary was built on CentOS6, it ran on CentOS5
but I also didn't do anything very spectacular - just shell calls and an
IPC for the daemon, all very simple and not timing related. Something
more complex, like what has been discussed in this thread, will likely
run into a lot more issues.

$0.02

Ben

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-19 Thread Dmitry Tantsur

On 05/19/2016 12:58 PM, Robert Collins wrote:

On 19 May 2016 at 22:40, Dmitry Tantsur  wrote:



You are correct that my position is subjective, but it is based on my
experiences trying to operate and deploy OpenStack in addition to
writing code. The draw of Go, in my experience, has been easily
deploying a single binary I've been able to build and test consistently.
The target system has doesn't require Go installed at all and it works
on old distros. And it has been much faster.



.. this is something distributions would never do or encourage. Ask zigo for
reasons :)


Distros are having a hard time at the moment :) - much of their
/obvious/ value is no longer sought: for instance compile time is
cheap enough that folk are rebuilding distros just to check that the
binaries are actually from the same sources!

Further, the historical squashing of all dependencies into one version
becomes increasing fragile as dependency chains get larger: the
probability of a bug preventing a library being updated (best case -
caught by CI) or breaking something without warning (typical case,
little-to-no-CI of transitive reverse deps) goes up, not down. This is
one of the major reasons folks doing operations often bypass distro
packages (or roll their own isolated set with known-good
dependencies).

The idea of trusted-collections-of-packages made a lot more sense
before this explosion of software we have now, much of which is high
quality, and moving much much faster than distro release
cycles.Canonical/Ubuntu has at least partly got its head around this
with their focus for the last while on a vibrant app store ecosystem -
one where shipping a single binary with vendored, static dependencies
is actually viable.

So yeah, some distros are getting there, bit by bit :)


It's already an off-topic, but I don't believe in this model personally. 
Especially since how many times such models appeared already without 
apparent instant success. But let us see :)




-Rob

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-19 Thread Robert Collins
On 19 May 2016 at 22:40, Dmitry Tantsur  wrote:
>
>> You are correct that my position is subjective, but it is based on my
>> experiences trying to operate and deploy OpenStack in addition to
>> writing code. The draw of Go, in my experience, has been easily
>> deploying a single binary I've been able to build and test consistently.
>> The target system has doesn't require Go installed at all and it works
>> on old distros. And it has been much faster.
>
>
> .. this is something distributions would never do or encourage. Ask zigo for
> reasons :)

Distros are having a hard time at the moment :) - much of their
/obvious/ value is no longer sought: for instance compile time is
cheap enough that folk are rebuilding distros just to check that the
binaries are actually from the same sources!

Further, the historical squashing of all dependencies into one version
becomes increasing fragile as dependency chains get larger: the
probability of a bug preventing a library being updated (best case -
caught by CI) or breaking something without warning (typical case,
little-to-no-CI of transitive reverse deps) goes up, not down. This is
one of the major reasons folks doing operations often bypass distro
packages (or roll their own isolated set with known-good
dependencies).

The idea of trusted-collections-of-packages made a lot more sense
before this explosion of software we have now, much of which is high
quality, and moving much much faster than distro release
cycles.Canonical/Ubuntu has at least partly got its head around this
with their focus for the last while on a vibrant app store ecosystem -
one where shipping a single binary with vendored, static dependencies
is actually viable.

So yeah, some distros are getting there, bit by bit :)

-Rob

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-19 Thread Dmitry Tantsur

On 05/19/2016 12:42 AM, Eric Larson wrote:


Dmitry Tantsur writes:


This is pretty subjective, I would say. I personally don't feel Go
(especially its approach to error handling) any natural (at least no
more than Rust or Scala, for example). If familiarity for Python
developers is an argument here, mastering Cython or making OpenStack
run on PyPy must be much easier for a random Python developer out
there to seriously bump the performance. And it would not require
introducing a completely new language to the picture.


In one sense you are correct. It is easier for a Pythonista to pick up
Cython and use that for performance specific areas of code. At the same
time, I'd argue that OpenStack as a community is not the same as Python
at large. There are packaging requirements and cross project standards
that also come into play, not to mention operators that end up bearing
the brunt of those decisions. For example, Debian will likely not
package a PyPy only version of Designate along with all its
requirements. Similarly, while 50% of operators use packaged versioned,
that means 50% work from source control to build, test, and release
OpenStack projects.


Here you speak about distributions and packaging, and I rather agree 
with you, but then...




You are correct that my position is subjective, but it is based on my
experiences trying to operate and deploy OpenStack in addition to
writing code. The draw of Go, in my experience, has been easily
deploying a single binary I've been able to build and test consistently.
The target system has doesn't require Go installed at all and it works
on old distros. And it has been much faster.


.. this is something distributions would never do or encourage. Ask zigo 
for reasons :)




Coming from Python, the reason Go has been easy to get started with is
that it offers some protections that are useful such as memory
management. Features such as slices are extremely similar to Python and
go routines / channels allow supporting more complex patterns such as
generators. Yes, you are correct, error handling is controversial, but
at the same time, it is no better in C.

I'm not an expert in Go, but from what I've seen, Go has been easier to
build and deploy than Python, while being faster. Picking it up has been
trivial and becoming reasonably proficient has been a quick process.
When considered within the scope of OpenStack, it adds a minimal
overhead for testing, packaging and deployment, especially when compared
to C extensions, PyPy or Cython.

I hope that contextualizes my opinion a bit to make clear the subjective
aspects are based on OpenStack specific constraints.

--

Eric Larson | eric.lar...@rackspace.com Software Developer |
Cloud DNS | OpenStack Designate Rackspace Hosting   | Austin, Texas

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-18 Thread Eric Larson


Dmitry Tantsur writes:

This is pretty subjective, I would say. I personally don't feel 
Go (especially its approach to error handling) any natural (at 
least no more than Rust or Scala, for example). If familiarity 
for Python developers is an argument here, mastering Cython or 
making OpenStack run on PyPy must be much easier for a random 
Python developer out there to seriously bump the 
performance. And it would not require introducing a completely 
new language to the picture.


In one sense you are correct. It is easier for a Pythonista to 
pick up Cython and use that for performance specific areas of 
code. At the same time, I'd argue that OpenStack as a community is 
not the same as Python at large. There are packaging requirements 
and cross project standards that also come into play, not to 
mention operators that end up bearing the brunt of those 
decisions. For example, Debian will likely not package a PyPy only 
version of Designate along with all its requirements. Similarly, 
while 50% of operators use packaged versioned, that means 50% work 
from source control to build, test, and release OpenStack 
projects.


You are correct that my position is subjective, but it is based on 
my experiences trying to operate and deploy OpenStack in addition 
to writing code. The draw of Go, in my experience, has been easily 
deploying a single binary I've been able to build and test 
consistently. The target system has doesn't require Go installed 
at all and it works on old distros. And it has been much faster.


Coming from Python, the reason Go has been easy to get started 
with is that it offers some protections that are useful such as 
memory management. Features such as slices are extremely similar 
to Python and go routines / channels allow supporting more complex 
patterns such as generators. Yes, you are correct, error handling 
is controversial, but at the same time, it is no better in C.


I'm not an expert in Go, but from what I've seen, Go has been 
easier to build and deploy than Python, while being 
faster. Picking it up has been trivial and becoming reasonably 
proficient has been a quick process. When considered within the 
scope of OpenStack, it adds a minimal overhead for testing, 
packaging and deployment, especially when compared to C 
extensions, PyPy or Cython.


I hope that contextualizes my opinion a bit to make clear the 
subjective aspects are based on OpenStack specific constraints.


--

Eric Larson | eric.lar...@rackspace.com Software Developer 
| Cloud DNS | OpenStack Designate Rackspace Hosting   | Austin, 
Texas


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-16 Thread Dmitry Tantsur

On 05/16/2016 05:21 PM, John Dickinson wrote:



On 16 May 2016, at 8:14, Dmitry Tantsur wrote:


On 05/16/2016 05:09 PM, Ian Cordasco wrote:



-Original Message-
From: Dmitry Tantsur <dtant...@redhat.com>
Reply: OpenStack Development Mailing List (not for usage questions) 
<openstack-dev@lists.openstack.org>
Date: May 16, 2016 at 09:55:27
To: openstack-dev@lists.openstack.org <openstack-dev@lists.openstack.org>
Subject:  Re: [openstack-dev] [tc] supporting Go


On 05/16/2016 04:35 PM, Adam Young wrote:

On 05/16/2016 05:23 AM, Dmitry Tantsur wrote:

On 05/14/2016 03:00 AM, Adam Young wrote:

On 05/13/2016 08:21 PM, Dieterly, Deklan wrote:

If we allow Go, then we should also consider allowing JVM based
languages.

Nope. Don't get me wrong, I've written more than my fair share of Java
in my career, and I like it, and I miss automated refactoring and real
threads. I have nothing against Java (I know a lot of you do).

Java fills the same niche as Python. We already have one of those, and
its very nice (according to John Cleese).


A couple of folks in this thread already stated that the primary
reason to switch from Python-based languages is the concurrency story.
JVM solves it and does it in the same manner as Go (at least that's my
assumption).

(not advocating for JVM, just trying to understand the objection)



So, what I think we are really saying here is "what is our Native
extension story going to be? Is it the traditional native languages, or
is it something new that has learned from them?"

Go is a complement to Python to fill in the native stuff. The
alternative is C or C++. Ok Flapper, or Rust.


C, C++, Rust, yes, I'd call them "native".

A language with a GC and green threads does not fall into "native"
category for me, rather the same as JVM.


MOre complex than just that. But Go does not have a VM, just put a lot
of effort into co-routines without taking context switches. Different
than green threads.


Ok, I think we have a different notion of "native" here. For me it's
being with as little magic happening behind the scenes as possible.


Have you written a lot of Rust?


Not a lot, but definitely some.


Rust handles the memory management for you as well. Certainly, you can 
determine the lifetime of something and tell the compiler how the underlying 
memory is shared, but Rust is far better than C in so much as you should never 
be able to write code that doubly frees the same memory unless you're 
explicitly using the unsafe features of the language that are infrequently 
needed.


I think we're in agreement here, not sure which bit you're arguing against :)



I'm with Flavio about preferring Rust personally, but I'm not a member of 
either of these teams and I understand the fact that most of the code is 
already written and has been shown to drastically improve performance in 
exactly the places where it's needed. With all of that in mind, I'm in favor of 
just agreeing already that Go is okay. I understand the concern that this will 
increase cognitive load on some developers and *might* have effects on our 
larger community but our community can only grow so long as our software is 
usable (performant) and useful (satisfies needs/requirements).


This Rust discussion is a bit offtopic, I was just stating that my notion of 
"nativeness" of Go is closer to one of JVM, not one of C/C++/Rust.

I guess my main question is whether folks seriously considered PyPy/Cython/etc.


Yes.

http://lists.openstack.org/pipermail/openstack-dev/2016-May/094960.html (which 
also references 
http://lists.openstack.org/pipermail/openstack-dev/2016-May/094549.html and 
http://lists.openstack.org/pipermail/openstack-dev/2016-May/094720.html


Thanks! Yeah, I've read the 1st, but somehow missed the other two, which 
actually provide a lot of interesting insights on how stuff works :) In 
this thread I was under a wrong impression, that people are hunting for 
running as "native" code as possible, while actually smart handling of 
IO operations is the critical point. I guess Go is really the best 
solution in this case.




--John




__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-16 Thread John Dickinson


On 16 May 2016, at 8:14, Dmitry Tantsur wrote:

> On 05/16/2016 05:09 PM, Ian Cordasco wrote:
>>
>>
>> -Original Message-
>> From: Dmitry Tantsur <dtant...@redhat.com>
>> Reply: OpenStack Development Mailing List (not for usage questions) 
>> <openstack-dev@lists.openstack.org>
>> Date: May 16, 2016 at 09:55:27
>> To: openstack-dev@lists.openstack.org <openstack-dev@lists.openstack.org>
>> Subject:  Re: [openstack-dev] [tc] supporting Go
>>
>>> On 05/16/2016 04:35 PM, Adam Young wrote:
>>>> On 05/16/2016 05:23 AM, Dmitry Tantsur wrote:
>>>>> On 05/14/2016 03:00 AM, Adam Young wrote:
>>>>>> On 05/13/2016 08:21 PM, Dieterly, Deklan wrote:
>>>>>>> If we allow Go, then we should also consider allowing JVM based
>>>>>>> languages.
>>>>>> Nope. Don't get me wrong, I've written more than my fair share of Java
>>>>>> in my career, and I like it, and I miss automated refactoring and real
>>>>>> threads. I have nothing against Java (I know a lot of you do).
>>>>>>
>>>>>> Java fills the same niche as Python. We already have one of those, and
>>>>>> its very nice (according to John Cleese).
>>>>>
>>>>> A couple of folks in this thread already stated that the primary
>>>>> reason to switch from Python-based languages is the concurrency story.
>>>>> JVM solves it and does it in the same manner as Go (at least that's my
>>>>> assumption).
>>>>>
>>>>> (not advocating for JVM, just trying to understand the objection)
>>>>>
>>>>>>
>>>>>> So, what I think we are really saying here is "what is our Native
>>>>>> extension story going to be? Is it the traditional native languages, or
>>>>>> is it something new that has learned from them?"
>>>>>>
>>>>>> Go is a complement to Python to fill in the native stuff. The
>>>>>> alternative is C or C++. Ok Flapper, or Rust.
>>>>>
>>>>> C, C++, Rust, yes, I'd call them "native".
>>>>>
>>>>> A language with a GC and green threads does not fall into "native"
>>>>> category for me, rather the same as JVM.
>>>>
>>>> MOre complex than just that. But Go does not have a VM, just put a lot
>>>> of effort into co-routines without taking context switches. Different
>>>> than green threads.
>>>
>>> Ok, I think we have a different notion of "native" here. For me it's
>>> being with as little magic happening behind the scenes as possible.
>>
>> Have you written a lot of Rust?
>
> Not a lot, but definitely some.
>
>> Rust handles the memory management for you as well. Certainly, you can 
>> determine the lifetime of something and tell the compiler how the underlying 
>> memory is shared, but Rust is far better than C in so much as you should 
>> never be able to write code that doubly frees the same memory unless you're 
>> explicitly using the unsafe features of the language that are infrequently 
>> needed.
>
> I think we're in agreement here, not sure which bit you're arguing against :)
>
>>
>> I'm with Flavio about preferring Rust personally, but I'm not a member of 
>> either of these teams and I understand the fact that most of the code is 
>> already written and has been shown to drastically improve performance in 
>> exactly the places where it's needed. With all of that in mind, I'm in favor 
>> of just agreeing already that Go is okay. I understand the concern that this 
>> will increase cognitive load on some developers and *might* have effects on 
>> our larger community but our community can only grow so long as our software 
>> is usable (performant) and useful (satisfies needs/requirements).
>
> This Rust discussion is a bit offtopic, I was just stating that my notion of 
> "nativeness" of Go is closer to one of JVM, not one of C/C++/Rust.
>
> I guess my main question is whether folks seriously considered 
> PyPy/Cython/etc.

Yes.

http://lists.openstack.org/pipermail/openstack-dev/2016-May/094960.html (which 
also references 
http://lists.openstack.org/pipermail/openstack-dev/2016-May/094549.html and 
http://lists.openstack.org/pipermail/openstack-dev/2016-May/094720.html

--John




signature.asc
Description: OpenPGP digital signature
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-16 Thread Dmitry Tantsur

On 05/16/2016 05:09 PM, Ian Cordasco wrote:



-Original Message-
From: Dmitry Tantsur <dtant...@redhat.com>
Reply: OpenStack Development Mailing List (not for usage questions) 
<openstack-dev@lists.openstack.org>
Date: May 16, 2016 at 09:55:27
To: openstack-dev@lists.openstack.org <openstack-dev@lists.openstack.org>
Subject:  Re: [openstack-dev] [tc] supporting Go


On 05/16/2016 04:35 PM, Adam Young wrote:

On 05/16/2016 05:23 AM, Dmitry Tantsur wrote:

On 05/14/2016 03:00 AM, Adam Young wrote:

On 05/13/2016 08:21 PM, Dieterly, Deklan wrote:

If we allow Go, then we should also consider allowing JVM based
languages.

Nope. Don't get me wrong, I've written more than my fair share of Java
in my career, and I like it, and I miss automated refactoring and real
threads. I have nothing against Java (I know a lot of you do).

Java fills the same niche as Python. We already have one of those, and
its very nice (according to John Cleese).


A couple of folks in this thread already stated that the primary
reason to switch from Python-based languages is the concurrency story.
JVM solves it and does it in the same manner as Go (at least that's my
assumption).

(not advocating for JVM, just trying to understand the objection)



So, what I think we are really saying here is "what is our Native
extension story going to be? Is it the traditional native languages, or
is it something new that has learned from them?"

Go is a complement to Python to fill in the native stuff. The
alternative is C or C++. Ok Flapper, or Rust.


C, C++, Rust, yes, I'd call them "native".

A language with a GC and green threads does not fall into "native"
category for me, rather the same as JVM.


MOre complex than just that. But Go does not have a VM, just put a lot
of effort into co-routines without taking context switches. Different
than green threads.


Ok, I think we have a different notion of "native" here. For me it's
being with as little magic happening behind the scenes as possible.


Have you written a lot of Rust?


Not a lot, but definitely some.


Rust handles the memory management for you as well. Certainly, you can 
determine the lifetime of something and tell the compiler how the underlying 
memory is shared, but Rust is far better than C in so much as you should never 
be able to write code that doubly frees the same memory unless you're 
explicitly using the unsafe features of the language that are infrequently 
needed.


I think we're in agreement here, not sure which bit you're arguing 
against :)




I'm with Flavio about preferring Rust personally, but I'm not a member of 
either of these teams and I understand the fact that most of the code is 
already written and has been shown to drastically improve performance in 
exactly the places where it's needed. With all of that in mind, I'm in favor of 
just agreeing already that Go is okay. I understand the concern that this will 
increase cognitive load on some developers and *might* have effects on our 
larger community but our community can only grow so long as our software is 
usable (performant) and useful (satisfies needs/requirements).


This Rust discussion is a bit offtopic, I was just stating that my 
notion of "nativeness" of Go is closer to one of JVM, not one of C/C++/Rust.


I guess my main question is whether folks seriously considered 
PyPy/Cython/etc.




--
Ian Cordasco




__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-16 Thread Ian Cordasco
 

-Original Message-
From: Dmitry Tantsur <dtant...@redhat.com>
Reply: OpenStack Development Mailing List (not for usage questions) 
<openstack-dev@lists.openstack.org>
Date: May 16, 2016 at 09:55:27
To: openstack-dev@lists.openstack.org <openstack-dev@lists.openstack.org>
Subject:  Re: [openstack-dev] [tc] supporting Go

> On 05/16/2016 04:35 PM, Adam Young wrote:
> > On 05/16/2016 05:23 AM, Dmitry Tantsur wrote:
> >> On 05/14/2016 03:00 AM, Adam Young wrote:
> >>> On 05/13/2016 08:21 PM, Dieterly, Deklan wrote:
> >>>> If we allow Go, then we should also consider allowing JVM based
> >>>> languages.
> >>> Nope. Don't get me wrong, I've written more than my fair share of Java
> >>> in my career, and I like it, and I miss automated refactoring and real
> >>> threads. I have nothing against Java (I know a lot of you do).
> >>>
> >>> Java fills the same niche as Python. We already have one of those, and
> >>> its very nice (according to John Cleese).
> >>
> >> A couple of folks in this thread already stated that the primary
> >> reason to switch from Python-based languages is the concurrency story.
> >> JVM solves it and does it in the same manner as Go (at least that's my
> >> assumption).
> >>
> >> (not advocating for JVM, just trying to understand the objection)
> >>
> >>>
> >>> So, what I think we are really saying here is "what is our Native
> >>> extension story going to be? Is it the traditional native languages, or
> >>> is it something new that has learned from them?"
> >>>
> >>> Go is a complement to Python to fill in the native stuff. The
> >>> alternative is C or C++. Ok Flapper, or Rust.
> >>
> >> C, C++, Rust, yes, I'd call them "native".
> >>
> >> A language with a GC and green threads does not fall into "native"
> >> category for me, rather the same as JVM.
> >
> > MOre complex than just that. But Go does not have a VM, just put a lot
> > of effort into co-routines without taking context switches. Different
> > than green threads.
>  
> Ok, I think we have a different notion of "native" here. For me it's
> being with as little magic happening behind the scenes as possible.

Have you written a lot of Rust? Rust handles the memory management for you as 
well. Certainly, you can determine the lifetime of something and tell the 
compiler how the underlying memory is shared, but Rust is far better than C in 
so much as you should never be able to write code that doubly frees the same 
memory unless you're explicitly using the unsafe features of the language that 
are infrequently needed.

I'm with Flavio about preferring Rust personally, but I'm not a member of 
either of these teams and I understand the fact that most of the code is 
already written and has been shown to drastically improve performance in 
exactly the places where it's needed. With all of that in mind, I'm in favor of 
just agreeing already that Go is okay. I understand the concern that this will 
increase cognitive load on some developers and *might* have effects on our 
larger community but our community can only grow so long as our software is 
usable (performant) and useful (satisfies needs/requirements).

--  
Ian Cordasco


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-16 Thread Dmitry Tantsur

On 05/16/2016 04:35 PM, Adam Young wrote:

On 05/16/2016 05:23 AM, Dmitry Tantsur wrote:

On 05/14/2016 03:00 AM, Adam Young wrote:

On 05/13/2016 08:21 PM, Dieterly, Deklan wrote:

If we allow Go, then we should also consider allowing JVM based
languages.

Nope.  Don't get me wrong, I've written more than my fair share of Java
in my career, and I like it, and I miss automated refactoring and real
threads.  I have nothing against Java (I know a lot of you do).

Java fills the same niche as Python.  We already have one of those, and
its very nice (according to John Cleese).


A couple of folks in this thread already stated that the primary
reason to switch from Python-based languages is the concurrency story.
JVM solves it and does it in the same manner as Go (at least that's my
assumption).

(not advocating for JVM, just trying to understand the objection)



So, what I think we are really saying here is "what is our Native
extension story going to be? Is it the traditional native languages, or
is it something new that has learned from them?"

Go is a complement to Python to fill in the native stuff.  The
alternative is C or C++.  Ok Flapper, or Rust.


C, C++, Rust, yes, I'd call them "native".

A language with a GC and green threads does not fall into "native"
category for me, rather the same as JVM.


MOre complex than just that.  But Go does not have a VM, just put a lot
of effort into co-routines without taking context switches. Different
than green threads.


Ok, I think we have a different notion of "native" here. For me it's 
being with as little magic happening behind the scenes as possible.




http://programmers.stackexchange.com/questions/222642/are-go-langs-goroutine-pools-just-green-threads



You can do userland level co-routines in C, C++ and Erlang, probably
even Rust (even if it is not written yet, no idea).  Which is different
than putting in a code translation layer.

We are not talking about a replacement for Python here.  We are talking
about a language to use for native optimizations when Python's
concurrency model or other overhead gets in the way.

In scientific computing, using a language like R or Python to then call
into a linear algebra or messaging library is the norm for just this
reason.  Since we are going to be writing the native code here, the
question is what language to use for it.

We are not getting rid of python, and we are not bringing in Java. Those
are different questions.


The question is "How do we take performance sensitive sections in
OpenStack and optimize to native?"

The list of answers that map to the question here as I see it include:

1.  We are not doing native code, stop asking.
2.  Stick with C
3.  C or C++ is Ok
4.  Fortran (OK I just put this in to see if you are paying attention).
5.  Go
6.  Rust (Only put in to keep Flapper off my back)


Count me in here as well, though of course I have no voting rights 
within this issue :)





We have two teams asking for Go, and Flapper asking for Rust.  No one
has suggested new native code in C or C++, instead those types of
projects seem to be kept out of OpenStack proper.






This is coming from someone  that has done Kernel stuff.  I did C++ in
both the Windows and Linux worlds.  I've written inversion of control
stuff in C++ template metaprogramming.  I am not personally afraid of
writing code in either language. But I don't want to inflict that on
OpenStack.  Its a question of reducing complexity, not increasing it.


__

OpenStack Development Mailing List (not for usage questions)
Unsubscribe:
openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



__

OpenStack Development Mailing List (not for usage questions)
Unsubscribe:
openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-16 Thread Adam Young

On 05/16/2016 05:23 AM, Dmitry Tantsur wrote:

On 05/14/2016 03:00 AM, Adam Young wrote:

On 05/13/2016 08:21 PM, Dieterly, Deklan wrote:

If we allow Go, then we should also consider allowing JVM based
languages.

Nope.  Don't get me wrong, I've written more than my fair share of Java
in my career, and I like it, and I miss automated refactoring and real
threads.  I have nothing against Java (I know a lot of you do).

Java fills the same niche as Python.  We already have one of those, and
its very nice (according to John Cleese).


A couple of folks in this thread already stated that the primary 
reason to switch from Python-based languages is the concurrency story. 
JVM solves it and does it in the same manner as Go (at least that's my 
assumption).


(not advocating for JVM, just trying to understand the objection)



So, what I think we are really saying here is "what is our Native
extension story going to be? Is it the traditional native languages, or
is it something new that has learned from them?"

Go is a complement to Python to fill in the native stuff.  The
alternative is C or C++.  Ok Flapper, or Rust.


C, C++, Rust, yes, I'd call them "native".

A language with a GC and green threads does not fall into "native" 
category for me, rather the same as JVM.


MOre complex than just that.  But Go does not have a VM, just put a lot 
of effort into co-routines without taking context switches. Different 
than green threads.


http://programmers.stackexchange.com/questions/222642/are-go-langs-goroutine-pools-just-green-threads


You can do userland level co-routines in C, C++ and Erlang, probably 
even Rust (even if it is not written yet, no idea).  Which is different 
than putting in a code translation layer.


We are not talking about a replacement for Python here.  We are talking 
about a language to use for native optimizations when Python's 
concurrency model or other overhead gets in the way.


In scientific computing, using a language like R or Python to then call 
into a linear algebra or messaging library is the norm for just this 
reason.  Since we are going to be writing the native code here, the 
question is what language to use for it.


We are not getting rid of python, and we are not bringing in Java. Those 
are different questions.



The question is "How do we take performance sensitive sections in 
OpenStack and optimize to native?"


The list of answers that map to the question here as I see it include:

1.  We are not doing native code, stop asking.
2.  Stick with C
3.  C or C++ is Ok
4.  Fortran (OK I just put this in to see if you are paying attention).
5.  Go
6.  Rust (Only put in to keep Flapper off my back)


We have two teams asking for Go, and Flapper asking for Rust.  No one 
has suggested new native code in C or C++, instead those types of 
projects seem to be kept out of OpenStack proper.







This is coming from someone  that has done Kernel stuff.  I did C++ in
both the Windows and Linux worlds.  I've written inversion of control
stuff in C++ template metaprogramming.  I am not personally afraid of
writing code in either language. But I don't want to inflict that on
OpenStack.  Its a question of reducing complexity, not increasing it.


__ 


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: 
openstack-dev-requ...@lists.openstack.org?subject:unsubscribe

http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



__ 


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: 
openstack-dev-requ...@lists.openstack.org?subject:unsubscribe

http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-16 Thread Dmitry Tantsur

On 05/14/2016 03:00 AM, Adam Young wrote:

On 05/13/2016 08:21 PM, Dieterly, Deklan wrote:

If we allow Go, then we should also consider allowing JVM based
languages.

Nope.  Don't get me wrong, I've written more than my fair share of Java
in my career, and I like it, and I miss automated refactoring and real
threads.  I have nothing against Java (I know a lot of you do).

Java fills the same niche as Python.  We already have one of those, and
its very nice (according to John Cleese).


A couple of folks in this thread already stated that the primary reason 
to switch from Python-based languages is the concurrency story. JVM 
solves it and does it in the same manner as Go (at least that's my 
assumption).


(not advocating for JVM, just trying to understand the objection)



So, what I think we are really saying here is "what is our Native
extension story going to be? Is it the traditional native languages, or
is it something new that has learned from them?"

Go is a complement to Python to fill in the native stuff.  The
alternative is C or C++.  Ok Flapper, or Rust.


C, C++, Rust, yes, I'd call them "native".

A language with a GC and green threads does not fall into "native" 
category for me, rather the same as JVM.




This is coming from someone  that has done Kernel stuff.  I did C++ in
both the Windows and Linux worlds.  I've written inversion of control
stuff in C++ template metaprogramming.  I am not personally afraid of
writing code in either language. But I don't want to inflict that on
OpenStack.  Its a question of reducing complexity, not increasing it.


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-15 Thread Antoni Segura Puimedon
On Sat, May 14, 2016 at 7:13 PM, Clint Byrum  wrote:

> Excerpts from Dieterly, Deklan's message of 2016-05-14 01:18:20 +:
> > Python 2.x will not be supported for much longer, and let¹s face it,
> > Python is easy, but it just does not scale. Nor does Python have the
> > performance characteristics that large, distributed systems require.
> Maybe
> > Java could replace Python in OpenStack as the workhorse language.
>
> Which is why we've been pushing toward python 3 for years now. It's
> default for python apps in distros now, gates are holding the line at the
> unit test level now, so we just need a push toward integration testing
> and I truly believe we'll be seeing people use python3 and pypy to run
> OpenStack in the next year.
>

Kuryr kubernetes integration is python 3 only, as it is asyncio based. I
would
be surprised if new projects and subprojects don't go to python3 directly.


>
> And regarding not scaling: That's precisely what's being discussed,
> and it seems like there are plenty of options for pushing python further
> that aren't even half explored yet. Meanwhile, if enough people agree,
> perhaps go is a good option for those areas where we just can't push
> Python further without it already looking like another language anyway.
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-14 Thread Clint Byrum
Excerpts from Dieterly, Deklan's message of 2016-05-14 01:18:20 +:
> Python 2.x will not be supported for much longer, and let¹s face it,
> Python is easy, but it just does not scale. Nor does Python have the
> performance characteristics that large, distributed systems require. Maybe
> Java could replace Python in OpenStack as the workhorse language.

Which is why we've been pushing toward python 3 for years now. It's
default for python apps in distros now, gates are holding the line at the
unit test level now, so we just need a push toward integration testing
and I truly believe we'll be seeing people use python3 and pypy to run
OpenStack in the next year.

And regarding not scaling: That's precisely what's being discussed,
and it seems like there are plenty of options for pushing python further
that aren't even half explored yet. Meanwhile, if enough people agree,
perhaps go is a good option for those areas where we just can't push
Python further without it already looking like another language anyway.

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-14 Thread Mark Casey

Why is that?

Thank you,
Mark

On 5/13/2016 7:21 PM, Dieterly, Deklan wrote:

If we allow Go, then we should also consider allowing JVM based languages.
-- Deklan Dieterly Senior Systems Software Engineer HPE On 5/13/16, 
2:10 PM, "Adam Young"  wrote:

>Can we just up and support Go, please?  I'm a C++ and C buff, but I
>would not inflict either of those on other people, nor would I want to
>support their code. Go is designed to be native but readable/writable.
>
>
>There is nothing perfect in this world.
>
>Python for most things.
>Javascript for web out of necessity
>Go for native tuning.
>
>Yes, Flapper, I like Rust, too, but we have to pick something, and I am
>not the one trying to code this.
>
>It makes sense. Go is already packaged for Fedora and Debian.  We can
>deal with it.
>
>
>
>__
>OpenStack Development Mailing List (not for usage questions)
>Unsubscribe:openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
>http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe:openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-13 Thread Dieterly, Deklan
Python 2.x will not be supported for much longer, and let¹s face it,
Python is easy, but it just does not scale. Nor does Python have the
performance characteristics that large, distributed systems require. Maybe
Java could replace Python in OpenStack as the workhorse language.
-- 
Deklan Dieterly

Senior Systems Software Engineer
HPE




On 5/13/16, 7:00 PM, "Adam Young"  wrote:

>On 05/13/2016 08:21 PM, Dieterly, Deklan wrote:
>> If we allow Go, then we should also consider allowing JVM based
>>languages.
>Nope.  Don't get me wrong, I've written more than my fair share of Java
>in my career, and I like it, and I miss automated refactoring and real
>threads.  I have nothing against Java (I know a lot of you do).
>
>Java fills the same niche as Python.  We already have one of those, and
>its very nice (according to John Cleese).
>
>So, what I think we are really saying here is "what is our Native
>extension story going to be? Is it the traditional native languages, or
>is it something new that has learned from them?"
>
>Go is a complement to Python to fill in the native stuff.  The
>alternative is C or C++.  Ok Flapper, or Rust.
>
>This is coming from someone  that has done Kernel stuff.  I did C++ in
>both the Windows and Linux worlds.  I've written inversion of control
>stuff in C++ template metaprogramming.  I am not personally afraid of
>writing code in either language. But I don't want to inflict that on
>OpenStack.  Its a question of reducing complexity, not increasing it.
>
>
>__
>OpenStack Development Mailing List (not for usage questions)
>Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
>http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-13 Thread Adam Young

On 05/13/2016 08:21 PM, Dieterly, Deklan wrote:

If we allow Go, then we should also consider allowing JVM based languages.
Nope.  Don't get me wrong, I've written more than my fair share of Java 
in my career, and I like it, and I miss automated refactoring and real 
threads.  I have nothing against Java (I know a lot of you do).


Java fills the same niche as Python.  We already have one of those, and 
its very nice (according to John Cleese).


So, what I think we are really saying here is "what is our Native 
extension story going to be? Is it the traditional native languages, or 
is it something new that has learned from them?"


Go is a complement to Python to fill in the native stuff.  The 
alternative is C or C++.  Ok Flapper, or Rust.


This is coming from someone  that has done Kernel stuff.  I did C++ in 
both the Windows and Linux worlds.  I've written inversion of control 
stuff in C++ template metaprogramming.  I am not personally afraid of 
writing code in either language. But I don't want to inflict that on 
OpenStack.  Its a question of reducing complexity, not increasing it.



__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-13 Thread Dieterly, Deklan
If we allow Go, then we should also consider allowing JVM based languages.
-- 
Deklan Dieterly

Senior Systems Software Engineer
HPE




On 5/13/16, 2:10 PM, "Adam Young"  wrote:

>Can we just up and support Go, please?  I'm a C++ and C buff, but I
>would not inflict either of those on other people, nor would I want to
>support their code. Go is designed to be native but readable/writable.
>
>
>There is nothing perfect in this world.
>
>Python for most things.
>Javascript for web out of necessity
>Go for native tuning.
>
>Yes, Flapper, I like Rust, too, but we have to pick something, and I am
>not the one trying to code this.
>
>It makes sense. Go is already packaged for Fedora and Debian.  We can
>deal with it.
>
>
>
>__
>OpenStack Development Mailing List (not for usage questions)
>Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
>http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-13 Thread Adam Young
Can we just up and support Go, please?  I'm a C++ and C buff, but I 
would not inflict either of those on other people, nor would I want to 
support their code. Go is designed to be native but readable/writable.



There is nothing perfect in this world.

Python for most things.
Javascript for web out of necessity
Go for native tuning.

Yes, Flapper, I like Rust, too, but we have to pick something, and I am 
not the one trying to code this.


It makes sense. Go is already packaged for Fedora and Debian.  We can 
deal with it.




__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-13 Thread Clint Byrum
Excerpts from Dmitry Tantsur's message of 2016-05-13 01:14:02 -0700:
> On 05/11/2016 09:50 PM, Eric Larson wrote:
> > To contrast that, the go POC was able to use a well tested go DNS
> > library and implement the same documented interface that was then
> > testable via the same functional tests. It also allowed an extremely
> > simple deployment and had a minimal impact for our CI systems. Finally,
> > as other go code has been written on our small team, getting Python
> > developers up to speed has been trivial. Memory management, built in
> > concurrency primitives, and similar language constructs have made using
> > Go feel natural.
> 
> This is pretty subjective, I would say. I personally don't feel Go 
> (especially its approach to error handling) any natural (at least no 
> more than Rust or Scala, for example). If familiarity for Python 
> developers is an argument here, mastering Cython or making OpenStack run 
> on PyPy must be much easier for a random Python developer out there to 
> seriously bump the performance. And it would not require introducing a 
> completely new language to the picture.
> 

I have been told before that eventlet isn't going to take advantage of
most of pypy's advantages. Can anyone confirm that? It seems like the
built in greenlet support would be a good fit, but maybe there's a layer
between greenlets and eventlet that I missed.

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-13 Thread Pete Zaitcev
On Fri, 13 May 2016 10:14:02 +0200
Dmitry Tantsur  wrote:

> [...] If familiarity for Python 
> developers is an argument here, mastering Cython or making OpenStack run 
> on PyPy must be much easier for a random Python developer out there to 
> seriously bump the performance.

Unfortunately, practice showed that PyPy is not an answer. It changes
nothing about the poor and coarse thread scheduling. It focuses on the
entirely different aspect of performance, the one which while unpleasant
was not unsurmountable in Python. Checksumming sure is faster, but then
rememebr that Swift offloads Erasure Coding to C already.

We dragged this Python cart 2 years too far already. Don't for a second
imagine that Hummingbird is some kind project prompted by Go being new
and shiny.

-- Pete

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-13 Thread John Dickinson
You're absolutely right. If we can get as good (or even close) to the same 
performance eg with PyPy, then we should absolutely do that! I've had many 
public and private conversations over the last year or so that have that same 
basic message as I've been looking at the ongoing Golang work in the Swift 
community.

In fact, for the last several months I have been working pretty closely with 
some Intel engineers who are dedicated to Python (and specifically PyPy) 
performance improvements. We've been running Swift under PyPy and there's been 
other more preliminary tests with other OpenStack projects. I gave a joint talk 
in Austin about this work: https://www.youtube.com/watch?v=L5sCD7zEENg

Based on that testing, I have a few conclusions:

1) (assuming production-ready stability of PyPy and OpenStack running under it) 
Everyone should be running OpenStack projects under PyPy instead of CPython. 
Put simply, it's just plain faster. There are some issues to work out, though, 
specifically relating to PyPy's GC. Right now, we're looking at a few patches 
that do a better job of socket handling in Swift so that it runs better under 
PyPy. Once these patches land, I really do hope that more people will be using 
PyPy in production.

2) PyPy only helps when you've got a CPU-constrained environment.

3) The Golang targets in Swift are related to effective thread management, 
syscalls, and IO (as Sam described in a few earlier posts in this thread), and 
these are the issues we're facing on the persistent storage layer in Swift.

The conclusion is that there will still be Python code in Swift for a long time 
to come, and there is serious effort underway to make sure we can run that in 
production on PyPy and get some great performance improvements there. However, 
PyPy is not helping us when it comes to the persistent storage layer in Swift. 
For that, we need scalable, lightweight, and fast syscall management and thread 
coordination (again, see Sam's earlier messages). Perhaps we could write some 
Python C extension to get something like that, but (1) the best we'd hope for 
would only be approaching what we'd get with Golang's runtime out-of-the box 
and (2) we'd still be having this exact same conversation except about C.

So I expect that a year from now (or sooner) Swift deployers will be running 
both Python code with PyPy and compiled Golang code. And they'll have a storage 
system that's a lot faster than is possible today.


--John





On 13 May 2016, at 2:04, Alexey Stupnikov wrote:

> + Agree. It is strange to use another language to address performance issues 
> if you haven't tried to solve those issues using original language's options.
>
> On 05/13/2016 11:53 AM, Fausto Marzi wrote:
>> ++ Brilliant.
>>
>> On Fri, May 13, 2016 at 10:14 AM, Dmitry Tantsur > > wrote:
>>
>>
>> This is pretty subjective, I would say. I personally don't feel Go
>> (especially its approach to error handling) any natural (at least
>> no more than Rust or Scala, for example). If familiarity for
>> Python developers is an argument here, mastering Cython or making
>> OpenStack run on PyPy must be much easier for a random Python
>> developer out there to seriously bump the performance. And it
>> would not require introducing a completely new language to the
>> picture.
>>
>>
>>
>>
>> __
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
> -- 
> BR, Alexey Stupnikov.
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


signature.asc
Description: OpenPGP digital signature
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-13 Thread Alexey Stupnikov
+ Agree. It is strange to use another language to address performance 
issues if you haven't tried to solve those issues using original 
language's options.


On 05/13/2016 11:53 AM, Fausto Marzi wrote:

++ Brilliant.

On Fri, May 13, 2016 at 10:14 AM, Dmitry Tantsur > wrote:



This is pretty subjective, I would say. I personally don't feel Go
(especially its approach to error handling) any natural (at least
no more than Rust or Scala, for example). If familiarity for
Python developers is an argument here, mastering Cython or making
OpenStack run on PyPy must be much easier for a random Python
developer out there to seriously bump the performance. And it
would not require introducing a completely new language to the
picture.




__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


--
BR, Alexey Stupnikov.

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-13 Thread Fausto Marzi
++ Brilliant.

On Fri, May 13, 2016 at 10:14 AM, Dmitry Tantsur 
wrote:

>
> This is pretty subjective, I would say. I personally don't feel Go
> (especially its approach to error handling) any natural (at least no more
> than Rust or Scala, for example). If familiarity for Python developers is
> an argument here, mastering Cython or making OpenStack run on PyPy must be
> much easier for a random Python developer out there to seriously bump the
> performance. And it would not require introducing a completely new language
> to the picture.
>
>
>
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-13 Thread Dmitry Tantsur

On 05/11/2016 09:50 PM, Eric Larson wrote:


Flavio Percoco writes:


On 11/05/16 09:47 -0500, Dean Troyer wrote:

On Tue, May 10, 2016 at 5:54 PM, Flavio Percoco 
wrote:

[language mixing bits were here]


   The above is my main concern with this proposal. I'vementioned
this in the upstream review and I'm glad to havefound it here as
well. The community impact of this changeis perhaps not being
discussed enough and I believe, in thelong run, it'll bite us.


Agreed, but to do nothing instead is so not what we are about. The
change from integrated/incubated to Big Tent was done to address some
issues knowing we did not have all of the answers up front and would
learn some things along the way. We did learn some things, both good
and bad.

I do believe that we can withstand the impact of a new language,
particularly when we do it intentionally and knowing where some of
the pitfalls are. Also, the specific request is coming from the
oldest of all OpenStack projects, and one that has a history of not
making big changes without _really_ good reasons. Yes it opens a
door, but it will be opened with what I believe to be a really solid
model to build upon in other parts of the OpenStack community.  I
would MUCH rather do it this way then with a new Go-only project that
is joining OpenStack from scratch in more than just the
implementation language.



So, one thing that was mentioned during the last TC meeting is to
decide this in a project basis. Don't open the door entirely but let
projects sign up for this.  This will give us a more contained growth
as far as projects with go-code go but it does mean we'll have to do a
technical analysis on every project willing to sign up and it kinda
goes against the principles of the big tent.



   The feedback from the Horizon community has been that it'sbeen
impossible to avoid a community split and that's whatI'd like to
avoid.


I do think part of this is also due to the differences in the problem
domain of client/browser-side and server-side. I believe there is a
similar issue with  devs writing SQL, the overlap in
expertise between the two is way smaller than we all wish it was.


Exactly! This separation of domains is the reason why opening the door
for JS code was easier. The request was for browser apps that can't be
written in Python.


And for the specific Python-Golang overlap, it feels to me like more
Python devs have (at least talked about) working in Go than in other
newish languages. There are worse choices to test the waters with.


Just to stress this a bit more, I don't think the problem is the
language per se. There are certainly technical issues related to it
(packaging, CI, etc) but the main discussion is currently going around
the impact this change will have in the community and other areas. I'm
sure we can figure the technical issues out.



One thing to consider regarding the community's ability to task switch
is how Go is much easier than other languages and techniques. For
example, one common tactic people suggest when Python becomes too slow
is to rewrite the slow parts in C. In designate's case, rewriting the
dns wire protocol aspects in C could be beneficial, but it would be very
difficult as well. We would need to write an implementation that is able
to safely parse dns wire format in a reasonably thread safe fashion that
also will work well when those threads have been patched by eventlet,
all while writing C code that is compatible with Python internals.

To contrast that, the go POC was able to use a well tested go DNS
library and implement the same documented interface that was then
testable via the same functional tests. It also allowed an extremely
simple deployment and had a minimal impact for our CI systems. Finally,
as other go code has been written on our small team, getting Python
developers up to speed has been trivial. Memory management, built in
concurrency primitives, and similar language constructs have made using
Go feel natural.


This is pretty subjective, I would say. I personally don't feel Go 
(especially its approach to error handling) any natural (at least no 
more than Rust or Scala, for example). If familiarity for Python 
developers is an argument here, mastering Cython or making OpenStack run 
on PyPy must be much easier for a random Python developer out there to 
seriously bump the performance. And it would not require introducing a 
completely new language to the picture.




This experience is different from JavaScript because there are very
specific silos between the UI and the backend. I'd expect that, even
though JavaScript is an accepted language in OpenStack, writing a
node.js service would prevent a whole host of new complexity the project
would similarly debate. Fortunately, on a technical level, I believe we
can try Go without its requirements putting a large burden on the CI
team resources.

Eric


Flavio


dt

--

Dean Troyer dtro...@gmail.com



--

Eric 

Re: [openstack-dev] [tc] supporting Go

2016-05-13 Thread Tim Pepper
On Tue 10 May at 10:19:23 -0400 raysonlo...@gmail.com said:
> 
> IMO, the best use case of not using a package manager is when deploying into
> containers -- would you prefer to just drop a static binary of your Go code, 
> or
> you would rather install "apt-get" into a container image, and then install 
> the
> language runtime via apt-get, and finally your application?? I don't know 
> about
> you, but many startup companies like Go as it would give them much faster time
> to react.

I think the thread here diverged and missed some important points about
the development lifecycle.

Go is not particularly unique in the need for projects to maintain
stable repos, insure quality, and deliver reproducible artifacts on
a predictable cadence.  It happens that many Go projects aren't doing
that well, but there are reasons and mitigations for that which I'll
come back to at the end.

IMHO containers are about ease of the deployment unit.  As somebody who
started with linux early enough to experience the pre-RPM days, containers
aren't all that conceptually different than RPM or DEB if you ignore
the namespacing.  Packaging by somebody else is a great convenience,
albeit with tradoffs which need active management.  Whether the packaging
is an entire OS image or smaller app you docker pull/run, or a bundling
of {.py files, compiled c, compiled go, etc} and systemd unit files and
such is less important than what comes next...

Deployment to production involves risk management on the packaged product
through testing.

The non-toy containers folks (ie: people who don't just run random stuff
from the internet) use CI for that reason.  My impression of production Go
usage is one of thoroughly embracing CI/CD:  continually go get literally
whatever is the latest without giving it any real thought or analysis,
automatically build and automatically test it, and then if it passes your
release criteria plunk the binary into your deployment and roll it out to
incrementally broader circles of exposure, with automation able to effect
reverts to prior good if something goes wrong.  The specific mechanism
for "plunk" will depend on whether your deployment unit is RPM, DEB,
container or otherwise.  And aside from "go get" being an actual Golang
thing, it's also just plain english what ever distro does every time
they compose their OS for all their components whether on a 6mo's cycle
or rolling releases, and the majority of their components are not Go.

Ie: this is not a Go conversation.  This is modern quality software
development and managing possibly funky upstream opensource inputs.

A tremendous benefit I see in the OpenStack community is that OpenStack
actually has a robust CI infrastructure continually vetting and
actively gating non-passing code.  Go has great test tooling and I've
been surprised to find how much its language patterns encourage you to
write code that is CI friendly.  The two mechanisms can be plumbed if
policy does not preclude it.

This implicit CI assumption in the Golang world arguably makes it easier
for folks to play fast and loose.  They churn out code, at non-reliable
repository hosts, rarely tag or promote stable release points.  Instead
they assume a user who cares will have CI implementing their version of
assuring care.  This is an issue distros have to deal with, where some
upstreams are more wobbly than others.  While this is a notable weakness
in the golang culture for those of us coming to it as outsiders, it is
one OpenStack's infra and processes are built to manage today and is a
weakness which does not need to come into OpenStack.

Chatting with John in Austin, my primary question was how can we help
enable OpenStack CI for Go code.  I read John's point of:

  "Further work is needed in the OpenStack community to determine the
  best way to manage dependencies, handle deployment artifacts, and
  ensure proper gate testing."

as being exactly the right first step down the path to insure potentially
sloppy go deps don't have to be a problem.

-- 
Tim Pepper -- Linux OS Engineering
Intel Open Source Technology Center

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-12 Thread Fausto Marzi
My take would be to select no more than 3 languages, according what they
are needed for,
then let the Service Team pick the best one right for what it needs to be
done.

Something like:

- Do you need more performance for this component in your service? OK, use
this.
- Do you need Web and alike? Ok, use that.
- General and Default: Python.
- Anything else? Then you can use this.

With this approach we would cover the needs of developers that have to
implement services and at the same time provide options for languages that
are better suited for related use cases.

All the gating, tests and alike will be focused on those selected languages.

This would also solve discussions in the future, as if for instance a new
language is proposed for performances, then we would already have a
solution for that. At the same time we would have an open approach to
alternatives, but only to those alternatives, not any and still be able to
keep control and focus.

Thanks,
Fausto


On Thu, May 12, 2016 at 9:04 PM, Robert Collins 
wrote:

> On 13 May 2016 at 00:01, Thierry Carrez  wrote:
> > Robert Collins wrote:
> >>
> >> [...]
> >> So, given that that is the model - why is language part of it? Yes,
> >> there are minimum overheads to having a given language in CI [...]
> >
> >
> > By "minimum" do you mean that they are someone else's problem ?
>
> No. I mean that there is an irreducible cost: there is some minimum
> and we need to account for that. (as in fact the end of that paragraph
> which you snipped, said).
>
> > There are economics at play here. Adding a language simplifies the work
> of
> > some and make more work for others. Obviously "some" see mostly benefits
> and
> > "others" see mostly drawbacks. You're just creating an externality[1].
>
> I'm not sure that allowing arbitrary languages would constitute an
> externality, properly structured - which is what I was trying to get
> at with my mail.
>
> > So rather than shifting workloads to someone else or pretending there is
> no
> > problem, let's take the time to calmly measure the cost, see what
> resources
> > we have lined up to address that cost, and make a decision from there.
>
> I proposed neither of those things (shifting, or pretence). Rebutting
> those positions is not rebutting my argument.
>
>  I agree with taking the time to assess things carefully, but in this
> discussion noone had taken a general 'pro' stance, so I decided, as an
> exercise, to write one up.
>
> However, assessing 'what we have to address that cost' is missing the
> actual point: we don't need to cover the cost /once/, we need to make
> how-its-covered, and who-covers-it be structured such that folk
> wanting to use $LANGUAGE provide the [human] resources needed to cover
> the incurred costs. An answer which says 'we can just afford to pay
> for go, but thats it', is an answer that has failed to actually tackle
> the underlying problem.
>
> -Rob
>
> --
> Robert Collins 
> Distinguished Technologist
> HP Converged Cloud
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-12 Thread Robert Collins
On 13 May 2016 at 00:01, Thierry Carrez  wrote:
> Robert Collins wrote:
>>
>> [...]
>> So, given that that is the model - why is language part of it? Yes,
>> there are minimum overheads to having a given language in CI [...]
>
>
> By "minimum" do you mean that they are someone else's problem ?

No. I mean that there is an irreducible cost: there is some minimum
and we need to account for that. (as in fact the end of that paragraph
which you snipped, said).

> There are economics at play here. Adding a language simplifies the work of
> some and make more work for others. Obviously "some" see mostly benefits and
> "others" see mostly drawbacks. You're just creating an externality[1].

I'm not sure that allowing arbitrary languages would constitute an
externality, properly structured - which is what I was trying to get
at with my mail.

> So rather than shifting workloads to someone else or pretending there is no
> problem, let's take the time to calmly measure the cost, see what resources
> we have lined up to address that cost, and make a decision from there.

I proposed neither of those things (shifting, or pretence). Rebutting
those positions is not rebutting my argument.

 I agree with taking the time to assess things carefully, but in this
discussion noone had taken a general 'pro' stance, so I decided, as an
exercise, to write one up.

However, assessing 'what we have to address that cost' is missing the
actual point: we don't need to cover the cost /once/, we need to make
how-its-covered, and who-covers-it be structured such that folk
wanting to use $LANGUAGE provide the [human] resources needed to cover
the incurred costs. An answer which says 'we can just afford to pay
for go, but thats it', is an answer that has failed to actually tackle
the underlying problem.

-Rob

-- 
Robert Collins 
Distinguished Technologist
HP Converged Cloud

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-12 Thread Davanum Srinivas
James,

Thanks for the detailed write up straight from the trenches :)

-- Dims

On Thu, May 12, 2016 at 5:58 AM, James Page  wrote:
> On Mon, 9 May 2016 at 19:32 Monty Taylor  wrote:
> [...]
>>
>> [> The point here though, is that the versions of Python that OpenStack
>> > has traditionally supported have been directly tied to what the Linux
>> > distributions carry in their repositories (case in point, Python 2.6
>> > was dropped from most things as soon as RHEL7 was available with Python
>> > 2.7). With Go, there might need to be similar restrictions.
>>
>> Since this is a forward-facing thing, I think starting with the version
>> that's in xenial is probably fine for today, yeah? That will be the
>> version of go that will get installed in the gate starting with this
>> cycle.
>
>
> Apologies for commenting late on this thread - I needed to catchup with the
> Go maintainer in Ubuntu (CC'ed) to get things straight from an Ubuntu
> perspective.
>
> a) Distribution of Go based projects in Ubuntu
>
> tl;dr - we've been dealing with distribution of large Go projects in Ubuntu
> for a number of years - so no problem if OpenStack wants to support Go as an
> official language
>
> Ubuntu supports at least three large Go codebases in archive as of Xenial -
> Juju, LXD and Snappy are all written in Go, and as a result we've had a
> focus on how to support them for end-users over the last few years.
>
> As Monty points out, Golang 1.6 is the released version of Go in Xenial (and
> its also installable for Trusty - "apt-get install golang-1.6-go"); that
> said the way the packaging has been done, its possible to introduce newer
> golang versions without breaking the existing Go based packages in the
> Ubuntu archive at any point in time;   The three Canonical projects in
> archive are using 1.6 as a baseline for compatibility to make things a
> little easier to manage; 1.6 will remain as the default Go version, but
> newer versions may be introduced in parallel.
>
> In terms of where code for dependencies of projects sits, Ubuntu has taken a
> flexible stance on this - for components where version alignment is good and
> there is good reason to want to identify the versions being used across a
> number of packages, a separate golang-XXX package is produced - this allows
> the Ubuntu Security team to monitor for CVE's, allowing for more effective
> security support. A good example of this is the go.crypto package.  For
> dependencies used by a single project, or where there is not alignment with
> the packaged golang-XXX version, we're continuing to use the version
> embedded by the consuming project.
>
> The Debian toolchain around Go packages helps with managing this by adding
> 'Built-Using' fields to all Go binary packages that depend on separate
> golang-XXX packages - which means that the archive keeps track of what was
> used to produce a particular binary package.  This allows the distro to
> easily analyse what needs rebuilding when a shared golang-XXX package is
> fixed/updated in some way, as well as letting us deal with things like
> transitions between Go versions (the golang package version is also embedded
> in this data).
>
> Shared library support is coming in Ubuntu (and Debian) for Go; however we
> think its something that adds value to the distributor (avoiding rebuilds
> for fully statically linked binaries) rather than the developer (esp in the
> context of security management).  Oh and its still really new...
>
> b) General technical feedback on Go development in the context of OpenStack
>
> Note that I'm not a Go developer, but have been observing Go development
> across a number of large Go codebases - these are things I've seen that help
> both the development team and the distributors of their work.
>
> i) Use godeps for dependency management
>
> This is used across Juju, LXD and Snappy to manage dependencies at specific
> commits/revisions and has proved invaluable.
>
> ii) Don't embedded your dependencies in your VCS repository
>
> Ideally when you cut a release artefact, bundle up the dependencies at this
> point in time using godeps.
>
> iii) Agree baseline versions
>
> For each OpenStack release agree a baseline golang version, and common
> version alignment on dependencies where appropriate.
>
>
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>



-- 
Davanum Srinivas :: https://twitter.com/dims

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-12 Thread Thierry Carrez

Robert Collins wrote:

[...]
So, given that that is the model - why is language part of it? Yes,
there are minimum overheads to having a given language in CI [...]


By "minimum" do you mean that they are someone else's problem ?

There are economics at play here. Adding a language simplifies the work 
of some and make more work for others. Obviously "some" see mostly 
benefits and "others" see mostly drawbacks. You're just creating an 
externality[1].


So rather than shifting workloads to someone else or pretending there is 
no problem, let's take the time to calmly measure the cost, see what 
resources we have lined up to address that cost, and make a decision 
from there.


[1] https://en.wikipedia.org/wiki/Externality

--
Thierry Carrez (ttx)

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-12 Thread James Page
On Mon, 9 May 2016 at 19:32 Monty Taylor  wrote:
[...]

> [> The point here though, is that the versions of Python that OpenStack
> > has traditionally supported have been directly tied to what the Linux
> > distributions carry in their repositories (case in point, Python 2.6
> > was dropped from most things as soon as RHEL7 was available with Python
> > 2.7). With Go, there might need to be similar restrictions.
>
> Since this is a forward-facing thing, I think starting with the version
> that's in xenial is probably fine for today, yeah? That will be the
> version of go that will get installed in the gate starting with this cycle.
>

Apologies for commenting late on this thread - I needed to catchup with the
Go maintainer in Ubuntu (CC'ed) to get things straight from an Ubuntu
perspective.

a) Distribution of Go based projects in Ubuntu

tl;dr - we've been dealing with distribution of large Go projects in Ubuntu
for a number of years - so no problem if OpenStack wants to support Go as
an official language

Ubuntu supports at least three large Go codebases in archive as of Xenial -
Juju, LXD and Snappy are all written in Go, and as a result we've had a
focus on how to support them for end-users over the last few years.

As Monty points out, Golang 1.6 is the released version of Go in Xenial
(and its also installable for Trusty - "apt-get install golang-1.6-go");
that said the way the packaging has been done, its possible to introduce
newer golang versions without breaking the existing Go based packages in
the Ubuntu archive at any point in time;   The three Canonical projects in
archive are using 1.6 as a baseline for compatibility to make things a
little easier to manage; 1.6 will remain as the default Go version, but
newer versions may be introduced in parallel.

In terms of where code for dependencies of projects sits, Ubuntu has taken
a flexible stance on this - for components where version alignment is good
and there is good reason to want to identify the versions being used across
a number of packages, a separate golang-XXX package is produced - this
allows the Ubuntu Security team to monitor for CVE's, allowing for more
effective security support. A good example of this is the go.crypto
package.  For dependencies used by a single project, or where there is not
alignment with the packaged golang-XXX version, we're continuing to use the
version embedded by the consuming project.

The Debian toolchain around Go packages helps with managing this by adding
'Built-Using' fields to all Go binary packages that depend on separate
golang-XXX packages - which means that the archive keeps track of what was
used to produce a particular binary package.  This allows the distro to
easily analyse what needs rebuilding when a shared golang-XXX package is
fixed/updated in some way, as well as letting us deal with things like
transitions between Go versions (the golang package version is also
embedded in this data).

Shared library support is coming in Ubuntu (and Debian) for Go; however we
think its something that adds value to the distributor (avoiding rebuilds
for fully statically linked binaries) rather than the developer (esp in the
context of security management).  Oh and its still really new...

b) General technical feedback on Go development in the context of OpenStack

Note that I'm not a Go developer, but have been observing Go development
across a number of large Go codebases - these are things I've seen that
help both the development team and the distributors of their work.

i) Use godeps for dependency management

This is used across Juju, LXD and Snappy to manage dependencies at specific
commits/revisions and has proved invaluable.

ii) Don't embedded your dependencies in your VCS repository

Ideally when you cut a release artefact, bundle up the dependencies at this
point in time using godeps.

iii) Agree baseline versions

For each OpenStack release agree a baseline golang version, and common
version alignment on dependencies where appropriate.
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-11 Thread Pete Zaitcev
On Mon, 9 May 2016 14:17:40 -0500
Edward Leafe  wrote:

> Whenever I hear claims that Python is “too slow for X”, I wonder
> what’s so special about X that makes it so much more demanding than,
> say, serving up YouTube.

In case of Swift, the biggest issue was the scheduler. As RAX people
found, although we (OpenStack Swift community of implementors) were able
to obtain an acceptable baseline performance, a bad drive dragged down
the whole node. Before Hummingbird, dfg (and redbo) screwed around with
fully separate processes that provided isolation, but that was not
scaling well. So, there was an endless parade of solutions on the base
of threads. Some patches went in, some did not. At some points things
were so bad that dfg posted a patch, which maintained a scoring board
in an SQLite file. They were willing to add a bunch of I/O to every
request just to avoid the worst case that Python forced upon them.
The community (that is basically John, Sam, and I) put brakes on that.
But only at that point redbo created Hummingbird, which solved the
issue for them.

Once Hummingbird went into production, they found that it was easy to
polish and it could be much faster. Some of the benchmarks were
beating Python by 80 times. CPU consumption went way down, too.
But all that was secondary in the adoption of Go. If not a significant
scalability crisis in the field, Swift in Go would not have happened.

Scott Simpson gave a preso at Vancouver Summit that had some details and
benchmarks. Google is no help finding it online, unfortunately. Only
finds the panel discussion. Maybe someone had it saved.

-- Pete

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-11 Thread Gregory Haynes
On Wed, May 11, 2016, at 01:11 PM, Robert Collins wrote:
> As a community, we decided long ago to silo our code: Nova and Swift
> could have been in one tree, with multiple different artifacts - think
> of all the cross-code-base-friction we would not have had if we'd done
> that! The cultural consequence though is that bringing up new things
> is much less disruptive: add a new tree, get it configured in CI, move
> on. We're a team-centric structure for governance, and the costs of
> doing cross-team code-level initiatives are already prohibitive: we
> have already delegated all those efforts to the teams that own the
> repositories: requirements syncing, translations syncing, lint fixups,
> security audits... Having folk routinely move cross project is
> something we seem to be trying to optimise for, but we're not actually
> achieving.
> 

I think this greatly understates how much cross project work goes on. I
agree that cross-team feature development is prohibitively difficult
most of the time, but I do see a lot of cross-project reading/debugging
happening on a day to day basis. I worry that this type of work is
extremely valuable but not very visible and therefore easy to overlook.
I know I do this a lot as both a deployer and a developer, and I have to
imagine others do as well.

> So, given that that is the model - why is language part of it? Yes,
> there are minimum overheads to having a given language in CI - we need
> to be able to do robust reliable builds [or accept periodic downtime
> when the internet is not cooperating], and that sets a lower fixed
> cost, varying per language. Right now we support Python, Java,
> Javascript, Ruby in CI (as I understand it - infra focused folk please
> jump in here :)).
> 

The upfront costs are not a huge issue IMO, for reasons you hit on -
folks wanting the support for a new lanaguage are silo'd off enough that
they can pay down upfront costs without effecting the rest of the
community much. What I worry about are the maintenance costs and the
cross-team costs which are hard to quantify in a list of requirements
for a new language:

Its reasonable to assume that new languages will have similar amounts of
upstream breakage that we get from python tooling (such as a new pip
releases), and so we would just be increasing the load here by a factor
of the number of languages we gate on. This is especially concerning
given that a lot of the firefighting to solve these types of issues
seems to center around one team doing cross-project work (infra).

The ability for folks to easily debug problems across projects is a huge
issue. This isn't mostly a language issue even, its a tooling issue: we
are going to have to use and/or develop a lot of tools to replace their
python counterparts we rely on and debugging issues (especially in the
gate) is going to require knowledge of each one.

-Greg

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-11 Thread Clark Boylan
On Wed, May 11, 2016, at 01:11 PM, Robert Collins wrote:
> So, given that that is the model - why is language part of it? Yes,
> there are minimum overheads to having a given language in CI - we need
> to be able to do robust reliable builds [or accept periodic downtime
> when the internet is not cooperating], and that sets a lower fixed
> cost, varying per language. Right now we support Python, Java,
> Javascript, Ruby in CI (as I understand it - infra focused folk please
> jump in here :)).

The actual list is more accurately Python and Bash and to a degree
Javascript. We can run Java and Ruby and there have even been people
running Go, this is a result of our test infrastructure giving you root
on single use test instances. But we haven't really jumped over
backwards to properly support these languages with package mirrors,
debugging help, test framework help, etc this has largely only been done
for Python and Bash (but more often Javascript too due to the realities
of the modern browser world).

One thing to keep in mind is that people working cross project tasks and
particularly infra and gate triage end up doing a significant amount of
debug work keeping the projects running. Whether it is an upstream lib
breaking, packaging tools exploding, packages disappearing, or
misdiagnosed infrastructure issues these individuals do spend a ton of
time knee deep in language specific details. Yes, there is a minimum
overhead for supporting a given language, and that overhead is much
higher than many seem to realize. This is why language is part of it.

If we had a stronger culture of cross project cooperation and OpenStack
issue triage I definitely wouldn't worry about this as much, but the
reality of the current world is that a very small subsection of our
community is involved in this work and they already have a high rate of
burn out.

I am glad that general consensus seems to be we should have this
discussion and determine these costs before we make any decisions.

Clark

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-11 Thread Fox, Kevin M
/me puts on his Operator hat.

Operators do care about being able to debug issues with the stuff they have to 
deploy/manage.

One of our complains about Java (and probably Erlang.. Not sure about go): In 
addition to the standard C like issues you hit, file descriptor limits, etc, 
the language has its own issues that it carries in. Java stack sizes, max 
memory limits that default too low, unusual command line switches, etc.

So, yes, operators don't tend to care too much about language if they can help 
it, but often the language makes them care.

Also, as someone that has had to write at least one patch (or backport myself) 
against something, pretty much every OpenStack upgrade I've done, familiarity 
with the language has greatly helped. Too many languages makes that harder. 
Sure, in an ideal world, OpenStack shouldn't require that out of an Operator 
and so language won't count as much. But we're not there yet.

I'm not saying don't do it. If its the right tool for the job, its the right 
tool for the job. Just be very cognizant of what you asking Operators to deal 
with. The language list is quite long already.

Thanks,
Kevin

From: Robert Collins [robe...@robertcollins.net]
Sent: Wednesday, May 11, 2016 1:11 PM
To: OpenStack Development Mailing List (not for usage questions)
Subject: Re: [openstack-dev] [tc] supporting Go

I'm going to try arguing the pro case.

The big tent has us bringing any *team* that want to work the way we
do: in the open, collaboratively, in concert with other teams, into
OpenStacks community.

Why are we using implementation language as a gate here?

I assert that most deployers don't fundamentally care about language
of the thing they are deploying; they care about cost of operations,
which is influenced by a number of facets around the language
ecosystem: packaging, building, maturity, VM
behaviour-and-tuning-needs, as well as service specific issues such as
sharding, upgrades, support (from vendors/community), training (their
staff - free reference material, as well as courses) etc. Every
discussion we had with operators about adding new dependencies was
primarily focused on the operational aspects, not 'is it written in
C/$LANGUAGE'. Right now our stock dependency stack has C (Linux, libc,
libssl, Python itself etc, Erlang (rabbitmq), java (zookeeper).

End users emphatically do not care about the language API servers were
written in. They want stability, performance, features, not 'Written
in $LANGUAGE'.

As a community, we decided long ago to silo our code: Nova and Swift
could have been in one tree, with multiple different artifacts - think
of all the cross-code-base-friction we would not have had if we'd done
that! The cultural consequence though is that bringing up new things
is much less disruptive: add a new tree, get it configured in CI, move
on. We're a team-centric structure for governance, and the costs of
doing cross-team code-level initiatives are already prohibitive: we
have already delegated all those efforts to the teams that own the
repositories: requirements syncing, translations syncing, lint fixups,
security audits... Having folk routinely move cross project is
something we seem to be trying to optimise for, but we're not actually
achieving.

So, given that that is the model - why is language part of it? Yes,
there are minimum overheads to having a given language in CI - we need
to be able to do robust reliable builds [or accept periodic downtime
when the internet is not cooperating], and that sets a lower fixed
cost, varying per language. Right now we support Python, Java,
Javascript, Ruby in CI (as I understand it - infra focused folk please
jump in here :)).

A Big Tent approach would be this:
 - Document the required support for a new language - not just CI
 - Any team that wants to use $LANGUAGE just needs to ensure that that
support is present.
 - Make sure that any cross-service interactions are well defined in a
language neutral fashion. This is just good engineering basically:
define a contract, use it.

Here is a straw man list of requirements:
 - Reliable builds: the ability to build and test without talking to
the internet at all.
 - Packagable: the ability to take a source tree for a project, do
some arbitrary transform and end up with a folder structure that can
be placed on another machine, with any needed dependencies, and work.
[Note, this isn't the same as 'packagable in a way that makes Red Hat
and Canonical and Suse **happy**, but thats something we can be sure
that those orgs are working on with language providers already ]
 - FL/OSS
 - Compatible with ASL v2 source code. [e.g. any compiler doesn't
taint its output]
 - Can talk oslo.messaging's message format

That list is actually short, and those needs are quite tameable. So
lets do it - lets open up the tent still further, stop picking winners
and instead let the market sort it out.

-Rob

Re: [openstack-dev] [tc] supporting Go

2016-05-11 Thread John Dickinson


On 11 May 2016, at 13:11, Robert Collins wrote:
>
> So, given that that is the model - why is language part of it? Yes,
> there are minimum overheads to having a given language in CI - we need
> to be able to do robust reliable builds [or accept periodic downtime
> when the internet is not cooperating], and that sets a lower fixed
> cost, varying per language. Right now we support Python, Java,
> Javascript, Ruby in CI (as I understand it - infra focused folk please
> jump in here :)).

+1000

this is what the whole thread should be about

> Here is a straw man list of requirements:
>  - Reliable builds: the ability to build and test without talking to
> the internet at all.
>  - Packagable: the ability to take a source tree for a project, do
> some arbitrary transform and end up with a folder structure that can
> be placed on another machine, with any needed dependencies, and work.
> [Note, this isn't the same as 'packagable in a way that makes Red Hat
> and Canonical and Suse **happy**, but thats something we can be sure
> that those orgs are working on with language providers already ]
>  - FL/OSS
>  - Compatible with ASL v2 source code. [e.g. any compiler doesn't
> taint its output]
>  - Can talk oslo.messaging's message format


The great news is that we don't have to have the straw man--we actually are 
building the real list (and you've hit several of them).

At the infra team meeting this week we talked through a few of these (mostly 
focused on the dependency management issues first), and we've started 
collecting notes on 
https://etherpad.openstack.org/p/golang-infra-issues-to-solve about the basic 
infra things that need to be figured out.

--John




signature.asc
Description: OpenPGP digital signature
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-11 Thread Jeremy Stanley
On 2016-05-12 08:11:46 +1200 (+1200), Robert Collins wrote:
[...]
> Right now we support Python, Java, Javascript, Ruby in CI (as I
> understand it - infra focused folk please jump in here :)).
[...]

We also support boatloads of shell script! ;)
-- 
Jeremy Stanley

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-11 Thread Robert Collins
I'm going to try arguing the pro case.

The big tent has us bringing any *team* that want to work the way we
do: in the open, collaboratively, in concert with other teams, into
OpenStacks community.

Why are we using implementation language as a gate here?

I assert that most deployers don't fundamentally care about language
of the thing they are deploying; they care about cost of operations,
which is influenced by a number of facets around the language
ecosystem: packaging, building, maturity, VM
behaviour-and-tuning-needs, as well as service specific issues such as
sharding, upgrades, support (from vendors/community), training (their
staff - free reference material, as well as courses) etc. Every
discussion we had with operators about adding new dependencies was
primarily focused on the operational aspects, not 'is it written in
C/$LANGUAGE'. Right now our stock dependency stack has C (Linux, libc,
libssl, Python itself etc, Erlang (rabbitmq), java (zookeeper).

End users emphatically do not care about the language API servers were
written in. They want stability, performance, features, not 'Written
in $LANGUAGE'.

As a community, we decided long ago to silo our code: Nova and Swift
could have been in one tree, with multiple different artifacts - think
of all the cross-code-base-friction we would not have had if we'd done
that! The cultural consequence though is that bringing up new things
is much less disruptive: add a new tree, get it configured in CI, move
on. We're a team-centric structure for governance, and the costs of
doing cross-team code-level initiatives are already prohibitive: we
have already delegated all those efforts to the teams that own the
repositories: requirements syncing, translations syncing, lint fixups,
security audits... Having folk routinely move cross project is
something we seem to be trying to optimise for, but we're not actually
achieving.

So, given that that is the model - why is language part of it? Yes,
there are minimum overheads to having a given language in CI - we need
to be able to do robust reliable builds [or accept periodic downtime
when the internet is not cooperating], and that sets a lower fixed
cost, varying per language. Right now we support Python, Java,
Javascript, Ruby in CI (as I understand it - infra focused folk please
jump in here :)).

A Big Tent approach would be this:
 - Document the required support for a new language - not just CI
 - Any team that wants to use $LANGUAGE just needs to ensure that that
support is present.
 - Make sure that any cross-service interactions are well defined in a
language neutral fashion. This is just good engineering basically:
define a contract, use it.

Here is a straw man list of requirements:
 - Reliable builds: the ability to build and test without talking to
the internet at all.
 - Packagable: the ability to take a source tree for a project, do
some arbitrary transform and end up with a folder structure that can
be placed on another machine, with any needed dependencies, and work.
[Note, this isn't the same as 'packagable in a way that makes Red Hat
and Canonical and Suse **happy**, but thats something we can be sure
that those orgs are working on with language providers already ]
 - FL/OSS
 - Compatible with ASL v2 source code. [e.g. any compiler doesn't
taint its output]
 - Can talk oslo.messaging's message format

That list is actually short, and those needs are quite tameable. So
lets do it - lets open up the tent still further, stop picking winners
and instead let the market sort it out.

-Rob

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-11 Thread Robert Collins
On 12 May 2016 at 02:35, Brant Knudson  wrote:
>
> I'd be worried about bringing in a language that doesn't integrate well with
> Python, since I'd expect the normal route would be to take advantage of as
> much of the existing code as we have and only replace those parts that need
> replacing. From these web pages it looks like Go integrates with Python:
> https://blog.filippo.io/building-python-modules-with-go-1-5/ and
> https://github.com/go-python/gopy (I haven't tried these myself).

It looks like that works by forking off of a go runtime and chatting
via locks. Using an RPC model (similar to privsep) would probably be
more flexible and easier, with at most a small speed cost. Worth
trying a few things to get experience?

-Rob



-- 
Robert Collins 
Distinguished Technologist
HP Converged Cloud

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-11 Thread Eric Larson


Jim Rollenhagen writes:


On Wed, May 11, 2016 at 03:36:09PM +0200, Thomas Goirand wrote:

On 05/11/2016 02:41 PM, Jim Rollenhagen wrote:
>> Installing from $language manager instead of distro 
>> packages, be it in containers or not, will almost always 
>> make you download random blobs from the Internet, which are 
>> of course changing over time without any notice, loosing the 
>> above 3 important features.

>
> Unless you pin the versions of your dependencies.

Pinning versions doesn't change the fact that you'll have to 
trust a large amount of providers, with some of the files 
stored in a single location on the Internet. Yes, you can add a 
cache, etc. but these are band-aids...


Well, if we're talking about python, it all comes from PyPI. For 
Go, the recommendation is for everything to come from Github, 
but you can choose other sources if you desire.




To clarify, Go best practices are to checkout the repo into a 
vendor directory that must be updated explicitly. While not 
everyone commits the vendored deps, I'd argue it is a reasonable 
practice, which means that at build time within a CI system, there 
should be *NO* dependencies resolved. Tools such as glide 
(https://github.com/Masterminds/glide) also create a `glide.lock` 
that provides the dependencies from the latest build, that can be 
checked into source control.


--

Eric Larson | eric.lar...@rackspace.com Software Developer 
| Cloud DNS | OpenStack Designate Rackspace Hosting   | Austin, 
Texas


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-11 Thread Eric Larson


Flavio Percoco writes:


On 11/05/16 09:47 -0500, Dean Troyer wrote:
On Tue, May 10, 2016 at 5:54 PM, Flavio Percoco 
 wrote:


[language mixing bits were here]


   The above is my main concern with this proposal. I've 
   mentioned this in the upstream review and I'm glad to have 
   found it here as well. The community impact of this change 
   is perhaps not being discussed enough and I believe, in the 
   long run, it'll bite us.



Agreed, but to do nothing instead is so not what we are 
about. The change from integrated/incubated to Big Tent was done 
to address some issues knowing we did not have all of the 
answers up front and would learn some things along the way. We 
did learn some things, both good and bad.


I do believe that we can withstand the impact of a new language, 
particularly when we do it intentionally and knowing where some 
of the pitfalls are. Also, the specific request is coming from 
the oldest of all OpenStack projects, and one that has a history 
of not making big changes without _really_ good reasons. Yes it 
opens a door, but it will be opened with what I believe to be a 
really solid model to build upon in other parts of the OpenStack 
community.  I would MUCH rather do it this way then with a new 
Go-only project that is joining OpenStack from scratch in more 
than just the implementation language.



So, one thing that was mentioned during the last TC meeting is 
to decide this in a project basis. Don't open the door entirely 
but let projects sign up for this.  This will give us a more 
contained growth as far as projects with go-code go but it does 
mean we'll have to do a technical analysis on every project 
willing to sign up and it kinda goes against the principles of 
the big tent.




   The feedback from the Horizon community has been that it's 
   been impossible to avoid a community split and that's what 
   I'd like to avoid.



I do think part of this is also due to the differences in the 
problem domain of client/browser-side and server-side. I believe 
there is a similar issue with  devs writing SQL, 
the overlap in expertise between the two is way smaller than we 
all wish it was.


Exactly! This separation of domains is the reason why opening 
the door for JS code was easier. The request was for browser 
apps that can't be written in Python.


And for the specific Python-Golang overlap, it feels to me like 
more Python devs have (at least talked about) working in Go than 
in other newish languages. There are worse choices to test the 
waters with.


Just to stress this a bit more, I don't think the problem is the 
language per se. There are certainly technical issues related to 
it (packaging, CI, etc) but the main discussion is currently 
going around the impact this change will have in the community 
and other areas. I'm sure we can figure the technical issues 
out.




One thing to consider regarding the community's ability to task 
switch is how Go is much easier than other languages and 
techniques. For example, one common tactic people suggest when 
Python becomes too slow is to rewrite the slow parts in C. In 
designate's case, rewriting the dns wire protocol aspects in C 
could be beneficial, but it would be very difficult as well. We 
would need to write an implementation that is able to safely parse 
dns wire format in a reasonably thread safe fashion that also will 
work well when those threads have been patched by eventlet, all 
while writing C code that is compatible with Python internals.


To contrast that, the go POC was able to use a well tested go DNS 
library and implement the same documented interface that was then 
testable via the same functional tests. It also allowed an 
extremely simple deployment and had a minimal impact for our CI 
systems. Finally, as other go code has been written on our small 
team, getting Python developers up to speed has been 
trivial. Memory management, built in concurrency primitives, and 
similar language constructs have made using Go feel natural.


This experience is different from JavaScript because there are 
very specific silos between the UI and the backend. I'd expect 
that, even though JavaScript is an accepted language in OpenStack, 
writing a node.js service would prevent a whole host of new 
complexity the project would similarly debate. Fortunately, on a 
technical level, I believe we can try Go without its requirements 
putting a large burden on the CI team resources.


Eric


Flavio


dt

--

Dean Troyer dtro...@gmail.com



--

Eric Larson | eric.lar...@rackspace.com Software Developer 
| Cloud DNS | OpenStack Designate Rackspace Hosting   | Austin, 
Texas


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-11 Thread Gregory Haynes
On Wed, May 11, 2016, at 03:24 AM, Thierry Carrez wrote:
> 
> That said I know that the Swift team spent a lot of time in the past 6 
> years optimizing their Python code, so I'm not sure we can generalize 
> this "everything to do with the algorithms" analysis to them ?
> 

I agree. The swift case is clearly a not easy engineering problem and
the awesome write up we got on it points out what issues they are
running in to that aren't easily solved. At that point the onus is on us
to either be certain there is a much easier way for them to solve the
issues they are running in to without the cost to the community or to
accept that another tool might be good for this job. Personally, I can
completely empathize with running into a problem that requires a lot of
direct OS interaction and just wanting a tool that gets out of my way
for it. I might have picked a different tool, but I don't think that is
the point of the conversation here :). I know we have a lot of Python
gurus here though, so maybe they feel differently.

Even if we're OK with part of Swift being in Go, I do still think there
is a lot of value in us remaining a Python project rather than a
Python+Go project. I really think Swift might be *the* exception to the
rule here and we don't need to completely open ourselves up to anyone re
implementing in Go as a result. Yes, some of the cost of Go will be
lowered when we support a single project having Go in tree, but there
are plenty of additional costs - especially for us all understanding a
common language/toolset - which aren't effected much by having one
component of one project be in a different language.

Cheers,
Greg

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-11 Thread Ben Meyer
On 05/11/2016 03:23 PM, Samuel Merritt wrote:
> On 5/11/16 7:09 AM, Thomas Goirand wrote:
>> On 05/10/2016 09:56 PM, Samuel Merritt wrote:
>>> On 5/9/16 5:21 PM, Robert Collins wrote:
 On 10 May 2016 at 10:54, John Dickinson  wrote:
> On 9 May 2016, at 13:16, Gregory Haynes wrote:
>>
>> This is a bit of an aside but I am sure others are wondering the
>> same
>> thing - Is there some info (specs/etherpad/ML thread/etc) that
>> has more
>> details on the bottleneck you're running in to? Given that the only
>> clients of your service are the public facing DNS servers I am
>> now even
>> more surprised that you're hitting a python-inherent bottleneck.
>
> In Swift's case, the summary is that it's hard[0] to write a network
> service in Python that shuffles data between the network and a block
> device (hard drive) and effectively utilizes all of the hardware
> available. So far, we've done very well by fork()'ing child
> processes,
 ...
> Initial results from a golang reimplementation of the object
> server in
> Python are very positive[1]. We're not proposing to rewrite Swift
> entirely in Golang. Specifically, we're looking at improving object
> replication time in Swift. This service must discover what data is on
> a drive, talk to other servers in the cluster about what they have,
> and coordinate any data sync process that's needed.
>
> [0] Hard, not impossible. Of course, given enough time, we can do
>  anything in a Turing-complete language, right? But we're not talking
>  about possible, we're talking about efficient tools for the job at
>  hand.
 ...

 I'm glad you're finding you can get good results in (presumably)
 clean, understandable code.

 Given go's historically poor perfornance with multiple cores
 (https://golang.org/doc/faq#Why_GOMAXPROCS) I'm going to presume the
 major advantage is in the CSP programming model - something that
 Twisted does very well: and frustratingly we've had numerous
 discussions from folk in the Twisted world who see the pain we have
 and want to help, but as a community we've consistently stayed with
 eventlet, which has a threaded programming model - and threaded models
 are poorly suited for the case here.
>>>
>>> At its core, the problem is that filesystem IO can take a surprisingly
>>> long time, during which the calling thread/process is blocked, and
>>> there's no good asynchronous alternative.
>>>
>>> Some background:
>>>
>>> With Eventlet, when your greenthread tries to read from a socket and
>>> the
>>> socket is not readable, then recvfrom() returns -1/EWOULDBLOCK; then,
>>> the Eventlet hub steps in, unschedules your greenthread, finds an
>>> unblocked one, and lets it proceed. It's pretty good at servicing a
>>> bunch of concurrent connections and keeping the CPU busy.
>>>
>>> On the other hand, when the socket is readable, then recvfrom() returns
>>> quickly (a few microseconds). The calling process was technically
>>> blocked, but the syscall is so fast that it hardly matters.
>>>
>>> Now, when your greenthread tries to read from a file, that read() call
>>> doesn't return until the data is in your process's memory. This can
>>> take
>>> a surprisingly long time. If the data isn't in buffer cache and the
>>> kernel has to go fetch it from a spinning disk, then you're looking
>>> at a
>>> seek time of ~7 ms, and that's assuming there are no other pending
>>> requests for the disk.
>>>
>>> There's no EWOULDBLOCK when reading from a plain file, either. If the
>>> file pointer isn't at EOF, then the calling process blocks until the
>>> kernel fetches data for it.
>>>
>>> Back to Swift:
>>>
>>> The Swift object server basically does two things: it either reads from
>>> a disk and writes to a socket or vice versa. There's a little HTTP
>>> parsing in there, but the vast majority of the work is shuffling bytes
>>> between network and disk. One Swift object server can service many
>>> clients simultaneously.
>>>
>>> The problem is those pauses due to read(). If your process is servicing
>>> hundreds of clients reading from and writing to dozens of disks (in,
>>> say, a 48-disk 4U server), then all those little 7 ms waits are pretty
>>> bad for throughput. Now, a lot of the time, the kernel does some
>>> readahead so your read() calls can quickly return data from buffer
>>> cache, but there are still lots of little hitches.
>>>
>>> But wait: it gets worse. Sometimes a disk gets slow. Maybe it's got a
>>> lot of pending IO requests, maybe its filesystem is getting close to
>>> full, or maybe the disk hardware is just starting to get flaky. For
>>> whatever reason, IO to this disk starts taking a lot longer than 7
>>> ms on
>>> average; think dozens or hundreds of milliseconds. Now, every time your
>>> process tries to read from this disk, all other work stops for quite a
>>> long 

Re: [openstack-dev] [tc] supporting Go

2016-05-11 Thread Samuel Merritt

On 5/11/16 7:09 AM, Thomas Goirand wrote:

On 05/10/2016 09:56 PM, Samuel Merritt wrote:

On 5/9/16 5:21 PM, Robert Collins wrote:

On 10 May 2016 at 10:54, John Dickinson  wrote:

On 9 May 2016, at 13:16, Gregory Haynes wrote:


This is a bit of an aside but I am sure others are wondering the same
thing - Is there some info (specs/etherpad/ML thread/etc) that has more
details on the bottleneck you're running in to? Given that the only
clients of your service are the public facing DNS servers I am now even
more surprised that you're hitting a python-inherent bottleneck.


In Swift's case, the summary is that it's hard[0] to write a network
service in Python that shuffles data between the network and a block
device (hard drive) and effectively utilizes all of the hardware
available. So far, we've done very well by fork()'ing child processes,

...

Initial results from a golang reimplementation of the object server in
Python are very positive[1]. We're not proposing to rewrite Swift
entirely in Golang. Specifically, we're looking at improving object
replication time in Swift. This service must discover what data is on
a drive, talk to other servers in the cluster about what they have,
and coordinate any data sync process that's needed.

[0] Hard, not impossible. Of course, given enough time, we can do
 anything in a Turing-complete language, right? But we're not talking
 about possible, we're talking about efficient tools for the job at
 hand.

...

I'm glad you're finding you can get good results in (presumably)
clean, understandable code.

Given go's historically poor perfornance with multiple cores
(https://golang.org/doc/faq#Why_GOMAXPROCS) I'm going to presume the
major advantage is in the CSP programming model - something that
Twisted does very well: and frustratingly we've had numerous
discussions from folk in the Twisted world who see the pain we have
and want to help, but as a community we've consistently stayed with
eventlet, which has a threaded programming model - and threaded models
are poorly suited for the case here.


At its core, the problem is that filesystem IO can take a surprisingly
long time, during which the calling thread/process is blocked, and
there's no good asynchronous alternative.

Some background:

With Eventlet, when your greenthread tries to read from a socket and the
socket is not readable, then recvfrom() returns -1/EWOULDBLOCK; then,
the Eventlet hub steps in, unschedules your greenthread, finds an
unblocked one, and lets it proceed. It's pretty good at servicing a
bunch of concurrent connections and keeping the CPU busy.

On the other hand, when the socket is readable, then recvfrom() returns
quickly (a few microseconds). The calling process was technically
blocked, but the syscall is so fast that it hardly matters.

Now, when your greenthread tries to read from a file, that read() call
doesn't return until the data is in your process's memory. This can take
a surprisingly long time. If the data isn't in buffer cache and the
kernel has to go fetch it from a spinning disk, then you're looking at a
seek time of ~7 ms, and that's assuming there are no other pending
requests for the disk.

There's no EWOULDBLOCK when reading from a plain file, either. If the
file pointer isn't at EOF, then the calling process blocks until the
kernel fetches data for it.

Back to Swift:

The Swift object server basically does two things: it either reads from
a disk and writes to a socket or vice versa. There's a little HTTP
parsing in there, but the vast majority of the work is shuffling bytes
between network and disk. One Swift object server can service many
clients simultaneously.

The problem is those pauses due to read(). If your process is servicing
hundreds of clients reading from and writing to dozens of disks (in,
say, a 48-disk 4U server), then all those little 7 ms waits are pretty
bad for throughput. Now, a lot of the time, the kernel does some
readahead so your read() calls can quickly return data from buffer
cache, but there are still lots of little hitches.

But wait: it gets worse. Sometimes a disk gets slow. Maybe it's got a
lot of pending IO requests, maybe its filesystem is getting close to
full, or maybe the disk hardware is just starting to get flaky. For
whatever reason, IO to this disk starts taking a lot longer than 7 ms on
average; think dozens or hundreds of milliseconds. Now, every time your
process tries to read from this disk, all other work stops for quite a
long time. The net effect is that the object server's throughput
plummets while it spends most of its time blocked on IO from that one
slow disk.

Now, of course there's things we can do. The obvious one is to use a
couple of IO threads per disk and push the blocking syscalls out
there... and, in fact, Swift did that. In commit b491549, the object
server gained a small threadpool for each disk[1] and started doing its
IO there.

This worked pretty well for avoiding the slow-disk problem. Requests

Re: [openstack-dev] [tc] supporting Go

2016-05-11 Thread Gregory Haynes
On Wed, May 11, 2016, at 05:09 AM, Hayes, Graham wrote:
> On 10/05/2016 23:28, Gregory Haynes wrote:
> >
> > OK, I'll bite.
> >
> > I had a look at the code and there's a *ton* of low hanging fruit. I
> > decided to hack in some fixes or emulation of fixes to see whether I
> > could get any major improvements. Each test I ran 4 workers using
> > SO_REUSEPORT and timed doing 1k axfr's with 4 in parallel at a time and
> > recorded 5 timings. I also added these changes on top of one another in
> > the order they follow.
> 
> Thanks for the analysis - any suggestions about how we can improve the
> current design are more than welcome .
> 
> For this test, was it a single static zone? What size was it?
> 

This was a small single static zone - so the most time possible was
spent in python, as opposed to blocking on the network.

> >
> > Base timings: [9.223, 9.030, 8.942, 8.657, 9.190]
> >
> > Stop spawning a thread per request - there are a lot of ways to do this
> > better, but lets not even mess with that and just literally move the
> > thread spawning that happens per request because its a silly idea here:
> > [8.579, 8.732, 8.217, 8.522, 8.214] (almost 10% increase).
> >
> > Stop instantiating oslo config object per request - this should be a no
> > brainer, we dont need to parse config inside of a request handler:
> > [8.544, 8.191, 8.318, 8.086] (a few more percent).
> >
> > Now, the slightly less low hanging fruit - there are 3 round trips to
> > the database *every request*. This is where the vast majority of request
> > time is spent (not in python). I didn't actually implement a full on
> > cache (I just hacked around the db queries), but this should be trivial
> > to do since designate does know when to invalidate the cache data. Some
> > numbers on how much a warm cache will help:
> >
> > Caching zone: [5.968, 5.942, 5.936, 5.797, 5.911]
> >
> > Caching records: [3.450, 3.357, 3.364, 3.459, 3.352].
> >
> > I would also expect real-world usage to be similar in that you should
> > only get 1 cache miss per worker per notify, and then all the other
> > public DNS servers would be getting cache hits. You could also remove
> > the cost of that 1 cache miss by pre-loading data in to the cache.
> 
> I actually would expect the real world use of this to have most of the
> servers have a cache miss.
> 
> We shuffle the order of the miniDNS servers sent out to the user facing
> DNS servers, so I would expect them to hit different minidns servers
> at nearly same time, and each of them try to generate the cache entry.
> 
> For pre-loading - this could work, but I *really* don't like relying on
> a cache for one of the critical path components.
> 

I am not sure what the issue with caching in general is, but its not
far-fetched to pre load an axfr into a cache before you send out any
notifies (since you know exactly when that will happen). For the herding
issue - that's just a matter of how you design your cache coherence
system. Usually you want to design that around your threading/worker
model and since we actually get a speed increase by turning the current
threading off it might be worth fixing that first...

That being said - this doesn't need to be designed amazingly to reap the
benefits being argued for. I haven't heard any goals of 'make every
single request as low latency as possible' (which is when you would
worry about dealing with cold cache costs), but instead that there's a
need to scale up to a potentially large number of clients all requesting
the same axfr at once. In that scenario even the most simple caching
setup would make a huge difference.

> >
> > All said and done, I think that's almost a 3x speed increase with
> > minimal effort. So, can we stop saying that this has anything to do with
> > Python as a language and has everything to do with the algorithms being
> > used?
> 
> As I have said before - for us, the time spent : performance
> improvement ratio is just much higher (for our dev team at least) with
> Go.
> 
> We saw a 50x improvement for small SOA queries, and ~ 10x improvement
> for 2000 record AXFR (without caching). The majority of your
> improvement came from caching, so I would imagine that would speed up
> the Go implementation as well.
> 

There has to be something very different between your python testing set
up and mine. In my testing there simply wasn't enough time spent in
Python to get even a 2x speed increase by removing all execution time. I
wonder if this is because the code originally spawns a thread per
request and therefore if you run in with a large number of parallel
requests you'll effectively thread bomb all the workers?

The point I am trying to make here is that throwing out "we rewrote our
software in another language, now its X times faster" does not mean that
the language is the issue. If there is a potential language issue it is
extremely useful for us to drill in to and determine the root cause
since that effects all of us. Since there is also 

Re: [openstack-dev] [tc] supporting Go

2016-05-11 Thread Flavio Percoco

On 11/05/16 09:47 -0500, Dean Troyer wrote:

On Tue, May 10, 2016 at 5:54 PM, Flavio Percoco  wrote:

[language mixing bits were here]


   The above is my main concern with this proposal. I've mentioned this in the
   upstream review and I'm glad to have found it here as well. The community
   impact
   of this change is perhaps not being discussed enough and I believe, in the
   long
   run, it'll bite us.


Agreed, but to do nothing instead is so not what we are about.  The change from
integrated/incubated to Big Tent was done to address some issues knowing we did
not have all of the answers up front and would learn some things along the
way.  We did learn some things, both good and bad.

I do believe that we can withstand the impact of a new language, particularly
when we do it intentionally and knowing where some of the pitfalls are.  Also,
the specific request is coming from the oldest of all OpenStack projects, and
one that has a history of not making big changes without _really_ good
reasons.  Yes it opens a door, but it will be opened with what I believe to be
a really solid model to build upon in other parts of the OpenStack community. 
I would MUCH rather do it this way then with a new Go-only project that is
joining OpenStack from scratch in more than just the implementation language.



So, one thing that was mentioned during the last TC meeting is to decide this in
a project basis. Don't open the door entirely but let projects sign up for this.
This will give us a more contained growth as far as projects with go-code go but
it does mean we'll have to do a technical analysis on every project willing to
sign up and it kinda goes against the principles of the big tent.



   The feedback from the Horizon community has been that it's been impossible
   to
   avoid a community split and that's what I'd like to avoid.


I do think part of this is also due to the differences in the problem domain of
client/browser-side and server-side.  I believe there is a similar issue with
 devs writing SQL, the overlap in expertise between the two is
way smaller than we all wish it was.


Exactly! This separation of domains is the reason why opening the door for JS
code was easier. The request was for browser apps that can't be written in
Python.


And for the specific Python-Golang overlap, it feels to me like more Python
devs have (at least talked about) working in Go than in other newish
languages.  There are worse choices to test the waters with.


Just to stress this a bit more, I don't think the problem is the language per
se. There are certainly technical issues related to it (packaging, CI, etc) but
the main discussion is currently going around the impact this change will have
in the community and other areas. I'm sure we can figure the technical issues
out.

Flavio


dt

--

Dean Troyer
dtro...@gmail.com


--
@flaper87
Flavio Percoco


signature.asc
Description: PGP signature
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-11 Thread Flavio Percoco

On 11/05/16 12:09 +, Hayes, Graham wrote:

On 10/05/2016 23:28, Gregory Haynes wrote:

On Tue, May 10, 2016, at 11:10 AM, Hayes, Graham wrote:

On 10/05/2016 01:01, Gregory Haynes wrote:


On Mon, May 9, 2016, at 03:54 PM, John Dickinson wrote:

On 9 May 2016, at 13:16, Gregory Haynes wrote:


This is a bit of an aside but I am sure others are wondering the same
thing - Is there some info (specs/etherpad/ML thread/etc) that has more
details on the bottleneck you're running in to? Given that the only
clients of your service are the public facing DNS servers I am now even
more surprised that you're hitting a python-inherent bottleneck.


In Swift's case, the summary is that it's hard[0] to write a network
service in Python that shuffles data between the network and a block
device (hard drive) and effectively utilizes all of the hardware
available. So far, we've done very well by fork()'ing child processes,
using cooperative concurrency via eventlet, and basic "write more
efficient code" optimizations. However, when it comes down to it,
managing all of the async operations across many cores and many drives
is really hard, and there just isn't a good, efficient interface for
that in Python.


This is a pretty big difference from hitting an unsolvable performance
issue in the language and instead is a case of language preference -
which is fine. I don't really want to fall in to the language-comparison
trap, but I think more detailed reasoning for why it is preferable over
python in specific use cases we have hit is good info to include /
discuss in the document you're drafting :). Essentially its a matter of
weighing the costs (which lots of people have hit on so I won't) with
the potential benefits and so unless the benefits are made very clear
(especially if those benefits are technical) its pretty hard to evaluate
IMO.

There seemed to be an assumption in some of the designate rewrite posts
that there is some language-inherent performance issue causing a
bottleneck. If this does actually exist then that is a good reason for
rewriting in another language and is something that would be very useful
to clearly document as a case where we support this type of thing. I am
highly suspicious that this is the case though, but I am trying hard to
keep an open mind...


The way this component works makes it quite difficult to make any major
improvement.


OK, I'll bite.

I had a look at the code and there's a *ton* of low hanging fruit. I
decided to hack in some fixes or emulation of fixes to see whether I
could get any major improvements. Each test I ran 4 workers using
SO_REUSEPORT and timed doing 1k axfr's with 4 in parallel at a time and
recorded 5 timings. I also added these changes on top of one another in
the order they follow.


Thanks for the analysis - any suggestions about how we can improve the
current design are more than welcome .

For this test, was it a single static zone? What size was it?



Base timings: [9.223, 9.030, 8.942, 8.657, 9.190]

Stop spawning a thread per request - there are a lot of ways to do this
better, but lets not even mess with that and just literally move the
thread spawning that happens per request because its a silly idea here:
[8.579, 8.732, 8.217, 8.522, 8.214] (almost 10% increase).

Stop instantiating oslo config object per request - this should be a no
brainer, we dont need to parse config inside of a request handler:
[8.544, 8.191, 8.318, 8.086] (a few more percent).

Now, the slightly less low hanging fruit - there are 3 round trips to
the database *every request*. This is where the vast majority of request
time is spent (not in python). I didn't actually implement a full on
cache (I just hacked around the db queries), but this should be trivial
to do since designate does know when to invalidate the cache data. Some
numbers on how much a warm cache will help:

Caching zone: [5.968, 5.942, 5.936, 5.797, 5.911]

Caching records: [3.450, 3.357, 3.364, 3.459, 3.352].

I would also expect real-world usage to be similar in that you should
only get 1 cache miss per worker per notify, and then all the other
public DNS servers would be getting cache hits. You could also remove
the cost of that 1 cache miss by pre-loading data in to the cache.


I actually would expect the real world use of this to have most of the
servers have a cache miss.

We shuffle the order of the miniDNS servers sent out to the user facing
DNS servers, so I would expect them to hit different minidns servers
at nearly same time, and each of them try to generate the cache entry.

For pre-loading - this could work, but I *really* don't like relying on
a cache for one of the critical path components.



All said and done, I think that's almost a 3x speed increase with
minimal effort. So, can we stop saying that this has anything to do with
Python as a language and has everything to do with the algorithms being
used?


As I have said before - for us, the time spent : performance
improvement ratio is just 

Re: [openstack-dev] [tc] supporting Go

2016-05-11 Thread Jeremy Stanley
On 2016-05-11 10:09:31 -0400 (-0400), Jim Rollenhagen wrote:
[...]
> Well, if we're talking about python, it all comes from PyPI.
[...]

That's not entirely true. Some projects listed on PyPI are simply
index links to packages hosted elsewhere on the Web and that used to
be a _lot_ more common than it is today. In the past year or two,
pip started warning and then by default refusing to retrieve
packages not hosted directly on PyPI, which has driven a lot of the
remaining stragglers to start uploading their packages directly to
it. Basically after many years, the Python community recognized that
having dependencies scattered hither and yon was a terrible idea
both from a security perspective and from a stability/robustness
perspective. In time I expect other packaging ecosystems still
suffering from that paradigm will come to similar conclusions as
their communities mature and their deployed base broadens further.
-- 
Jeremy Stanley

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-11 Thread gordon chung
wow. everything you did below is awesome. respect.

not a swift dev so i won't suggest what to do as i'm sure you've put a 
lot more thought into adopting golang than i have. personally, i think 
it's easier to find design flaws in something that is (perceived) slow 
and these design optimisations still benefit you if/when you switch.

On 10/05/2016 6:25 PM, Gregory Haynes wrote:
> On Tue, May 10, 2016, at 11:10 AM, Hayes, Graham wrote:
>> On 10/05/2016 01:01, Gregory Haynes wrote:
>>>
>>> On Mon, May 9, 2016, at 03:54 PM, John Dickinson wrote:
 On 9 May 2016, at 13:16, Gregory Haynes wrote:
>
> This is a bit of an aside but I am sure others are wondering the same
> thing - Is there some info (specs/etherpad/ML thread/etc) that has more
> details on the bottleneck you're running in to? Given that the only
> clients of your service are the public facing DNS servers I am now even
> more surprised that you're hitting a python-inherent bottleneck.

 In Swift's case, the summary is that it's hard[0] to write a network
 service in Python that shuffles data between the network and a block
 device (hard drive) and effectively utilizes all of the hardware
 available. So far, we've done very well by fork()'ing child processes,
 using cooperative concurrency via eventlet, and basic "write more
 efficient code" optimizations. However, when it comes down to it,
 managing all of the async operations across many cores and many drives
 is really hard, and there just isn't a good, efficient interface for
 that in Python.
>>>
>>> This is a pretty big difference from hitting an unsolvable performance
>>> issue in the language and instead is a case of language preference -
>>> which is fine. I don't really want to fall in to the language-comparison
>>> trap, but I think more detailed reasoning for why it is preferable over
>>> python in specific use cases we have hit is good info to include /
>>> discuss in the document you're drafting :). Essentially its a matter of
>>> weighing the costs (which lots of people have hit on so I won't) with
>>> the potential benefits and so unless the benefits are made very clear
>>> (especially if those benefits are technical) its pretty hard to evaluate
>>> IMO.
>>>
>>> There seemed to be an assumption in some of the designate rewrite posts
>>> that there is some language-inherent performance issue causing a
>>> bottleneck. If this does actually exist then that is a good reason for
>>> rewriting in another language and is something that would be very useful
>>> to clearly document as a case where we support this type of thing. I am
>>> highly suspicious that this is the case though, but I am trying hard to
>>> keep an open mind...
>>
>> The way this component works makes it quite difficult to make any major
>> improvement.
>
> OK, I'll bite.
>
> I had a look at the code and there's a *ton* of low hanging fruit. I
> decided to hack in some fixes or emulation of fixes to see whether I
> could get any major improvements. Each test I ran 4 workers using
> SO_REUSEPORT and timed doing 1k axfr's with 4 in parallel at a time and
> recorded 5 timings. I also added these changes on top of one another in
> the order they follow.
>
> Base timings: [9.223, 9.030, 8.942, 8.657, 9.190]
>
> Stop spawning a thread per request - there are a lot of ways to do this
> better, but lets not even mess with that and just literally move the
> thread spawning that happens per request because its a silly idea here:
> [8.579, 8.732, 8.217, 8.522, 8.214] (almost 10% increase).
>
> Stop instantiating oslo config object per request - this should be a no
> brainer, we dont need to parse config inside of a request handler:
> [8.544, 8.191, 8.318, 8.086] (a few more percent).
>
> Now, the slightly less low hanging fruit - there are 3 round trips to
> the database *every request*. This is where the vast majority of request
> time is spent (not in python). I didn't actually implement a full on
> cache (I just hacked around the db queries), but this should be trivial
> to do since designate does know when to invalidate the cache data. Some
> numbers on how much a warm cache will help:
>
> Caching zone: [5.968, 5.942, 5.936, 5.797, 5.911]
>
> Caching records: [3.450, 3.357, 3.364, 3.459, 3.352].
>
> I would also expect real-world usage to be similar in that you should
> only get 1 cache miss per worker per notify, and then all the other
> public DNS servers would be getting cache hits. You could also remove
> the cost of that 1 cache miss by pre-loading data in to the cache.
>
> All said and done, I think that's almost a 3x speed increase with
> minimal effort. So, can we stop saying that this has anything to do with
> Python as a language and has everything to do with the algorithms being
> used?
>
>>
>> MiniDNS (the component) takes data and sends a zone transfer every time
>> a recordset gets updated. That is a full (AXFR) zone transfer, so every
>> record 

Re: [openstack-dev] [tc] supporting Go

2016-05-11 Thread Dean Troyer
On Tue, May 10, 2016 at 5:54 PM, Flavio Percoco  wrote:

[language mixing bits were here]

The above is my main concern with this proposal. I've mentioned this in the
> upstream review and I'm glad to have found it here as well. The community
> impact
> of this change is perhaps not being discussed enough and I believe, in the
> long
> run, it'll bite us.
>

Agreed, but to do nothing instead is so not what we are about.  The change
from integrated/incubated to Big Tent was done to address some issues
knowing we did not have all of the answers up front and would learn some
things along the way.  We did learn some things, both good and bad.

I do believe that we can withstand the impact of a new language,
particularly when we do it intentionally and knowing where some of the
pitfalls are.  Also, the specific request is coming from the oldest of all
OpenStack projects, and one that has a history of not making big changes
without _really_ good reasons.  Yes it opens a door, but it will be opened
with what I believe to be a really solid model to build upon in other parts
of the OpenStack community.  I would MUCH rather do it this way then with a
new Go-only project that is joining OpenStack from scratch in more than
just the implementation language.


> The feedback from the Horizon community has been that it's been impossible
> to
> avoid a community split and that's what I'd like to avoid.
>

I do think part of this is also due to the differences in the problem
domain of client/browser-side and server-side.  I believe there is a
similar issue with  devs writing SQL, the overlap in
expertise between the two is way smaller than we all wish it was.

And for the specific Python-Golang overlap, it feels to me like more Python
devs have (at least talked about) working in Go than in other newish
languages.  There are worse choices to test the waters with.

dt

-- 

Dean Troyer
dtro...@gmail.com
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-11 Thread Adam Young

On 05/10/2016 07:08 PM, Flavio Percoco wrote:

On 10/05/16 13:52 -0400, Adam Young wrote:
Forget package management for a moment; we can figure it out if we 
need to.  The question is "Why Go" which I've pondered for a while.


If you need to write a multithreaded app, Python's GIL makes it very 
hard to do.  It is one reason why I pushed for HTTPD as the Keystone 
front end.


Python has long held the option to optimize to native as the way to 
deal with performance sensitive segments.


The question, then, is what language are you going to use to write 
that perf sensitive native code?


To date, there have been two realistic options, Straight C and C++. 
For numeric algorithms, there is a large body written in Fortran that 
are often pulled over for scientific operations. The rest have been 
largely one-offs.


Go and Rust are interesting in that they are both native, as opposed 
to runtime compiled languages like Java and Python. That makes them 
candidates for writing this kind of performance code.


Rust is not there yet.  I like it, but it is tricky to learn, and the 
packaging and distribution is still getting in place.


I disagree ;)
OK, you know I am a RUSTifarian.  But Packaging is a real issue in 
Fedora, as the Rust compiler is not packaged yet, and thus all the 
downstream.



But really I was attempting to curb my enthusiasm for Rust, as it is not 
the language under discussion here.





Go has been more aggressively integrated into the larger community. 
Probably the most notable and relevant for our world is the 
Kubernetes push toward Go.


In the cosmic scheme of things, I see Go taking on C++ as the "native 
but organized" language, as contrasted with C which is native but 
purely procedural, and thus requires a lot more work to avoid 
security and project scale issues.


I disagree! I don't believe Go will take on C++ but for the sake of 
keeping this

thread a bit sane, I won't go into details here.
This is the core of the matter:  they want to build something native, 
performance, and threadable.  The options thus far are C or C++, and I 
would expect people that got to C to continue to do so; their rationale 
still holds.  In the past, I would have suggested people use C++ for an 
Object oriented and structured code base, but Go is a viable native 
alternative unlike ones we've had in the past.


Yes, yes, Rust would also work, but they are not asking about Rust. Curb 
your enthusiasm, too, Flavio!







So, I can see the desire to not start supporting C++, and to jump 
right to Go.  I think it is a reasonable language to investigate for 
this type of coding, but committing to it is less obvious than 
Javascript was:  with Javascript, there is no alternative for dynamic 
web apps, and for native, there are several.


I honestly don't think the above is a good enough motivation to start 
such a
huge change in the community. I mean, really, I'm not opposed to Go 
and I'm less

opposed to Rust.

As I've mentioned in other replies on this thread, there's more to it 
than just

the service specific needs. Infra, CI, Packagers, OPs, *community*.

Flavio



__ 


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: 
openstack-dev-requ...@lists.openstack.org?subject:unsubscribe

http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



__ 


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: 
openstack-dev-requ...@lists.openstack.org?subject:unsubscribe

http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-11 Thread Brant Knudson
I'd be worried about bringing in a language that doesn't integrate well
with Python, since I'd expect the normal route would be to take advantage
of as much of the existing code as we have and only replace those parts
that need replacing. From these web pages it looks like Go integrates with
Python: https://blog.filippo.io/building-python-modules-with-go-1-5/ and
https://github.com/go-python/gopy (I haven't tried these myself).

-- 
Brant
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-11 Thread Jim Rollenhagen
On Wed, May 11, 2016 at 03:36:09PM +0200, Thomas Goirand wrote:
> On 05/11/2016 02:41 PM, Jim Rollenhagen wrote:
> >> Installing from $language manager instead of distro packages, be it in
> >> containers or not, will almost always make you download random blobs
> >> from the Internet, which are of course changing over time without any
> >> notice, loosing the above 3 important features.
> > 
> > Unless you pin the versions of your dependencies.
> 
> Pinning versions doesn't change the fact that you'll have to trust a
> large amount of providers, with some of the files stored in a single
> location on the Internet. Yes, you can add a cache, etc. but these are
> band-aids...

Well, if we're talking about python, it all comes from PyPI. For Go, the
recommendation is for everything to come from Github, but you can
choose other sources if you desire.

> > As for "random blobs from the internet changing over time without
> > notice", I think this is the same thing for distros.
> 
> With the huge difference that in the case of distros, you're trusting a
> single well known entity, with known QA and all, vs a very large number
> of 3rd party which you have absolutely no relationship with, and which
> you may not be able to get in touch with.

"large number" certainly depends on the application and the number of
dependencies, no? If one is willing to make this tradeoff, they should
choose their upstreams wisely.

> > On the
> > other side, you're trusting yourself to handle these things
> 
> In practice, you wont make any effort to make sure what you're
> downloading comes from trusted sources only: it's just too difficult for
> no rewards.

Again, you're making assumptions about people. I've observed teams that
are *very* diligent about these things. Note that I never said everyone
should manage their own deps instead of using distro packages, I said
that it is a valid option if one is willing to put in the work.

// jim

P.S. we're way off topic now, we should probably take this piece of the
thread elsewhere. My intention was to point out that some people prefer
not to use distro packages for their application and its dependencies,
and that's okay.

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-11 Thread Dean Troyer
On Wed, May 11, 2016 at 8:36 AM, Thomas Goirand  wrote:

> Pinning versions doesn't change the fact that you'll have to trust a
> large amount of providers, with some of the files stored in a single
> location on the Internet. Yes, you can add a cache, etc. but these are
> band-aids...


If this were not a thread about Go, I'd swear you were talking about PyPI
here...


> With the huge difference that in the case of distros, you're trusting a
> single well known entity, with known QA and all, vs a very large number
> of 3rd party which you have absolutely no relationship with, and which
> you may not be able to get in touch with.


But 'single location on the Internet' is a bad thing?

In practice, you wont make any effort to make sure what you're
> downloading comes from trusted sources only: it's just too difficult for
> no rewards.


And here is the real point, you (for every value of 'you', being me, zigo,
jroll, everyone) are most likely to use the SAME principles and practices
in development in all environments for the same purpose.  I am just as
meticulous in Go and Python and Perl for production use, and just as sloppy
in all for one-off-hack use.  Some tools make this easier, some make it
harder (sometimes that's the same tool!)

Thomas, I understand why you believe that $language packaging systems are
all evil.  But they are a necessary evil because we have N OS packaging
systems (think beyond Linux here, all of these languages do) to deal with.
This is an extension of why OpenStack doesn't even try to include packaging
in the main projects, and why tarballs are still a viable, and often
preferred, method for upstream distribution.

The big difference with Go here is that the dependency work happens at
build time, not deploy/runtime in most cases.  That shifts much of the
burden to people (theoretically) better suited to manage that work.
Following the same basic principles with Go is just as possible as it is
with Python, or C, or even Perl.  They all require different details, but I
believe working out those details is doable, even in a mostly-acceptable
manner.

dt

-- 

Dean Troyer
dtro...@gmail.com
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-11 Thread Thomas Goirand
On 05/10/2016 09:56 PM, Samuel Merritt wrote:
> On 5/9/16 5:21 PM, Robert Collins wrote:
>> On 10 May 2016 at 10:54, John Dickinson  wrote:
>>> On 9 May 2016, at 13:16, Gregory Haynes wrote:

 This is a bit of an aside but I am sure others are wondering the same
 thing - Is there some info (specs/etherpad/ML thread/etc) that has more
 details on the bottleneck you're running in to? Given that the only
 clients of your service are the public facing DNS servers I am now even
 more surprised that you're hitting a python-inherent bottleneck.
>>>
>>> In Swift's case, the summary is that it's hard[0] to write a network
>>> service in Python that shuffles data between the network and a block
>>> device (hard drive) and effectively utilizes all of the hardware
>>> available. So far, we've done very well by fork()'ing child processes,
>> ...
>>> Initial results from a golang reimplementation of the object server in
>>> Python are very positive[1]. We're not proposing to rewrite Swift
>>> entirely in Golang. Specifically, we're looking at improving object
>>> replication time in Swift. This service must discover what data is on
>>> a drive, talk to other servers in the cluster about what they have,
>>> and coordinate any data sync process that's needed.
>>>
>>> [0] Hard, not impossible. Of course, given enough time, we can do
>>>  anything in a Turing-complete language, right? But we're not talking
>>>  about possible, we're talking about efficient tools for the job at
>>>  hand.
>> ...
>>
>> I'm glad you're finding you can get good results in (presumably)
>> clean, understandable code.
>>
>> Given go's historically poor perfornance with multiple cores
>> (https://golang.org/doc/faq#Why_GOMAXPROCS) I'm going to presume the
>> major advantage is in the CSP programming model - something that
>> Twisted does very well: and frustratingly we've had numerous
>> discussions from folk in the Twisted world who see the pain we have
>> and want to help, but as a community we've consistently stayed with
>> eventlet, which has a threaded programming model - and threaded models
>> are poorly suited for the case here.
> 
> At its core, the problem is that filesystem IO can take a surprisingly
> long time, during which the calling thread/process is blocked, and
> there's no good asynchronous alternative.
> 
> Some background:
> 
> With Eventlet, when your greenthread tries to read from a socket and the
> socket is not readable, then recvfrom() returns -1/EWOULDBLOCK; then,
> the Eventlet hub steps in, unschedules your greenthread, finds an
> unblocked one, and lets it proceed. It's pretty good at servicing a
> bunch of concurrent connections and keeping the CPU busy.
> 
> On the other hand, when the socket is readable, then recvfrom() returns
> quickly (a few microseconds). The calling process was technically
> blocked, but the syscall is so fast that it hardly matters.
> 
> Now, when your greenthread tries to read from a file, that read() call
> doesn't return until the data is in your process's memory. This can take
> a surprisingly long time. If the data isn't in buffer cache and the
> kernel has to go fetch it from a spinning disk, then you're looking at a
> seek time of ~7 ms, and that's assuming there are no other pending
> requests for the disk.
> 
> There's no EWOULDBLOCK when reading from a plain file, either. If the
> file pointer isn't at EOF, then the calling process blocks until the
> kernel fetches data for it.
> 
> Back to Swift:
> 
> The Swift object server basically does two things: it either reads from
> a disk and writes to a socket or vice versa. There's a little HTTP
> parsing in there, but the vast majority of the work is shuffling bytes
> between network and disk. One Swift object server can service many
> clients simultaneously.
> 
> The problem is those pauses due to read(). If your process is servicing
> hundreds of clients reading from and writing to dozens of disks (in,
> say, a 48-disk 4U server), then all those little 7 ms waits are pretty
> bad for throughput. Now, a lot of the time, the kernel does some
> readahead so your read() calls can quickly return data from buffer
> cache, but there are still lots of little hitches.
> 
> But wait: it gets worse. Sometimes a disk gets slow. Maybe it's got a
> lot of pending IO requests, maybe its filesystem is getting close to
> full, or maybe the disk hardware is just starting to get flaky. For
> whatever reason, IO to this disk starts taking a lot longer than 7 ms on
> average; think dozens or hundreds of milliseconds. Now, every time your
> process tries to read from this disk, all other work stops for quite a
> long time. The net effect is that the object server's throughput
> plummets while it spends most of its time blocked on IO from that one
> slow disk.
> 
> Now, of course there's things we can do. The obvious one is to use a
> couple of IO threads per disk and push the blocking syscalls out
> there... and, in 

Re: [openstack-dev] [tc] supporting Go

2016-05-11 Thread Thomas Goirand
On 05/11/2016 02:41 PM, Jim Rollenhagen wrote:
>> Installing from $language manager instead of distro packages, be it in
>> containers or not, will almost always make you download random blobs
>> from the Internet, which are of course changing over time without any
>> notice, loosing the above 3 important features.
> 
> Unless you pin the versions of your dependencies.

Pinning versions doesn't change the fact that you'll have to trust a
large amount of providers, with some of the files stored in a single
location on the Internet. Yes, you can add a cache, etc. but these are
band-aids...

> As for "random blobs from the internet changing over time without
> notice", I think this is the same thing for distros.

With the huge difference that in the case of distros, you're trusting a
single well known entity, with known QA and all, vs a very large number
of 3rd party which you have absolutely no relationship with, and which
you may not be able to get in touch with.

> On the
> other side, you're trusting yourself to handle these things

In practice, you wont make any effort to make sure what you're
downloading comes from trusted sources only: it's just too difficult for
no rewards.

Cheers,

Thomas Goirand (zigo)


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-11 Thread Flavio Percoco

On 09/05/16 19:43 -0400, Rayson Ho wrote:

On Mon, May 9, 2016 at 2:35 PM, Ben Swartzlander  wrote:


Perhaps for mature languages. But go is still finding its way, and that
usually involves rapid changes that are needed faster than the multi-year
cycle Linux distributions offer.



This statement right here would be the nail in the coffin of this idea if I

were deciding. As a community we should not be building software based on
unstable platforms and languages.


Go is a production language used by Google, Dropbox, many many web startups,
and in fact Fortune 500 companies.

Using a package manager won't buy us anything, and like Clint raised, the Linux
distros are way too slow in picking up new Go releases. In fact, the standard
way of installing Rust also does not use a package manager:

https://www.rust-lang.org/downloads.html


I honestly don't think the above is a good reference/example. OpenStack's
doesn't explicitly mention a package manager but we'll know going around package
managers is a terrible idea (unless you're doing CI/CD/whatever you wanna call 
it).

Realistically, though, distros won't ever recommend using tar.gz and I can
hardly believe that process will fit into any workflow established by Red Hat,
Debian, Suse, Ubuntu, etc.


I have nothing against golang in particular but I strongly believe that

mixing 2 languages within a project is always the wrong decision

It would be nice if we only need to write code in one language. But in the real
world the "nicer" & "easier" languages like Python & Perl are also the slower
ones. I used to work for an investment bank, and our system was developed in
Perl, with performance critical part rewritten in C/C++, so there really is
nothing wrong with mixing languages. (But if you ask me, I would strongly
prefer Go than C++.)


And I would prefer Rust. ;)

The thing here is not just the technical implications of this change. I do
believe there may be good technical motivations behind this request but I also
believe we need to balance those with other aspects like community,
infrastructure, contributions, etc.

If it were a standalone project with its own community and completely
independent, I believe we wouldn't need to have such a long discussion on this
topic.

Flavio





 


If you want to write code in a language that's not Python, go start another

project. Don't call it OpenStack. If it ends up being a better implementation
than the reference OpenStack Swift implementation, it will win anyways and
perhaps Swift will start to look more like the rest of the projects in
OpenStack with a standardized API and multiple plugable implementations.


-Ben Swartzlander



Also worth noting, is that go is not a "language runtime" but a compiler
(that happens to statically link in a runtime to the binaries it
produces...).

The point here though, is that the versions of Python that OpenStack
has traditionally supported have been directly tied to what the Linux
distributions carry in their repositories (case in point, Python 2.6
was dropped from most things as soon as RHEL7 was available with Python
2.7). With Go, there might need to be similar restrictions.

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



--
@flaper87
Flavio Percoco


signature.asc
Description: PGP signature
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-11 Thread Flavio Percoco

On 10/05/16 13:52 -0400, Adam Young wrote:
Forget package management for a moment;  we can figure it out if we 
need to.  The question is "Why Go" which I've pondered for a while.


If you need to write a multithreaded app, Python's GIL makes it very 
hard to do.  It is one reason why I pushed for HTTPD as the Keystone 
front end.


Python has long held the option to optimize to native as the way to 
deal with performance sensitive segments.


The question, then, is what language are you going to use to write 
that perf sensitive native code?


To date, there have been two realistic options, Straight C and C++. 
For numeric algorithms, there is a large body written in Fortran that 
are often pulled over for scientific operations.  The rest have been 
largely one-offs.


Go and Rust are interesting in that they are both native, as opposed 
to runtime compiled languages like Java and Python.  That makes them 
candidates for writing this kind of performance code.


Rust is not there yet.  I like it, but it is tricky to learn, and the 
packaging and distribution is still getting in place.


I disagree ;)

Go has been more aggressively integrated into the larger community. 
Probably the most notable and relevant for our world is the Kubernetes 
push toward Go.


In the cosmic scheme of things, I see Go taking on C++ as the "native 
but organized" language, as contrasted with C which is native but 
purely procedural, and thus requires a lot more work to avoid security 
and project scale issues.


I disagree! I don't believe Go will take on C++ but for the sake of keeping this
thread a bit sane, I won't go into details here.



So, I can see the desire to not start supporting C++, and to jump 
right to Go.  I think it is a reasonable language to investigate for 
this type of coding, but committing to it is less obvious than 
Javascript was:  with Javascript, there is no alternative for dynamic 
web apps, and for native, there are several.


I honestly don't think the above is a good enough motivation to start such a
huge change in the community. I mean, really, I'm not opposed to Go and I'm less
opposed to Rust.

As I've mentioned in other replies on this thread, there's more to it than just
the service specific needs. Infra, CI, Packagers, OPs, *community*.

Flavio



__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


--
@flaper87
Flavio Percoco


signature.asc
Description: PGP signature
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-11 Thread Flavio Percoco

On 09/05/16 14:35 -0400, Ben Swartzlander wrote:

On 05/09/2016 02:15 PM, Clint Byrum wrote:

Excerpts from Pete Zaitcev's message of 2016-05-09 08:52:16 -0700:

On Mon, 9 May 2016 09:06:02 -0400
Rayson Ho  wrote:


Since the Go toolchain is pretty self-contained, most people just follow
the official instructions to get it installed... by a one-step:

# tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz


I'm pretty certain the humanity has moved on from this sort of thing.
Nowadays "most people" use packaged language runtimes that come with
the Linux they're running.



Perhaps for mature languages. But go is still finding its way, and that
usually involves rapid changes that are needed faster than the multi-year
cycle Linux distributions offer.


This statement right here would be the nail in the coffin of this idea 
if I were deciding. As a community we should not be building software 
based on unstable platforms and languages.


I have nothing against golang in particular but I strongly believe 
that mixing 2 languages within a project is always the wrong decision, 
and doubly so if one of those languages is a niche language. The 
reason is simple: it's hard enough to find programmers who are 
competent in one language -- finding programmers who know both 
languages well will be nearly impossible. You'll end up with core 
reviewers who can't review half of the code and developers who can 
only fix bugs in half the code.



The above is my main concern with this proposal. I've mentioned this in the
upstream review and I'm glad to have found it here as well. The community impact
of this change is perhaps not being discussed enough and I believe, in the long
run, it'll bite us.

The feedback from the Horizon community has been that it's been impossible to
avoid a community split and that's what I'd like to avoid.

Flavio

If you want to write code in a language that's not Python, go start 
another project. Don't call it OpenStack. If it ends up being a better 
implementation than the reference OpenStack Swift implementation, it 
will win anyways and perhaps Swift will start to look more like the 
rest of the projects in OpenStack with a standardized API and multiple 
plugable implementations.


-Ben Swartzlander


Also worth noting, is that go is not a "language runtime" but a compiler
(that happens to statically link in a runtime to the binaries it
produces...).

The point here though, is that the versions of Python that OpenStack
has traditionally supported have been directly tied to what the Linux
distributions carry in their repositories (case in point, Python 2.6
was dropped from most things as soon as RHEL7 was available with Python
2.7). With Go, there might need to be similar restrictions.

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


--
@flaper87
Flavio Percoco


signature.asc
Description: PGP signature
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-11 Thread Jim Rollenhagen
On Wed, May 11, 2016 at 02:01:30AM +0200, Thomas Goirand wrote:
> On 05/10/2016 04:19 PM, Rayson Ho wrote:
> > I mentioned in earlier replies but I may as well mention it again: a
> > package manager gives you no advantage in a language toolchain like Go
> 
> Oh... You mean just like in Python where we have pip, Perl where we have
> CPAN, PHP where we have PEAR, or JavaScript where we have
> gulp/npm/grunt/you-name-it?
> 
> Each and every language think it's "special" and that no distro should
> be involved. Of course, the reality is different.
> 
> > IMO, the best use case of not using a package manager is when deploying
> > into containers
> > -- would you prefer to just drop a static binary of your
> > Go code, or you would rather install "apt-get" into a container image,
> 
> For anything serious, the later, of course! The former is only for
> hackers, calling themselves devs, who don't know about opts, playing and
> thinking they're the cool guys. This fashion of "we're in a container,
> so it's ok to do everything dirty" will soon be regarded by everyone as
> one big mistake.

Well, I tend to think this is a matter of opinion. Please, let's not
imply folks involved in this discussion are not "real developers"
because they have a different opinion.

> If you're using containers the wrong way, you loose:
> 1/ Version accountability
> 2/ Security audit
> 3/ Build reproducibility
> 
> Installing from $language manager instead of distro packages, be it in
> containers or not, will almost always make you download random blobs
> from the Internet, which are of course changing over time without any
> notice, loosing the above 3 important features.

Unless you pin the versions of your dependencies.

As for "random blobs from the internet changing over time without
notice", I think this is the same thing for distros. On one side,
you're trusting your distro to handle these things for you (and
downloading random blobs that may change from your distro repo). On the
other side, you're trusting yourself to handle these things (and
downloading random blobs that may change from PyPI (or whatever
$language manager).

So it's a matter of trusting $distro community versus trusting yourself
and/or your team.

If your team is competent enough to manage these things, I'd agree that
compiling a Go application and dropping it in a container is a totally
valid thing to do.

// jim

> 
> Cheers,
> 
> Thomas Goirand (zigo)
> 
> 
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-11 Thread Hayes, Graham
On 10/05/2016 23:28, Gregory Haynes wrote:
> On Tue, May 10, 2016, at 11:10 AM, Hayes, Graham wrote:
>> On 10/05/2016 01:01, Gregory Haynes wrote:
>>>
>>> On Mon, May 9, 2016, at 03:54 PM, John Dickinson wrote:
 On 9 May 2016, at 13:16, Gregory Haynes wrote:
>
> This is a bit of an aside but I am sure others are wondering the same
> thing - Is there some info (specs/etherpad/ML thread/etc) that has more
> details on the bottleneck you're running in to? Given that the only
> clients of your service are the public facing DNS servers I am now even
> more surprised that you're hitting a python-inherent bottleneck.

 In Swift's case, the summary is that it's hard[0] to write a network
 service in Python that shuffles data between the network and a block
 device (hard drive) and effectively utilizes all of the hardware
 available. So far, we've done very well by fork()'ing child processes,
 using cooperative concurrency via eventlet, and basic "write more
 efficient code" optimizations. However, when it comes down to it,
 managing all of the async operations across many cores and many drives
 is really hard, and there just isn't a good, efficient interface for
 that in Python.
>>>
>>> This is a pretty big difference from hitting an unsolvable performance
>>> issue in the language and instead is a case of language preference -
>>> which is fine. I don't really want to fall in to the language-comparison
>>> trap, but I think more detailed reasoning for why it is preferable over
>>> python in specific use cases we have hit is good info to include /
>>> discuss in the document you're drafting :). Essentially its a matter of
>>> weighing the costs (which lots of people have hit on so I won't) with
>>> the potential benefits and so unless the benefits are made very clear
>>> (especially if those benefits are technical) its pretty hard to evaluate
>>> IMO.
>>>
>>> There seemed to be an assumption in some of the designate rewrite posts
>>> that there is some language-inherent performance issue causing a
>>> bottleneck. If this does actually exist then that is a good reason for
>>> rewriting in another language and is something that would be very useful
>>> to clearly document as a case where we support this type of thing. I am
>>> highly suspicious that this is the case though, but I am trying hard to
>>> keep an open mind...
>>
>> The way this component works makes it quite difficult to make any major
>> improvement.
>
> OK, I'll bite.
>
> I had a look at the code and there's a *ton* of low hanging fruit. I
> decided to hack in some fixes or emulation of fixes to see whether I
> could get any major improvements. Each test I ran 4 workers using
> SO_REUSEPORT and timed doing 1k axfr's with 4 in parallel at a time and
> recorded 5 timings. I also added these changes on top of one another in
> the order they follow.

Thanks for the analysis - any suggestions about how we can improve the
current design are more than welcome .

For this test, was it a single static zone? What size was it?

>
> Base timings: [9.223, 9.030, 8.942, 8.657, 9.190]
>
> Stop spawning a thread per request - there are a lot of ways to do this
> better, but lets not even mess with that and just literally move the
> thread spawning that happens per request because its a silly idea here:
> [8.579, 8.732, 8.217, 8.522, 8.214] (almost 10% increase).
>
> Stop instantiating oslo config object per request - this should be a no
> brainer, we dont need to parse config inside of a request handler:
> [8.544, 8.191, 8.318, 8.086] (a few more percent).
>
> Now, the slightly less low hanging fruit - there are 3 round trips to
> the database *every request*. This is where the vast majority of request
> time is spent (not in python). I didn't actually implement a full on
> cache (I just hacked around the db queries), but this should be trivial
> to do since designate does know when to invalidate the cache data. Some
> numbers on how much a warm cache will help:
>
> Caching zone: [5.968, 5.942, 5.936, 5.797, 5.911]
>
> Caching records: [3.450, 3.357, 3.364, 3.459, 3.352].
>
> I would also expect real-world usage to be similar in that you should
> only get 1 cache miss per worker per notify, and then all the other
> public DNS servers would be getting cache hits. You could also remove
> the cost of that 1 cache miss by pre-loading data in to the cache.

I actually would expect the real world use of this to have most of the
servers have a cache miss.

We shuffle the order of the miniDNS servers sent out to the user facing
DNS servers, so I would expect them to hit different minidns servers
at nearly same time, and each of them try to generate the cache entry.

For pre-loading - this could work, but I *really* don't like relying on
a cache for one of the critical path components.

>
> All said and done, I think that's almost a 3x speed increase with
> minimal effort. So, can we stop saying that this 

Re: [openstack-dev] [tc] supporting Go

2016-05-11 Thread Thierry Carrez

Gregory Haynes wrote:

[...]
All said and done, I think that's almost a 3x speed increase with
minimal effort. So, can we stop saying that this has anything to do with
Python as a language and has everything to do with the algorithms being
used?


Thanks for this analysis, it's really helpful.


[...]

We are a small development team, and after looking at our options, and
judging the amount of developer hours we had available, a different
language was the route we decided on. I was going to go implement a few
POCs and see what was most suitable.


This is what especially surprises me. The problems going on here are
purely algorithmic, and the thinking is that rather than solve those
issues the small amount of development time needs to be spent on a re
implementation which also is going to have costs the the wider community
due to the language choice.


That is my concern (wearing my Technical Committee chair hat): we should 
not make changes that just move the pain around to other teams and 
create externalities -- we should make changes that are globally 
positive for OpenStack development *overall*. And that is why it's up to 
the TC to make such calls.


If this is an algorithm issue more than a Python issue, maybe a better 
solution would be to come up with a SWAT team of Python performance 
experts (we happen to have a few of them in various corners of our 
community) that can be called in to help optimize the performance of 
critical code. Or some other solution that would just not move the 
effort around.


That said I know that the Swift team spent a lot of time in the past 6 
years optimizing their Python code, so I'm not sure we can generalize 
this "everything to do with the algorithms" analysis to them ?


--
Thierry Carrez (ttx)

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-10 Thread Fox, Kevin M
Thomas, fully agree. :)

Rayson Ho, even with containers, distro packages are preferable. Its really 
difficult at the moment to ensure your containers don't have security 
vulnerabilities backed into them. None of the docker repo's I've seen really 
help you with automating this. The only trick I've found is to setup a jenkins 
server that tests a 'docker run -it --rm containername [apt-get upgrade -y || 
yum upgrade -y] periodically, check the results to see if it does anything, and 
if it does, force a rebuild of the container using the native tools. And then 
ensure you either get notified or have some kind of orchestration system that 
notices the new containers and does the right rolling upgrades for you.

This process gets much more complicated if your using, random language provided 
tool on top of the distro provided tools as there are increasing numbers of 
sources to check.

Thanks,
Kevin

From: Thomas Goirand [z...@debian.org]
Sent: Tuesday, May 10, 2016 5:01 PM
To: OpenStack Development Mailing List (not for usage questions)
Subject: Re: [openstack-dev] [tc] supporting Go

On 05/10/2016 04:19 PM, Rayson Ho wrote:
> I mentioned in earlier replies but I may as well mention it again: a
> package manager gives you no advantage in a language toolchain like Go

Oh... You mean just like in Python where we have pip, Perl where we have
CPAN, PHP where we have PEAR, or JavaScript where we have
gulp/npm/grunt/you-name-it?

Each and every language think it's "special" and that no distro should
be involved. Of course, the reality is different.

> IMO, the best use case of not using a package manager is when deploying
> into containers
> -- would you prefer to just drop a static binary of your
> Go code, or you would rather install "apt-get" into a container image,

For anything serious, the later, of course! The former is only for
hackers, calling themselves devs, who don't know about opts, playing and
thinking they're the cool guys. This fashion of "we're in a container,
so it's ok to do everything dirty" will soon be regarded by everyone as
one big mistake.

If you're using containers the wrong way, you loose:
1/ Version accountability
2/ Security audit
3/ Build reproducibility

Installing from $language manager instead of distro packages, be it in
containers or not, will almost always make you download random blobs
from the Internet, which are of course changing over time without any
notice, loosing the above 3 important features.

Cheers,

Thomas Goirand (zigo)


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-10 Thread Thomas Goirand
On 05/10/2016 04:19 PM, Rayson Ho wrote:
> I mentioned in earlier replies but I may as well mention it again: a
> package manager gives you no advantage in a language toolchain like Go

Oh... You mean just like in Python where we have pip, Perl where we have
CPAN, PHP where we have PEAR, or JavaScript where we have
gulp/npm/grunt/you-name-it?

Each and every language think it's "special" and that no distro should
be involved. Of course, the reality is different.

> IMO, the best use case of not using a package manager is when deploying
> into containers
> -- would you prefer to just drop a static binary of your
> Go code, or you would rather install "apt-get" into a container image,

For anything serious, the later, of course! The former is only for
hackers, calling themselves devs, who don't know about opts, playing and
thinking they're the cool guys. This fashion of "we're in a container,
so it's ok to do everything dirty" will soon be regarded by everyone as
one big mistake.

If you're using containers the wrong way, you loose:
1/ Version accountability
2/ Security audit
3/ Build reproducibility

Installing from $language manager instead of distro packages, be it in
containers or not, will almost always make you download random blobs
from the Internet, which are of course changing over time without any
notice, loosing the above 3 important features.

Cheers,

Thomas Goirand (zigo)


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-10 Thread Thomas Goirand
On 05/10/2016 08:42 AM, Tim Bell wrote:
> I hope that the packaging technologies are considered as part of the TC
> evaluation of a new language. While many alternative approaches are
> available, a language which could not be packaged into RPM or DEB would
> be an additional burden for distro builders and deployers.
> 
> Does Go present any additional work compared to Python in this area ?
> 
> Tim

As I wrote earlier, the main issue is that Go doesn't understand the
concept of shared libraries (at least, last time I checked, and that was
a few months ago). This means that whenever we get a new version of
library X, everyone that depends on it must be rebuilt. This is *very*
painful.

Also, this means that every single binary contains an embedded copy of
every Go lib it uses. This can potentially be a security nightmare. This
also means we're wasting a lot of resources.

Hopefully, we'll get there. According to someone else in this thread, Go
has already basic support for shared libs, and eventually, we'll make it
happen in distros too. But as much as I know, it's not the case yet, and
it will take a lot of time (months? years?) to get it right.

Plus all what Matthias wrote...

Cheers,

Thomas Goirand (zigo)

P.S: Again, I'm all but a Go specialist, so I hope I'm not writing too
many wrong things here... Feel free to correct me if I'm wrong.


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-10 Thread Thomas Goirand
On 05/10/2016 01:43 AM, Rayson Ho wrote:
> Using a package manager won't buy us anything, and like Clint raised,
> the Linux distros are way too slow in picking up new Go releases.

Let's check for the facts and compare:
https://golang.org/doc/devel/release.html

with:
https://tracker.debian.org/pkg/golang

For the 1.5.x releases, we can see that Debian Sid is lagging at most 1
month behind. For 1.6.x, it's less than 2 weeks. In my book, that's
*very quick* transitions, especially if you consider all the reverse
dependencies that could potentially break with these last versions.

So, either you have a very limited definition of "distro" (ie: RHEL
only? Ubuntu LTS only?), or anything older than a week is too old for
you. In both cases, that's not reasonable from my viewpoint.

Last, if that's still too slow for you, I'm sure the Debian Go packaging
team will accept contributions (which may later be backported wherever
Canonical people want to store it, if you are a Ubuntu user).

Cheers,

Thomas Goirand (zigo)


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-10 Thread Gregory Haynes
On Tue, May 10, 2016, at 11:10 AM, Hayes, Graham wrote:
> On 10/05/2016 01:01, Gregory Haynes wrote:
> >
> > On Mon, May 9, 2016, at 03:54 PM, John Dickinson wrote:
> >> On 9 May 2016, at 13:16, Gregory Haynes wrote:
> >>>
> >>> This is a bit of an aside but I am sure others are wondering the same
> >>> thing - Is there some info (specs/etherpad/ML thread/etc) that has more
> >>> details on the bottleneck you're running in to? Given that the only
> >>> clients of your service are the public facing DNS servers I am now even
> >>> more surprised that you're hitting a python-inherent bottleneck.
> >>
> >> In Swift's case, the summary is that it's hard[0] to write a network
> >> service in Python that shuffles data between the network and a block
> >> device (hard drive) and effectively utilizes all of the hardware
> >> available. So far, we've done very well by fork()'ing child processes,
> >> using cooperative concurrency via eventlet, and basic "write more
> >> efficient code" optimizations. However, when it comes down to it,
> >> managing all of the async operations across many cores and many drives
> >> is really hard, and there just isn't a good, efficient interface for
> >> that in Python.
> >
> > This is a pretty big difference from hitting an unsolvable performance
> > issue in the language and instead is a case of language preference -
> > which is fine. I don't really want to fall in to the language-comparison
> > trap, but I think more detailed reasoning for why it is preferable over
> > python in specific use cases we have hit is good info to include /
> > discuss in the document you're drafting :). Essentially its a matter of
> > weighing the costs (which lots of people have hit on so I won't) with
> > the potential benefits and so unless the benefits are made very clear
> > (especially if those benefits are technical) its pretty hard to evaluate
> > IMO.
> >
> > There seemed to be an assumption in some of the designate rewrite posts
> > that there is some language-inherent performance issue causing a
> > bottleneck. If this does actually exist then that is a good reason for
> > rewriting in another language and is something that would be very useful
> > to clearly document as a case where we support this type of thing. I am
> > highly suspicious that this is the case though, but I am trying hard to
> > keep an open mind...
> 
> The way this component works makes it quite difficult to make any major
> improvement.

OK, I'll bite.

I had a look at the code and there's a *ton* of low hanging fruit. I
decided to hack in some fixes or emulation of fixes to see whether I
could get any major improvements. Each test I ran 4 workers using
SO_REUSEPORT and timed doing 1k axfr's with 4 in parallel at a time and
recorded 5 timings. I also added these changes on top of one another in
the order they follow.

Base timings: [9.223, 9.030, 8.942, 8.657, 9.190]

Stop spawning a thread per request - there are a lot of ways to do this
better, but lets not even mess with that and just literally move the
thread spawning that happens per request because its a silly idea here:
[8.579, 8.732, 8.217, 8.522, 8.214] (almost 10% increase).

Stop instantiating oslo config object per request - this should be a no
brainer, we dont need to parse config inside of a request handler:
[8.544, 8.191, 8.318, 8.086] (a few more percent).

Now, the slightly less low hanging fruit - there are 3 round trips to
the database *every request*. This is where the vast majority of request
time is spent (not in python). I didn't actually implement a full on
cache (I just hacked around the db queries), but this should be trivial
to do since designate does know when to invalidate the cache data. Some
numbers on how much a warm cache will help:

Caching zone: [5.968, 5.942, 5.936, 5.797, 5.911]

Caching records: [3.450, 3.357, 3.364, 3.459, 3.352].

I would also expect real-world usage to be similar in that you should
only get 1 cache miss per worker per notify, and then all the other
public DNS servers would be getting cache hits. You could also remove
the cost of that 1 cache miss by pre-loading data in to the cache.

All said and done, I think that's almost a 3x speed increase with
minimal effort. So, can we stop saying that this has anything to do with
Python as a language and has everything to do with the algorithms being
used?

> 
> MiniDNS (the component) takes data and sends a zone transfer every time 
> a recordset gets updated. That is a full (AXFR) zone transfer, so every
> record in the zone gets sent to each of the DNS servers that end users
> can hit.
> 
> This can be quite a large number - ns[1-6].example.com. may well be
> tens or hundreds of servers behind anycast IPs and load balancers.
> 

This design sounds like a *perfect* contender for caching. If you're
designing this properly its purely a question of how quickly can you
shove memory over the wire and as a result your choice in language will
have almost no effect - it'll be 

Re: [openstack-dev] [tc] supporting Go

2016-05-10 Thread Robert Collins
On 11 May 2016 at 06:10, Hayes, Graham  wrote:
> On 10/05/2016 01:01, Gregory Haynes wrote:

> The way this component works makes it quite difficult to make any major
> improvement.
>
> MiniDNS (the component) takes data and sends a zone transfer every time
> a recordset gets updated. That is a full (AXFR) zone transfer, so every
> record in the zone gets sent to each of the DNS servers that end users
> can hit.
>
> This can be quite a large number - ns[1-6].example.com. may well be
> tens or hundreds of servers behind anycast IPs and load balancers.
>
> In many cases, internal zones (or even external zones) can be quite
> large - I have seen zones that are 200-300Mb. If a zone is high traffic

I presume you mean MB ?

> (like say cloud.example.com. where a record is added / removed for
> each boot / destroy, or the reverse DNS zones for a cloud), there can
> be a lot of data sent out from this component.
>
> We are a small development team, and after looking at our options, and
> judging the amount of developer hours we had available, a different
> language was the route we decided on. I was going to go implement a few
> POCs and see what was most suitable.

Out of interest, what was the problem you had/have with Python here?
Sending a few GB of data at wire speeds on a TCP link is pretty
shallow for Python, though not having had my hands on a 40gpbs NIC I
can't personally say whether its still the case there.

I guess my fundamental question is: is this a domain problem, or a
Python problem? If the problem is 'we need to send 300MB to 100
servers in < 5 seconds', which is 30GB of traffic - you're going to
need a 240GB/5s == 48Gbps NIC, or you're going to need distributed
workers to shard that workload across machines.

If the problem is 'designate's memory use is blowing way up when we
try to do this' - that might be a very straightforward fix (use
memoryviews and zero-copy IO).

I guess what I'm wondering is whether there is a low hanging fix, and
as an observer I have absolutely no insight into the problem you've
been having - I'd like to know more... is there a bug report perhaps?

My *fear* is that the underlying problem has nothing to do with Python
and can rear its head in any language - and that perhaps the idioms
being used in Designate (or OpenStack as a whole) are driving whatever
specific problem you've got?

I know that our current programming model is missing a lot of the
easily-correct improvements that have been created in the last few
decades (because our basic abstraction is the thread) - how much does
that factor in, do you think?

-Rob

-- 
Robert Collins 
Distinguished Technologist
HP Converged Cloud

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-10 Thread Hayes, Graham
On 10/05/2016 20:48, Chris Friesen wrote:
> On 05/10/2016 12:10 PM, Hayes, Graham wrote:
>
>> The way this component works makes it quite difficult to make any major
>> improvement.
>>
>> MiniDNS (the component) takes data and sends a zone transfer every time
>> a recordset gets updated. That is a full (AXFR) zone transfer, so every
>> record in the zone gets sent to each of the DNS servers that end users
>> can hit.
>>
>> This can be quite a large number - ns[1-6].example.com. may well be
>> tens or hundreds of servers behind anycast IPs and load balancers.
>>
>> In many cases, internal zones (or even external zones) can be quite
>> large - I have seen zones that are 200-300Mb. If a zone is high traffic
>> (like say cloud.example.com. where a record is added / removed for
>> each boot / destroy, or the reverse DNS zones for a cloud), there can
>> be a lot of data sent out from this component.
>>
>> We are a small development team, and after looking at our options, and
>> judging the amount of developer hours we had available, a different
>> language was the route we decided on. I was going to go implement a few
>> POCs and see what was most suitable.
>
>
> I know nothing about what you're doing beyond what you've mentioned above, but
> it seems really odd to transmit all that data any time something changes.
>
> Is there no way to send an incremental change?

In short, yes there is a DNS standard for a incremental change, but it
is quite complex to implement, and can often end up reverting to a full 
zone transfer when there is problems.

We have discussed IXFR (incremental zone transfers) previously but we
have not found a good solution to it.

> Chris
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-10 Thread Samuel Merritt

On 5/9/16 5:21 PM, Robert Collins wrote:

On 10 May 2016 at 10:54, John Dickinson  wrote:

On 9 May 2016, at 13:16, Gregory Haynes wrote:


This is a bit of an aside but I am sure others are wondering the same
thing - Is there some info (specs/etherpad/ML thread/etc) that has more
details on the bottleneck you're running in to? Given that the only
clients of your service are the public facing DNS servers I am now even
more surprised that you're hitting a python-inherent bottleneck.


In Swift's case, the summary is that it's hard[0] to write a network
service in Python that shuffles data between the network and a block
device (hard drive) and effectively utilizes all of the hardware
available. So far, we've done very well by fork()'ing child processes,

...

Initial results from a golang reimplementation of the object server in
Python are very positive[1]. We're not proposing to rewrite Swift
entirely in Golang. Specifically, we're looking at improving object
replication time in Swift. This service must discover what data is on
a drive, talk to other servers in the cluster about what they have,
and coordinate any data sync process that's needed.

[0] Hard, not impossible. Of course, given enough time, we can do
 anything in a Turing-complete language, right? But we're not talking
 about possible, we're talking about efficient tools for the job at
 hand.

...

I'm glad you're finding you can get good results in (presumably)
clean, understandable code.

Given go's historically poor perfornance with multiple cores
(https://golang.org/doc/faq#Why_GOMAXPROCS) I'm going to presume the
major advantage is in the CSP programming model - something that
Twisted does very well: and frustratingly we've had numerous
discussions from folk in the Twisted world who see the pain we have
and want to help, but as a community we've consistently stayed with
eventlet, which has a threaded programming model - and threaded models
are poorly suited for the case here.


At its core, the problem is that filesystem IO can take a surprisingly 
long time, during which the calling thread/process is blocked, and 
there's no good asynchronous alternative.


Some background:

With Eventlet, when your greenthread tries to read from a socket and the 
socket is not readable, then recvfrom() returns -1/EWOULDBLOCK; then, 
the Eventlet hub steps in, unschedules your greenthread, finds an 
unblocked one, and lets it proceed. It's pretty good at servicing a 
bunch of concurrent connections and keeping the CPU busy.


On the other hand, when the socket is readable, then recvfrom() returns 
quickly (a few microseconds). The calling process was technically 
blocked, but the syscall is so fast that it hardly matters.


Now, when your greenthread tries to read from a file, that read() call 
doesn't return until the data is in your process's memory. This can take 
a surprisingly long time. If the data isn't in buffer cache and the 
kernel has to go fetch it from a spinning disk, then you're looking at a 
seek time of ~7 ms, and that's assuming there are no other pending 
requests for the disk.


There's no EWOULDBLOCK when reading from a plain file, either. If the 
file pointer isn't at EOF, then the calling process blocks until the 
kernel fetches data for it.


Back to Swift:

The Swift object server basically does two things: it either reads from 
a disk and writes to a socket or vice versa. There's a little HTTP 
parsing in there, but the vast majority of the work is shuffling bytes 
between network and disk. One Swift object server can service many 
clients simultaneously.


The problem is those pauses due to read(). If your process is servicing 
hundreds of clients reading from and writing to dozens of disks (in, 
say, a 48-disk 4U server), then all those little 7 ms waits are pretty 
bad for throughput. Now, a lot of the time, the kernel does some 
readahead so your read() calls can quickly return data from buffer 
cache, but there are still lots of little hitches.


But wait: it gets worse. Sometimes a disk gets slow. Maybe it's got a 
lot of pending IO requests, maybe its filesystem is getting close to 
full, or maybe the disk hardware is just starting to get flaky. For 
whatever reason, IO to this disk starts taking a lot longer than 7 ms on 
average; think dozens or hundreds of milliseconds. Now, every time your 
process tries to read from this disk, all other work stops for quite a 
long time. The net effect is that the object server's throughput 
plummets while it spends most of its time blocked on IO from that one 
slow disk.


Now, of course there's things we can do. The obvious one is to use a 
couple of IO threads per disk and push the blocking syscalls out 
there... and, in fact, Swift did that. In commit b491549, the object 
server gained a small threadpool for each disk[1] and started doing its 
IO there.


This worked pretty well for avoiding the slow-disk problem. Requests 
that touched the slow disk would back up, 

Re: [openstack-dev] [tc] supporting Go

2016-05-10 Thread Chris Friesen

On 05/10/2016 12:10 PM, Hayes, Graham wrote:


The way this component works makes it quite difficult to make any major
improvement.

MiniDNS (the component) takes data and sends a zone transfer every time
a recordset gets updated. That is a full (AXFR) zone transfer, so every
record in the zone gets sent to each of the DNS servers that end users
can hit.

This can be quite a large number - ns[1-6].example.com. may well be
tens or hundreds of servers behind anycast IPs and load balancers.

In many cases, internal zones (or even external zones) can be quite
large - I have seen zones that are 200-300Mb. If a zone is high traffic
(like say cloud.example.com. where a record is added / removed for
each boot / destroy, or the reverse DNS zones for a cloud), there can
be a lot of data sent out from this component.

We are a small development team, and after looking at our options, and
judging the amount of developer hours we had available, a different
language was the route we decided on. I was going to go implement a few
POCs and see what was most suitable.



I know nothing about what you're doing beyond what you've mentioned above, but 
it seems really odd to transmit all that data any time something changes.


Is there no way to send an incremental change?

Chris

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-10 Thread Mike Perez
On 15:54 May 09, John Dickinson wrote:
> On 9 May 2016, at 13:16, Gregory Haynes wrote:
> >
> > This is a bit of an aside but I am sure others are wondering the same
> > thing - Is there some info (specs/etherpad/ML thread/etc) that has more
> > details on the bottleneck you're running in to? Given that the only
> > clients of your service are the public facing DNS servers I am now even
> > more surprised that you're hitting a python-inherent bottleneck.
> 
> In Swift's case, the summary is that it's hard[0] to write a network
> service in Python that shuffles data between the network and a block
> device (hard drive) and effectively utilizes all of the hardware
> available. So far, we've done very well by fork()'ing child processes,
> using cooperative concurrency via eventlet, and basic "write more
> efficient code" optimizations. However, when it comes down to it,
> managing all of the async operations across many cores and many drives
> is really hard, and there just isn't a good, efficient interface for
> that in Python.

If I'm understanding correctly you're findings are:

1) Performance great from benchmarks.
2) Interface great for dealing with network and block devices

For item one, I'm wondering if asyncio was explored at all? I get more and more
curious if this is going to be a thing in the past [1] as I read some
improvements in this area (still immature as noted).

For item two, can you speak more about the interface improvements with working
with all the hardware available. Cinder for example, we deal with block devices
a bit and having to sometimes just dd data from here to there.

[1] - http://magic.io/blog/uvloop-blazing-fast-python-networking/

-- 
Mike Perez

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-10 Thread Hayes, Graham
On 10/05/2016 01:01, Gregory Haynes wrote:
>
> On Mon, May 9, 2016, at 03:54 PM, John Dickinson wrote:
>> On 9 May 2016, at 13:16, Gregory Haynes wrote:
>>>
>>> This is a bit of an aside but I am sure others are wondering the same
>>> thing - Is there some info (specs/etherpad/ML thread/etc) that has more
>>> details on the bottleneck you're running in to? Given that the only
>>> clients of your service are the public facing DNS servers I am now even
>>> more surprised that you're hitting a python-inherent bottleneck.
>>
>> In Swift's case, the summary is that it's hard[0] to write a network
>> service in Python that shuffles data between the network and a block
>> device (hard drive) and effectively utilizes all of the hardware
>> available. So far, we've done very well by fork()'ing child processes,
>> using cooperative concurrency via eventlet, and basic "write more
>> efficient code" optimizations. However, when it comes down to it,
>> managing all of the async operations across many cores and many drives
>> is really hard, and there just isn't a good, efficient interface for
>> that in Python.
>
> This is a pretty big difference from hitting an unsolvable performance
> issue in the language and instead is a case of language preference -
> which is fine. I don't really want to fall in to the language-comparison
> trap, but I think more detailed reasoning for why it is preferable over
> python in specific use cases we have hit is good info to include /
> discuss in the document you're drafting :). Essentially its a matter of
> weighing the costs (which lots of people have hit on so I won't) with
> the potential benefits and so unless the benefits are made very clear
> (especially if those benefits are technical) its pretty hard to evaluate
> IMO.
>
> There seemed to be an assumption in some of the designate rewrite posts
> that there is some language-inherent performance issue causing a
> bottleneck. If this does actually exist then that is a good reason for
> rewriting in another language and is something that would be very useful
> to clearly document as a case where we support this type of thing. I am
> highly suspicious that this is the case though, but I am trying hard to
> keep an open mind...

The way this component works makes it quite difficult to make any major
improvement.

MiniDNS (the component) takes data and sends a zone transfer every time 
a recordset gets updated. That is a full (AXFR) zone transfer, so every
record in the zone gets sent to each of the DNS servers that end users
can hit.

This can be quite a large number - ns[1-6].example.com. may well be
tens or hundreds of servers behind anycast IPs and load balancers.

In many cases, internal zones (or even external zones) can be quite
large - I have seen zones that are 200-300Mb. If a zone is high traffic
(like say cloud.example.com. where a record is added / removed for
each boot / destroy, or the reverse DNS zones for a cloud), there can
be a lot of data sent out from this component.

We are a small development team, and after looking at our options, and 
judging the amount of developer hours we had available, a different
language was the route we decided on. I was going to go implement a few
POCs and see what was most suitable.

Golang was then being proposed as a new "blessed" language, and as it
was a language that we had a pre-existing POC in we decided to keep
this within the potential new list of languages.

As I said before, we did not just randomly decide this. We have been
talking about it for a while, and at this summit we dedicated an entire
session to it, and decided to do it.


>>
>> Initial results from a golang reimplementation of the object server in
>> Python are very positive[1]. We're not proposing to rewrite Swift
>> entirely in Golang. Specifically, we're looking at improving object
>> replication time in Swift. This service must discover what data is on
>> a drive, talk to other servers in the cluster about what they have,
>> and coordinate any data sync process that's needed.
>>
>> [0] Hard, not impossible. Of course, given enough time, we can do
>>   anything in a Turing-complete language, right? But we're not talking
>>   about possible, we're talking about efficient tools for the job at
>>   hand.
>
> Sorry to be a pedant but that is just plain false - there are plenty of
> intractable problems.
>
>>
>> [1] http://d.not.mn/python_vs_golang_gets.png and
>>   http://d.not.mn/python_vs_golang_puts.png
>>
>>
>> --John
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: 

Re: [openstack-dev] [tc] supporting Go

2016-05-10 Thread Adam Young
Forget package management for a moment;  we can figure it out if we need 
to.  The question is "Why Go" which I've pondered for a while.



If you need to write a multithreaded app, Python's GIL makes it very 
hard to do.  It is one reason why I pushed for HTTPD as the Keystone 
front end.


Python has long held the option to optimize to native as the way to deal 
with performance sensitive segments.


The question, then, is what language are you going to use to write that 
perf sensitive native code?


To date, there have been two realistic options, Straight C and C++. For 
numeric algorithms, there is a large body written in Fortran that are 
often pulled over for scientific operations.  The rest have been largely 
one-offs.


Go and Rust are interesting in that they are both native, as opposed to 
runtime compiled languages like Java and Python.  That makes them 
candidates for writing this kind of performance code.


Rust is not there yet.  I like it, but it is tricky to learn, and the 
packaging and distribution is still getting in place.


Go has been more aggressively integrated into the larger community. 
Probably the most notable and relevant for our world is the Kubernetes 
push toward Go.


In the cosmic scheme of things, I see Go taking on C++ as the "native 
but organized" language, as contrasted with C which is native but purely 
procedural, and thus requires a lot more work to avoid security and 
project scale issues.


So, I can see the desire to not start supporting C++, and to jump right 
to Go.  I think it is a reasonable language to investigate for this type 
of coding, but committing to it is less obvious than Javascript was:  
with Javascript, there is no alternative for dynamic web apps, and for 
native, there are several.




__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-10 Thread Clint Byrum
Excerpts from Rayson Ho's message of 2016-05-10 07:19:23 -0700:
> On Tue, May 10, 2016 at 2:42 AM, Tim Bell  wrote:
> > I hope that the packaging technologies are considered as part of the TC
> evaluation of a new language. While many alternative approaches are
> available, a language which could not be packaged into RPM or DEB would be
> an additional burden for distro builders and deployers.
> >
> 
> I mentioned in earlier replies but I may as well mention it again: a
> package manager gives you no advantage in a language toolchain like Go (or
> Rust). In fact, when you code is written in Go, you will be spared from
> dependency hell.
> 

Package managers don't just resolve dependencies. You may have forgotten
the days _before_ apt-get where they just _expressed_ dependencies, but
it was up to you to find and download and install them all together.

There is also integration. Having an init script or systemd unit that
expresses when it makes sense to start this service is quite useful.

Source packages assist users in repeating the build the way the binary
they're using was built. If you do need to patch, patching the version
you're using, with the flags it used, means less entropy to deal with.
The alternative is going full upstream, which is great, and should be
done for anything you intend to have a deep relationship, but may not be
appropriate in every case.

Finally, the chain of trust is huge. Knowing that the binary in that
package is the one that was built by developers who understand your OS
is something we take for granted every time we 'yum install' or 'apt-get
install'. Of course, a go binary distributor can make detached pgp
signatures of their binaries, or try to claim their server is secured
and https is enough. But that puts the onus on the user to figure out
how to verify, or places trust in the global PKI, which is usually fine
(and definitely better than nothing at all!) but far inferior to the
signed metadata/binary approach distros use.

> And, while not the official way to install Go, the Go toolchain can be
> packaged and in fact it is in Ubuntu 16.04 LTS:
> 
> https://launchpad.net/ubuntu/xenial/+source/golang-1.6
> 
> 
> IMO, the best use case of not using a package manager is when deploying
> into containers -- would you prefer to just drop a static binary of your Go
> code, or you would rather install "apt-get" into a container image, and
> then install the language runtime via apt-get, and finally your
> application?? I don't know about you, but many startup companies like Go as
> it would give them much faster time to react.
> 
> Lastly, I would encourage anyone who has never even used Go to at least
> download the Go toolchain and install it in your home directory (or if you
> are committed enough, system wide), and then compile a few hello world
> programs and see what Go gives you. Go won't give you everything, but I am
> a "pick the right tool for the right job" guy and I am pretty happy about
> Go.
> 

Go's fine. But so is Python. I think the debate here is whether Go has
enough strengths vs. Python to warrant endorsement by OpenStack.

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-10 Thread Matthias Runge
On 05/05/16 02:25, Tom Fifield wrote:

> Not a TC member, and this might not even be the right place for this,
> but ... I think it would be nice if someone has a think about how moving
> from a primarily single language community to a
> multiple-languages-allowed-in-a-bigger-way community impacts the
> "people" side of the community. Then, possibly write that down, maybe
> even with things that we could do to address any badness foreseen.
> 
We already had that, for example in Horizon, moving from a mostly Python
oriented community to a mostly JavaScript community.

At the same time, when the shift happened, the community changed quite a
lot. That might be coincidence.
-- 
Matthias Runge 

Red Hat GmbH, http://www.de.redhat.com/, Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Paul Argiry, Charles Cachera, Michael Cunningham,
Michael O'Neill

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-10 Thread Matthias Runge
On 10/05/16 08:57, Angus Lees wrote:
> No, it doesn't.  Several applications written in go are already packaged
> for Debian (for example).
> 
> Indeed the equivalent of "installing from master/pip" (ie: not using
> distro packages) is _much_ easier in go, since there is no need for the
> equivalent of venvs.  Like all compiled languages, there is a separate
> compile step required.
> 
>  - Gus
> 

For fedora, there is gofed, which produces nice spec files for golang
packages. Fedora already contains a few golang packages.

As a packager looking at go packages, I noticed

1. most golang "packages" don't even have a release, they only consist
of a series of commits
2. golang programs often fetch various sources from all over the net at
build time; they are compiled into static linked binaries, with all
known consequences
3. both 1. and 2. make issue tracking or tracking for vulnerabilities
quite hard, or even impossible.
4. I also noticed, upstreams change quite quickly, some changed
location, some just a name, not to speak about api changes. That might
be due to the age of observed projects. But the nature of go makes is
quite easy to import directly from the net.



-- 
Matthias Runge 

Red Hat GmbH, http://www.de.redhat.com/, Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Paul Argiry, Charles Cachera, Michael Cunningham,
Michael O'Neill

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-10 Thread Angus Lees
No, it doesn't.  Several applications written in go are already packaged
for Debian (for example).

Indeed the equivalent of "installing from master/pip" (ie: not using distro
packages) is _much_ easier in go, since there is no need for the equivalent
of venvs.  Like all compiled languages, there is a separate compile step
required.

 - Gus

On Tue, 10 May 2016 at 16:44 Tim Bell <tim.b...@cern.ch> wrote:

> From: Rayson Ho <raysonlo...@gmail.com>
> Reply-To: "OpenStack Development Mailing List (not for usage questions)" <
> openstack-dev@lists.openstack.org>
> Date: Tuesday 10 May 2016 at 01:43
> To: "OpenStack Development Mailing List (not for usage questions)" <
> openstack-dev@lists.openstack.org>
>
> Subject: Re: [openstack-dev] [tc] supporting Go
>
> Go is a production language used by Google, Dropbox, many many web
> startups, and in fact Fortune 500 companies.
>
> Using a package manager won't buy us anything, and like Clint raised, the
> Linux distros are way too slow in picking up new Go releases. In fact, the
> standard way of installing Rust also does not use a package manager:
>
> https://www.rust-lang.org/downloads.html
>
>
> > I have nothing against golang in particular but I strongly believe that
> mixing 2 languages within a project is always the wrong decision
>
> It would be nice if we only need to write code in one language. But in the
> real world the "nicer" & "easier" languages like Python & Perl are also the
> slower ones. I used to work for an investment bank, and our system was
> developed in Perl, with performance critical part rewritten in C/C++, so
> there really is nothing wrong with mixing languages. (But if you ask me, I
> would strongly prefer Go than C++.)
>
> Rayson
>
>
> I hope that the packaging technologies are considered as part of the TC
> evaluation of a new language. While many alternative approaches are
> available, a language which could not be packaged into RPM or DEB would be
> an additional burden for distro builders and deployers.
>
> Does Go present any additional work compared to Python in this area ?
>
> Tim
>
>
> ==
> Open Grid Scheduler - The Official Open Source Grid Engine
> http://gridscheduler.sourceforge.net/
> http://gridscheduler.sourceforge.net/GridEngine/GridEngineCloud.html
>
>
>
>
> >
> > If you want to write code in a language that's not Python, go start
> another project. Don't call it OpenStack. If it ends up being a better
> implementation than the reference OpenStack Swift implementation, it will
> win anyways and perhaps Swift will start to look more like the rest of the
> projects in OpenStack with a standardized API and multiple plugable
> implementations.
> >
> > -Ben Swartzlander
> >
> >
> >> Also worth noting, is that go is not a "language runtime" but a compiler
> >> (that happens to statically link in a runtime to the binaries it
> >> produces...).
> >>
> >> The point here though, is that the versions of Python that OpenStack
> >> has traditionally supported have been directly tied to what the Linux
> >> distributions carry in their repositories (case in point, Python 2.6
> >> was dropped from most things as soon as RHEL7 was available with Python
> >> 2.7). With Go, there might need to be similar restrictions.
> >>
> >>
> __
> >> OpenStack Development Mailing List (not for usage questions)
> >> Unsubscribe:
> openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> >> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> >>
> >
> >
> >
> __
> > OpenStack Development Mailing List (not for usage questions)
> > Unsubscribe:
> openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
> Message protected by MailGuard: e-mail anti-virus, anti-spam and content
> filtering.
> http://www.mailguard.com.au/mg
>
> Report this message as spam
> <https://console.mailguard.com.au/ras/1Opb7lh9Zt/4DLz47QQjrgvOd0QkNyy3X/0.214>
>
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-10 Thread Tim Bell
From: Rayson Ho <raysonlo...@gmail.com<mailto:raysonlo...@gmail.com>>
Reply-To: "OpenStack Development Mailing List (not for usage questions)" 
<openstack-dev@lists.openstack.org<mailto:openstack-dev@lists.openstack.org>>
Date: Tuesday 10 May 2016 at 01:43
To: "OpenStack Development Mailing List (not for usage questions)" 
<openstack-dev@lists.openstack.org<mailto:openstack-dev@lists.openstack.org>>
Subject: Re: [openstack-dev] [tc] supporting Go


Go is a production language used by Google, Dropbox, many many web startups, 
and in fact Fortune 500 companies.

Using a package manager won't buy us anything, and like Clint raised, the Linux 
distros are way too slow in picking up new Go releases. In fact, the standard 
way of installing Rust also does not use a package manager:

https://www.rust-lang.org/downloads.html


> I have nothing against golang in particular but I strongly believe that 
> mixing 2 languages within a project is always the wrong decision

It would be nice if we only need to write code in one language. But in the real 
world the "nicer" & "easier" languages like Python & Perl are also the slower 
ones. I used to work for an investment bank, and our system was developed in 
Perl, with performance critical part rewritten in C/C++, so there really is 
nothing wrong with mixing languages. (But if you ask me, I would strongly 
prefer Go than C++.)

Rayson

I hope that the packaging technologies are considered as part of the TC 
evaluation of a new language. While many alternative approaches are available, 
a language which could not be packaged into RPM or DEB would be an additional 
burden for distro builders and deployers.

Does Go present any additional work compared to Python in this area ?

Tim


==
Open Grid Scheduler - The Official Open Source Grid Engine
http://gridscheduler.sourceforge.net/
http://gridscheduler.sourceforge.net/GridEngine/GridEngineCloud.html




>
> If you want to write code in a language that's not Python, go start another 
> project. Don't call it OpenStack. If it ends up being a better implementation 
> than the reference OpenStack Swift implementation, it will win anyways and 
> perhaps Swift will start to look more like the rest of the projects in 
> OpenStack with a standardized API and multiple plugable implementations.
>
> -Ben Swartzlander
>
>
>> Also worth noting, is that go is not a "language runtime" but a compiler
>> (that happens to statically link in a runtime to the binaries it
>> produces...).
>>
>> The point here though, is that the versions of Python that OpenStack
>> has traditionally supported have been directly tied to what the Linux
>> distributions carry in their repositories (case in point, Python 2.6
>> was dropped from most things as soon as RHEL7 was available with Python
>> 2.7). With Go, there might need to be similar restrictions.
>>
>> __
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe: 
>> openstack-dev-requ...@lists.openstack.org?subject:unsubscribe<http://openstack-dev-requ...@lists.openstack.org?subject:unsubscribe>
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: 
> openstack-dev-requ...@lists.openstack.org?subject:unsubscribe<http://openstack-dev-requ...@lists.openstack.org?subject:unsubscribe>
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-09 Thread Angus Lees
On Tue, 10 May 2016 at 05:19 Edward Leafe  wrote:

> On May 9, 2016, at 1:58 PM, Hayes, Graham  wrote:
>
> > This is not a "Go seems cool - lets go try that" decision from us - we
> > know we have a performance problem with one of our components, and we
> > have come to the conclusion that Go (or something like it) is the
> > solution.
>
> Whenever I hear claims that Python is “too slow for X”, I wonder what’s so
> special about X that makes it so much more demanding than, say, serving up
> YouTube. YouTube is written nearly entirely in Python, and has been for
> many, many years. The only parts that aren’t are those that were identified
> as particular performance bottlenecks, such as some parts of the encoding
> process. These were then written in C, which is drop-in compatible with
> Python using ctypes.
>

(Just in case there is any confusion here, no part of serving a youtube
*video* to users involves python.  I believe the *web UI* is/was generated
using python (and then cached aggressively, etc) - but I'm less familiar
with the HTML parts of youtube)

 - Gus
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-09 Thread Robert Collins
On 10 May 2016 at 06:58, Hayes, Graham  wrote:
>  From a deck about "the rise and fall of Bind 10" [0] -
>
>"Python is awesome, but too damn slow for DNS"

That slide deck doesn't provide any analysis on *what* that means -
latency? requests per second?
Dollars-per-millions-requests-per-second?

https://github.com/bundy-dns/bundy/blob/master/src/lib/python/bundy/server_common/bundy_server.py
<- they wrote their server around select(), which has been pretty much
deprecated for high performance - whether scale or latency (except
with very small connection counts) servers for decades...

tl;dr: I don't trust their ability to make the statement that Python
is too slow, because their code is failing a basic sniff test in this
space.

A UDP only DNS server could get away with select (in fact, it might
possibly be optimal), but something handling TCP will rapidly run into
terrible scaling problems - quadratic overheads - with select.

-Rob

-- 
Robert Collins 
Distinguished Technologist
HP Converged Cloud

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-09 Thread Rayson Ho
On Mon, May 9, 2016 at 8:21 PM, Ben Swartzlander 
wrote:
>
>
> If you think Perl is "nice" or "easy" you better get you head checked.
>

Each language has its strength and weakness, so just use the right tool for
the job. In fact the system at the investment bank worked quite well. If we
were to write the whole system in C/C++, there would be a lot more bugs and
a lot more lines of code. Parsing market data does not always need the
fastest code, so Perl served us (and I am sure it will continue to do its
job) very well.

Lastly, I think people that are insulting on mailing lists should get their
head checked first. No? :-)

Rayson

==
Open Grid Scheduler - The Official Open Source Grid Engine
http://gridscheduler.sourceforge.net/
http://gridscheduler.sourceforge.net/GridEngine/GridEngineCloud.html
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-09 Thread Ben Swartzlander

On 05/09/2016 07:43 PM, Rayson Ho wrote:

On Mon, May 9, 2016 at 2:35 PM, Ben Swartzlander > wrote:
 >>
 >> Perhaps for mature languages. But go is still finding its way, and that
 >> usually involves rapid changes that are needed faster than the
multi-year
 >> cycle Linux distributions offer.
 >
 >
 > This statement right here would be the nail in the coffin of this
idea if I were deciding. As a community we should not be building
software based on unstable platforms and languages.


Go is a production language used by Google, Dropbox, many many web
startups, and in fact Fortune 500 companies.

Using a package manager won't buy us anything, and like Clint raised,
the Linux distros are way too slow in picking up new Go releases. In
fact, the standard way of installing Rust also does not use a package
manager:

https://www.rust-lang.org/downloads.html


I never tried to compare Go to Rust. Rust also strikes me as a rather 
immature language that we shouldn't use. My point though is not to 
fixate on the language and start a religious war. I have bad things to 
say about every programming language in existence. My point is that 
immature unstable languages are a poor choice to pair with a stable 
mature language like Python (25 years old!) This is primarily due to 
cultural fit.


Only a small fraction of the human beings on Earth can write code at 
all. Of those, some fraction knows Python well enough to write and 
maintain complex software written in Python. Some other fraction knows 
$COOL_LANGUAGE well enough to do the same in that language. The 
intersection of these 2 groups is inevitably vanishingly small.




 > I have nothing against golang in particular but I strongly believe
that mixing 2 languages within a project is always the wrong decision

It would be nice if we only need to write code in one language. But in
the real world the "nicer" & "easier" languages like Python & Perl are
also the slower ones. I used to work for an investment bank, and our
system was developed in Perl, with performance critical part rewritten
in C/C++, so there really is nothing wrong with mixing languages. (But
if you ask me, I would strongly prefer Go than C++.)


If you think Perl is "nice" or "easy" you better get you head checked.

Also, C is not really a programming language -- it's more like assembly 
code with a portability layer. C++ is not worth mentioning as a language 
to write anything in given the better alternatives.


My argument boils down to: don't force OpenStack to accept code written 
in $COOL_LANGUAGE because we don't all want to have to learn that 
language in addition to Python. Sure some people will, and some probably 
already have learned it, but in a functioning development team, EVERYONE 
needs to speak the same language or you get the I-can't-review-that-code 
or I-can't-fix-that-bug syndrome.


OpenStack succeeds spectacularly at being modular -- with literally 
dozens of small projects that work with eachother and with other 
components in the ecosystem. Go start another project. Go use whatever 
language you want. If you don't want to use Python then don't call it 
OpenStack.


-Ben Swartzlander



Rayson

==
Open Grid Scheduler - The Official Open Source Grid Engine
http://gridscheduler.sourceforge.net/
http://gridscheduler.sourceforge.net/GridEngine/GridEngineCloud.html




 >
 > If you want to write code in a language that's not Python, go start
another project. Don't call it OpenStack. If it ends up being a better
implementation than the reference OpenStack Swift implementation, it
will win anyways and perhaps Swift will start to look more like the rest
of the projects in OpenStack with a standardized API and multiple
plugable implementations.
 >
 > -Ben Swartzlander
 >
 >
 >> Also worth noting, is that go is not a "language runtime" but a compiler
 >> (that happens to statically link in a runtime to the binaries it
 >> produces...).
 >>
 >> The point here though, is that the versions of Python that OpenStack
 >> has traditionally supported have been directly tied to what the Linux
 >> distributions carry in their repositories (case in point, Python 2.6
 >> was dropped from most things as soon as RHEL7 was available with Python
 >> 2.7). With Go, there might need to be similar restrictions.
 >>
 >>
__
 >> OpenStack Development Mailing List (not for usage questions)
 >> Unsubscribe:
openstack-dev-requ...@lists.openstack.org?subject:unsubscribe

 >> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
 >>
 >
 >
 >
__
 > OpenStack Development Mailing List (not for usage questions)
 > Unsubscribe:
openstack-dev-requ...@lists.openstack.org?subject:unsubscribe

Re: [openstack-dev] [tc] supporting Go

2016-05-09 Thread Robert Collins
On 10 May 2016 at 10:54, John Dickinson  wrote:
> On 9 May 2016, at 13:16, Gregory Haynes wrote:
>>
>> This is a bit of an aside but I am sure others are wondering the same
>> thing - Is there some info (specs/etherpad/ML thread/etc) that has more
>> details on the bottleneck you're running in to? Given that the only
>> clients of your service are the public facing DNS servers I am now even
>> more surprised that you're hitting a python-inherent bottleneck.
>
> In Swift's case, the summary is that it's hard[0] to write a network
> service in Python that shuffles data between the network and a block
> device (hard drive) and effectively utilizes all of the hardware
> available. So far, we've done very well by fork()'ing child processes,
...
> Initial results from a golang reimplementation of the object server in
> Python are very positive[1]. We're not proposing to rewrite Swift
> entirely in Golang. Specifically, we're looking at improving object
> replication time in Swift. This service must discover what data is on
> a drive, talk to other servers in the cluster about what they have,
> and coordinate any data sync process that's needed.
>
> [0] Hard, not impossible. Of course, given enough time, we can do
>  anything in a Turing-complete language, right? But we're not talking
>  about possible, we're talking about efficient tools for the job at
>  hand.
...

I'm glad you're finding you can get good results in (presumably)
clean, understandable code.

Given go's historically poor perfornance with multiple cores
(https://golang.org/doc/faq#Why_GOMAXPROCS) I'm going to presume the
major advantage is in the CSP programming model - something that
Twisted does very well: and frustratingly we've had numerous
discussions from folk in the Twisted world who see the pain we have
and want to help, but as a community we've consistently stayed with
eventlet, which has a threaded programming model - and threaded models
are poorly suited for the case here.

All of which to say, I disagree quite strongly that its hard to drive
a server's hardware at full capacity using Python. Using Python like
*we have been* - yes, certainly.

Thats not a reason to avoid golang - but if minimising the number of
languages in play is a thing we want to do, we should make sure we're
actually using the best facilities of our existing languages first!

On the Designate side, PyPy got a 40% performance improvement over
CPython for a benchmark of Twisted's DNS component 6 years ago - and
Twisted and PyPy have both moved forward a great deal since then
http://morepypy.blogspot.co.nz/2010/03/hello.html

-Rob

-- 
Robert Collins 
Distinguished Technologist
HP Converged Cloud

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-09 Thread Gregory Haynes

On Mon, May 9, 2016, at 03:54 PM, John Dickinson wrote:
> On 9 May 2016, at 13:16, Gregory Haynes wrote:
> >
> > This is a bit of an aside but I am sure others are wondering the same
> > thing - Is there some info (specs/etherpad/ML thread/etc) that has more
> > details on the bottleneck you're running in to? Given that the only
> > clients of your service are the public facing DNS servers I am now even
> > more surprised that you're hitting a python-inherent bottleneck.
> 
> In Swift's case, the summary is that it's hard[0] to write a network
> service in Python that shuffles data between the network and a block
> device (hard drive) and effectively utilizes all of the hardware
> available. So far, we've done very well by fork()'ing child processes,
> using cooperative concurrency via eventlet, and basic "write more
> efficient code" optimizations. However, when it comes down to it,
> managing all of the async operations across many cores and many drives
> is really hard, and there just isn't a good, efficient interface for
> that in Python.

This is a pretty big difference from hitting an unsolvable performance
issue in the language and instead is a case of language preference -
which is fine. I don't really want to fall in to the language-comparison
trap, but I think more detailed reasoning for why it is preferable over
python in specific use cases we have hit is good info to include /
discuss in the document you're drafting :). Essentially its a matter of
weighing the costs (which lots of people have hit on so I won't) with
the potential benefits and so unless the benefits are made very clear
(especially if those benefits are technical) its pretty hard to evaluate
IMO.

There seemed to be an assumption in some of the designate rewrite posts
that there is some language-inherent performance issue causing a
bottleneck. If this does actually exist then that is a good reason for
rewriting in another language and is something that would be very useful
to clearly document as a case where we support this type of thing. I am
highly suspicious that this is the case though, but I am trying hard to
keep an open mind...

> 
> Initial results from a golang reimplementation of the object server in
> Python are very positive[1]. We're not proposing to rewrite Swift
> entirely in Golang. Specifically, we're looking at improving object
> replication time in Swift. This service must discover what data is on
> a drive, talk to other servers in the cluster about what they have,
> and coordinate any data sync process that's needed.
> 
> [0] Hard, not impossible. Of course, given enough time, we can do
>  anything in a Turing-complete language, right? But we're not talking
>  about possible, we're talking about efficient tools for the job at
>  hand.

Sorry to be a pedant but that is just plain false - there are plenty of
intractable problems.

> 
> [1] http://d.not.mn/python_vs_golang_gets.png and
>  http://d.not.mn/python_vs_golang_puts.png
> 
> 
> --John

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-09 Thread Thomas Goirand
On 05/09/2016 09:51 PM, Clint Byrum wrote:
> There are all kinds of reasons to pick languages, but I think it would
> be foolish of OpenStack to ignore the phenomenon of actual deployers
> choosing Go to address OpenStack's shortcomings. Whether they're right,
> I'm not sure, but I do know that the community wants to invest in things
> that aren't Python, and so, that fact should at least be considered
> fully before making any long term decisions.

Let's port all of OpenStack to C# ... ;)


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-09 Thread Thomas Goirand
On 05/09/2016 01:33 PM, Hayes, Graham wrote:
> On 08/05/2016 10:21, Thomas Goirand wrote:
>> On 05/04/2016 01:29 AM, Hayes, Graham wrote:
>>> On 03/05/2016 17:03, John Dickinson wrote:
 TC,

 In reference to 
 http://lists.openstack.org/pipermail/openstack-dev/2016-May/093680.html 
 and Thierry's reply, I'm currently drafting a TC resolution to update 
 http://governance.openstack.org/resolutions/20150901-programming-languages.html
  to include Go as a supported language in OpenStack projects.

 As a starting point, what would you like to see addressed in the document 
 I'm drafting?

 --John



>>>
>>> Great - I was about to write a thread like this :)
>>>
>>> Designate is looking to move a single component of ours to Go - and we
>>> were wondering what was the best way to do it.
> 
>> We discussed about this during the summit. You told me that the issue
>> was a piece of code that needed optimization, to which I replied that
>> probably, a C++ .so extension in a Python module is probably what you
>> are looking for (with the advice of not using CFFI which is sometimes
>> breaking things in distros).
>>
>> Did you think about this other possibility, and did you discuss it with
>> your team?
> 
> We had a brief discussion about it, and we going to try a new POC in
> C/C++ to validate it, but then this thread (and related TC policy) were
> proposed.
> 
> If Golang is going to be a supported language, we would much rather
> stick with one of the official OpenStack languages that suits our
> use case instead of getting an exemption for another similar language.

If I'm not mistaking, a C/C++ extension for Python is already valid and
accepted (writing things in C one of the possibilities that the Python
language offers, so i don't see why it would be forbidden...). So why not?

On 05/09/2016 08:14 PM, Hayes, Graham wrote:
> We won't be replacing any particular function, we will be replacing a
> whole service.

That's IMO where the problem stands. If you're attempting to rewrite the
service fully just because it's slow, that probably means that you don't
even know *where* it's slow. Have you tried running a profiler?

On 05/09/2016 08:14 PM, Hayes, Graham wrote:
> There is no auth (or inter-service communications) from this
> component, all it does it query the DB and spit out DNS packets.

And just for that, you'd need Go? Writing this in C is IMO very simple
(disclosure: I don't know Go, but I do know C/C++). The MySQL client lib
is really easy to use, and writing a few UDP packet shouldn't be hard
either...

Or is it more complicated than just this? Hard to tell, as I'm not sure
which part of your code is slowing the whole operation down...

Cheers,

Thomas Goirand (zigo)


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-09 Thread John Dickinson
On 9 May 2016, at 13:16, Gregory Haynes wrote:
>
> This is a bit of an aside but I am sure others are wondering the same
> thing - Is there some info (specs/etherpad/ML thread/etc) that has more
> details on the bottleneck you're running in to? Given that the only
> clients of your service are the public facing DNS servers I am now even
> more surprised that you're hitting a python-inherent bottleneck.

In Swift's case, the summary is that it's hard[0] to write a network
service in Python that shuffles data between the network and a block
device (hard drive) and effectively utilizes all of the hardware
available. So far, we've done very well by fork()'ing child processes,
using cooperative concurrency via eventlet, and basic "write more
efficient code" optimizations. However, when it comes down to it,
managing all of the async operations across many cores and many drives
is really hard, and there just isn't a good, efficient interface for
that in Python.

Initial results from a golang reimplementation of the object server in
Python are very positive[1]. We're not proposing to rewrite Swift
entirely in Golang. Specifically, we're looking at improving object
replication time in Swift. This service must discover what data is on
a drive, talk to other servers in the cluster about what they have,
and coordinate any data sync process that's needed.

[0] Hard, not impossible. Of course, given enough time, we can do
 anything in a Turing-complete language, right? But we're not talking
 about possible, we're talking about efficient tools for the job at
 hand.

[1] http://d.not.mn/python_vs_golang_gets.png and
 http://d.not.mn/python_vs_golang_puts.png


--John






signature.asc
Description: OpenPGP digital signature
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-09 Thread Sean M. Collins
Hayes, Graham wrote:
> Sure - the Designate team could maintain 2 copies of our DNS server,
> one in python as a reference, and one externally in Golang / C / C++ /
> Rust / $language, which would in reality need to be used by anything
> over a medium size deployment.
> 
> That seems less than ideal for our users though.

This is exactly what every OpenStack project does. Provide an API
and a way for different implementations to exist under the same API.

So, why does this need to be in the OpenStack namespace?


-- 
Sean M. Collins

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-09 Thread Joshua Harlow

Clint Byrum wrote:

Excerpts from Edward Leafe's message of 2016-05-09 12:17:40 -0700:

On May 9, 2016, at 1:58 PM, Hayes, Graham  wrote:


This is not a "Go seems cool - lets go try that" decision from us - we
know we have a performance problem with one of our components, and we
have come to the conclusion that Go (or something like it) is the
solution.

Whenever I hear claims that Python is “too slow for X”, I wonder what’s so 
special about X that makes it so much more demanding than, say, serving up 
YouTube. YouTube is written nearly entirely in Python, and has been for many, 
many years. The only parts that aren’t are those that were identified as 
particular performance bottlenecks, such as some parts of the encoding process. 
These were then written in C, which is drop-in compatible with Python using 
ctypes.



NO, we should paint it yellow!



I like blue.


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-09 Thread Gregory Haynes

On Mon, May 9, 2016, at 01:01 PM, Hayes, Graham wrote:
> On 09/05/2016 20:46, Adam Young wrote:
> > On 05/09/2016 02:14 PM, Hayes, Graham wrote:
> >> On 09/05/2016 19:09, Fox, Kevin M wrote:
> >>> I think you'll find that being able to embed a higher performance 
> >>> language inside python will be much easier to do for optimizing a 
> >>> function or two rather then deal with having a separate server have to be 
> >>> created, authentication be added between the two, and 
> >>> marshalling/unmarshalling the data to and from it to optimize one little 
> >>> piece. Last I heard, you couldn't just embed go in python. C/C++ is 
> >>> pretty easy to do. Maybe I'm wrong and its possible to embed go now. 
> >>> Someone, please chime in if you know of a good way.
> >>>
> >>> Thanks,
> >>> Kevin
> >> We won't be replacing any particular function, we will be replacing a
> >> whole service.
> >>
> >> There is no auth (or inter-service communications) from this component,
> >> all it does it query the DB and spit out DNS packets.
> >>
> >> I can't talk for what swift are doing, but we have a very targeted scope
> >> for our Go work.
> >>
> >> - Graham
> > I'm assuming you have a whole body of work discussing Bind and why it is
> > not viable for these cases.  Is there a concise version of the discussion?
> 
> Because we work with multiple DNS servers. This is a component that
> sits between Designate and the end user DNS servers (like Bind,
> PowerDNS, NSD and others, or service providers like Akamai or DynECT)
> 
> The best solution for use to push out DNS information to other DNS
> servers was to us the DNS protocol, so we have a small DNS server that
> knows how to get zones and recordsets from our DB, and send them as
> zone transfers to the end user facing servers.
> 
> The design discussion happened 2 years ago now - this blueprint as the 
> most detail [0].
> 
> Ironically the entire conversation was driven by a need to scale the
> Bind9 backend by supporting an async API.
> 
> 0 - https://blueprints.launchpad.net/designate/+spec/mdns-master

This is a bit of an aside but I am sure others are wondering the same
thing - Is there some info (specs/etherpad/ML thread/etc) that has more
details on the bottleneck you're running in to? Given that the only
clients of your service are the public facing DNS servers I am now even
more surprised that you're hitting a python-inherent bottleneck.


Cheers,
Greg

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-09 Thread Hayes, Graham
On 09/05/2016 20:46, Adam Young wrote:
> On 05/09/2016 02:14 PM, Hayes, Graham wrote:
>> On 09/05/2016 19:09, Fox, Kevin M wrote:
>>> I think you'll find that being able to embed a higher performance language 
>>> inside python will be much easier to do for optimizing a function or two 
>>> rather then deal with having a separate server have to be created, 
>>> authentication be added between the two, and marshalling/unmarshalling the 
>>> data to and from it to optimize one little piece. Last I heard, you 
>>> couldn't just embed go in python. C/C++ is pretty easy to do. Maybe I'm 
>>> wrong and its possible to embed go now. Someone, please chime in if you 
>>> know of a good way.
>>>
>>> Thanks,
>>> Kevin
>> We won't be replacing any particular function, we will be replacing a
>> whole service.
>>
>> There is no auth (or inter-service communications) from this component,
>> all it does it query the DB and spit out DNS packets.
>>
>> I can't talk for what swift are doing, but we have a very targeted scope
>> for our Go work.
>>
>> - Graham
> I'm assuming you have a whole body of work discussing Bind and why it is
> not viable for these cases.  Is there a concise version of the discussion?

Because we work with multiple DNS servers. This is a component that
sits between Designate and the end user DNS servers (like Bind,
PowerDNS, NSD and others, or service providers like Akamai or DynECT)

The best solution for use to push out DNS information to other DNS
servers was to us the DNS protocol, so we have a small DNS server that
knows how to get zones and recordsets from our DB, and send them as
zone transfers to the end user facing servers.

The design discussion happened 2 years ago now - this blueprint as the 
most detail [0].

Ironically the entire conversation was driven by a need to scale the
Bind9 backend by supporting an async API.

0 - https://blueprints.launchpad.net/designate/+spec/mdns-master
>
>>
>>> ________________
>>> From: Hayes, Graham [graham.ha...@hpe.com]
>>> Sent: Monday, May 09, 2016 4:33 AM
>>> To: OpenStack Development Mailing List (not for usage questions)
>>> Subject: Re: [openstack-dev] [tc] supporting Go
>>>
>>> On 08/05/2016 10:21, Thomas Goirand wrote:
>>>> On 05/04/2016 01:29 AM, Hayes, Graham wrote:
>>>>> On 03/05/2016 17:03, John Dickinson wrote:
>>>>>> TC,
>>>>>>
>>>>>> In reference to 
>>>>>> http://lists.openstack.org/pipermail/openstack-dev/2016-May/093680.html 
>>>>>> and Thierry's reply, I'm currently drafting a TC resolution to update 
>>>>>> http://governance.openstack.org/resolutions/20150901-programming-languages.html
>>>>>>  to include Go as a supported language in OpenStack projects.
>>>>>>
>>>>>> As a starting point, what would you like to see addressed in the 
>>>>>> document I'm drafting?
>>>>>>
>>>>>> --John
>>>>>>
>>>>>>
>>>>>>
>>>>> Great - I was about to write a thread like this :)
>>>>>
>>>>> Designate is looking to move a single component of ours to Go - and we
>>>>> were wondering what was the best way to do it.
>>>> We discussed about this during the summit. You told me that the issue
>>>> was a piece of code that needed optimization, to which I replied that
>>>> probably, a C++ .so extension in a Python module is probably what you
>>>> are looking for (with the advice of not using CFFI which is sometimes
>>>> breaking things in distros).
>>>>
>>>> Did you think about this other possibility, and did you discuss it with
>>>> your team?
>>> We had a brief discussion about it, and we going to try a new POC in
>>> C/C++ to validate it, but then this thread (and related TC policy) were
>>> proposed.
>>>
>>> If Golang is going to be a supported language, we would much rather
>>> stick with one of the official OpenStack languages that suits our
>>> use case instead of getting an exemption for another similar language.
>>>
>>> When we spoke at the summit, I was under the impression that the feature
>>> branch in swift was not going to be merged to master, and we would have
>>> to get an exemption from the TC anyway - which we could have used to get
>>> C / C++.
>>>
>>> The team also much preferred the idea of Golang - we do 

Re: [openstack-dev] [tc] supporting Go

2016-05-09 Thread Ed Leafe
On May 9, 2016, at 2:52 PM, Clint Byrum  wrote:

>> Whenever I hear claims that Python is “too slow for X”, I wonder what’s so 
>> special about X that makes it so much more demanding than, say, serving up 
>> YouTube. YouTube is written nearly entirely in Python, and has been for 
>> many, many years. The only parts that aren’t are those that were identified 
>> as particular performance bottlenecks, such as some parts of the encoding 
>> process. These were then written in C, which is drop-in compatible with 
>> Python using ctypes.
> 
> NO, we should paint it yellow!

Not even close to bikeshedding. C extensions live all throughout the Python 
world, and are not the equivalent of a completely new language to the 
ecosystem. And the point was to simply speed up the bottleneck, not the entire 
project.

-- Ed Leafe






__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-09 Thread Clint Byrum
Excerpts from Edward Leafe's message of 2016-05-09 12:17:40 -0700:
> On May 9, 2016, at 1:58 PM, Hayes, Graham  wrote:
> 
> > This is not a "Go seems cool - lets go try that" decision from us - we
> > know we have a performance problem with one of our components, and we
> > have come to the conclusion that Go (or something like it) is the
> > solution.
> 
> Whenever I hear claims that Python is “too slow for X”, I wonder what’s so 
> special about X that makes it so much more demanding than, say, serving up 
> YouTube. YouTube is written nearly entirely in Python, and has been for many, 
> many years. The only parts that aren’t are those that were identified as 
> particular performance bottlenecks, such as some parts of the encoding 
> process. These were then written in C, which is drop-in compatible with 
> Python using ctypes.
> 

NO, we should paint it yellow!

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tc] supporting Go

2016-05-09 Thread Clint Byrum
Excerpts from Hayes, Graham's message of 2016-05-09 11:58:38 -0700:
> On 09/05/2016 19:39, Ben Swartzlander wrote:
> > On 05/09/2016 02:15 PM, Clint Byrum wrote:
> >> Excerpts from Pete Zaitcev's message of 2016-05-09 08:52:16 -0700:
> >>> On Mon, 9 May 2016 09:06:02 -0400
> >>> Rayson Ho  wrote:
> >>>
>  Since the Go toolchain is pretty self-contained, most people just follow
>  the official instructions to get it installed... by a one-step:
> 
>  # tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz
> >>>
> >>> I'm pretty certain the humanity has moved on from this sort of thing.
> >>> Nowadays "most people" use packaged language runtimes that come with
> >>> the Linux they're running.
> >>>
> >>
> >> Perhaps for mature languages. But go is still finding its way, and that
> >> usually involves rapid changes that are needed faster than the multi-year
> >> cycle Linux distributions offer.
> >
> > This statement right here would be the nail in the coffin of this idea
> > if I were deciding. As a community we should not be building software
> > based on unstable platforms and languages.
> >
> > I have nothing against golang in particular but I strongly believe that
> > mixing 2 languages within a project is always the wrong decision, and
> > doubly so if one of those languages is a niche language. The reason is
> > simple: it's hard enough to find programmers who are competent in one
> > language -- finding programmers who know both languages well will be
> > nearly impossible. You'll end up with core reviewers who can't review
> > half of the code and developers who can only fix bugs in half the code.
> >
> > If you want to write code in a language that's not Python, go start
> > another project. Don't call it OpenStack. If it ends up being a better
> > implementation than the reference OpenStack Swift implementation, it
> > will win anyways and perhaps Swift will start to look more like the rest
> > of the projects in OpenStack with a standardized API and multiple
> > plugable implementations.
> >
> 
> Sure - the Designate team could maintain 2 copies of our DNS server,
> one in python as a reference, and one externally in Golang / C / C++ /
> Rust / $language, which would in reality need to be used by anything
> over a medium size deployment.
> 
> That seems less than ideal for our users though.
> 
> This is not a "Go seems cool - lets go try that" decision from us - we
> know we have a performance problem with one of our components, and we
> have come to the conclusion that Go (or something like it) is the
> solution.
> 
>  From a deck about "the rise and fall of Bind 10" [0] -
> 
>"Python is awesome, but too damn slow for DNS"
> 
> 0 - 
> https://ripe68.ripe.net/presentations/208-The_Decline_and_Fall_of_BIND_10.pdf
> 

I love this, first a bikeshed statement: "Python is too damn slow for
DNS", and a few lines later "Perfect bikeshed topic".

There are all kinds of reasons to pick languages, but I think it would
be foolish of OpenStack to ignore the phenomenon of actual deployers
choosing Go to address OpenStack's shortcomings. Whether they're right,
I'm not sure, but I do know that the community wants to invest in things
that aren't Python, and so, that fact should at least be considered
fully before making any long term decisions.

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


  1   2   >