Is it safe to use JMX to extract metadata from Gemfire? - jmx

I have a requirement to extract metadata(Member and Region attributes) from Pivotal Gemfire. Is it safe to connect to JMX Manager node to extract the metadata using mBeans? Is there an alternative to do so?

Yes, is perfectly safe to do so. In fact, several internal tools (like PULSE) use JMX to access the information about members, regions, metrics, etc.
Another option would be to use the gfsh describe member and gfsh describe region commands.
Hope this helps, cheers.

Related

How to create a custom connector for Presto and InfluxDB

I am trying to create a custom connector for Presto and InfluxDB in order to make it possible for Presto to run SQL queries on InfluxDB. Are there any examples of such a connector being available already?
Connectors are the source of all data for queries in Presto. Even if your data source doesn’t have underlying tables backing it, as long as you adapt your data source to the API expected by Presto, you can write queries against this data.
The only documentation that I found for writing a connector is:
https://prestodb.io/docs/current/develop/example-http.html
If anyone has other examples, can you please share it?
There are multiple connectors in the presto source tree.
When you're connecting to a data source having JDBC driver (probably not your case), extending presto-base-jdbc driver gives you almost all you need. See for example https://github.com/trinodb/trino/tree/master/presto-postgresql
When you're connecting to a non-JDBC-enabled data source (or you need more that it's possible with presto-base-jdbc), you need to implement all the relevant connector interfaces. There isn't good documentation for this other than Java interfaces & source code, but you can follow examples e.g. https://github.com/trinodb/trino/tree/master/presto-cassandra, https://github.com/trinodb/trino/tree/master/presto-accumulo
Yet another option is Greg Leclercq's suggestion to implement a Thrift connector. See his answer for directions.
Another option if you prefer to code in a programming language other than Java, is to implement a Thrift service and use the Thrift connector

Neo4J end user interface

I need to share a Neo4J graph visualization with end users. They should be able to interact with the graph, and perform some very basic querying. For example:
- show me the relationships up to 3 hops away from node named 'Joe'
A first option would be to just give them the standard user interface (usually exposed at port 7474); however this is too powerful as they could perform anything in Cypher.
Is there any way of restricting this interface (so that they cannot trigger expensive queries or even graph updates)? Or maybe other open source / community alternatives?
Thanks
If you are using the Enterprise Edition of neo4j, you will have access to extensive authentication and authorization capabilities, including the ability to assign a reader role to specific user names.
If you do want to use the standard browser interface, you can apply some settings on the neo4j.conf file that may help you out:
dbms.transaction.timeout=10s
dbms.read_only=true
dbms.transaction.timeout will terminate queries exceeding the timeout, so that can prevent expensive queries.
dbms.read_only makes the entire db instance read-only.
You may also build a custom web UI that calls the REST endpoint (need to auth in headers)
or
create an unmanaged extension
https://neo4j.com/docs/java-reference/3.1/#server-unmanaged-extensions
I suggest you the chapter 8 of the excellent book Learning Neo4j, by Rik Van Bruggen. This book is available for download at Neo4j web site.
One of the sections of this chapter shows some open source visualization libraries and visualization solutions.
EDIT 1:
Analyzing a bit more the chapter 8 of the Learning Neo4j book I believe that a promising tool for your use case is the paid solution Linkurio.us (you can run a demo in the site). This solution has a native integration with Neo4j and others graph databases.
EDIT 2:
Alternatively you can build your own visualization solution with a graph visualization library in JavaScript, for example. Here a very useful answer from another StackOverflow question that lists more some libraries that can help you.

How to pull patient ID for a program/device that records MRI patient scans

My company is working on a project and we've run into a wall trying to determine the best way to pull the patients ID. We need the patients ID to name the video file for easy searching.
We want to install this system into a bunch of different scan rooms with different MRI's so we think (but we may be wrong) The best way would be to sniff from the network the conversation between the MRI and the server since this would be more standardized.
I know very little about HL7 or how MRI's interact with the server. If you have any knowledge of these protocols I would love to hear from you.
As was already pointed out in a comment - this is more related to DICOM, than HL7.
I assume the MRI machines will store their image data on a PACS server at some point. So the easiest way would be to just query the PACS server via its DICOM interface for MRI studies. The studies have all the patient information embedded in the DICOM image files when they are stored from the MRI to the PACS. There's also a possibility, that You could query the MRI machine itself via its DICOM interface if it happens to provide the necessary Query/Retrieve SCP-s. Information on that can be found in the DICOM conformance statement of the MRI-s. However getting the data from a PACS server would be the easiest and most logical way of achieving it.
There should be DICOM libraries available for all major programming languages and platforms both paid and free. Get one and start exploring!

How can you define and enforce a Neo4J graph's schema?

I want to achieve, with a Neo4j graph a RDBMS's ability to define and enforce a known schema. We know what our graph should look like (all the edge types and node types). So we simply want to prevent someone (developer/user) from adding an edge or node type which is "invalid" i.e. not part of the defined graph schema. How can we enforce a graphs schema? Note I am not asking about how to enforce the properties of an edge or a graph but simply how to enforce that the graph is made up if a specific set of known edge and node types.
Please help
This should probably be done on the application side. Build a wrapper/API that enforces this sort of thing, and make the developers use it. Sorry for the short answer...
Most of the language drivers or frameworks listed here provide means to define a schema:
http://www.neo4j.org/drivers
For Java we developed structr (https://github.com/structr/structr) where you define your schema in Java beans. You could start f.e. with the simple Maven archetype as shown in this screencast: http://vimeo.com/53235075
Cheers
Axel
It has to happen in a layer above Neo4j. I've been building one of those layers (Restagraph), which puts a REST interface on top of it.
It's a mite less mature than Structr, but may be worth a look. I package it in a Docker image, and it's designed so you can easily define your own schema in YAML files.

"Business" Software Metrics

I'm looking for a service (or gem) that will enable me to create a track software-produced business metrics. I should clarify what I'm looking for, because this might be me failing at articulating what I'm looking for in Google. Basically, based on the context of my software, I want to be able to emit certain values and then have them accumulate as metrics. These are not performance or request metrics, per se, and certainly not code-quality metrics.
The quintessential use case is: suppose I have an if / else block in my code, I'd like to publish a metric that tells me how often I choose the true block vs the false block.
Or, suppose I'm using delayed_job, I'd like to publish how often jobs run and how many are in the queue on each run.
I can find all the metrics I want in code, I'm just not sure where to put them right now.
AWS cloudwatch has an api to publish your own metrics. New Relic does, too. However, both look expensive and give me a whole lots I'm not looking for (all the host metrics and code profiling).
Are there other services out that that offer this kind of functionality?
There are actually a couple of services that offer this functionality. My company's product, Instrumental sounds like it might be a great fit for you - we've got a Ruby client as well as some extra tools for measuring system level stuff among other things.
If you're up for hosting your own stats collecting services, many people use the Graphite/Statsd combination; it takes a bit to set up and maintain, but it can definitely accomplish what you're looking to do here as well.
If I understood you right, you're looking for some form of event tracking (as in, how often a part of your code gets used as opposed to another part). If that's right, you might want to give Mixpanel a look.
You should see NewRelic (APM or Insights modules) or Microsoft Insights, they allow you to create custom metrics (business metrics) inside your source code and monitor them online using dashboards.

Resources