Topics

#couchdb #fabric-chaincode #fabric-sdk-java #fabric-sdk-java #fabric-chaincode #couchdb


Matthew White
 

Just for confirmation - spoke with Marek on rocketchat, and the fix for FABCJ-285 will resolve this... will look to put our a patch release in the coming week. 
 
 
Regards, Matthew.
Matthew B White  IBM Blockchain Solutions Architect
 
Email me at WHITEMAT@...
Find me on StackOverflow, and generally at  calanais.me.uk
 
Note: restricted availability for meetings 14:30 to 17:00 UK Tuesday 
IBM United Kingdom Limited, Hursley Park, Winchester, Hampshire, SO21 2JN

"The wrong answers are the ones you go looking for when the right answers stare you in the face"
 
 
 
----- Original message -----
From: Marek Malik <info@...>
To: Matthew White <WHITEMAT@...>
Cc: "fabric@..." <fabric@...>
Subject: [EXTERNAL] Re: [Hyperledger Fabric] #couchdb #fabric-chaincode #fabric-sdk-java
Date: Fri, May 15, 2020 1:38 PM
 

Hi Matthew,

 

Thank you!

I think I’m still not using that fix, the problem with the time is constant since I remember, it’s just depended on what the data volume is. The weirds thing is that FabCar is running smooth.
I didn’t tested uploading the data from outside the chaincode rather than on `initLedger`. If you need anything I’m on rocketchat @c0deh0use.

 



Marek Malik

 

Od: Matthew White <WHITEMAT@...>
Data: piątek, 15 maja 2020 14:31
Do: Marek Malik <info@...>
DW: "fabric@..." <fabric@...>
Temat: RE: [Hyperledger Fabric] #couchdb #fabric-chaincode #fabric-sdk-java

 

Hello; let me have a look at your repo... just to double check it couldn't be the perf issue fixes this week?

 

 

Regards, Matthew.


Matthew B White  IBM Blockchain Solutions Architect

 

Email me at WHITEMAT@...

Find me on StackOverflow, and generally at  calanais.me.uk

 

Note: restricted availability for meetings 14:30 to 17:00 UK Tuesday 

IBM United Kingdom Limited, Hursley Park, Winchester, Hampshire, SO21 2JN


"The wrong answers are the ones you go looking for when the right answers stare you in the face"
 

 

 

----- Original message -----
From: "Marek Malik" <info@...>
Sent by: fabric@...
To: Senthilnathan N <cendhu@...>
Cc: "fabric@..." <fabric@...>
Subject: [EXTERNAL] Re: [Hyperledger Fabric] #couchdb #fabric-chaincode #fabric-sdk-java
Date: Fri, May 15, 2020 1:23 PM
 

Hello guys,

Sorry for being such a pain in the ass, but could one please help with that darn performance issue ?
I have tried to strip down my chaincode and do a copy-past of what the FabCar java chaincode has and do my chaincode on its based (both the setup and the chaincode build).

Not much have this helped, and I’m running out of points where my chaincode can differ from the sample fabcar.
I’m only interested in the getQueryResult
rich query feature in CouchDB.


Bellow you can access my repo with the two chaincodes setup and client apps to test the responses.
https://github.com/Marek00Malik/fabric-samples/tree/chaincode-performance-test


Besides the FabCar java chaincode there is a poc-services chaincode, and also a poc-services client app.
You can start the network and deploy both chaincodes by running 
` ./startFabric.sh fabcar` from the poc-services folder.
The chaincode is located in the chaincodes/poc-services folder as the fabcar one is.

The results differ by around 30 seconds.
FabCar                        - 3.5 seconds
My chaincode             - 31 seconds.


Can someone review and help me with this one, I don’t have any other ideas where the additional time difference could be sitting.


Best Regards,
Marek Malik

 

Od: <fabric@...> w imieniu użytkownika Marek Malik <info@...>
Data: piątek, 1 maja 2020 22:17
Do: Senthilnathan N <cendhu@...>
DW: "fabric@..." <fabric@...>
Temat: Re: [Hyperledger Fabric] #couchdb #fabric-chaincode #fabric-sdk-java

 

I didn’t tested placing the content in the root of the project, as usually the META-INF is placed in the app resource directory (as stated in the initial email).

Remarkably, this actually worked!
I assume that the process of setting up the couch db and any configuration/ doesn’t necessary have anything to do with the actual chain code deployment, it’s just packaged in the root with the code ?




Anyway, Thanks for your suggestion 😊

Best Regards,
Marek

