Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: OpenStack: Dev

Fwd: Nodejs in horizon

 

 

OpenStack dev RSS feed   Index | Next | Previous | View Threaded


semyazz at gmail

May 25, 2012, 5:41 AM

Post #1 of 19 (356 views)
Permalink
Fwd: Nodejs in horizon

Hello,

I don't want to be rude, but fast research about point *3c* and sockets => PyPi
search<http://pypi.python.org/pypi?%3Aaction=search&term=socket.io&submit=search>

- http://pypi.python.org/pypi/SocketTornad.IO/
- http://pypi.python.org/pypi/TornadIO2/0.0.3 ,
https://github.com/MrJoes/tornadio2
- http://pypi.python.org/pypi/django-socketio/0.3.3
- http://mrjoes.github.com/2011/12/15/sockjs-bench.html

How mature are those projects? I don't know. I'm not an expert in python.
I'm just trying to find alternatives to Node.js if almost everything is in
python. I'm just testing Openstack and right now I'm trying to add
something to nova, but I really like horizon and if it's possible, I'd like
to avoid node.js. I'm not a fan of this technology even if it's popular and
fast, because I just have some doubts about Javascript and its
maintainability.

Decision belongs to you guys who really develop this part of Openstack.

On Fri, May 25, 2012 at 12:27 PM, Gabriel Hurley
<Gabriel.Hurley [at] nebula>wrote:

> (...)
>
>
> *3c.* Node.js vs. Ruby: Looking out later in this release cycle and into
> future cycles, there are capabilities that node.js can facilitate which
> Ruby (or Python for that matter) simply can't. Node.js has proven itself to
> be stupendously capable in terms of real-time communications and massive
> parallelism. Node libraries like socket.io are quickly becoming part of
> the permanent landscape on the web. So while it may seem silly to use
> node.js just for CSS management here, in the longer term we have the
> potential to leverage it immensely.
>
> 4. LESS for dev, commit compiled files: I veto'd this one in Horizon's
> discussions. I've played this game being a committer for Django when we
> tried to maintain both "development" and "production" versions of the
> admin's javascript files. It was a nightmare trying to do due diligence on
> contributions to make sure they were always in sync, etc. It's also an
> added burden on the developers to understand this process and always adhere
> to updating both files. All in all, not a scenario I support in any way
> shape or form.
>
> 5. Client-side LESS vs. server-side LESS: If it is determined to be an
> unreasonable burden to make node.js a hard requirement, I will admit we
> could potentially hack a way to make node.js VERY STRONGLY recommended but
> optional for those who simply will not/cannot install it. I, personally,
> would never deploy LESS's client-side compilation code since it's a
> significantly worse experience, but that's just me. That said, see point 3c
> for why we'll likely have this discussion again in the future...
>
> Finding the right balance is important here.
>
> All the best,
>
> - Gabriel
>
>
>
> > -----Original Message-----
> > From: openstack-bounces+gabriel.hurley=nebula.com [at] lists
> > [mailto:openstack-
> > bounces+gabriel.hurley=nebula.com [at] lists] On Behalf Of
> > Thierry Carrez
> > Sent: Friday, May 25, 2012 1:48 AM
> > To: openstack [at] lists
> > Subject: Re: [Openstack] Nodejs in horizon
> >
> > Devin Carlen wrote:
> > > -1 to introducing formal processes around this. This will happen from
> > > time to time. Development may be briefly impacted on other platforms
> > > but hindering innovation and telling developers that they are
> > > responsible for package availability across every distro is not
> healthy.
> >
> > The PPB actually already ruled that new dependencies *need* to be
> > discussed on the mailing-list prior to their introduction, if only so
> that
> > downstream stakeholders learn about it and can work to solve it.
> >
> > Like others said, new dependencies impact our whole ecosystem and most
> > of the time a small amount of discussion can go a long way in choosing a
> > solution that is good for everyone, rather than firefighting after the
> fact.
> >
> > You are not responsible for package availability across every distro, but
> > you're responsible for playing as nice with them as you can. That's the
> > "Facilitation of downstream distribution" obligation of core
> projects[1], an
> > obligation that the PPB can enforce.
> >
> > [1] http://wiki.openstack.org/ProjectTypes
> >
> > Regards,
> >
> > --
> > Thierry Carrez (ttx)
> > Release Manager, OpenStack
> >
> > _______________________________________________
> > Mailing list: https://launchpad.net/~openstack
> > Post to : openstack [at] lists
> > Unsubscribe : https://launchpad.net/~openstack
> > More help : https://help.launchpad.net/ListHelp
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack [at] lists
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp
>

*
*




--
*Semy*


jaypipes at gmail

May 25, 2012, 6:20 AM

Post #2 of 19 (351 views)
Permalink
Re: Fwd: Nodejs in horizon [In reply to]

On 05/25/2012 08:41 AM, Simon G. wrote:
> Hello,
>
> I don't want to be rude, but fast research about point *3c* and sockets
> => PyPi search
> <http://pypi.python.org/pypi?%3Aaction=search&term=socket.io&submit=search>
>
> * http://pypi.python.org/pypi/SocketTornad.IO/
> * http://pypi.python.org/pypi/TornadIO2/0.0.3 ,
> https://github.com/MrJoes/tornadio2
> * http://pypi.python.org/pypi/django-socketio/0.3.3
> * http://mrjoes.github.com/2011/12/15/sockjs-bench.html
>
> How mature are those projects? I don't know. I'm not an expert in
> python. I'm just trying to find alternatives to Node.js if almost
> everything is in python. I'm just testing Openstack and right now I'm
> trying to add something to nova, but I really like horizon and if it's
> possible, I'd like to avoid node.js. I'm not a fan of this technology
> even if it's popular and fast, because I just have some doubts about
> Javascript and its maintainability.

Hi Simon,

socket.io is a Javascript library :) 3 of the 4 projects you reference
above use socket.io.

Best,
-jay

_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


semyazz at gmail

May 25, 2012, 7:40 AM

Post #3 of 19 (357 views)
Permalink
Re: Fwd: Nodejs in horizon [In reply to]

Maybe I've misuderstood something, but I've tried to give examples of other
backends than node.js which can make use of mentioned before socket.io and
can be used to implement realtime communication. I just wanted to minimize
use of node.js. Hmm... I'm still talking about realtime communication, but
it was only mentioned as an example and it's not even listed as a feature
anywhere. So maybe my part in this topic is pointless. I'll be silent from
now :)

Cheers,

On Fri, May 25, 2012 at 3:20 PM, Jay Pipes <jaypipes [at] gmail> wrote:

> On 05/25/2012 08:41 AM, Simon G. wrote:
>
>> Hello,
>>
>> I don't want to be rude, but fast research about point *3c* and sockets
>> => PyPi search
>> <http://pypi.python.org/pypi?%**3Aaction=search&term=socket.**
>> io&submit=search<http://pypi.python.org/pypi?%3Aaction=search&term=socket.io&submit=search>
>> >
>>
>> * http://pypi.python.org/pypi/**SocketTornad.IO/<http://pypi.python.org/pypi/SocketTornad.IO/>
>> * http://pypi.python.org/pypi/**TornadIO2/0.0.3<http://pypi.python.org/pypi/TornadIO2/0.0.3>,
>> https://github.com/MrJoes/**tornadio2<https://github.com/MrJoes/tornadio2>
>> * http://pypi.python.org/pypi/**django-socketio/0.3.3<http://pypi.python.org/pypi/django-socketio/0.3.3>
>> * http://mrjoes.github.com/2011/**12/15/sockjs-bench.html<http://mrjoes.github.com/2011/12/15/sockjs-bench.html>
>>
>>
>> How mature are those projects? I don't know. I'm not an expert in
>> python. I'm just trying to find alternatives to Node.js if almost
>> everything is in python. I'm just testing Openstack and right now I'm
>> trying to add something to nova, but I really like horizon and if it's
>> possible, I'd like to avoid node.js. I'm not a fan of this technology
>> even if it's popular and fast, because I just have some doubts about
>> Javascript and its maintainability.
>>
>
> Hi Simon,
>
> socket.io is a Javascript library :) 3 of the 4 projects you reference
> above use socket.io.
>
> Best,
> -jay
>
>
> ______________________________**_________________
> Mailing list: https://launchpad.net/~**openstack<https://launchpad.net/%7Eopenstack>
> Post to : openstack [at] lists
> Unsubscribe : https://launchpad.net/~**openstack<https://launchpad.net/%7Eopenstack>
> More help : https://help.launchpad.net/**ListHelp<https://help.launchpad.net/ListHelp>
>



--
*Semy*


john.postlethwait at nebula

May 25, 2012, 9:22 AM

Post #4 of 19 (353 views)
Permalink
Re: Fwd: Nodejs in horizon [In reply to]

Hi Everyone,

Sorry if I've missed anything below, this thread has become rather fragmented and messy (at least in my email clients) but I will try to address the main points I have seen so far:


* Just so that everyone is aware, the lessc parser that is bundled in Horizon, while executable, is NOT a binary. It is, in fact, just a 140 line JS file, you can see the code here: https://review.openstack.org/#/c/7367/4/bin/less/lessc
* The reason I have bundled it within the Horizon code, as Gabriel mentioned, is to assuage any version mismatches or install issues with LESS itself that may arise from having yet another dependency on top of NodeJS that needs manual steps to install. Also, the LESS package that exists for Ubuntu is a year out of date, and other distributions do not even have packages for it. I would love if we could rely on the OS' packages to assuage this dependency, but we cannot, so this is the simplest and best-working solution I could think of. It will be no more difficult to maintain than jQuery, or Bootstrap, in the Horizon code-base...
* As for distribution support, Node can be installed on just about anything, see here: https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
* As to the concerns about "it not being Python" or "JavaScript has been abused." Well, all I can say to that is no, it is not Python, and yes, some developers write terrible and abusive code with JavaScript. I'm sure I could find horrid/abusive Python somewhere as well, but doing so would not preclude our reasons to use it in OpenStack. Misuse of a tool is not a reason to fear the tool itself, if that were so none of us would use any language, ever. Not to mention, we already use a ton of JS in Horizon... I'm not introducing JavaScript to Horizon for the first time or anything here.

I'm sure I've missed some good points, but this thread is a mess and is difficult to sort through... :P

-John Postlethwait

