XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    A question for the creators of XO

    Scheduled Pinned Locked Moved Xen Orchestra
    31 Posts 9 Posters 8.9k Views 6 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      jasonnix
      last edited by Danp

      Hello,
      Why is XO written in JavaScript? Why isn't it written in PHP, Ruby or HTML5 programming languages? Are PHP, Ruby or HTML5 programming languages ​​not able to do this?

      Thanks.

      florentF 1 Reply Last reply Reply Quote -1
      • florentF Offline
        florent Vates 🪐 XO Team @jasonnix
        last edited by florent

        @jasonnix I am not a creator, but I work on XO .
        Most of he uses case can be done in any languages. You could clone XO (or even do more) in any language( though I don't advice to chose cobol)
        Javascript here is quite handy, since a lot of interactions are event based ( a changed from the api is repercuted on XO server ) and a lot of disk handling is easier to do with stream in the backup

        Also we share the same language with the front (HTML5/react) , that ease some of the pain of data transformation between language.

        a little bit of history : https://xen-orchestra.com/blog/current-state-and-perspectives/

        J 1 Reply Last reply Reply Quote 0
        • J Offline
          jasonnix @florent
          last edited by

          Hi @florent,
          So somehow this was a personal taste. Is it correct?

          D 1 Reply Last reply Reply Quote 0
          • D Offline
            davemcl @jasonnix
            last edited by davemcl

            @jasonnix Not really a taste thing.
            React likely has the larger ecosystem and majority of mindshare in JS land.
            There are very comprehensive component libraries out there for React and the growing numbers of React devs makes it easier to find people to work on your product.
            Given the type of frontend/backend interaction that XOA requires via web sockets React/Javascript is a solid choice.

            1 Reply Last reply Reply Quote 0
            • olivierlambertO Offline
              olivierlambert Vates 🪐 Co-Founder CEO
              last edited by

              XO creator here. Initially started in PHP (back in 2009).

              Switched to JS for many reasons, but all in all it was because you can have one language both for backend (NodeJS) and frontend. It's also relatively easy to get people fluent in JS 🙂

              J 1 Reply Last reply Reply Quote 1
              • J Offline
                jasonnix @olivierlambert
                last edited by

                Hello @olivierlambert,
                Can't PHP or Ruby really have the functionality and features of JavaScript? Aren't the number of PHP or Ruby developers equal or more than JavaScript?

                1 Reply Last reply Reply Quote 0
                • olivierlambertO Offline
                  olivierlambert Vates 🪐 Co-Founder CEO
                  last edited by

                  Short answer (I'm in vacation): no, not in our case.

                  Also I'm not sure to understand the reason behind your question 🤔

                  J 1 Reply Last reply Reply Quote 0
                  • J Offline
                    jasonnix @olivierlambert
                    last edited by

                    Hi @olivierlambert,
                    Can you tell me which JavaScript features are not available in Ruby or PHP?

                    gskgerG 1 Reply Last reply Reply Quote 0
                    • gskgerG Offline
                      gskger Top contributor @jasonnix
                      last edited by

                      @jasonnix On the other hand, why should one use Ruby or PHP when Javascript fits the projects requirements? Javascript is a State of the Art development environment with a lot of available and capable resources. According to the (maybe biased 😇) conclusion of the State of Javascript 2022 survey, JavaScript and TypeScript are more vibrant than ever. You don't normally change horses in projects like this without good reason.

                      Would love to understand why you are asking though.

                      J 1 Reply Last reply Reply Quote 0
                      • J Offline
                        jasonnix @gskger
                        last edited by

                        Thanks @gskger.
                        I asked because languages like PHP and Ruby are very popular in the web and have many developers. you said "Javascript is a State of the Art development environment with a lot of available and capable resources.", I want to know what features are there in this project that PHP or Ruby can't do.

                        gskgerG marcungeschiktsM 2 Replies Last reply Reply Quote 0
                        • gskgerG Offline
                          gskger Top contributor @jasonnix
                          last edited by

                          @jasonnix said in A question for the creators of XO:

                          I want to know what features are there in this project that PHP or Ruby can't do

                          A feature comparison (or retrospective evaluation of the decision) is not needed anymore for a project that already choose a development environment years ago, engaged people with the required skills and build a deployment process around a commercial product.

                          Could XO be build with PHP or Ruby? Probably yes. Does it add value to the product? Probably no, because it working just fine with Javascript as a future proofed development environment.

                          I apologize if I still not get why you are asking.

                          1 Reply Last reply Reply Quote 1
                          • olivierlambertO Offline
                            olivierlambert Vates 🪐 Co-Founder CEO
                            last edited by

                            I start to wonder if we are talking to an actual human or an LLM 😞 I still don't get the point of this discussion.

                            J 1 Reply Last reply Reply Quote 3
                            • J Offline
                              jasonnix @olivierlambert
                              last edited by

                              Hi @olivierlambert,
                              No, I'm not a bot. I asked it because I need your experiences. I want to make a panel for Xen.

                              D gskgerG 2 Replies Last reply Reply Quote 0
                              • D Offline
                                DustinB @jasonnix
                                last edited by

                                @jasonnix said in A question for the creators of XO:

                                Hi @olivierlambert,
                                No, I'm not a bot. I asked it because I need your experiences. I want to make a panel for Xen.

                                So you know how to program with PHP and Ruby and not with Javascript, so the question is really "Why can't this be rewritten so I can help?"

                                florentF 1 Reply Last reply Reply Quote 2
                                • florentF Offline
                                  florent Vates 🪐 XO Team @DustinB
                                  last edited by

                                  @DustinB you are really asking to rewrite the full XO project in PHP so you can contribute? or did I miss something
                                  4fd79a44-efbd-4360-b736-5506ab9936a4-image.png
                                  since there is only 136K line of code to rewrite, maybe it can be a good weekend project ?

                                  D 1 Reply Last reply Reply Quote 1
                                  • marcungeschiktsM Offline
                                    marcungeschikts Vates 🪐 Project mgmt @jasonnix
                                    last edited by

                                    @jasonnix said in A question for the creators of XO:

                                    I asked because languages like PHP and Ruby are very popular in the web and have many developers.

                                    Javascript and node.js seem to be more popular than PHP and Ruby:
                                    https://survey.stackoverflow.co/2023/#most-popular-technologies-language-prof
                                    https://survey.stackoverflow.co/2023/#most-popular-technologies-webframe-prof

                                    nikadeN 1 Reply Last reply Reply Quote 1
                                    • nikadeN Offline
                                      nikade Top contributor @marcungeschikts
                                      last edited by

                                      I dont think a lot of ppl use PHP anymore, its a good language to get started with coding but its not something you want to run in mission critical production environments.

                                      I think node/java is a good choice for this project since it can be used for both backend and frontend, it runs smooth on pretty much all distros that supports it and now days a lot of ppl know node/java so it is easy to find ppl to code for you.

                                      1 Reply Last reply Reply Quote 1
                                      • olivierlambertO Offline
                                        olivierlambert Vates 🪐 Co-Founder CEO
                                        last edited by olivierlambert

                                        PHP is still widely used and there's some neat frameworks. But again, seeing the language only from its popularity is wrong. It's an entire "ecosystem" you need to look at:

                                        • being reasonably good for your existing team (ie if your team like the language/framework or not, doesn't matter if it's personal taste, it will have an impact on the team performance)
                                        • if the language is not too niche to easily find more devs when you grow
                                        • that the language pros are worth it in your context (ie we don't specifically need something too complex to learn like Rust to build an UI): all about usage context. It's obviously different for an hypervisor or a toolstack
                                        • there's a big enough ecosystem (libraries, packaging, sec updates etc.)

                                        And probably other things I forgot. So as you can see, there's not one reason to adopt a language, but many and most of all them depend on the project and people around it.

                                        J 1 Reply Last reply Reply Quote 0
                                        • D Offline
                                          DustinB @florent
                                          last edited by

                                          @florent said in A question for the creators of XO:

                                          @DustinB you are really asking to rewrite the full XO project in PHP so you can contribute? or did I miss something
                                          4fd79a44-efbd-4360-b736-5506ab9936a4-image.png
                                          since there is only 136K line of code to rewrite, maybe it can be a good weekend project ?

                                          I'm not, lol. I was pointing out what @jasonnix was seeming to ask.

                                          1 Reply Last reply Reply Quote 0
                                          • gskgerG Offline
                                            gskger Top contributor @jasonnix
                                            last edited by gskger

                                            @jasonnix said in A question for the creators of XO:

                                            I want to make a panel for Xen

                                            If by make a panel for Xen you mean a dashboard to visualize or controll a Xen-enabled host or the virtualized guests, I would suggest to start learning about XAPI or better XO API.

                                            How you design or implement such a panel is up to your ideas, capabilities and choice of the tools you are familiar with, be it Ruby, PHP, Java or Javascript. Also check out XCP-ng Center which is maintained by @michael-manley in a community effort and uses C# to controll Xen-enabled hosts.

                                            J 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post