Od: Senthilnathan N <cendhu@...>
Data: piątek, 1 maja 2020 19:32
Do: Marek Malik <info@...>
DW: "fabric@..." <fabric@...>
Temat: Re: [Hyperledger Fabric] #couchdb #fabric-chaincode #fabric-sdk-java

 

Regards,

Senthil

 

 

On Fri, May 1, 2020 at 10:44 PM <info@...> wrote:

I'm trying to create a CouchDB index while deploying the Java-based chain code.
I was following the documentation from there:
https://hyperledger-fabric.readthedocs.io/en/release-2.0/couchdb_tutorial.html#verify-index-was-deployed

I'm not able to get the index to be created while deploying the chaincode on the peer. I cannot see any log entry like "[couchdb] CreateIndex ->" when checking peer logs.

I’m trying to create a simple index, it’s stored in the following path: `root-dir/src/main/resources/META-INF/statedb/couchdb/indexes`
with the filename `pocServicesIdx.json` and content:

```
{

  "index": {

    "fields": [

      "projectId",

      "data_type"

    ]

  },

  "ddoc": "pocServicesDoc",

  "name": "pocServicesIdx",

  "type": "json"

}


```



I’m able to create an index manually doing it from the Fauxton admin console so the syntax should be valid.
The problem is that I’m not even getting any error logs related to creating indexes when deploying the chaincode when running the peer with flag FABRIC_LOGGING_SPEC

Using Fabric 2.0.0 version. 

Can anybody help or give some suggestions?

 

 

Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU


 
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU


Marek Malik
 

Hi Matthew,

 

Thank you!

I think I’m still not using that fix, the problem with the time is constant since I remember, it’s just depended on what the data volume is. The weirds thing is that FabCar is running smooth.
I didn’t tested uploading the data from outside the chaincode rather than on `initLedger`. If you need anything I’m on rocketchat @c0deh0use.

 



Marek Malik

 

Od: Matthew White <WHITEMAT@...>
Data: piątek, 15 maja 2020 14:31
Do: Marek Malik <info@...>
DW: "fabric@..." <fabric@...>
Temat: RE: [Hyperledger Fabric] #couchdb #fabric-chaincode #fabric-sdk-java

 

Hello; let me have a look at your repo... just to double check it couldn't be the perf issue fixes this week?

 

 

Regards, Matthew.


Matthew B White  IBM Blockchain Solutions Architect

 

Email me at WHITEMAT@...

Find me on StackOverflow, and generally at  calanais.me.uk

 

Note: restricted availability for meetings 14:30 to 17:00 UK Tuesday 

IBM United Kingdom Limited, Hursley Park, Winchester, Hampshire, SO21 2JN


"The wrong answers are the ones you go looking for when the right answers stare you in the face"
 

 

 

----- Original message -----
From: "Marek Malik" <info@...>
Sent by: fabric@...
To: Senthilnathan N <cendhu@...>
Cc: "fabric@..." <fabric@...>
Subject: [EXTERNAL] Re: [Hyperledger Fabric] #couchdb #fabric-chaincode #fabric-sdk-java
Date: Fri, May 15, 2020 1:23 PM
 

Hello guys,

Sorry for being such a pain in the ass, but could one please help with that darn performance issue ?
I have tried to strip down my chaincode and do a copy-past of what the FabCar java chaincode has and do my chaincode on its based (both the setup and the chaincode build).

Not much have this helped, and I’m running out of points where my chaincode can differ from the sample fabcar.
I’m only interested in the getQueryResult
rich query feature in CouchDB.


Bellow you can access my repo with the two chaincodes setup and client apps to test the responses.
https://github.com/Marek00Malik/fabric-samples/tree/chaincode-performance-test


Besides the FabCar java chaincode there is a poc-services chaincode, and also a poc-services client app.
You can start the network and deploy both chaincodes by running 
` ./startFabric.sh fabcar` from the poc-services folder.
The chaincode is located in the chaincodes/poc-services folder as the fabcar one is.

The results differ by around 30 seconds.
FabCar                        - 3.5 seconds
My chaincode             - 31 seconds.


Can someone review and help me with this one, I don’t have any other ideas where the additional time difference could be sitting.


Best Regards,
Marek Malik

 

Od: <fabric@...> w imieniu użytkownika Marek Malik <info@...>
Data: piątek, 1 maja 2020 22:17
Do: Senthilnathan N <cendhu@...>
DW: "fabric@..." <fabric@...>
Temat: Re: [Hyperledger Fabric] #couchdb #fabric-chaincode #fabric-sdk-java

 