________________________________
From: openstack-bounces+john.postlethwait=nebula.com [at] lists [openstack-bounces+john.postlethwait=nebula.com [at] lists] on behalf of Simon G. [semyazz [at] gmail]
Sent: Friday, May 25, 2012 7:40 AM
To: Jay Pipes
Cc: openstack [at] lists
Subject: Re: [Openstack] Fwd: Nodejs in horizon

Maybe I've misuderstood something, but I've tried to give examples of other backends than node.js which can make use of mentioned before socket.io<http://socket.io> and can be used to implement realtime communication. I just wanted to minimize use of node.js. Hmm... I'm still talking about realtime communication, but it was only mentioned as an example and it's not even listed as a feature anywhere. So maybe my part in this topic is pointless. I'll be silent from now :)

Cheers,

On Fri, May 25, 2012 at 3:20 PM, Jay Pipes <jaypipes [at] gmail<mailto:jaypipes [at] gmail>> wrote:
On 05/25/2012 08:41 AM, Simon G. wrote:
Hello,

I don't want to be rude, but fast research about point *3c* and sockets
=> PyPi search
<http://pypi.python.org/pypi?%3Aaction=search&term=socket.io&submit=search>

* http://pypi.python.org/pypi/SocketTornad.IO/
* http://pypi.python.org/pypi/TornadIO2/0.0.3 ,
https://github.com/MrJoes/tornadio2
* http://pypi.python.org/pypi/django-socketio/0.3.3
* http://mrjoes.github.com/2011/12/15/sockjs-bench.html


How mature are those projects? I don't know. I'm not an expert in
python. I'm just trying to find alternatives to Node.js if almost
everything is in python. I'm just testing Openstack and right now I'm
trying to add something to nova, but I really like horizon and if it's
possible, I'd like to avoid node.js. I'm not a fan of this technology
even if it's popular and fast, because I just have some doubts about
Javascript and its maintainability.

Hi Simon,

socket.io<http://socket.io> is a Javascript library :) 3 of the 4 projects you reference above use socket.io<http://socket.io>.

Best,
-jay


_______________________________________________
Mailing list: https://launchpad.net/~openstack<https://launchpad.net/%7Eopenstack>
Post to : openstack [at] lists<mailto:openstack [at] lists>
Unsubscribe : https://launchpad.net/~openstack<https://launchpad.net/%7Eopenstack>
More help : https://help.launchpad.net/ListHelp



--
Semy


Gabriel.Hurley at nebula

May 25, 2012, 10:54 AM

Post #5 of 19 (355 views)
Permalink
Re: Fwd: Nodejs in horizon [In reply to]

To elucidate a few more points from people's responses so far:


* All the python socket.io backends are immature projects, and there's a GAPING flaw with them all: WSGI (the interface between web servers and Python) doesn't support the handshake features that websocket communication requires. The WSGI standard was drafted before websockets was a thing. There's a gevent lib that supports it, but it's also immature and doesn't play nice with Apache, etc. Deployment will get *really* iteresting trying to use socket.io with Python. I've tried. ;-)

* Pypy *is* fast (I know several of the main contributors) but it's as big a decision to use Pypy as it is to use node, but that only affects performance. It doesn't make Django any more suited to real-time communication. Pypy is also a major new dependency that's not packaged and it changes a lot of things. It's also used by several orders of magnitude fewer people than node.js currently, so security there is a whole different concern.

* Tornado and Twisted are both non-blocking web servers in Python, but both projects have serious peculiarities which we could dive into separately. And ultimately they're not tools any of the Horizon contributors I've talked to so far are interested in working with, which in an open source community is pretty much a death knell for that solution.

* John P's point about Javascript already being a core language used in Horizon is well taken. I get the "server-side javascript is different" mindset, but language-bashing for the sake of "I don't like javascript" is no more helpful than Python people bashing Ruby. The fact is that Javascript as a language is extremely similar to Python in its syntax and construction (I often write my JS to PEP8 standards), and though it's not as readable as Python (what is?), there's no reason JS code is inherently bad. Bad programmers write bad code. Bad frameworks encourage bad code. Node.js suffers from neither.

* I'm 100% in favor of code-bundling only being a short-term solution. When a reasonable number of distros package things like LESS, dropping our bundled version in favor of a properly-versioned package would be awesome. The fewer things to maintain the better.

All the best,


- Gabriel

From: openstack-bounces+gabriel.hurley=nebula.com [at] lists [mailto:openstack-bounces+gabriel.hurley=nebula.com [at] lists] On Behalf Of John Postlethwait
Sent: Friday, May 25, 2012 9:23 AM
To: Simon G.; Jay Pipes
Cc: openstack [at] lists
Subject: Re: [Openstack] Fwd: Nodejs in horizon

Hi Everyone,

Sorry if I've missed anything below, this thread has become rather fragmented and messy (at least in my email clients) but I will try to address the main points I have seen so far:


* Just so that everyone is aware, the lessc parser that is bundled in Horizon, while executable, is NOT a binary. It is, in fact, just a 140 line JS file, you can see the code here: https://review.openstack.org/#/c/7367/4/bin/less/lessc
* The reason I have bundled it within the Horizon code, as Gabriel mentioned, is to assuage any version mismatches or install issues with LESS itself that may arise from having yet another dependency on top of NodeJS that needs manual steps to install. Also, the LESS package that exists for Ubuntu is a year out of date, and other distributions do not even have packages for it. I would love if we could rely on the OS' packages to assuage this dependency, but we cannot, so this is the simplest and best-working solution I could think of. It will be no more difficult to maintain than jQuery, or Bootstrap, in the Horizon code-base...
* As for distribution support, Node can be installed on just about anything, see here: https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
* As to the concerns about "it not being Python" or "JavaScript has been abused." Well, all I can say to that is no, it is not Python, and yes, some developers write terrible and abusive code with JavaScript. I'm sure I could find horrid/abusive Python somewhere as well, but doing so would not preclude our reasons to use it in OpenStack. Misuse of a tool is not a reason to fear the tool itself, if that were so none of us would use any language, ever. Not to mention, we already use a ton of JS in Horizon... I'm not introducing JavaScript to Horizon for the first time or anything here.

I'm sure I've missed some good points, but this thread is a mess and is difficult to sort through... :P

-John Postlethwait

________________________________
From: openstack-bounces+john.postlethwait=nebula.com [at] lists<mailto:openstack-bounces+john.postlethwait=nebula.com [at] lists> [openstack-bounces+john.postlethwait=nebula.com [at] lists] on behalf of Simon G. [semyazz [at] gmail]
Sent: Friday, May 25, 2012 7:40 AM
To: Jay Pipes
Cc: openstack [at] lists<mailto:openstack [at] lists>
Subject: Re: [Openstack] Fwd: Nodejs in horizon
Maybe I've misuderstood something, but I've tried to give examples of other backends than node.js which can make use of mentioned before socket.io<http://socket.io> and can be used to implement realtime communication. I just wanted to minimize use of node.js. Hmm... I'm still talking about realtime communication, but it was only mentioned as an example and it's not even listed as a feature anywhere. So maybe my part in this topic is pointless. I'll be silent from now :)

Cheers,
On Fri, May 25, 2012 at 3:20 PM, Jay Pipes <jaypipes [at] gmail<mailto:jaypipes [at] gmail>> wrote:
On 05/25/2012 08:41 AM, Simon G. wrote:
Hello,

I don't want to be rude, but fast research about point *3c* and sockets
=> PyPi search
<http://pypi.python.org/pypi?%3Aaction=search&term=socket.io&submit=search>

* http://pypi.python.org/pypi/SocketTornad.IO/
* http://pypi.python.org/pypi/TornadIO2/0.0.3 ,
https://github.com/MrJoes/tornadio2
* http://pypi.python.org/pypi/django-socketio/0.3.3
* http://mrjoes.github.com/2011/12/15/sockjs-bench.html


How mature are those projects? I don't know. I'm not an expert in
python. I'm just trying to find alternatives to Node.js if almost
everything is in python. I'm just testing Openstack and right now I'm
trying to add something to nova, but I really like horizon and if it's
possible, I'd like to avoid node.js. I'm not a fan of this technology
even if it's popular and fast, because I just have some doubts about
Javascript and its maintainability.

Hi Simon,

socket.io<http://socket.io> is a Javascript library :) 3 of the 4 projects you reference above use socket.io<http://socket.io>.

Best,
-jay


_______________________________________________
Mailing list: https://launchpad.net/~openstack<https://launchpad.net/%7Eopenstack>
Post to : openstack [at] lists<mailto:openstack [at] lists>
Unsubscribe : https://launchpad.net/~openstack<https://launchpad.net/%7Eopenstack>
More help : https://help.launchpad.net/ListHelp



--
Semy


ayoung at redhat

May 25, 2012, 3:56 PM

Post #6 of 19 (350 views)
Permalink
Re: Fwd: Nodejs in horizon [In reply to]

We are using Eventlet as a Webserver, not apache, and Eventlet does
have websocket support.

When using Node.js do we need to run an alternative Server than the
Apache HTTPD for Dashboard?

We are looking at Websockets issues for noVNC already. One Potential
approach is to use an Apache module for Websockets: I am aware that
mod_wsgi will not handle it. Perhaps getting websocket support into
mod_wsgi is a better way forward?




