Tinkerpop common version for multiple databases - neo4j

Summary
I am devloping a app that is intendent to work across multiple graph databases suppoted by tinkerpop
Details
Based on my research the same version of tinkerpop library (gremlin-python) does not work with the latest version of all the graph databases. What is the best approach for this situation. The databases I intent to test are
JanusGraph 0.2.0 supported gremlin-python 3.2.7
NEO4J 3.3.3 supported gremlin-python 3.3.2
I am still trying to integrating some more databases like orientDB and Amazon Neptune do you know what version they will supported.

This issue can be a little tricky especially with non-open source systems that don't publish version and feature support clearly. For open source systems, you can typically find the version of TinkerPop they support for a particular version by looking at the pom.xml of the project. For OrientDB that means finding the version you want (in this case 3.2.3.0) and then looking for the gremlin-core dependency:
https://github.com/orientechnologies/orientdb-gremlin/blob/3.2.3.0/driver/pom.xml#L47
The version points to a property, so examine the pom a bit further and you'll see that number defined above:
https://github.com/orientechnologies/orientdb-gremlin/blob/3.2.3.0/driver/pom.xml#L14
So OrientDB 3.2.3.0 supports TinkerPop 3.2.3. With closed source systems you can only search around until you find the answer your looking for or ask the vendor directly I guess - I've seen that Neptune is on 3.3.x, but I'm not sure of what version of "x".
Just because all of these systems support different versions of TinkerPop and the general recommendation is to use a matching TinkerPop version to connect to them doesn't mean that you can't get a 3.3.x driver to connect to a 3.2.x based server. You may not have the best experience doing so and you would need to be aware of a few things as you do that, but I think it can be done.
The key to this to work from a driver perspective is to ensure that you have the right serialization configuration for the graph you are connecting to. This is true whether you are trying to connect to a same version system or not. By default, TinkerPop ensures that these configurations within the same version are aligned so that they work out of the box. This is why we tend to recommend that you use the same version when possible. When not possible, you need to make those alignments manually.
For example, if you scroll down in this link a bit to the "Serialization" section you will find the supported formats for Neptune:
https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-gremlin-differences.html
As long as you configure your driver to match one of those formats it should work for you. The same could be said of JanusGraph, which in contrast to Neptune, will not support Gryo or GraphSON 3.0 as it is bound to the 3.2.x line. The configuration for the serializers can be found in JanusGraph's packaging of Gremlin Server:
https://github.com/JanusGraph/janusgraph/blob/v0.2.0/janusgraph-dist/src/assembly/static/conf/gremlin-server/gremlin-server.yaml#L15-L21
As to how you configure your python driver for serialization? Admittedly, there isn't a lot written on that. The key is to set the message_serializer when configuring the Client (from gremlinpython 3.3.2):
https://github.com/apache/tinkerpop/blob/3.3.2/gremlin-python/src/main/jython/gremlin_python/driver/client.py#L44-L45
You can see there that by default it is set to GraphSON 3.0. So, that's perfect for Neptune, but not JanusGraph. For JanusGraph, which doesn't support GraphSON 3.0 yet, you would just change the configuration to use the GraphSON 2.0 serializer:
https://github.com/apache/tinkerpop/blob/3.3.2/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py#L149
So, that is just getting a connection working - then there are other things to consider:
If you use a new version of gremlinpython against an older server, you will need to make sure that you are aware of any features that aren't supported on the server (e.g. don't use math() step from your 3.3.x client because it won't work on a 3.2.x server)
CosmosDB has may allow you to connect with 3.3.x, but it doesn't have full Gremlin support and at this time does not support bytecode based traversals - only strings
A number of bugs have been fixed in GraphSON serialization over these releases and sometimes certain types may have a revised serialization scheme that may prevent a 3.3.x from talking to a 3.2.x - I can't think of any big issues like that offhand that would immediately jump out, but I'm pretty sure it's happened - perhaps something in serialization of Tree and perhaps some of the extended types. You can always look at the full list of GraphSON types here and compare between published versions if you run into trouble.

Related

InfluxDB - 2.0 - stand alone DB