I didn’t tested placing the content in the root of the project, as usually the META-INF is placed in the app resource directory (as stated in the initial email).

Remarkably, this actually worked!
I assume that the process of setting up the couch db and any configuration/ doesn’t necessary have anything to do with the actual chain code deployment, it’s just packaged in the root with the code ?




Anyway, Thanks for your suggestion 😊

Best Regards,
Marek

Od: Senthilnathan N <cendhu@...>
Data: piątek, 1 maja 2020 19:32
Do: Marek Malik <info@...>
DW: "fabric@..." <fabric@...>
Temat: Re: [Hyperledger Fabric] #couchdb #fabric-chaincode #fabric-sdk-java

 

Regards,

Senthil

 

 

On Fri, May 1, 2020 at 10:44 PM <info@...> wrote:

I'm trying to create a CouchDB index while deploying the Java-based chain code.
I was following the documentation from there:
https://hyperledger-fabric.readthedocs.io/en/release-2.0/couchdb_tutorial.html#verify-index-was-deployed

I'm not able to get the index to be created while deploying the chaincode on the peer. I cannot see any log entry like "[couchdb] CreateIndex ->" when checking peer logs.

I’m trying to create a simple index, it’s stored in the following path: `root-dir/src/main/resources/META-INF/statedb/couchdb/indexes`
with the filename `pocServicesIdx.json` and content:

```
{

  "index": {

    "fields": [

      "projectId",

      "data_type"

    ]

  },

  "ddoc": "pocServicesDoc",

  "name": "pocServicesIdx",

  "type": "json"

}


```



I’m able to create an index manually doing it from the Fauxton admin console so the syntax should be valid.
The problem is that I’m not even getting any error logs related to creating indexes when deploying the chaincode when running the peer with flag FABRIC_LOGGING_SPEC

Using Fabric 2.0.0 version. 

Can anybody help or give some suggestions?

 

 

Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU



Matthew White
 

Hello; let me have a look at your repo... just to double check it couldn't be the perf issue fixes this week?
 
 
Regards, Matthew.
Matthew B White  IBM Blockchain Solutions Architect
 
Email me at WHITEMAT@...
Find me on StackOverflow, and generally at  calanais.me.uk
 
Note: restricted availability for meetings 14:30 to 17:00 UK Tuesday 
IBM United Kingdom Limited, Hursley Park, Winchester, Hampshire, SO21 2JN

"The wrong answers are the ones you go looking for when the right answers stare you in the face"
 
 
 
----- Original message -----
From: "Marek Malik" <info@...>
Sent by: fabric@...
To: Senthilnathan N <cendhu@...>
Cc: "fabric@..." <fabric@...>
Subject: [EXTERNAL] Re: [Hyperledger Fabric] #couchdb #fabric-chaincode #fabric-sdk-java
Date: Fri, May 15, 2020 1:23 PM
 

Hello guys,

Sorry for being such a pain in the ass, but could one please help with that darn performance issue ?
I have tried to strip down my chaincode and do a copy-past of what the FabCar java chaincode has and do my chaincode on its based (both the setup and the chaincode build).

Not much have this helped, and I’m running out of points where my chaincode can differ from the sample fabcar.
I’m only interested in the getQueryResult
rich query feature in CouchDB.


Bellow you can access my repo with the two chaincodes setup and client apps to test the responses.
https://github.com/Marek00Malik/fabric-samples/tree/chaincode-performance-test


Besides the FabCar java chaincode there is a poc-services chaincode, and also a poc-services client app.
You can start the network and deploy both chaincodes by running 
` ./startFabric.sh fabcar` from the poc-services folder.
The chaincode is located in the chaincodes/poc-services folder as the fabcar one is.

The results differ by around 30 seconds.
FabCar                        - 3.5 seconds
My chaincode             - 31 seconds.


Can someone review and help me with this one, I don’t have any other ideas where the additional time difference could be sitting.


Best Regards,
Marek Malik

 

Od: <fabric@...> w imieniu użytkownika Marek Malik <info@...>
Data: piątek, 1 maja 2020 22:17
Do: Senthilnathan N <cendhu@...>
DW: "fabric@..." <fabric@...>
Temat: Re: [Hyperledger Fabric] #couchdb #fabric-chaincode #fabric-sdk-java

 

I didn’t tested placing the content in the root of the project, as usually the META-INF is placed in the app resource directory (as stated in the initial email).

Remarkably, this actually worked!
I assume that the process of setting up the couch db and any configuration/ doesn’t necessary have anything to do with the actual chain code deployment, it’s just packaged in the root with the code ?