On 05/25/2012 01:54 PM, Gabriel Hurley wrote:
>
> To elucidate a few more points from people's responses so far:
>
> ·All the python socket.io backends are immature projects, and there's
> a GAPING flaw with them all: WSGI (the interface between web servers
> and Python) doesn't support the handshake features that websocket
> communication requires. The WSGI standard was drafted before
> websockets was a thing. There's a gevent lib that supports it, but
> it's also immature and doesn't play nice with Apache, etc. Deployment
> will get **really** iteresting trying to use socket.io with Python.
> I've tried. ;-)
>
> ·Pypy **is** fast (I know several of the main contributors) but it's
> as big a decision to use Pypy as it is to use node, but that only
> affects performance. It doesn't make Django any more suited to
> real-time communication. Pypy is also a major new dependency that's
> not packaged and it changes a lot of things. It's also used by several
> orders of magnitude fewer people than node.js currently, so security
> there is a whole different concern.
>
> ·Tornado and Twisted are both non-blocking web servers in Python, but
> both projects have serious peculiarities which we could dive into
> separately. And ultimately they're not tools any of the Horizon
> contributors I've talked to so far are interested in working with,
> which in an open source community is pretty much a death knell for
> that solution.
>
> ·John P's point about Javascript already being a core language used in
> Horizon is well taken. I get the "server-side javascript is different"
> mindset, but language-bashing for the sake of "I don't like
> javascript" is no more helpful than Python people bashing Ruby. The
> fact is that Javascript as a language is extremely similar to Python
> in its syntax and construction (I often write my JS to PEP8
> standards), and though it's not as readable as Python (what is?),
> there's no reason JS code is inherently bad. Bad programmers write bad
> code. Bad frameworks encourage bad code. Node.js suffers from neither.
>
> ·I'm 100% in favor of code-bundling only being a short-term solution.
> When a reasonable number of distros package things like LESS, dropping
> our bundled version in favor of a properly-versioned package would be
> awesome. The fewer things to maintain the better.
>
> All the best,
>
> -Gabriel
>
> *From:*openstack-bounces+gabriel.hurley=nebula.com [at] lists
> [mailto:openstack-bounces+gabriel.hurley=nebula.com [at] lists]
> *On Behalf Of *John Postlethwait
> *Sent:* Friday, May 25, 2012 9:23 AM
> *To:* Simon G.; Jay Pipes
> *Cc:* openstack [at] lists
> *Subject:* Re: [Openstack] Fwd: Nodejs in horizon
>
> Hi Everyone,
>
> Sorry if I've missed anything below, this thread has become rather
> fragmented and messy (at least in my email clients) but I will try to
> address the main points I have seen so far:
>
> * Just so that everyone is aware, the lessc parser that is bundled
> in Horizon, while executable, is NOT a binary. It is, in fact,
> just a 140 line JS file, you can see the code here:
> https://review.openstack.org/#/c/7367/4/bin/less/lessc
> * The reason I have bundled it within the Horizon code, as Gabriel
> mentioned, is to assuage any version mismatches or install issues
> with LESS itself that may arise from having yet another dependency
> on top of NodeJS that needs manual steps to install. Also, the
> LESS package that exists for Ubuntu is a year out of date, and
> other distributions do not even have packages for it. I would love
> if we could rely on the OS' packages to assuage this dependency,
> but we cannot, so this is the simplest and best-working solution I
> could think of. It will be no more difficult to maintain than
> jQuery, or Bootstrap, in the Horizon code-base...
> * As for distribution support, Node can be installed on just about
> anything, see here:
> https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
> * As to the concerns about "it not being Python" or "JavaScript has
> been abused." Well, all I can say to that is no, it is not Python,
> and yes, some developers write terrible and abusive code with
> JavaScript. I'm sure I could find horrid/abusive Python somewhere
> as well, but doing so would not preclude our reasons to use it in
> OpenStack. Misuse of a tool is not a reason to fear the tool
> itself, if that were so none of us would use any language, ever.
> Not to mention, we already use a ton of JS in Horizon... I'm not
> introducing JavaScript to Horizon for the first time or anything here.
>
> I'm sure I've missed some good points, but this thread is a mess and
> is difficult to sort through... :P
>
> -John Postlethwait
>
> ------------------------------------------------------------------------
>
> *From:*openstack-bounces+john.postlethwait=nebula.com [at] lists
> <mailto:openstack-bounces+john.postlethwait=nebula.com [at] lists>
> [openstack-bounces+john.postlethwait=nebula.com [at] lists]
> on behalf of Simon G. [semyazz [at] gmail]
> *Sent:* Friday, May 25, 2012 7:40 AM
> *To:* Jay Pipes
> *Cc:* openstack [at] lists <mailto:openstack [at] lists>
> *Subject:* Re: [Openstack] Fwd: Nodejs in horizon
>
> Maybe I've misuderstood something, but I've tried to give examples of
> other backends than node.js which can make use of mentioned before
> socket.io <http://socket.io> and can be used to implement realtime
> communication. I just wanted to minimize use of node.js. Hmm... I'm
> still talking about realtime communication, but it was only mentioned
> as an example and it's not even listed as a feature anywhere. So maybe
> my part in this topic is pointless. I'll be silent from now :)
>
> Cheers,
>
> On Fri, May 25, 2012 at 3:20 PM, Jay Pipes <jaypipes [at] gmail
> <mailto:jaypipes [at] gmail>> wrote:
>
> On 05/25/2012 08:41 AM, Simon G. wrote:
>
> Hello,
>
> I don't want to be rude, but fast research about point *3c* and
> sockets
> => PyPi search
> <http://pypi.python.org/pypi?%3Aaction=search&term=socket.io&submit=search
> <http://pypi.python.org/pypi?%3Aaction=search&term=socket.io&submit=search>>
>
> * http://pypi.python.org/pypi/SocketTornad.IO/
> * http://pypi.python.org/pypi/TornadIO2/0.0.3 ,
> https://github.com/MrJoes/tornadio2
> * http://pypi.python.org/pypi/django-socketio/0.3.3
> * http://mrjoes.github.com/2011/12/15/sockjs-bench.html
>
>
>
> How mature are those projects? I don't know. I'm not an expert in
> python. I'm just trying to find alternatives to Node.js if almost
> everything is in python. I'm just testing Openstack and right now I'm
> trying to add something to nova, but I really like horizon and if it's
> possible, I'd like to avoid node.js. I'm not a fan of this technology
> even if it's popular and fast, because I just have some doubts about
> Javascript and its maintainability.
>
>
> Hi Simon,
>
> socket.io <http://socket.io> is a Javascript library :) 3 of the 4
> projects you reference above use socket.io <http://socket.io>.
>
> Best,
> -jay
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> <https://launchpad.net/%7Eopenstack>
> Post to : openstack [at] lists
> <mailto:openstack [at] lists>
> Unsubscribe : https://launchpad.net/~openstack
> <https://launchpad.net/%7Eopenstack>
> More help : https://help.launchpad.net/ListHelp
>
>
>
>
> --
> /Semy/
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack [at] lists
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp


Gabriel.Hurley at nebula

May 25, 2012, 4:15 PM

Post #7 of 19 (356 views)
Permalink
Re: Fwd: Nodejs in horizon [In reply to]

I can't speak for other use cases as I haven't directly investigated them, but to those questions:

Apache was only an example. Any webserver that uses WSGI (whether mod_wsgi or otherwise) doesn't support websockets. As for pushing to get it into the WSGI standard, there's already work in that direction but amending the standard and *then* getting all the implementations to update, etc. is a LONG way off.

If (disclaimer: these are not final details, I'm just blue-sky throwing out possibilities) we were implementing websockets for the dashboard via node.js, we would likely run node.js with socket.io and the "express" web framework so it acts as its own async server on its own port. This is a pretty common setup, very lightweight, and with minimal dependencies. It would run side-by-side with the traditional webserver (Apache/nginx) for wsgi/python. This is down the road for Horizon, though.


- Gabriel

From: openstack-bounces+gabriel.hurley=nebula.com [at] lists [mailto:openstack-bounces+gabriel.hurley=nebula.com [at] lists] On Behalf Of Adam Young
Sent: Friday, May 25, 2012 3:57 PM
To: openstack [at] lists
Subject: Re: [Openstack] Fwd: Nodejs in horizon

We are using Eventlet as a Webserver, not apache, and Eventlet does have websocket support.

When using Node.js do we need to run an alternative Server than the Apache HTTPD for Dashboard?

We are looking at Websockets issues for noVNC already. One Potential approach is to use an Apache module for Websockets: I am aware that mod_wsgi will not handle it. Perhaps getting websocket support into mod_wsgi is a better way forward?




On 05/25/2012 01:54 PM, Gabriel Hurley wrote:
To elucidate a few more points from people's responses so far:


* All the python socket.io backends are immature projects, and there's a GAPING flaw with them all: WSGI (the interface between web servers and Python) doesn't support the handshake features that websocket communication requires. The WSGI standard was drafted before websockets was a thing. There's a gevent lib that supports it, but it's also immature and doesn't play nice with Apache, etc. Deployment will get *really* iteresting trying to use socket.io with Python. I've tried. ;-)

* Pypy *is* fast (I know several of the main contributors) but it's as big a decision to use Pypy as it is to use node, but that only affects performance. It doesn't make Django any more suited to real-time communication. Pypy is also a major new dependency that's not packaged and it changes a lot of things. It's also used by several orders of magnitude fewer people than node.js currently, so security there is a whole different concern.

* Tornado and Twisted are both non-blocking web servers in Python, but both projects have serious peculiarities which we could dive into separately. And ultimately they're not tools any of the Horizon contributors I've talked to so far are interested in working with, which in an open source community is pretty much a death knell for that solution.

* John P's point about Javascript already being a core language used in Horizon is well taken. I get the "server-side javascript is different" mindset, but language-bashing for the sake of "I don't like javascript" is no more helpful than Python people bashing Ruby. The fact is that Javascript as a language is extremely similar to Python in its syntax and construction (I often write my JS to PEP8 standards), and though it's not as readable as Python (what is?), there's no reason JS code is inherently bad. Bad programmers write bad code. Bad frameworks encourage bad code. Node.js suffers from neither.

* I'm 100% in favor of code-bundling only being a short-term solution. When a reasonable number of distros package things like LESS, dropping our bundled version in favor of a properly-versioned package would be awesome. The fewer things to maintain the better.

All the best,


- Gabriel

From: openstack-bounces+gabriel.hurley=nebula.com [at] lists<mailto:openstack-bounces+gabriel.hurley=nebula.com [at] lists> [mailto:openstack-bounces+gabriel.hurley=nebula.com [at] lists] On Behalf Of John Postlethwait
Sent: Friday, May 25, 2012 9:23 AM
To: Simon G.; Jay Pipes
Cc: openstack [at] lists<mailto:openstack [at] lists>
Subject: Re: [Openstack] Fwd: Nodejs in horizon

Hi Everyone,

Sorry if I've missed anything below, this thread has become rather fragmented and messy (at least in my email clients) but I will try to address the main points I have seen so far:


