Cassandra
  1. Cassandra
  2. CASSANDRA-918

Create a dazzling web ui for cassandra

    Details

    • Type: Wish Wish
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Fix Version/s: None
    • Component/s: Examples
    • Labels:

      Description

      This would need to pull in jmx attributes and be able to execute operations.

        Issue Links

          Activity

          Gary Dusbabek created issue -
          Jonathan Ellis made changes -
          Field Original Value New Value
          Labels gsoc2010 gsoc gsoc2010
          Hide
          Jonathan Ellis added a comment -

          prior art: contrib/cassandra_browser, http://github.com/driftx/chiton

          chiton works with 0.6, cassandra_browser probably does not w/o some tweaks.

          Show
          Jonathan Ellis added a comment - prior art: contrib/cassandra_browser, http://github.com/driftx/chiton chiton works with 0.6, cassandra_browser probably does not w/o some tweaks.
          Hide
          Gary Dusbabek added a comment -

          Currently, there are various management and monitoring functions spread across JMX and the thrift client (and for good reason too). In my mind a web UI would unify these and become a tool for simplified monitoring and management.

          I don't want every cassandra node to house its own web server. This should be an application that stands on its own, possibly in its own server that communicates with the cassandra cluster.

          Language is not that important. The biggest challenge early on will be figuring out a way to access the JMX bits from a non-java platform. (Although, if you choose to implement this using a java servlet, then no problem.) http://code.google.com/p/polarrose-jmx-rest-bridge/ has also been suggested as a way to do this.

          Show
          Gary Dusbabek added a comment - Currently, there are various management and monitoring functions spread across JMX and the thrift client (and for good reason too). In my mind a web UI would unify these and become a tool for simplified monitoring and management. I don't want every cassandra node to house its own web server. This should be an application that stands on its own, possibly in its own server that communicates with the cassandra cluster. Language is not that important. The biggest challenge early on will be figuring out a way to access the JMX bits from a non-java platform. (Although, if you choose to implement this using a java servlet, then no problem.) http://code.google.com/p/polarrose-jmx-rest-bridge/ has also been suggested as a way to do this.
          Hide
          Jonathan Ellis added a comment -

          I'm primarily interested in seeing something focusing on exposing the Thrift api for querying and KS/CF management (post CASSANDRA-44), but that should leave plenty of time to do something with JMX too over a whole summer.

          Other things being equal, I'd like to see this in Python, since it's kind of our unofficial 2nd language after Java, and using Java for web stuff is too painful to contemplate. But go right ahead and propose something if your heart is with PHP or Ruby or whatever.

          Show
          Jonathan Ellis added a comment - I'm primarily interested in seeing something focusing on exposing the Thrift api for querying and KS/CF management (post CASSANDRA-44 ), but that should leave plenty of time to do something with JMX too over a whole summer. Other things being equal, I'd like to see this in Python, since it's kind of our unofficial 2nd language after Java, and using Java for web stuff is too painful to contemplate. But go right ahead and propose something if your heart is with PHP or Ruby or whatever.
          Hide
          Philippe Pinheiro added a comment -

          Another suggestion is to develop a Flex UI and use Blaze DS or Granite DS for the communication with the JMX servers.

          Here are some pros and cons :

          + with this solution, we can use the "MBean Notification Mechanism" for managing events and directly send them to the Flex UI without need of refresh
          + we can easily develop a "desktop" application (AIR) based on the same code

          • BlazeDS or GraniteDS don't provide a direct access to the JMX objects, we need to develop POJOs containing the code accessing the JMX servers
          • users need to have a flash player plugin for the web version and install Adobe AIR for the desktop version

          I already developed a similar UI to remotely monitor a Java application through JMX and the development was straightforward.

          Show
          Philippe Pinheiro added a comment - Another suggestion is to develop a Flex UI and use Blaze DS or Granite DS for the communication with the JMX servers. Here are some pros and cons : + with this solution, we can use the "MBean Notification Mechanism" for managing events and directly send them to the Flex UI without need of refresh + we can easily develop a "desktop" application (AIR) based on the same code BlazeDS or GraniteDS don't provide a direct access to the JMX objects, we need to develop POJOs containing the code accessing the JMX servers users need to have a flash player plugin for the web version and install Adobe AIR for the desktop version I already developed a similar UI to remotely monitor a Java application through JMX and the development was straightforward.
          Hide
          Jonathan Ellis added a comment -

          Would switching to MXBeans (http://java.sun.com/javase/6/docs/api/javax/management/MXBean.html) obviate the need for another POJO layer? Seems like that's what it's designed for.

          Show
          Jonathan Ellis added a comment - Would switching to MXBeans ( http://java.sun.com/javase/6/docs/api/javax/management/MXBean.html ) obviate the need for another POJO layer? Seems like that's what it's designed for.
          Hide
          Pablo Cuadrado added a comment -

          Hi!

          My idea on the GUI was to develop at first a communication mechanism/layer, providing both JMX and Thrift functionalities, in order to achieve monitoring and querying capabilities like most DB web UIs do.

          It would be good to know which features are most desirable, to develop a roadmap. Please comment any opinion/idea on this matter!

          As for the language, personally, I don't mind if it's PHP or Python, BUT: I care about running the project in a language which is familiar to the Cassandra community. I wouldn't like to build a PHP UI which seems like a foreign member standing outside the Cassandra umbrella.

          About Flex, in my experience, I don't see it as "flexible" as HTML/CSS/Javascript (the usual suspects on the client side) are. For instance, HTML runs on different devices/platforms/browsers almost the same way, or by tweaking some CSS and Javascript (think iPhone, Blackberry, Android, netbooks, etc).

          Nowadays, with modern browser is easy to have graphs updated on the run with any need of refresh. Take a look at YUI Charts polling mechanisms:

          http://developer.yahoo.com/yui/examples/charts/charts-xhr-polling.html

          These are flash implementations but can also be done via javascript very easily.

          Show
          Pablo Cuadrado added a comment - Hi! My idea on the GUI was to develop at first a communication mechanism/layer, providing both JMX and Thrift functionalities, in order to achieve monitoring and querying capabilities like most DB web UIs do. It would be good to know which features are most desirable, to develop a roadmap. Please comment any opinion/idea on this matter! As for the language, personally, I don't mind if it's PHP or Python, BUT: I care about running the project in a language which is familiar to the Cassandra community. I wouldn't like to build a PHP UI which seems like a foreign member standing outside the Cassandra umbrella. About Flex, in my experience, I don't see it as "flexible" as HTML/CSS/Javascript (the usual suspects on the client side) are. For instance, HTML runs on different devices/platforms/browsers almost the same way, or by tweaking some CSS and Javascript (think iPhone, Blackberry, Android, netbooks, etc). Nowadays, with modern browser is easy to have graphs updated on the run with any need of refresh. Take a look at YUI Charts polling mechanisms: http://developer.yahoo.com/yui/examples/charts/charts-xhr-polling.html These are flash implementations but can also be done via javascript very easily.
          Hide
          Philippe Pinheiro added a comment -

          Switching to MXBeans will not avoid the need of a POJO layer in a Flex solution to bridge Flex and JMX.
          This layer is in any case required to connect to the JMX servers, retrieve remote java objects and call the java methods.

          I think that this layer is also required in the server side for an HTML/CSS/Javascript solution.
          it's what Pablo called a "communication mechanism/layer, providing both JMX and Thrift functionalities"

          So for me the first step is to develop this java layer and then we can use it in a JSP or Flex solution.
          But for me we must stay in the java world for the server side (so avoid PHP)

          Show
          Philippe Pinheiro added a comment - Switching to MXBeans will not avoid the need of a POJO layer in a Flex solution to bridge Flex and JMX. This layer is in any case required to connect to the JMX servers, retrieve remote java objects and call the java methods. I think that this layer is also required in the server side for an HTML/CSS/Javascript solution. it's what Pablo called a "communication mechanism/layer, providing both JMX and Thrift functionalities" So for me the first step is to develop this java layer and then we can use it in a JSP or Flex solution. But for me we must stay in the java world for the server side (so avoid PHP)
          Hide
          Pablo Cuadrado added a comment -

          Guys!

          In case you missed it, I'm copying this e-mail (related to this subject), which I've sent to the list, I have a working java JMX-Rest interface.

          ------------

          In a first progressive step, I managed to adapt a simple (yet
          effective) REST interface I've found at:

          http://blogs.sun.com/jmxnetbeans/entry/restful_access_to_jmx_instrumentation

          The example was connecting to the first MBean server found on the
          virtual machine, so it was showing many JVM MBeans, but not the
          Cassandra ones. I added a JMXConnector articulation (connecting to the
          default 8080 port) to enable remote MBean browsing... with an awful
          implementation... HORRIBLE!... But it was just a simple test...

          It even supports reading of tabular, composite, collections, complex MBeans.

          Runs on it's own http server (in port 2021 in my example), this is a
          working URL which returns the requested data:

          http://localhost:2021/jmx/org.apache.cassandra.db:type=ColumnFamilyStores,name=Keyspace1,columnfamily=Standard2/MemtableDataSize

          So, that huge URI returns a single number!!!


          Limitations so far:

          • TO-DO items: Set, Invoke and Notifications handling.
          • The "request-per-mbean-attribute" approach is a bit rough, the web
            client will be doing a request for every single magnitude being
            measured... the interface should have more commands to retrieve
            related sets of information, possibly JSON formatted.

          Regards!

          ==============

          Also, take a look at:

          http://blogs.sun.com/jmxnetbeans/entry/restful_access_to_jmx_instrumentation1

          Show
          Pablo Cuadrado added a comment - Guys! In case you missed it, I'm copying this e-mail (related to this subject), which I've sent to the list, I have a working java JMX-Rest interface. ------------ In a first progressive step, I managed to adapt a simple (yet effective) REST interface I've found at: http://blogs.sun.com/jmxnetbeans/entry/restful_access_to_jmx_instrumentation The example was connecting to the first MBean server found on the virtual machine, so it was showing many JVM MBeans, but not the Cassandra ones. I added a JMXConnector articulation (connecting to the default 8080 port) to enable remote MBean browsing... with an awful implementation... HORRIBLE!... But it was just a simple test... It even supports reading of tabular, composite, collections, complex MBeans. Runs on it's own http server (in port 2021 in my example), this is a working URL which returns the requested data: http://localhost:2021/jmx/org.apache.cassandra.db:type=ColumnFamilyStores,name=Keyspace1,columnfamily=Standard2/MemtableDataSize So, that huge URI returns a single number!!! Limitations so far: TO-DO items: Set, Invoke and Notifications handling. The "request-per-mbean-attribute" approach is a bit rough, the web client will be doing a request for every single magnitude being measured... the interface should have more commands to retrieve related sets of information, possibly JSON formatted. Regards! ============== Also, take a look at: http://blogs.sun.com/jmxnetbeans/entry/restful_access_to_jmx_instrumentation1
          Hide
          Gary Dusbabek added a comment -

          I don't know much about the jmx-rest bridge. Is it a requirement for every cassandra node to run a web server? We don't want to go in that direction. We want one service that connect to every node in the cluster.

          Show
          Gary Dusbabek added a comment - I don't know much about the jmx-rest bridge. Is it a requirement for every cassandra node to run a web server? We don't want to go in that direction. We want one service that connect to every node in the cluster.
          Gary Dusbabek made changes -
          Link This issue relates to CASSANDRA-451 [ CASSANDRA-451 ]
          Hide
          Pablo Cuadrado added a comment -

          Not a requirement at all!

          Think about this architecture:

          Machine A: User running Web client ---> Machine B: The Web server with JMX Bridge, also where the UI resides. ---> Machine C: Any Cassandra node

          The bridge doesn't need to coexist with the node!

          Show
          Pablo Cuadrado added a comment - Not a requirement at all! Think about this architecture: Machine A: User running Web client ---> Machine B: The Web server with JMX Bridge, also where the UI resides. ---> Machine C: Any Cassandra node The bridge doesn't need to coexist with the node!
          Hide
          Jonathan Ellis added a comment - - edited

          Did a little poking, the jmx rest bridge used here is dual licensed GPL/CDDL: https://opendmk.dev.java.net/contributions/rest-adaptor/readme.html

          CDDL is okay for us to include.

          How is the one used here different from the one at http://code.google.com/p/polarrose-jmx-rest-bridge/ , which at least has a project page?

          Show
          Jonathan Ellis added a comment - - edited Did a little poking, the jmx rest bridge used here is dual licensed GPL/CDDL: https://opendmk.dev.java.net/contributions/rest-adaptor/readme.html CDDL is okay for us to include. How is the one used here different from the one at http://code.google.com/p/polarrose-jmx-rest-bridge/ , which at least has a project page?
          Hide
          Pablo Cuadrado added a comment -

          Oh, I wast just using it as an example, but if we can actually include it, could be a good starting point and save some work.

          The one at polarrose is not that different, both use the javax.management.remote objects, but is a very simple chunk of code, the one at opendmk has a bit more complete implementation, supporting more complex MBeans. Although, I haven't fully tested that functionality.

          Show
          Pablo Cuadrado added a comment - Oh, I wast just using it as an example, but if we can actually include it, could be a good starting point and save some work. The one at polarrose is not that different, both use the javax.management.remote objects, but is a very simple chunk of code, the one at opendmk has a bit more complete implementation, supporting more complex MBeans. Although, I haven't fully tested that functionality.
          Hide
          Pablo Cuadrado added a comment -

          Hi!

          I just got it working.

          http://www.flickr.com/photos/pablin/4484128875/

          The graph is actively updated every 4 seconds. It's showing the value from the JMX-REST interface.

          It's using:

          • Python/Django
          • Java JMX-Rest adapter.
          • Google Visualization API, jQuery.

          You can see how the value changes as I set data on the Cassandra client.

          Show
          Pablo Cuadrado added a comment - Hi! I just got it working. http://www.flickr.com/photos/pablin/4484128875/ The graph is actively updated every 4 seconds. It's showing the value from the JMX-REST interface. It's using: Python/Django Java JMX-Rest adapter. Google Visualization API, jQuery. You can see how the value changes as I set data on the Cassandra client.
          Hide
          Jonathan Ellis added a comment -

          The jmx part is addressed by CASSANDRA-1068. More than that probably doesn't belong in-tree.

          Show
          Jonathan Ellis added a comment - The jmx part is addressed by CASSANDRA-1068 . More than that probably doesn't belong in-tree.
          Jonathan Ellis made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Won't Fix [ 2 ]
          Gavin made changes -
          Workflow no-reopen-closed, patch-avail [ 12502871 ] patch-available, re-open possible [ 12751873 ]
          Gavin made changes -
          Workflow patch-available, re-open possible [ 12751873 ] reopen-resolved, no closed status, patch-avail, testing [ 12757981 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Gary Dusbabek
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development