Anyway, Thanks for your suggestion 😊

Best Regards,
Marek

Od: Senthilnathan N <cendhu@...>
Data: piątek, 1 maja 2020 19:32
Do: Marek Malik <info@...>
DW: "fabric@..." <fabric@...>
Temat: Re: [Hyperledger Fabric] #couchdb #fabric-chaincode #fabric-sdk-java

 

Regards,

Senthil

 

 

On Fri, May 1, 2020 at 10:44 PM <info@...> wrote:

I'm trying to create a CouchDB index while deploying the Java-based chain code.
I was following the documentation from there:
https://hyperledger-fabric.readthedocs.io/en/release-2.0/couchdb_tutorial.html#verify-index-was-deployed

I'm not able to get the index to be created while deploying the chaincode on the peer. I cannot see any log entry like "[couchdb] CreateIndex ->" when checking peer logs.

I’m trying to create a simple index, it’s stored in the following path: `root-dir/src/main/resources/META-INF/statedb/couchdb/indexes`
with the filename `pocServicesIdx.json` and content:

```
{
  "index": {
    "fields": [
      "projectId",
      "data_type"
    ]
  },
  "ddoc": "pocServicesDoc",
  "name": "pocServicesIdx",
  "type": "json"
}

```



I’m able to create an index manually doing it from the Fauxton admin console so the syntax should be valid.
The problem is that I’m not even getting any error logs related to creating indexes when deploying the chaincode when running the peer with flag FABRIC_LOGGING_SPEC

Using Fabric 2.0.0 version. 

Can anybody help or give some suggestions?

 

 
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU


Marek Malik
 

Hello guys,

Sorry for being such a pain in the ass, but could one please help with that darn performance issue ?
I have tried to strip down my chaincode and do a copy-past of what the FabCar java chaincode has and do my chaincode on its based (both the setup and the chaincode build).

Not much have this helped, and I’m running out of points where my chaincode can differ from the sample fabcar.
I’m only interested in the getQueryResult
rich query feature in CouchDB.


Bellow you can access my repo with the two chaincodes setup and client apps to test the responses.
https://github.com/Marek00Malik/fabric-samples/tree/chaincode-performance-test


Besides the FabCar java chaincode there is a poc-services chaincode, and also a poc-services client app.
You can start the network and deploy both chaincodes by running 
` ./startFabric.sh fabcar` from the poc-services folder.
The chaincode is located in the chaincodes/poc-services folder as the fabcar one is.

The results differ by around 30 seconds.
FabCar                        - 3.5 seconds
My chaincode             - 31 seconds.


Can someone review and help me with this one, I don’t have any other ideas where the additional time difference could be sitting.


Best Regards,
Marek Malik

 

Od: <fabric@...> w imieniu użytkownika Marek Malik <info@...>
Data: piątek, 1 maja 2020 22:17
Do: Senthilnathan N <cendhu@...>
DW: "fabric@..." <fabric@...>
Temat: Re: [Hyperledger Fabric] #couchdb #fabric-chaincode #fabric-sdk-java

 

I didn’t tested placing the content in the root of the project, as usually the META-INF is placed in the app resource directory (as stated in the initial email).

Remarkably, this actually worked!
I assume that the process of setting up the couch db and any configuration/ doesn’t necessary have anything to do with the actual chain code deployment, it’s just packaged in the root with the code ?


Anyway, Thanks for your suggestion 😊

Best Regards,
Marek

Od: Senthilnathan N <cendhu@...>
Data: piątek, 1 maja 2020 19:32
Do: Marek Malik <info@...>
DW: "fabric@..." <fabric@...>
Temat: Re: [Hyperledger Fabric] #couchdb #fabric-chaincode #fabric-sdk-java

 

Regards,

Senthil

 

 

On Fri, May 1, 2020 at 10:44 PM <info@...> wrote:

I'm trying to create a CouchDB index while deploying the Java-based chain code.
I was following the documentation from there:

https://hyperledger-fabric.readthedocs.io/en/release-2.0/couchdb_tutorial.html#verify-index-was-deployed

I'm not able to get the index to be created while deploying the chaincode on the peer. 
I cannot see any log entry like "[couchdb] CreateIndex ->" when checking peer logs.



I’m trying to create a simple index, it’s stored in the following path: `root-dir/src/main/resources/META-INF/statedb/couchdb/indexes`

with the filename 
`pocServicesIdx.json` and content:

```
{
  "index": {
    "fields": [
      "projectId",
      "data_type"
    ]
  },
  "ddoc": "pocServicesDoc",
  "name": "pocServicesIdx",
  "type": "json"
}

```



