What programming languages and databases are suported by Hyperledger Fabric? - hyperledger

I have previous experience in using Ethereum and Solidity, but now I want to try writing smart contracts for Hyperledger.
I have few considerations:
First one is regarding supported databases. According to their documentation (http://hyperledger-fabric.readthedocs.io/en/latest/ledger.html) they use LevelDB for storing contract data and CouchDB support is still in beta. Does anyone have any experience using CouchDB in Hyperledger?
Second, I see that Go is mostly used for the specification of smart contracts, but they have support for Java too. Is Java still in beta too, and is there support for any other programming language?
Also, what operating system do you suggest for production server running Hyperledger?
Thank you for the answers.

Is Java still in beta too, and is there support for any other
programming language?
Hyperledger V1.0 doesn't support Java Chaincode.
There will be support for it in the future.
You can ask around in https://chat.hyperledger.org/channel/fabric for ETAs.
There is also a work in progress to have node.js support.
Also, what operating system do you suggest for production server
running Hyperledger?
Ubuntu 16.04 LTS works well

Does anyone have any experience using CouchDB in Hyperledger?
Yes, CouchDB works well if your data is modeled as JSON and you would like to query the content of the data. The default goleveldb state database only supports key-based queries.

You should take a look at Hyperleger Composer that helps you create blockchain applications on Hyperledger Fabric quite easy. (It works better with Ubuntu).
It has is own Modeling Language.

Hyperledger initially was build using Go language.
the aim of the hyperledger team is to support as many languages as possible. currently the hyperledger composer( tool for developing blockchain application) supports javascript for defining the assets, transactions and chaincode.
the transactions log, state data and backed by Level DB and Couch DB
Note :
LevelDB and CouchDB are fully integrated in fabric framework,
currently you can't replace them with other database
Chaincode runs in a secured Docker container, the chaincode (aka smart-contract)can be programmed in Go,Node,Java currently Go is stable and fully supported language.
considering the operating system i have tested the fabric network running on Microsoft Azure platform where created a image of ubuntu 16.04 and installed Fabric framework.till now got no issue on it.

Related

Tinkerpop common version for multiple databases

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.

i confused, who fabric application is for?

sorry, i am just beginner student studying fabric and . please, understand me, i do not use English well.. just i'm confused.. who is the application that was explained in http://hyperledger-fabric.readthedocs.io/en/latest/write_first_app.html?highlight=node.js%20SDK for? client or just for invoking Systematically?
if the application is for invoking, any language is okay for coding client-side application?
The Writing your first application tutorial in Hyperledger Fabric's documentation is oriented to the application developer. It specifically targets a developer leveraging the Hyperledger Fabric SDK for Node.js. There are other language-specific SDKs available (e.g. Java) and others in development (Go and Python). There is also a command-line capability to interact with a Hyperledger Fabric blockchain network.

Native iOS Oracle Database Connection

I am currently developing a native iOS (from 8.0 in swift) application for a customer of my company. One of his requirements is that the mobile application have to connect directly to a remote oracle database (11g 2.0.3). Yes, I know this is a really really bad idea and we should not do that, but our customer explicitly wants this and doesn't want any additional infrastructure.
So please don't advise me to do this over an approriate web service.
I already seeked through the Internet several times to find a suitable solution. There appears to be a ODBC driver ODBCRouter, but as far as I could see, this driver is really really really outdated and won't be fit in my project. Even the native web services introduced in oracle 11g do not appear to be a viable solution for our customer.
We also have experience in Xamarin but even there seems to be no solution for my problem. I tried to install the Official Oracle ODP.NET Managed Driver NuGet package, but that doesn't work because of the iOS target.
I would be most pleased if anyone has an idea and can help me :)

How to install Dart in Google Compute Engine (GCE)?

I am trying to learn both Dart and GCE. I already created a server at GCE, but I don't know how to install Dart since I can only use Linux commands on the Debian server.
This is mostly about Dart on AppEngine:
You should be able to find all information here https://www.dartlang.org/cloud/
I did it using the instructions from this page and the linked pages at the bottom.
The discussions here https://groups.google.com/a/dartlang.org/forum/#!forum/cloud provide some useful bits too.
Dart on Compute engine:
Here is a blog post that covers it pretty good http://financecoding.github.io/blog/2013/09/30/getting-started-with-dart-on-compute-engine/ but some things have changed since this was written.
There are docker images https://github.com/dart-lang/dart_docker ready to execute Dart scripts.
Just search for information how to use Docker images with GCE and you should be fine (there should already be a lot available)
Please ask again if you encounter concrete problems.
Dart on AppEngine runs as Managed VM. Managed VMs work differently than real AppEngine VMs that run 'native' supported languages like Java, Python, and Go. Managed VMs are in fact Compute engines but managed by AppEngine. This means they are launched and shut down depending on the load (and depending on some basic configuration settings in app.yaml and also depending on payment settings) while Compute Engines instances are basically always on. You have to manage yourself when instances should be added/removed depending on the load. There is Kubernetes which is a handy tool to make this easier but you have to actually manage your instances. Besides from that there is not much difference between Managed VMs and Compute Engine instances. A difference to native AppEngine is that you can add any libraries and also binaries to Managed VMs like to CE.
There are pricing differences but I don't know details about this myself yet

Ruby on Rails: Developing in the cloud

I've taken over a rails site, and learning along the way.
It's been a real pain getting the site pulled down from git and working properly in OSX (mysql, REE, ruby_inline gem etc). It seems can be a little fiddly to get some of this stuff working cross os.
Our live production runs on ubuntu.
I have been developing on a cloud hosted server using vi / git etc and it's working quiet well, but it's a little slower (not much) to refresh pages etc and test.
I'm curious, is anyone developing in the cloud? Or do you run a local linux VM. Curious to hear about thoughts and experiences from the battlefield.
Many thanks,
b
It's a "default" environment when you have OS X on local and Linux on production servers. Many of rails-developers use it for everyday development and testing process.
You told "It's been a real pain getting the site pulled down from git and working properly in OSX", just ask a question here what exactly had a pain to setup? Ruby? Rails? Git?
No, it's almost the same platform, OS X is a BSD-based system.
Homebrew will help you to setup DB engine, GIT
RBEnv - multiple Ruby version handle
Rubygems - crossplatform GEM packaging
"I have been developing on a cloud hosted server using vi" - what does it mean? It's actually not a pattern of development process. What if you broke something straight on production server while business users are doing a demonstration to clients?
"I'm curious, is anyone developing in the cloud" - rather no, than yes. You can develop anywhere, but the code snapshot should be available to test and preproduction usage.
If we are talking about standard approach and typical task, it already has typical patterns and solution to achieve the goals
I think you will find most people develop on osx, some on linux, but by far the normal way to do it is locally rather then on a remote server

Resources