I am using Influxdb with Grafana for a while and I like it.
I am confused with the new version of Influxdb2.0. I was searching the doc and could not find useful info.
I have some questions.
Will Influxdb be available only as bundled with db + ui as 1 single binary going forward? Can we have standalone DB?
Will the Flux replace the current SQL like InfluxQL ? Or InfluxQL will also be supported.
Yes, I believe the intention is to bundle the UI into the single binary so that it is always available with no additional installs. You can continue to use Grafana though - ignoring the bundled UI entirely*. There's no problem to ignore it so the DB is still "standalone". Since it is OSS, you could build a binary without the bundled UI if that is important for your use case.
InfluxDB 2.0 OSS is currently in RC0 (as of late Oct 2020). This version supports both InfluxQL via a compatibility API (/query) and Flux via the new /api/v2/query API querying. The query and response formats are different. The docs have examples. In general, Flux is the direction InfluxDB is going.
*There may be some rough edges in the RC around configuring the first user without using the UI and only using the API. I have not tried this. I would expect the API to continue to improve is this area.

Whats difference between HL7 v2.5 and v2.8

Whats difference between HL7 version 2.5 and 2.8. I searched on google, but couldn't get any good information on this.
We need to migrate to 2.8, and wondering how much impact we would have because of this change.
All HL7v2 versions are backwards compatible, meaning that if you assert that you are using 2.8, a 2.5 message should automatically be valid in 2.8.
That said, HL7v2 implementations may be making rules/assumptions that don't follow anything in the spec.
From HL7v2.7 Chapter 1.8.1
The usage of multiple versions of HL7 2.x within a single integration infrastructure creates further anomalies that are introduced as the Standard has evolved. While all attempts have been made to maintain “backwards compatibility” it is clearly a goal that cannot be completely achieved. For example, documentation exists within HL7 2.x that, after several years of continued support, has retired older data types with newer definitions that support more comprehensive properties including requirements for all countries using HL7.
You state that you need to migrate to 2.8. The only reason you would need to upgrade is if you have need of a new field added in a version between 2.5 and 2.8.
Chapter 1 of each HL7 version spec usually contains errata and breaking changes between versions.

How to handle the "Unknow ODataVersion 3.0" exception when I use odata4j?

I am studying the odata protocal, and find the odata4j, but when I follow the Consumers Example, an exception occurred, "java.lang.IllegalArgumentException: Unknown ODataVersion 3.0". I debug it and found the odata4j is not supported odata version 3. My question is how can I fix it, or how can I use odata4j? Can I change something to make the version to 2 or 1?? Thank you very much.
By the way, I dowloaded the latest odata4j, which is version 0.7.
A sincere recommendation is to switch to Apache Olingo if you would like to implement OData services or clients on the Java platform. The only reason is that OData4J hasn't been updated for more than a year and is not currently supported or maintained. Apache Olingo, on the other hand, is been actively contributed by SAP, Microsoft, and many others. Thus, there are also more samples and documentations there.

Grails vs Roo - why SpringSource is pushing two very similar technologies?