I’m able to create an index manually doing it from the Fauxton admin console so the syntax should be valid.
The problem is that I’m not even getting any error logs related to creating indexes when deploying the chaincode when running the peer with flag FABRIC_LOGGING_SPEC

Using Fabric 2.0.0 version. 

Can anybody help or give some suggestions?


Marek Malik
 

I didn’t tested placing the content in the root of the project, as usually the META-INF is placed in the app resource directory (as stated in the initial email).

Remarkably, this actually worked!
I assume that the process of setting up the couch db and any configuration/ doesn’t necessary have anything to do with the actual chain code deployment, it’s just packaged in the root with the code ?

Anyway, Thanks for your suggestion 😊

Best Regards,
Marek

Od: Senthilnathan N <cendhu@...>
Data: piątek, 1 maja 2020 19:32
Do: Marek Malik <info@...>
DW: "fabric@..." <fabric@...>
Temat: Re: [Hyperledger Fabric] #couchdb #fabric-chaincode #fabric-sdk-java

 

Regards,

Senthil

 

 

On Fri, May 1, 2020 at 10:44 PM <info@...> wrote:

I'm trying to create a CouchDB index while deploying the Java-based chain code.
I was following the documentation from there:

https://hyperledger-fabric.readthedocs.io/en/release-2.0/couchdb_tutorial.html#verify-index-was-deployed

I'm not able to get the index to be created while deploying the chaincode on the peer. 
I cannot see any log entry like "[couchdb] CreateIndex ->" when checking peer logs.



I’m trying to create a simple index, it’s stored in the following path: `root-dir/src/main/resources/META-INF/statedb/couchdb/indexes`

with the filename 
`pocServicesIdx.json` and content:

```
{
  "index": {
    "fields": [
      "projectId",
      "data_type"
    ]
  },
  "ddoc": "pocServicesDoc",
  "name": "pocServicesIdx",
  "type": "json"
}

```



I’m able to create an index manually doing it from the Fauxton admin console so the syntax should be valid.
The problem is that I’m not even getting any error logs related to creating indexes when deploying the chaincode when running the peer with flag FABRIC_LOGGING_SPEC

Using Fabric 2.0.0 version. 

Can anybody help or give some suggestions?


Senthil Nathan
 

Regards,
Senthil


On Fri, May 1, 2020 at 10:44 PM <info@...> wrote:

I'm trying to create a CouchDB index while deploying the Java-based chain code.
I was following the documentation from there:
https://hyperledger-fabric.readthedocs.io/en/release-2.0/couchdb_tutorial.html#verify-index-was-deployed

I'm not able to get the index to be created while deploying the chaincode on the peer. 
I cannot see any log entry like "[couchdb] CreateIndex ->" when checking peer logs.



I’m trying to create a simple index, it’s stored in the following path: `root-dir/src/main/resources/META-INF/statedb/couchdb/indexes`

with the filename `pocServicesIdx.json` and content:

```
{ "index": { "fields": [ "projectId", "data_type" ] }, "ddoc": "pocServicesDoc", "name": "pocServicesIdx", "type": "json" }
```




I’m able to create an index manually doing it from the Fauxton admin console so the syntax should be valid. 

The problem is that I’m not even getting any error logs related to creating indexes when deploying the chaincode when running the peer with flag FABRIC_LOGGING_SPEC

Using Fabric 2.0.0 version. 

Can anybody help or give some suggestions?


Marek Malik
 

I'm trying to create a CouchDB index while deploying the Java-based chain code.
I was following the documentation from there:
https://hyperledger-fabric.readthedocs.io/en/release-2.0/couchdb_tutorial.html#verify-index-was-deployed

I'm not able to get the index to be created while deploying the chaincode on the peer. 
I cannot see any log entry like "[couchdb] CreateIndex ->" when checking peer logs.



I’m trying to create a simple index, it’s stored in the following path: `root-dir/src/main/resources/META-INF/statedb/couchdb/indexes`

with the filename `pocServicesIdx.json` and content:

```
{ "index": { "fields": [ "projectId", "data_type" ] }, "ddoc": "pocServicesDoc", "name": "pocServicesIdx", "type": "json" }
```




I’m able to create an index manually doing it from the Fauxton admin console so the syntax should be valid. 

The problem is that I’m not even getting any error logs related to creating indexes when deploying the chaincode when running the peer with flag FABRIC_LOGGING_SPEC

Using Fabric 2.0.0 version. 

Can anybody help or give some suggestions?