* Just so that everyone is aware, the lessc parser that is bundled in Horizon, while executable, is NOT a binary. It is, in fact, just a 140 line JS file, you can see the code here: https://review.openstack.org/#/c/7367/4/bin/less/lessc
* The reason I have bundled it within the Horizon code, as Gabriel mentioned, is to assuage any version mismatches or install issues with LESS itself that may arise from having yet another dependency on top of NodeJS that needs manual steps to install. Also, the LESS package that exists for Ubuntu is a year out of date, and other distributions do not even have packages for it. I would love if we could rely on the OS' packages to assuage this dependency, but we cannot, so this is the simplest and best-working solution I could think of. It will be no more difficult to maintain than jQuery, or Bootstrap, in the Horizon code-base...
* As for distribution support, Node can be installed on just about anything, see here: https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
* As to the concerns about "it not being Python" or "JavaScript has been abused." Well, all I can say to that is no, it is not Python, and yes, some developers write terrible and abusive code with JavaScript. I'm sure I could find horrid/abusive Python somewhere as well, but doing so would not preclude our reasons to use it in OpenStack. Misuse of a tool is not a reason to fear the tool itself, if that were so none of us would use any language, ever. Not to mention, we already use a ton of JS in Horizon... I'm not introducing JavaScript to Horizon for the first time or anything here.

I'm sure I've missed some good points, but this thread is a mess and is difficult to sort through... :P

-John Postlethwait

________________________________
From: openstack-bounces+john.postlethwait=nebula.com [at] lists<mailto:openstack-bounces+john.postlethwait=nebula.com [at] lists> [openstack-bounces+john.postlethwait=nebula.com [at] lists<mailto:openstack-bounces+john.postlethwait=nebula.com [at] lists>] on behalf of Simon G. [semyazz [at] gmail<mailto:semyazz [at] gmail>]
Sent: Friday, May 25, 2012 7:40 AM
To: Jay Pipes
Cc: openstack [at] lists<mailto:openstack [at] lists>
Subject: Re: [Openstack] Fwd: Nodejs in horizon
Maybe I've misuderstood something, but I've tried to give examples of other backends than node.js which can make use of mentioned before socket.io<http://socket.io> and can be used to implement realtime communication. I just wanted to minimize use of node.js. Hmm... I'm still talking about realtime communication, but it was only mentioned as an example and it's not even listed as a feature anywhere. So maybe my part in this topic is pointless. I'll be silent from now :)

Cheers,
On Fri, May 25, 2012 at 3:20 PM, Jay Pipes <jaypipes [at] gmail<mailto:jaypipes [at] gmail>> wrote:
On 05/25/2012 08:41 AM, Simon G. wrote:
Hello,

I don't want to be rude, but fast research about point *3c* and sockets
=> PyPi search
<http://pypi.python.org/pypi?%3Aaction=search&term=socket.io&submit=search>

* http://pypi.python.org/pypi/SocketTornad.IO/
* http://pypi.python.org/pypi/TornadIO2/0.0.3 ,
https://github.com/MrJoes/tornadio2
* http://pypi.python.org/pypi/django-socketio/0.3.3
* http://mrjoes.github.com/2011/12/15/sockjs-bench.html


How mature are those projects? I don't know. I'm not an expert in
python. I'm just trying to find alternatives to Node.js if almost
everything is in python. I'm just testing Openstack and right now I'm
trying to add something to nova, but I really like horizon and if it's
possible, I'd like to avoid node.js. I'm not a fan of this technology
even if it's popular and fast, because I just have some doubts about
Javascript and its maintainability.

Hi Simon,

socket.io<http://socket.io> is a Javascript library :) 3 of the 4 projects you reference above use socket.io<http://socket.io>.

Best,
-jay


_______________________________________________
Mailing list: https://launchpad.net/~openstack<https://launchpad.net/%7Eopenstack>
Post to : openstack [at] lists<mailto:openstack [at] lists>
Unsubscribe : https://launchpad.net/~openstack<https://launchpad.net/%7Eopenstack>
More help : https://help.launchpad.net/ListHelp



--
Semy






_______________________________________________

Mailing list: https://launchpad.net/~openstack

Post to : openstack [at] lists<mailto:openstack [at] lists>

Unsubscribe : https://launchpad.net/~openstack

More help : https://help.launchpad.net/ListHelp


ayoung at redhat

May 25, 2012, 5:33 PM

Post #8 of 19 (351 views)
Permalink
Re: Fwd: Nodejs in horizon [In reply to]

On 05/25/2012 07:15 PM, Gabriel Hurley wrote:
>
> I can't speak for other use cases as I haven't directly investigated
> them, but to those questions:
>
> Apache was only an example. Any webserver that uses WSGI (whether
> mod_wsgi or otherwise) doesn't support websockets. As for pushing to
> get it into the WSGI standard, there's already work in that direction
> but amending the standard and **then** getting all the implementations
> to update, etc. is a LONG way off.
>
> If (disclaimer: these are not final details, I'm just blue-sky
> throwing out possibilities) we were implementing websockets for the
> dashboard via node.js, we would likely run node.js with socket.io and
> the "express" web framework so it acts as its own async server on its
> own port. This is a pretty common setup, very lightweight, and with
> minimal dependencies. It would run side-by-side with the traditional
> webserver (Apache/nginx) for wsgi/python. This is down the road for
> Horizon, though.
>

This is not a good idea. We already have a proliferation of ports.
This is a SELinux Nightmare: some of these are already owned by
applications other than ours.


Websockets does not and should not be run on a separate port. All of
our applications should be able to run on the standard ports of 80 for
HTTP and 443 for HTTPS. For websockets, that is ws on 80 and 443 for wss.

Node.js is a fine architecture, but throwing another server side
language into the pot once the application is already built on Python is
not a sound decision. Now developers need to think in two languages for
server side scripting, and that is not a good idea.

Don't get me wrong, I've done my share of Javascript: prior to
Openstack, I spent over a year doing straight Javascript programming
for the Web UI for FreeIPA. But that was Client side Javascript, and I
for one would like to limit Javascript's role to the web browser where
we cannot avoid it.


Like it or lump it, the server side language for Openstack is Python.
We already have a framework for Event driven programming there, and we
should stick with it. Adding Server side Javascript into the picture
needlessly complicates things.





> -Gabriel
>
> *From:*openstack-bounces+gabriel.hurley=nebula.com [at] lists
> [mailto:openstack-bounces+gabriel.hurley=nebula.com [at] lists]
> *On Behalf Of *Adam Young
> *Sent:* Friday, May 25, 2012 3:57 PM
> *To:* openstack [at] lists
> *Subject:* Re: [Openstack] Fwd: Nodejs in horizon
>
> We are using Eventlet as a Webserver, not apache, and Eventlet does
> have websocket support.
>
> When using Node.js do we need to run an alternative Server than the
> Apache HTTPD for Dashboard?
>
> We are looking at Websockets issues for noVNC already. One Potential
> approach is to use an Apache module for Websockets: I am aware that
> mod_wsgi will not handle it. Perhaps getting websocket support into
> mod_wsgi is a better way forward?
>
>
>
>
> On 05/25/2012 01:54 PM, Gabriel Hurley wrote:
>
> To elucidate a few more points from people's responses so far:
>
> ·All the python socket.io backends are immature projects, and there's
> a GAPING flaw with them all: WSGI (the interface between web servers
> and Python) doesn't support the handshake features that websocket
> communication requires. The WSGI standard was drafted before
> websockets was a thing. There's a gevent lib that supports it, but
> it's also immature and doesn't play nice with Apache, etc. Deployment
> will get **really** iteresting trying to use socket.io with Python.
> I've tried. ;-)
>
> ·Pypy **is** fast (I know several of the main contributors) but it's
> as big a decision to use Pypy as it is to use node, but that only
> affects performance. It doesn't make Django any more suited to
> real-time communication. Pypy is also a major new dependency that's
> not packaged and it changes a lot of things. It's also used by several
> orders of magnitude fewer people than node.js currently, so security
> there is a whole different concern.
>
> ·Tornado and Twisted are both non-blocking web servers in Python, but
> both projects have serious peculiarities which we could dive into
> separately. And ultimately they're not tools any of the Horizon
> contributors I've talked to so far are interested in working with,
> which in an open source community is pretty much a death knell for
> that solution.
>
> ·John P's point about Javascript already being a core language used in
> Horizon is well taken. I get the "server-side javascript is different"
> mindset, but language-bashing for the sake of "I don't like
> javascript" is no more helpful than Python people bashing Ruby. The
> fact is that Javascript as a language is extremely similar to Python
> in its syntax and construction (I often write my JS to PEP8
> standards), and though it's not as readable as Python (what is?),
> there's no reason JS code is inherently bad. Bad programmers write bad
> code. Bad frameworks encourage bad code. Node.js suffers from neither.
>
> ·I'm 100% in favor of code-bundling only being a short-term solution.
> When a reasonable number of distros package things like LESS, dropping
> our bundled version in favor of a properly-versioned package would be
> awesome. The fewer things to maintain the better.
>
> All the best,
>
> -Gabriel
>
> *From:*openstack-bounces+gabriel.hurley=nebula.com [at] lists
> <mailto:openstack-bounces+gabriel.hurley=nebula.com [at] lists>
> [mailto:openstack-bounces+gabriel.hurley=nebula.com [at] lists]
> *On Behalf Of *John Postlethwait
> *Sent:* Friday, May 25, 2012 9:23 AM
> *To:* Simon G.; Jay Pipes
> *Cc:* openstack [at] lists <mailto:openstack [at] lists>
> *Subject:* Re: [Openstack] Fwd: Nodejs in horizon
>
> Hi Everyone,
>
> Sorry if I've missed anything below, this thread has become rather
> fragmented and messy (at least in my email clients) but I will try to
> address the main points I have seen so far:
>
> * Just so that everyone is aware, the lessc parser that is bundled
> in Horizon, while executable, is NOT a binary. It is, in fact,
> just a 140 line JS file, you can see the code here:
> https://review.openstack.org/#/c/7367/4/bin/less/lessc
> * The reason I have bundled it within the Horizon code, as Gabriel
> mentioned, is to assuage any version mismatches or install issues
> with LESS itself that may arise from having yet another dependency
> on top of NodeJS that needs manual steps to install. Also, the
> LESS package that exists for Ubuntu is a year out of date, and
> other distributions do not even have packages for it. I would love
> if we could rely on the OS' packages to assuage this dependency,
> but we cannot, so this is the simplest and best-working solution I
> could think of. It will be no more difficult to maintain than
> jQuery, or Bootstrap, in the Horizon code-base...
> * As for distribution support, Node can be installed on just about
> anything, see here:
> https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
> * As to the concerns about "it not being Python" or "JavaScript has
> been abused." Well, all I can say to that is no, it is not Python,
> and yes, some developers write terrible and abusive code with
> JavaScript. I'm sure I could find horrid/abusive Python somewhere
> as well, but doing so would not preclude our reasons to use it in
> OpenStack. Misuse of a tool is not a reason to fear the tool
> itself, if that were so none of us would use any language, ever.
> Not to mention, we already use a ton of JS in Horizon... I'm not
> introducing JavaScript to Horizon for the first time or anything here.
>
> I'm sure I've missed some good points, but this thread is a mess and
> is difficult to sort through... :P
>
> -John Postlethwait
>
> ------------------------------------------------------------------------
>
> *From:*openstack-bounces+john.postlethwait=nebula.com [at] lists
> <mailto:openstack-bounces+john.postlethwait=nebula.com [at] lists>
> [openstack-bounces+john.postlethwait=nebula.com [at] lists
> <mailto:openstack-bounces+john.postlethwait=nebula.com [at] lists>]
> on behalf of Simon G. [semyazz [at] gmail <mailto:semyazz [at] gmail>]
> *Sent:* Friday, May 25, 2012 7:40 AM
> *To:* Jay Pipes
> *Cc:* openstack [at] lists <mailto:openstack [at] lists>
> *Subject:* Re: [Openstack] Fwd: Nodejs in horizon
>
> Maybe I've misuderstood something, but I've tried to give examples of
> other backends than node.js which can make use of mentioned before
> socket.io <http://socket.io> and can be used to implement realtime
> communication. I just wanted to minimize use of node.js. Hmm... I'm
> still talking about realtime communication, but it was only mentioned
> as an example and it's not even listed as a feature anywhere. So maybe
> my part in this topic is pointless. I'll be silent from now :)
>
> Cheers,
>
> On Fri, May 25, 2012 at 3:20 PM, Jay Pipes <jaypipes [at] gmail
> <mailto:jaypipes [at] gmail>> wrote:
>
> On 05/25/2012 08:41 AM, Simon G. wrote:
>
> Hello,
>
> I don't want to be rude, but fast research about point *3c* and
> sockets
> => PyPi search
> <http://pypi.python.org/pypi?%3Aaction=search&term=socket.io&submit=search
> <http://pypi.python.org/pypi?%3Aaction=search&term=socket.io&submit=search>>
>
> * http://pypi.python.org/pypi/SocketTornad.IO/
> * http://pypi.python.org/pypi/TornadIO2/0.0.3 ,
> https://github.com/MrJoes/tornadio2
> * http://pypi.python.org/pypi/django-socketio/0.3.3
> * http://mrjoes.github.com/2011/12/15/sockjs-bench.html
>
>
>
> How mature are those projects? I don't know. I'm not an expert in
> python. I'm just trying to find alternatives to Node.js if almost
> everything is in python. I'm just testing Openstack and right now I'm
> trying to add something to nova, but I really like horizon and if it's
> possible, I'd like to avoid node.js. I'm not a fan of this technology
> even if it's popular and fast, because I just have some doubts about
> Javascript and its maintainability.
>
>
> Hi Simon,
>
> socket.io <http://socket.io> is a Javascript library :) 3 of the 4
> projects you reference above use socket.io <http://socket.io>.
>
> Best,
> -jay
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> <https://launchpad.net/%7Eopenstack>
> Post to : openstack [at] lists
> <mailto:openstack [at] lists>
> Unsubscribe : https://launchpad.net/~openstack
> <https://launchpad.net/%7Eopenstack>
> More help : https://help.launchpad.net/ListHelp
>
>
>
>
> --
> /Semy/
>
>
>
>
> _______________________________________________
> Mailing list:https://launchpad.net/~openstack <https://launchpad.net/%7Eopenstack>
> Post to :openstack [at] lists <mailto:openstack [at] lists>
> Unsubscribe :https://launchpad.net/~openstack <https://launchpad.net/%7Eopenstack>
> More help :https://help.launchpad.net/ListHelp
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack [at] lists
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp


Gabriel.Hurley at nebula

May 26, 2012, 7:57 PM

Post #9 of 19 (339 views)
Permalink
Re: Fwd: Nodejs in horizon [In reply to]

To Adam Young's points: as I noted, that was an off-the-cuff implementation option since you asked, but the subject of how future websocket-related features might or might not be implemented isn't the subject at hand.

In terms of the current discussion (Horizon's use of node.js for the purpose of LESS and possible future options), it sounds like for the Folsom release cycle a reasonable compromise is to move forward with node.js and LESS for development and recommend it for production as long as we can work with downstream distros to make sure they have options in cases where they currently do not support node. These options would include things such as helping them to provide a compiled stylesheet that can be served statically as part of their distro package when they go to ship Folsom.

Any further leveraging of node.js in the Folsom cycle would then be treated similarly: make it customizable/make it configurable/provide a reasonable fallback behavior for distros who don't yet support node.js.

That's the proposal on the table as far as I understand it.


- Gabriel

From: openstack-bounces+gabriel.hurley=nebula.com [at] lists [mailto:openstack-bounces+gabriel.hurley=nebula.com [at] lists] On Behalf Of Adam Young
Sent: Friday, May 25, 2012 5:34 PM
To: openstack [at] lists
Subject: Re: [Openstack] Fwd: Nodejs in horizon

On 05/25/2012 07:15 PM, Gabriel Hurley wrote:
I can't speak for other use cases as I haven't directly investigated them, but to those questions:

Apache was only an example. Any webserver that uses WSGI (whether mod_wsgi or otherwise) doesn't support websockets. As for pushing to get it into the WSGI standard, there's already work in that direction but amending the standard and *then* getting all the implementations to update, etc. is a LONG way off.

If (disclaimer: these are not final details, I'm just blue-sky throwing out possibilities) we were implementing websockets for the dashboard via node.js, we would likely run node.js with socket.io and the "express" web framework so it acts as its own async server on its own port. This is a pretty common setup, very lightweight, and with minimal dependencies. It would run side-by-side with the traditional webserver (Apache/nginx) for wsgi/python. This is down the road for Horizon, though.

This is not a good idea. We already have a proliferation of ports. This is a SELinux Nightmare: some of these are already owned by applications other than ours.


Websockets does not and should not be run on a separate port. All of our applications should be able to run on the standard ports of 80 for HTTP and 443 for HTTPS. For websockets, that is ws on 80 and 443 for wss.

Node.js is a fine architecture, but throwing another server side language into the pot once the application is already built on Python is not a sound decision. Now developers need to think in two languages for server side scripting, and that is not a good idea.

Don't get me wrong, I've done my share of Javascript: prior to Openstack, I spent over a year doing straight Javascript programming for the Web UI for FreeIPA. But that was Client side Javascript, and I for one would like to limit Javascript's role to the web browser where we cannot avoid it.


Like it or lump it, the server side language for Openstack is Python. We already have a framework for Event driven programming there, and we should stick with it. Adding Server side Javascript into the picture needlessly complicates things.








- Gabriel

From: openstack-bounces+gabriel.hurley=nebula.com [at] lists<mailto:openstack-bounces+gabriel.hurley=nebula.com [at] lists> [mailto:openstack-bounces+gabriel.hurley=nebula.com [at] lists] On Behalf Of Adam Young
Sent: Friday, May 25, 2012 3:57 PM
To: openstack [at] lists<mailto:openstack [at] lists>
Subject: Re: [Openstack] Fwd: Nodejs in horizon

We are using Eventlet as a Webserver, not apache, and Eventlet does have websocket support.

When using Node.js do we need to run an alternative Server than the Apache HTTPD for Dashboard?

We are looking at Websockets issues for noVNC already. One Potential approach is to use an Apache module for Websockets: I am aware that mod_wsgi will not handle it. Perhaps getting websocket support into mod_wsgi is a better way forward?




On 05/25/2012 01:54 PM, Gabriel Hurley wrote:
To elucidate a few more points from people's responses so far:


* All the python socket.io backends are immature projects, and there's a GAPING flaw with them all: WSGI (the interface between web servers and Python) doesn't support the handshake features that websocket communication requires. The WSGI standard was drafted before websockets was a thing. There's a gevent lib that supports it, but it's also immature and doesn't play nice with Apache, etc. Deployment will get *really* iteresting trying to use socket.io with Python. I've tried. ;-)

* Pypy *is* fast (I know several of the main contributors) but it's as big a decision to use Pypy as it is to use node, but that only affects performance. It doesn't make Django any more suited to real-time communication. Pypy is also a major new dependency that's not packaged and it changes a lot of things. It's also used by several orders of magnitude fewer people than node.js currently, so security there is a whole different concern.

* Tornado and Twisted are both non-blocking web servers in Python, but both projects have serious peculiarities which we could dive into separately. And ultimately they're not tools any of the Horizon contributors I've talked to so far are interested in working with, which in an open source community is pretty much a death knell for that solution.

* John P's point about Javascript already being a core language used in Horizon is well taken. I get the "server-side javascript is different" mindset, but language-bashing for the sake of "I don't like javascript" is no more helpful than Python people bashing Ruby. The fact is that Javascript as a language is extremely similar to Python in its syntax and construction (I often write my JS to PEP8 standards), and though it's not as readable as Python (what is?), there's no reason JS code is inherently bad. Bad programmers write bad code. Bad frameworks encourage bad code. Node.js suffers from neither.

* I'm 100% in favor of code-bundling only being a short-term solution. When a reasonable number of distros package things like LESS, dropping our bundled version in favor of a properly-versioned package would be awesome. The fewer things to maintain the better.

All the best,


- Gabriel

From: openstack-bounces+gabriel.hurley=nebula.com [at] lists<mailto:openstack-bounces+gabriel.hurley=nebula.com [at] lists> [mailto:openstack-bounces+gabriel.hurley=nebula.com [at] lists] On Behalf Of John Postlethwait
Sent: Friday, May 25, 2012 9:23 AM
To: Simon G.; Jay Pipes
Cc: openstack [at] lists<mailto:openstack [at] lists>
Subject: Re: [Openstack] Fwd: Nodejs in horizon

Hi Everyone,

Sorry if I've missed anything below, this thread has become rather fragmented and messy (at least in my email clients) but I will try to address the main points I have seen so far:


* Just so that everyone is aware, the lessc parser that is bundled in Horizon, while executable, is NOT a binary. It is, in fact, just a 140 line JS file, you can see the code here: https://review.openstack.org/#/c/7367/4/bin/less/lessc
* The reason I have bundled it within the Horizon code, as Gabriel mentioned, is to assuage any version mismatches or install issues with LESS itself that may arise from having yet another dependency on top of NodeJS that needs manual steps to install. Also, the LESS package that exists for Ubuntu is a year out of date, and other distributions do not even have packages for it. I would love if we could rely on the OS' packages to assuage this dependency, but we cannot, so this is the simplest and best-working solution I could think of. It will be no more difficult to maintain than jQuery, or Bootstrap, in the Horizon code-base...
* As for distribution support, Node can be installed on just about anything, see here: https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
* As to the concerns about "it not being Python" or "JavaScript has been abused." Well, all I can say to that is no, it is not Python, and yes, some developers write terrible and abusive code with JavaScript. I'm sure I could find horrid/abusive Python somewhere as well, but doing so would not preclude our reasons to use it in OpenStack. Misuse of a tool is not a reason to fear the tool itself, if that were so none of us would use any language, ever. Not to mention, we already use a ton of JS in Horizon... I'm not introducing JavaScript to Horizon for the first time or anything here.

I'm sure I've missed some good points, but this thread is a mess and is difficult to sort through... :P

-John Postlethwait

________________________________
From: openstack-bounces+john.postlethwait=nebula.com [at] lists<mailto:openstack-bounces+john.postlethwait=nebula.com [at] lists> [openstack-bounces+john.postlethwait=nebula.com [at] lists<mailto:openstack-bounces+john.postlethwait=nebula.com [at] lists>] on behalf of Simon G. [semyazz [at] gmail<mailto:semyazz [at] gmail>]
Sent: Friday, May 25, 2012 7:40 AM
To: Jay Pipes
Cc: openstack [at] lists<mailto:openstack [at] lists>
Subject: Re: [Openstack] Fwd: Nodejs in horizon
Maybe I've misuderstood something, but I've tried to give examples of other backends than node.js which can make use of mentioned before socket.io<http://socket.io> and can be used to implement realtime communication. I just wanted to minimize use of node.js. Hmm... I'm still talking about realtime communication, but it was only mentioned as an example and it's not even listed as a feature anywhere. So maybe my part in this topic is pointless. I'll be silent from now :)

Cheers,
On Fri, May 25, 2012 at 3:20 PM, Jay Pipes <jaypipes [at] gmail<mailto:jaypipes [at] gmail>> wrote:
On 05/25/2012 08:41 AM, Simon G. wrote:
Hello,

I don't want to be rude, but fast research about point *3c* and sockets
=> PyPi search
<http://pypi.python.org/pypi?%3Aaction=search&term=socket.io&submit=search>

* http://pypi.python.org/pypi/SocketTornad.IO/
* http://pypi.python.org/pypi/TornadIO2/0.0.3 ,
https://github.com/MrJoes/tornadio2
* http://pypi.python.org/pypi/django-socketio/0.3.3
* http://mrjoes.github.com/2011/12/15/sockjs-bench.html


How mature are those projects? I don't know. I'm not an expert in
python. I'm just trying to find alternatives to Node.js if almost
everything is in python. I'm just testing Openstack and right now I'm
trying to add something to nova, but I really like horizon and if it's
possible, I'd like to avoid node.js. I'm not a fan of this technology
even if it's popular and fast, because I just have some doubts about
Javascript and its maintainability.

Hi Simon,

socket.io<http://socket.io> is a Javascript library :) 3 of the 4 projects you reference above use socket.io<http://socket.io>.

Best,
-jay


_______________________________________________
Mailing list: https://launchpad.net/~openstack<https://launchpad.net/%7Eopenstack>
Post to : openstack [at] lists<mailto:openstack [at] lists>
Unsubscribe : https://launchpad.net/~openstack<https://launchpad.net/%7Eopenstack>
More help : https://help.launchpad.net/ListHelp



--
Semy







_______________________________________________

Mailing list: https://launchpad.net/~openstack<https://launchpad.net/%7Eopenstack>

Post to : openstack [at] lists<mailto:openstack [at] lists>

Unsubscribe : https://launchpad.net/~openstack<https://launchpad.net/%7Eopenstack>

More help : https://help.launchpad.net/ListHelp





_______________________________________________

Mailing list: https://launchpad.net/~openstack

Post to : openstack [at] lists<mailto:openstack [at] lists>

Unsubscribe : https://launchpad.net/~openstack

More help : https://help.launchpad.net/ListHelp


thierry at openstack

May 28, 2012, 7:21 AM

Post #10 of 19 (331 views)
Permalink
Re: Fwd: Nodejs in horizon [In reply to]

John Postlethwait wrote:
> Sorry if I've missed anything below, this thread has become rather
> fragmented and messy (at least in my email clients) but I will try to
> address the main points I have seen so far:

Thanks for your answers !

> * Just so that everyone is aware, the lessc parser that is bundled in
> Horizon, while executable, is NOT a binary. It is, in fact, just a
> 140 line JS file, you can see the code
> here: https://review.openstack.org/#/c/7367/4/bin/less/lessc

I think the concern is not about binary bundling, it's more about
bundling code from another project (code duplication). Less is more
(haha) than 3500 lines of code. Javascript is often duplicated to be
included in pages that get executed client-side... But here it is
server-side code, so this is as bad as duplicating (and having to
maintain) 3500 lines of C code from another project in your source code.

That said, if this code duplication is seen as a stop-gap, temporary
measure until "enough" distros catch up and package it correctly, as
Gabriel suggested, I think that's acceptable.

> * As to the concerns about "it not being Python" or "JavaScript has
> been abused." Well, all I can say to that is no, it is not Python,
> and yes, some developers write terrible and abusive code with
> JavaScript. I'm sure I could find horrid/abusive Python somewhere as
> well, but doing so would not preclude our reasons to use it in
> OpenStack. Misuse of a tool is not a reason to fear the tool itself,
> if that were so none of us would use any language, ever. Not to
> mention, we already use a ton of JS in Horizon... I'm not
> introducing JavaScript to Horizon for the first time or anything here.

The difference here is that it is server-side. So far we only had Python
as a server-side language, while obviously more languages were accepted
for client-side scripts. IMHO we should try to converge towards Python,
but if this precise featureset is not covered by any Python alternative
and the best tool for the job is JS...

--
Thierry Carrez (ttx)
Release Manager, OpenStack

_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


mrunge at matthias-runge

May 29, 2012, 12:58 AM

Post #11 of 19 (324 views)
Permalink
Re: Fwd: Nodejs in horizon [In reply to]

On 28/05/12 16:21, Thierry Carrez wrote:
> John Postlethwait wrote:
>> Sorry if I've missed anything below, this thread has become rather
>> fragmented and messy (at least in my email clients) but I will try to
>> address the main points I have seen so far:
>

Sorry, if I jump in late in this thread, I may have skipped some basics.
If I get it right, nodejs is just required to compile LESS to css, right?

There is at least one alternative without requiring nodejs:

https://github.com/leafo/lessphp
--
Matthias Runge <mrunge [at] matthias-runge>

_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


Gabriel.Hurley at nebula

May 29, 2012, 9:29 AM

Post #12 of 19 (320 views)
Permalink
Re: Fwd: Nodejs in horizon [In reply to]

Without rehashing backstory which is available in public archives of this thread, while node is currently on the table for LESS it also may play a role
in future needs as well.

As for your link, yes there are LESS compilers in other languages (there's even a nascent one in Python that's very much not ready for prime time) but requiring PHP or any other language besides Python opens a similar can of worms, and PHP gets us nowhere on any other fronts.

/me refrains from any other comments about PHP.

Moreover, the canonical LESS compiler which is the best supported and most stable is the main one written for node.js. Unless there were a 100% working Python version I see no reason not to favor the "real" LESS compiler.

All the best,

- Gabriel

On May 29, 2012, at 1:00 AM, "Matthias Runge" <mrunge [at] matthias-runge> wrote:

> On 28/05/12 16:21, Thierry Carrez wrote:
>> John Postlethwait wrote:
>>> Sorry if I've missed anything below, this thread has become rather
>>> fragmented and messy (at least in my email clients) but I will try to
>>> address the main points I have seen so far:
>>
>
> Sorry, if I jump in late in this thread, I may have skipped some basics.
> If I get it right, nodejs is just required to compile LESS to css, right?
>
> There is at least one alternative without requiring nodejs:
>
> https://github.com/leafo/lessphp
> --
> Matthias Runge <mrunge [at] matthias-runge>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack [at] lists
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp
>


_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


ayoung at redhat

May 29, 2012, 10:26 AM

Post #13 of 19 (320 views)
Permalink
Re: Fwd: Nodejs in horizon [In reply to]

On 05/29/2012 12:29 PM, Gabriel Hurley wrote:
> Without rehashing backstory which is available in public archives of this thread, while node is currently on the table for LESS it also may play a role
> in future needs as well.
>
> As for your link, yes there are LESS compilers in other languages (there's even a nascent one in Python that's very much not ready for prime time) but requiring PHP or any other language besides Python opens a similar can of worms, and PHP gets us nowhere on any other fronts.
>
> /me refrains from any other comments about PHP.
>
> Moreover, the canonical LESS compiler which is the best supported and most stable is the main one written for node.js. Unless there were a 100% working Python version I see no reason not to favor the "real" LESS compiler.
>
> All the best,

For LESS, it think it is fine to use even server side Javascript. The
CSS should be compiled at RPM/DEB build time, and not at run time for
live deployments, so that is a bit of a non-issue. I'd also be fine
with using the client side LESS implementation, especially if we want to
use the same implementation at development and live deployment time,
but I can understand if there are issues with doing this.


Node.js is a whole different server side technology, and that should
not be implemented at this time.


>
> - Gabriel
>
> On May 29, 2012, at 1:00 AM, "Matthias Runge"<mrunge [at] matthias-runge> wrote:
>
>> On 28/05/12 16:21, Thierry Carrez wrote:
>>> John Postlethwait wrote:
>>>> Sorry if I've missed anything below, this thread has become rather
>>>> fragmented and messy (at least in my email clients) but I will try to
>>>> address the main points I have seen so far:
>> Sorry, if I jump in late in this thread, I may have skipped some basics.
>> If I get it right, nodejs is just required to compile LESS to css, right?
>>
>> There is at least one alternative without requiring nodejs:
>>
>> https://github.com/leafo/lessphp
>> --
>> Matthias Runge<mrunge [at] matthias-runge>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~openstack
>> Post to : openstack [at] lists
>> Unsubscribe : https://launchpad.net/~openstack
>> More help : https://help.launchpad.net/ListHelp
>>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack [at] lists
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp


_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


martin.paulo at gmail

May 29, 2012, 9:18 PM

Post #14 of 19 (319 views)
Permalink
Re: Fwd: Nodejs in horizon [In reply to]

I want to second Adam's comment:

"Node.js is a whole different server side technology, and that should not
be implemented at this time."

for all the reasons others have expressed in this thread.

Martin

On 30 May 2012 03:26, Adam Young <ayoung [at] redhat> wrote:

> On 05/29/2012 12:29 PM, Gabriel Hurley wrote:
>
>> Without rehashing backstory which is available in public archives of this
>> thread, while node is currently on the table for LESS it also may play a
>> role
>> in future needs as well.
>>
>> As for your link, yes there are LESS compilers in other languages
>> (there's even a nascent one in Python that's very much not ready for prime
>> time) but requiring PHP or any other language besides Python opens a
>> similar can of worms, and PHP gets us nowhere on any other fronts.
>>
>> /me refrains from any other comments about PHP.
>>
>> Moreover, the canonical LESS compiler which is the best supported and
>> most stable is the main one written for node.js. Unless there were a 100%
>> working Python version I see no reason not to favor the "real" LESS
>> compiler.
>>
>> All the best,
>>
>
> For LESS, it think it is fine to use even server side Javascript. The
> CSS should be compiled at RPM/DEB build time, and not at run time for live
> deployments, so that is a bit of a non-issue. I'd also be fine with using
> the client side LESS implementation, especially if we want to use the same
> implementation at development and live deployment time, but I can
> understand if there are issues with doing this.
>
>
> Node.js is a whole different server side technology, and that should not
> be implemented at this time.
>
>
>
>
>> - Gabriel
>>
>> On May 29, 2012, at 1:00 AM, "Matthias Runge"<mrunge [at] matthias-runge**de<mrunge [at] matthias-runge>>
>> wrote:
>>
>> On 28/05/12 16:21, Thierry Carrez wrote:
>>>
>>>> John Postlethwait wrote:
>>>>
>>>>> Sorry if I've missed anything below, this thread has become rather
>>>>> fragmented and messy (at least in my email clients) but I will try to
>>>>> address the main points I have seen so far:
>>>>>
>>>> Sorry, if I jump in late in this thread, I may have skipped some basics.
>>> If I get it right, nodejs is just required to compile LESS to css, right?
>>>
>>> There is at least one alternative without requiring nodejs:
>>>
>>> https://github.com/leafo/**lessphp <https://github.com/leafo/lessphp>
>>> --
>>> Matthias Runge<mrunge [at] matthias-runge**>
>>>
>>> ______________________________**_________________
>>> Mailing list: https://launchpad.net/~**openstack<https://launchpad.net/%7Eopenstack>
>>> Post to : openstack [at] lists
>>> Unsubscribe : https://launchpad.net/~**openstack<https://launchpad.net/%7Eopenstack>
>>> More help : https://help.launchpad.net/**ListHelp<https://help.launchpad.net/ListHelp>
>>>
>>>
>> ______________________________**_________________
>> Mailing list: https://launchpad.net/~**openstack<https://launchpad.net/%7Eopenstack>
>> Post to : openstack [at] lists
>> Unsubscribe : https://launchpad.net/~**openstack<https://launchpad.net/%7Eopenstack>
>> More help : https://help.launchpad.net/**ListHelp<https://help.launchpad.net/ListHelp>
>>
>
>
> ______________________________**_________________
> Mailing list: https://launchpad.net/~**openstack<https://launchpad.net/%7Eopenstack>
> Post to : openstack [at] lists
> Unsubscribe : https://launchpad.net/~**openstack<https://launchpad.net/%7Eopenstack>
> More help : https://help.launchpad.net/**ListHelp<https://help.launchpad.net/ListHelp>
>



--
==================================================================

Martin Paulo, BSc.
Software Developer

Tel : +61-3-9434 2508 (Home)
Tel : 04 205 20339 (Mobile)
Site: http://www.thepaulofamily.net

"Nobody goes there any more. It's too crowded" - Yogi Berra.


devin at openstack

May 30, 2012, 1:37 PM

Post #15 of 19 (316 views)
Permalink
Re: Nodejs in horizon [In reply to]

Long story short - we will work to make node.js an optional build time component and leave it as an distro packaging issue. node.js was being evaluated as a potential solution to https://blueprints.launchpad.net/horizon/+spec/realtime-communication, but that blueprint isn't targeted for Folsom, so it's very future. We'll have a lot of time to evaluate python based alternatives.


Devin


On May 29, 2012, at 10:26 AM, Adam Young wrote:

> On 05/29/2012 12:29 PM, Gabriel Hurley wrote:
>> Without rehashing backstory which is available in public archives of this thread, while node is currently on the table for LESS it also may play a role
>> in future needs as well.
>>
>> As for your link, yes there are LESS compilers in other languages (there's even a nascent one in Python that's very much not ready for prime time) but requiring PHP or any other language besides Python opens a similar can of worms, and PHP gets us nowhere on any other fronts.
>>
>> /me refrains from any other comments about PHP.
>>
>> Moreover, the canonical LESS compiler which is the best supported and most stable is the main one written for node.js. Unless there were a 100% working Python version I see no reason not to favor the "real" LESS compiler.
>>
>> All the best,
>
> For LESS, it think it is fine to use even server side Javascript. The CSS should be compiled at RPM/DEB build time, and not at run time for live deployments, so that is a bit of a non-issue. I'd also be fine with using the client side LESS implementation, especially if we want to use the same implementation at development and live deployment time, but I can understand if there are issues with doing this.
>
>
> Node.js is a whole different server side technology, and that should not be implemented at this time.
>
>
>>
>> - Gabriel
>>
>> On May 29, 2012, at 1:00 AM, "Matthias Runge"<mrunge [at] matthias-runge> wrote:
>>
>>> On 28/05/12 16:21, Thierry Carrez wrote:
>>>> John Postlethwait wrote:
>>>>> Sorry if I've missed anything below, this thread has become rather
>>>>> fragmented and messy (at least in my email clients) but I will try to
>>>>> address the main points I have seen so far:
>>> Sorry, if I jump in late in this thread, I may have skipped some basics.
>>> If I get it right, nodejs is just required to compile LESS to css, right?
>>>
>>> There is at least one alternative without requiring nodejs:
>>>
>>> https://github.com/leafo/lessphp
>>> --
>>> Matthias Runge<mrunge [at] matthias-runge>
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~openstack
>>> Post to : openstack [at] lists
>>> Unsubscribe : https://launchpad.net/~openstack
>>> More help : https://help.launchpad.net/ListHelp
>>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~openstack
>> Post to : openstack [at] lists
>> Unsubscribe : https://launchpad.net/~openstack
>> More help : https://help.launchpad.net/ListHelp
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack [at] lists
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp


_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


ayoung at redhat

May 30, 2012, 2:14 PM

Post #16 of 19 (316 views)
Permalink
Re: Nodejs in horizon [In reply to]

On 05/30/2012 04:37 PM, Devin Carlen wrote:
> Long story short - we will work to make node.js an optional build time component and leave it as an distro packaging issue. node.js was being evaluated as a potential solution to https://blueprints.launchpad.net/horizon/+spec/realtime-communication, but that blueprint isn't targeted for Folsom, so it's very future. We'll have a lot of time to evaluate python based alternatives.

Sounds good. Does websockets qualify as an alternative? If so, I'll
update the blueprint



>
>
> Devin
>
>
> On May 29, 2012, at 10:26 AM, Adam Young wrote:
>
>> On 05/29/2012 12:29 PM, Gabriel Hurley wrote:
>>> Without rehashing backstory which is available in public archives of this thread, while node is currently on the table for LESS it also may play a role
>>> in future needs as well.
>>>
>>> As for your link, yes there are LESS compilers in other languages (there's even a nascent one in Python that's very much not ready for prime time) but requiring PHP or any other language besides Python opens a similar can of worms, and PHP gets us nowhere on any other fronts.
>>>
>>> /me refrains from any other comments about PHP.
>>>
>>> Moreover, the canonical LESS compiler which is the best supported and most stable is the main one written for node.js. Unless there were a 100% working Python version I see no reason not to favor the "real" LESS compiler.
>>>
>>> All the best,
>> For LESS, it think it is fine to use even server side Javascript. The CSS should be compiled at RPM/DEB build time, and not at run time for live deployments, so that is a bit of a non-issue. I'd also be fine with using the client side LESS implementation, especially if we want to use the same implementation at development and live deployment time, but I can understand if there are issues with doing this.
>>
>>
>> Node.js is a whole different server side technology, and that should not be implemented at this time.
>>
>>
>>> - Gabriel
>>>
>>> On May 29, 2012, at 1:00 AM, "Matthias Runge"<mrunge [at] matthias-runge> wrote:
>>>
>>>> On 28/05/12 16:21, Thierry Carrez wrote:
>>>>> John Postlethwait wrote:
>>>>>> Sorry if I've missed anything below, this thread has become rather
>>>>>> fragmented and messy (at least in my email clients) but I will try to
>>>>>> address the main points I have seen so far:
>>>> Sorry, if I jump in late in this thread, I may have skipped some basics.
>>>> If I get it right, nodejs is just required to compile LESS to css, right?
>>>>
>>>> There is at least one alternative without requiring nodejs:
>>>>
>>>> https://github.com/leafo/lessphp
>>>> --
>>>> Matthias Runge<mrunge [at] matthias-runge>
>>>>
>>>> _______________________________________________
>>>> Mailing list: https://launchpad.net/~openstack
>>>> Post to : openstack [at] lists
>>>> Unsubscribe : https://launchpad.net/~openstack
>>>> More help : https://help.launchpad.net/ListHelp
>>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~openstack
>>> Post to : openstack [at] lists
>>> Unsubscribe : https://launchpad.net/~openstack
>>> More help : https://help.launchpad.net/ListHelp
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~openstack
>> Post to : openstack [at] lists
>> Unsubscribe : https://launchpad.net/~openstack
>> More help : https://help.launchpad.net/ListHelp


_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


jan_drake at hotmail

May 30, 2012, 4:28 PM

Post #17 of 19 (316 views)
Permalink
Re: Nodejs in horizon [In reply to]

For what it's worth, I've noticed a generally myopic trend towards python only. Node.js can play many very good roles as an implementation strategy for various openstack capabilities, especially at the edge. I was excited to see it being included. There's a balance to be struck in optimizing the development community, especially for core openstack, around a limited set of languages; however, I've never trusted an engineer who's ever only coded (or still only codes) in one language.

So, consider this a nudge in the direction of being open to additional technology sets and languages (not blindly randomly or chaotically).

Also, it might be good practice to declare, when offering an opinion, whether or not one has experience with the stack in question. I do. Node.js can be very useful.

Different != bad.
Stupid = bad.
If different = stupid then different = bad.

I'm starting to see NIH (not invented here) and RTW (Reinventing the wheel) perhaps in areas that it isn't necessary.

Pot stirred,


Jan

P.S. It is this perceived myopia that is primarily the reason I didnt open source our oauth and api mgmt solutions to the community. I was told: language not allowed. Um Okay but then you probably wouldn't have had to rewrite keystone.

On May 30, 2012, at 1:37 PM, Devin Carlen <devin [at] openstack> wrote:

> Long story short - we will work to make node.js an optional build time component and leave it as an distro packaging issue. node.js was being evaluated as a potential solution to https://blueprints.launchpad.net/horizon/+spec/realtime-communication, but that blueprint isn't targeted for Folsom, so it's very future. We'll have a lot of time to evaluate python based alternatives.
>
>
> Devin
>
>
> On May 29, 2012, at 10:26 AM, Adam Young wrote:
>
>> On 05/29/2012 12:29 PM, Gabriel Hurley wrote:
>>> Without rehashing backstory which is available in public archives of this thread, while node is currently on the table for LESS it also may play a role
>>> in future needs as well.
>>>
>>> As for your link, yes there are LESS compilers in other languages (there's even a nascent one in Python that's very much not ready for prime time) but requiring PHP or any other language besides Python opens a similar can of worms, and PHP gets us nowhere on any other fronts.
>>>
>>> /me refrains from any other comments about PHP.
>>>
>>> Moreover, the canonical LESS compiler which is the best supported and most stable is the main one written for node.js. Unless there were a 100% working Python version I see no reason not to favor the "real" LESS compiler.
>>>
>>> All the best,
>>
>> For LESS, it think it is fine to use even server side Javascript. The CSS should be compiled at RPM/DEB build time, and not at run time for live deployments, so that is a bit of a non-issue. I'd also be fine with using the client side LESS implementation, especially if we want to use the same implementation at development and live deployment time, but I can understand if there are issues with doing this.
>>
>>
>> Node.js is a whole different server side technology, and that should not be implemented at this time.
>>
>>
>>>
>>> - Gabriel
>>>
>>> On May 29, 2012, at 1:00 AM, "Matthias Runge"<mrunge [at] matthias-runge> wrote:
>>>
>>>> On 28/05/12 16:21, Thierry Carrez wrote:
>>>>> John Postlethwait wrote:
>>>>>> Sorry if I've missed anything below, this thread has become rather
>>>>>> fragmented and messy (at least in my email clients) but I will try to
>>>>>> address the main points I have seen so far:
>>>> Sorry, if I jump in late in this thread, I may have skipped some basics.
>>>> If I get it right, nodejs is just required to compile LESS to css, right?
>>>>
>>>> There is at least one alternative without requiring nodejs:
>>>>
>>>> https://github.com/leafo/lessphp
>>>> --
>>>> Matthias Runge<mrunge [at] matthias-runge>
>>>>
>>>> _______________________________________________
>>>> Mailing list: https://launchpad.net/~openstack
>>>> Post to : openstack [at] lists
>>>> Unsubscribe : https://launchpad.net/~openstack
>>>> More help : https://help.launchpad.net/ListHelp
>>>>
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~openstack
>>> Post to : openstack [at] lists
>>> Unsubscribe : https://launchpad.net/~openstack
>>> More help : https://help.launchpad.net/ListHelp
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~openstack
>> Post to : openstack [at] lists
>> Unsubscribe : https://launchpad.net/~openstack
>> More help : https://help.launchpad.net/ListHelp
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack [at] lists
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp
>

_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


Gabriel.Hurley at nebula

May 30, 2012, 4:44 PM

Post #18 of 19 (317 views)
Permalink
Re: Nodejs in horizon [In reply to]

Websockets is an API for bi-directional client-server communication over TCP, not an implementation. Thereby it's not "an alternative" per se; alternatives to websockets would be long connections with chunked transfer like comet, etc. (which also have issues). There are various implementations of websockets in various languages; the Python implementations have some very serious problems (see my earlier posts in this thread, or the blueprint whiteboard linked below).

For now though, for *anyone* who's interested in that discussion, please direct any further feedback on that future feature to the blueprint (https://blueprints.launchpad.net/horizon/+spec/realtime-communication). I've linked a number of resources from the blueprint whiteboard. I recommend doing your homework and/or testing your hypotheses for Python-based solutions as there's a lot of prior work in this area that's better-off not being rehashed to death.

As far as this thread is concerned, I think we've achieved sufficient consensus on the current topic (LESS) and we'll move forward with that blueprint and code review as such.

All the best,

- Gabriel

> -----Original Message-----
> From: openstack-bounces+gabriel.hurley=nebula.com [at] lists
> [mailto:openstack-
> bounces+gabriel.hurley=nebula.com [at] lists] On Behalf Of
> Adam Young
> Sent: Wednesday, May 30, 2012 2:14 PM
> To: Devin Carlen
> Cc: openstack [at] lists
> Subject: Re: [Openstack] Nodejs in horizon
>
> On 05/30/2012 04:37 PM, Devin Carlen wrote:
> > Long story short - we will work to make node.js an optional build time
> component and leave it as an distro packaging issue. node.js was being
> evaluated as a potential solution to
> https://blueprints.launchpad.net/horizon/+spec/realtime-communication,
> but that blueprint isn't targeted for Folsom, so it's very future. We'll have a
> lot of time to evaluate python based alternatives.
>
> Sounds good. Does websockets qualify as an alternative? If so, I'll update
> the blueprint
>
>
>
> >
> >
> > Devin
> >
> >
> > On May 29, 2012, at 10:26 AM, Adam Young wrote:
> >
> >> On 05/29/2012 12:29 PM, Gabriel Hurley wrote:
> >>> Without rehashing backstory which is available in public archives of this
> thread, while node is currently on the table for LESS it also may play a role
> >>> in future needs as well.
> >>>
> >>> As for your link, yes there are LESS compilers in other languages (there's
> even a nascent one in Python that's very much not ready for prime time) but
> requiring PHP or any other language besides Python opens a similar can of
> worms, and PHP gets us nowhere on any other fronts.
> >>>
> >>> /me refrains from any other comments about PHP.
> >>>
> >>> Moreover, the canonical LESS compiler which is the best supported and
> most stable is the main one written for node.js. Unless there were a 100%
> working Python version I see no reason not to favor the "real" LESS compiler.
> >>>
> >>> All the best,
> >> For LESS, it think it is fine to use even server side Javascript. The CSS
> should be compiled at RPM/DEB build time, and not at run time for live
> deployments, so that is a bit of a non-issue. I'd also be fine with using the
> client side LESS implementation, especially if we want to use the same
> implementation at development and live deployment time, but I can
> understand if there are issues with doing this.
> >>
> >>
> >> Node.js is a whole different server side technology, and that should not
> be implemented at this time.
> >>
> >>
> >>> - Gabriel
> >>>
> >>> On May 29, 2012, at 1:00 AM, "Matthias Runge"<mrunge [at] matthias
> runge.de> wrote:
> >>>
> >>>> On 28/05/12 16:21, Thierry Carrez wrote:
> >>>>> John Postlethwait wrote:
> >>>>>> Sorry if I've missed anything below, this thread has become rather
> >>>>>> fragmented and messy (at least in my email clients) but I will try to
> >>>>>> address the main points I have seen so far:
> >>>> Sorry, if I jump in late in this thread, I may have skipped some basics.
> >>>> If I get it right, nodejs is just required to compile LESS to css, right?
> >>>>
> >>>> There is at least one alternative without requiring nodejs:
> >>>>
> >>>> https://github.com/leafo/lessphp
> >>>> --
> >>>> Matthias Runge<mrunge [at] matthias-runge>
> >>>>
> >>>> _______________________________________________
> >>>> Mailing list: https://launchpad.net/~openstack
> >>>> Post to : openstack [at] lists
> >>>> Unsubscribe : https://launchpad.net/~openstack
> >>>> More help : https://help.launchpad.net/ListHelp
> >>>>
> >>> _______________________________________________
> >>> Mailing list: https://launchpad.net/~openstack
> >>> Post to : openstack [at] lists
> >>> Unsubscribe : https://launchpad.net/~openstack
> >>> More help : https://help.launchpad.net/ListHelp
> >>
> >> _______________________________________________
> >> Mailing list: https://launchpad.net/~openstack
> >> Post to : openstack [at] lists
> >> Unsubscribe : https://launchpad.net/~openstack
> >> More help : https://help.launchpad.net/ListHelp
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack [at] lists
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp



_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


Caitlin.Bestler at nexenta

May 31, 2012, 10:32 AM

Post #19 of 19 (308 views)
Permalink
Re: Nodejs in horizon [In reply to]

Jan Drake wrote:


> For what it's worth, I've noticed a generally myopic trend towards python only. Node.js can play many very good roles as an
> implementation strategy for various openstack capabilities, especially at the edge. I was excited to see it being included.
> There's a balance to be struck in optimizing the development community, especially for core openstack, around a limite
> set of languages; however, I've never trusted an engineer who's ever only coded (or still only codes) in one language.

> So, consider this a nudge in the direction of being open to additional technology sets and languages (not blindly randomly or chaotically).

If we were launching the project from scratch and the question was which language would be better, node.js or python, I would
Strongly advocate node.js.

However, I do not think there is anything "myopic" about wanting to limit the dependencies that the host OS must provide
to support your project, or the amount of learning that is required before a team of developers can be proficient with the
code base for a project.

Once a second major ecosystem is introduced, whether node.js or just a different python threading library, all of the release
decisions become more complex from that day forward. It is not just when to support a new version of the python libraries,
but which python *and* node.js libraries will be supported in the next project release. That extra release work must be undertaken
by each OS distribution that supports openstack.

Any shift in the ecosystem will be a major undertaking, it should only be considered when the costs of not doing it become onerous.


_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp

OpenStack dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.