SpringSource (now VMWare) has two very similar technologies: Grails and Spring Roo. I have been using Grails, but I see that SpringSource is actively working on something that is a competitor for that technology and that makes me worried about the future of Grails.
Does anyone know how these technologies relate, are they going to be merged, or one of them will be abandoned?
Besides, are there any important technical differences betweent Grails and Roo?
SpringSource's goal is to make it as fast and easy as possible for people to build, run and manage Spring-based solutions. We have both Grails and Spring Roo because we deeply care about developer productivity and unquestionably both of these tools deliver a serious boost to what teams can achieve on top of Spring.
We have both technologies because Roo and Grails are very different at philosophical and implementation levels (as already noted in the other replies). Each technology approaches its primary language (Java or Groovy) and operating model (dev-time or runtime) with the philosophy of "how do we make the value proposition unbelievably good using this language and operating model combination?". As such you'll see each technology adopting a different style that maximises that combination (Roo's Java+Dev-time or Grail's Groovy+Runtime) and the commensurate benefits.
These differences are actually very positive, because they mean the Spring community can chose which "flavour" of productivity solution they prefer. While these initial differences around language choice and runtime/dev-time operation are immediately apparent, the choice of Grails or Roo also extends to more subtle considerations such as the default technologies used, user interaction model, IDE support, dependencies, standards, roadmap, extensions etc. Nearly all of these differences are a natural consequence of pursuing a best-of-breed solution for a particular language style.
Our best advice is to consider both solutions. Each have their sweet spots, but there are differences between the two which will make your overall experience better with one technology or the other in a given context. Both reference guides detail the respective benefits of each solution. Of course, remember the time investment is minimal in trying both out. In 10 minutes you can build a project in Roo or Grails, so give them a try and see what feels more natural for you given your specific background and project needs.
The main difference is that Roo is a pure Java framework whereas Grails leverages Groovy as well as Java. Both are built on the core Spring libraries and make use of popular Java open source libraries.
This question was asked back when Roo was announced and Graeme Rocher (Grails lead) says that both frameworks have a place within Spring and are supported equally.
If anything, I think Grails has a brighter future than Roo. I love developing with it and don't see any downsides to it not being pure Java.
Grails and Roo are very different. The first major difference is the language used. While you can write Groovy code like traditional Java code you still need the Groovy dependencies to run Grails applications. To be as productive as possible in Grails you also need to have a grasp of features in Groovy that are not currently part of Java such as Closures. Another difference is the philosophy the frameworks take to generating code. Grails generates a lot of methods at runtime while Roo generates them on request during the development process. Roo has no behind the scenes magic accept for the usage of aspect oriented programming, and you can view all the code that Roo generates. For example in Roo you must use a command to have it generate dynamic finder methods such as findByBook() and then view the generated code in the .aj files. In Grails the findByBook() method is created at runtime, and you can’t view the generated code. Roo also allows you to stop using the framework if you chose while continuing to have a running application by merging all the generated code into normal .java files. You then have no dependencies on any Roo libraries at either runtime or design time. If you decide you don’t like Grails there’s no way to stop using the framework while continuing to have a functioning application.
IMO the two are not very similar. Even though there are similarities the following are significant differences:
Roo uses "Stock-Standard Java",
Grails is based on Groovy
Grails is a Web framework, Roo is not
Roo is very similar to Grails' command line system (e.g. the create-app, create-domain-class, test-app type commands found in Grails). I would not be surprised to see some "cross-pollination" between this part of the Grails framework and Roo.
Ben Alex from SpringSource talks about Roo in this interview and he is asked about Grails vs Roo. The main difference besides using different languages (Groovy vs Java as others mentioned) is that Roo is mainly a development time tool and Grails is more involved in runtime.
They're actually not that similar. Roo does it's magic at compile time, where Grails is does it runtime. Because of that Roo projects does not take any performance hits at runtime.
I can't see how they could be merged as Grails is built upon Groovy and Roo on Java.
I saw some comments on the Grails mailing lists which indicated that the authors believed that Roo exists only as a stepping-stone to Grails! However I am personally considering a possible switch from Grails to Roo. I think the main difference is between dynamic and statically typed languages - to me this is huge. I love many features of Grails but I prefer the IDE support and compile-time checking of a statically typed language. Some others feel exactly the opposite, hence horses for courses. That said, static groovy is currently under heavy development so who knows what the future holds.
We had a requirement where we had an application in production and was developed in Spring MVC and the velocity of developing new features were slow. We had to explore alternate frameworks like Grails and Roo. I personally spent close to a month exploring which one was better.
If you want to see the details of the analysis visit # http://krishnasblog.com/2012/05/08/roo-vs-grails/
We explored following features in both these and below is our findings. The final verdict we are not sure we will use either one, we are still exploring

Rails or Grails? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Grails vs Rails. Which has better support? And which one is a better choice to develop medium size apps with? Most importantly which one has more plug-ins?
One other thing worth mentioning: the design philosophy of both framework is somewhat different when it comes to the model. Grails is more "domain-oriented" while Rails is more "database-oriented".
In Rails, you essentially start by defining your tables (with field names and their specifics). Then ActiveRecord will map them to Ruby classes or models.
In Grails, it's the reverse: you start by defining your models (Groovy classes) and when you hit run, GORM (Grails ActiveRecord equivalent) will create the related database and tables (or update them). Which may also be why you don't have the concept of 'migrations' in Grails (although I think it will come in some future release).
I don't know if one is better than the other. I guess it depends on your context.
This being said, I'm still myself wondering which one to choose. As Tom was saying, if you're dependent on Java you can still go for JRuby - so Java reuse shouldn't be your sole criterion.
I guess if you are a Java developer and want to have access to all the existing enterprise Java libraries and functionality... go with Grails.
Rails is more mature, has more plugins, has a bigger userbase, has better documentation and support available. It can also run on JRuby giving access to Java libraries if you require.
Grails has some interesting qualities, but can't claim to be up there with rails just yet. However, if you're predominantly a Java or groovy developer you may prefer it. Otherwise though, I'd suggest using Rails for medium sized projects right now.
I say grails since there are so many java libraries out there. But I am a bit biased due to the fact that I come from a java background.
If the app isn't going to be big, either suffices - and the choice ought to depend on existing infrastructure. Say if you already have a java servlet container server running, you might as well stick with grails instead of provisioning another server for rails.
I used rails before and liked it quite a bit. However, my current company had a lot of legacy java code and therefore the natural choice was grails.
When I started with rails, very few sites were using it and documentation was atrocious. There was railscast that was great and railsforum.com, but anything out of the ordinary, you're on your own. Deploying it was a nightmare, and using mongrel-clusters was not really production ready. This is very different now as everybody can see, much more mature and deployed everywhere.
Over a year back, I had to learn grails due to reason I cited above. Transitioning to grails was very easy, since it is very similar to Rails. Again, it was very similar to the early stages of rails, with one huge difference. Because you can easily import java code, grails users can use almost all the production tested java libraries available out there. I've been able to successfully integrate our legacy java projects into grails projects and very little tweaking are needed. You will also notice that plugin development has been rapid, mainly because developers are just writing grails "hooks" but the underlying code are the old java libraries. Deploying grails is also just deploying a WAR file.
Another thing you have to look at is IDE. If you're comfortable with eclipse, then eclipse-STS for grails gives you all the bells and whistles. I still see a lot of rails developers use textmate, though rubymine has made great strides (the early version of rubymine used to grind my ubuntu to a halt).
The bottom line, both are great MVC frameworks. RoR is much more mature and has a lot more developers. Grails is where RoR was 3-4 years ago, but I see the progress a lot more faster. Hope this helps.
It depends on your skills with Ruby and/or Groovy, whether you have legacy Java systems to deal with, and where you want to deploy your applications.
I was initially thrilled with Rails. At the time, there wasn't an option of deploying on the application servers at work since work is all Java. This has changed. I couldn't abandon the Java infrastructure and applications already in place and switch to Ruby, even though I thought Rails was awesome. Grails works because we can mix and match Groovy with the existing Java solutions.
Outside of work, Ruby is easier to find hosting for at the low end of the price spectrum. Because Grails uses a lot of existing Java projects the .war files, even for a small app, tend to be large. If you have a dedicated server this isn't a problem but trying to run on shared hosting with 128 MB RAM doesn't work.
2008 is the year of Groovy and Grails books but there are still many more Rails resources available.
Based on your specific criteria, Rails may be a better framework to learn. If you have any Java knowledge, or baggage ;-), you should look at Grails.
Seeing as how the guys who make Grails just got bought out by Spring source yesterday, I would say Grails.
Also, since Groovy is a superset of Java, you can dive right in just using the Java you know without having to learn Ruby. Now, you'll learn a lot of dynamic stuff too and eventually write Groovy code instead of Java code, but it lowers the barrier to entry.
Grails all the way!
I would go with Grails since I like its approach (specify your domain classes and have Grails generate everything else) better than the Rails one (build database tables and have Rails generate everything else). If you're a Java developer, you'll also like that Java code is valid Groovy code, and a Groovy class is a Java class so the integration is seamless both ways.
As a Grails developer coming from Java, I loved it from the very first time.
Now, I'm starting to dig into Rails and having problems with gem. While MySQL connection setup with Grails was pretty straightforward, I'm still struggling to make it work with Rails.
The command gem install mysql is not working, apparently because I don't have XCode intalled.
If it weren't for its memory consumption issue, I'd say Grails is perfect.
May I suggest Merb? It is rack-based, modular, ORM-agnostic, built for speed from ground up by Ezra Zygmuntowicz. It is starting to gain some heat now...
Rails is more mainstream, but less flexible. Grails is still changing rapidly, doesn't have the same developer ecosystem, and the documentation isn't nearly as mature, but it will work in some situations Rails won't.
I have used turbogears and rails a little bit. Before using rails, I tried using grails because I was using groovy for my scripting. Grails was a difficult experience.
The groovy call stack is difficult to read for a small program, but when you add in several heavy weight frameworks a simple error can yield 100s of lines. Unlike rails the grails version that I was using didn't have tools to help me determine what was mine and what belonged to the framework.
I eventually switched to using the Google Web toolkit since I really didn't need the database.
I think Grails and Groovy hold promise, but the user experience of working with them is cumbersome at present (present being last spring).
I think it depends on the environment you're working in to some extent.
Grails seems to have more corporate level acceptance.
Rails has the Koolaid-vibe, and is very acceptable for start-ups with no legacy systems.
Personally I'm using both. Though only really just starting out in the Grails world - I like that authentication/authorisation is easier in Grails-one simple plugin; Shiro. I like that Rails isn't dependant on JVM, and doesn't take a minute or so to startup.
I find setting up BDD/Cucumber within Rails was far easier, but that could just be because that's what I'm comfortable with! There's definitely efforts in the Grails world (cuke4duke etc) to make this easier-and an active community developing Grails.
Just my 2p·
Try both :)

Resources