How to create a custom advertisedServices












1














I was looking at Corda Demobench and I was wondering how to create custom advertised services in a Cordapps.



The Demobench provide a lot of services for a node such as:



corda.notary.simple --> (simple notary)  
corda.notary.validating --> (validating notary)
corda.intrest_rates --> (oracle service)
corda.issuer.CURRENCY
corda.cash


I believe the last two services are custom services that enable the nodes to provide special services like issue cash and use cash.



Please do correct me if I am wrong!










share|improve this question



























    1














    I was looking at Corda Demobench and I was wondering how to create custom advertised services in a Cordapps.



    The Demobench provide a lot of services for a node such as:



    corda.notary.simple --> (simple notary)  
    corda.notary.validating --> (validating notary)
    corda.intrest_rates --> (oracle service)
    corda.issuer.CURRENCY
    corda.cash


    I believe the last two services are custom services that enable the nodes to provide special services like issue cash and use cash.



    Please do correct me if I am wrong!










    share|improve this question

























      1












      1








      1







      I was looking at Corda Demobench and I was wondering how to create custom advertised services in a Cordapps.



      The Demobench provide a lot of services for a node such as:



      corda.notary.simple --> (simple notary)  
      corda.notary.validating --> (validating notary)
      corda.intrest_rates --> (oracle service)
      corda.issuer.CURRENCY
      corda.cash


      I believe the last two services are custom services that enable the nodes to provide special services like issue cash and use cash.



      Please do correct me if I am wrong!










      share|improve this question













      I was looking at Corda Demobench and I was wondering how to create custom advertised services in a Cordapps.



      The Demobench provide a lot of services for a node such as:



      corda.notary.simple --> (simple notary)  
      corda.notary.validating --> (validating notary)
      corda.intrest_rates --> (oracle service)
      corda.issuer.CURRENCY
      corda.cash


      I believe the last two services are custom services that enable the nodes to provide special services like issue cash and use cash.



      Please do correct me if I am wrong!







      corda






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 10 '18 at 14:45









      Paradox

      538




      538
























          1 Answer
          1






          active

          oldest

          votes


















          0














          Nodes can advertise a service by listing it in their node configuration file under extraAdvertisedServiceIds - see https://docs.corda.net/corda-configuration-file.html. You can also list the name of the service you wish to offer in the deployNodes task - see https://github.com/corda/corda/blob/release-V2/samples/irs-demo/build.gradle#L56.



          However, Corda is moving away from looking up nodes based on the service they offer. In V2, there are no methods to retrieve a node based on the service it offers. In V3, the concept of services will be removed entirely.



          If you check the Oracle Example here, you'll see that we look up the oracles by name, and not based on the fact that they offer a specific service.






          share|improve this answer























          • If the concept of services would be removed then how can I ensure that only one single node would be able to issue assets and others would use them
            – Paradox
            Jan 11 '18 at 12:08










          • You could encode this constraint directly in the contract code or in the flows. Instead of identifying this issuer by their service, you'd identify them simply by name.
            – Joel
            Jan 11 '18 at 12:44










          • But if I create a constraint then those flows and contract would still be shown on the list. In CoradaDemobench you cant even see the flows in the node if you have not selected that service before initializing the node. Can you point me to some examples that would help me in implementing this?
            – Paradox
            Jan 12 '18 at 6:30












          • You control which flows appear on which nodes simply by installing or not installing the CorDapp jar containing them on a node. See the deployNodes task here for example: github.com/CaisR3/cordapp-optionv1/blob/master/build.gradle. The Oracle node has the base and oracle cordapps installed, while the other (non-oracle) nodes have the base and client cordapps installed.
            – Joel
            Jan 12 '18 at 8:55










          • So let's say If I want to issue cash from node A and then use that cash in another node then how should I distribute the app so that the same state could be used between both the nodes
            – Paradox
            Jan 12 '18 at 15:08











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f48189906%2fhow-to-create-a-custom-advertisedservices%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          Nodes can advertise a service by listing it in their node configuration file under extraAdvertisedServiceIds - see https://docs.corda.net/corda-configuration-file.html. You can also list the name of the service you wish to offer in the deployNodes task - see https://github.com/corda/corda/blob/release-V2/samples/irs-demo/build.gradle#L56.



          However, Corda is moving away from looking up nodes based on the service they offer. In V2, there are no methods to retrieve a node based on the service it offers. In V3, the concept of services will be removed entirely.



          If you check the Oracle Example here, you'll see that we look up the oracles by name, and not based on the fact that they offer a specific service.






          share|improve this answer























          • If the concept of services would be removed then how can I ensure that only one single node would be able to issue assets and others would use them
            – Paradox
            Jan 11 '18 at 12:08










          • You could encode this constraint directly in the contract code or in the flows. Instead of identifying this issuer by their service, you'd identify them simply by name.
            – Joel
            Jan 11 '18 at 12:44










          • But if I create a constraint then those flows and contract would still be shown on the list. In CoradaDemobench you cant even see the flows in the node if you have not selected that service before initializing the node. Can you point me to some examples that would help me in implementing this?
            – Paradox
            Jan 12 '18 at 6:30












          • You control which flows appear on which nodes simply by installing or not installing the CorDapp jar containing them on a node. See the deployNodes task here for example: github.com/CaisR3/cordapp-optionv1/blob/master/build.gradle. The Oracle node has the base and oracle cordapps installed, while the other (non-oracle) nodes have the base and client cordapps installed.
            – Joel
            Jan 12 '18 at 8:55










          • So let's say If I want to issue cash from node A and then use that cash in another node then how should I distribute the app so that the same state could be used between both the nodes
            – Paradox
            Jan 12 '18 at 15:08
















          0














          Nodes can advertise a service by listing it in their node configuration file under extraAdvertisedServiceIds - see https://docs.corda.net/corda-configuration-file.html. You can also list the name of the service you wish to offer in the deployNodes task - see https://github.com/corda/corda/blob/release-V2/samples/irs-demo/build.gradle#L56.



          However, Corda is moving away from looking up nodes based on the service they offer. In V2, there are no methods to retrieve a node based on the service it offers. In V3, the concept of services will be removed entirely.



          If you check the Oracle Example here, you'll see that we look up the oracles by name, and not based on the fact that they offer a specific service.






          share|improve this answer























          • If the concept of services would be removed then how can I ensure that only one single node would be able to issue assets and others would use them
            – Paradox
            Jan 11 '18 at 12:08










          • You could encode this constraint directly in the contract code or in the flows. Instead of identifying this issuer by their service, you'd identify them simply by name.
            – Joel
            Jan 11 '18 at 12:44










          • But if I create a constraint then those flows and contract would still be shown on the list. In CoradaDemobench you cant even see the flows in the node if you have not selected that service before initializing the node. Can you point me to some examples that would help me in implementing this?
            – Paradox
            Jan 12 '18 at 6:30












          • You control which flows appear on which nodes simply by installing or not installing the CorDapp jar containing them on a node. See the deployNodes task here for example: github.com/CaisR3/cordapp-optionv1/blob/master/build.gradle. The Oracle node has the base and oracle cordapps installed, while the other (non-oracle) nodes have the base and client cordapps installed.
            – Joel
            Jan 12 '18 at 8:55










          • So let's say If I want to issue cash from node A and then use that cash in another node then how should I distribute the app so that the same state could be used between both the nodes
            – Paradox
            Jan 12 '18 at 15:08














          0












          0








          0






          Nodes can advertise a service by listing it in their node configuration file under extraAdvertisedServiceIds - see https://docs.corda.net/corda-configuration-file.html. You can also list the name of the service you wish to offer in the deployNodes task - see https://github.com/corda/corda/blob/release-V2/samples/irs-demo/build.gradle#L56.



          However, Corda is moving away from looking up nodes based on the service they offer. In V2, there are no methods to retrieve a node based on the service it offers. In V3, the concept of services will be removed entirely.



          If you check the Oracle Example here, you'll see that we look up the oracles by name, and not based on the fact that they offer a specific service.






          share|improve this answer














          Nodes can advertise a service by listing it in their node configuration file under extraAdvertisedServiceIds - see https://docs.corda.net/corda-configuration-file.html. You can also list the name of the service you wish to offer in the deployNodes task - see https://github.com/corda/corda/blob/release-V2/samples/irs-demo/build.gradle#L56.



          However, Corda is moving away from looking up nodes based on the service they offer. In V2, there are no methods to retrieve a node based on the service it offers. In V3, the concept of services will be removed entirely.



          If you check the Oracle Example here, you'll see that we look up the oracles by name, and not based on the fact that they offer a specific service.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 19 '18 at 16:22

























          answered Jan 10 '18 at 18:01









          Joel

          10.1k11228




          10.1k11228












          • If the concept of services would be removed then how can I ensure that only one single node would be able to issue assets and others would use them
            – Paradox
            Jan 11 '18 at 12:08










          • You could encode this constraint directly in the contract code or in the flows. Instead of identifying this issuer by their service, you'd identify them simply by name.
            – Joel
            Jan 11 '18 at 12:44










          • But if I create a constraint then those flows and contract would still be shown on the list. In CoradaDemobench you cant even see the flows in the node if you have not selected that service before initializing the node. Can you point me to some examples that would help me in implementing this?
            – Paradox
            Jan 12 '18 at 6:30












          • You control which flows appear on which nodes simply by installing or not installing the CorDapp jar containing them on a node. See the deployNodes task here for example: github.com/CaisR3/cordapp-optionv1/blob/master/build.gradle. The Oracle node has the base and oracle cordapps installed, while the other (non-oracle) nodes have the base and client cordapps installed.
            – Joel
            Jan 12 '18 at 8:55










          • So let's say If I want to issue cash from node A and then use that cash in another node then how should I distribute the app so that the same state could be used between both the nodes
            – Paradox
            Jan 12 '18 at 15:08


















          • If the concept of services would be removed then how can I ensure that only one single node would be able to issue assets and others would use them
            – Paradox
            Jan 11 '18 at 12:08










          • You could encode this constraint directly in the contract code or in the flows. Instead of identifying this issuer by their service, you'd identify them simply by name.
            – Joel
            Jan 11 '18 at 12:44










          • But if I create a constraint then those flows and contract would still be shown on the list. In CoradaDemobench you cant even see the flows in the node if you have not selected that service before initializing the node. Can you point me to some examples that would help me in implementing this?
            – Paradox
            Jan 12 '18 at 6:30












          • You control which flows appear on which nodes simply by installing or not installing the CorDapp jar containing them on a node. See the deployNodes task here for example: github.com/CaisR3/cordapp-optionv1/blob/master/build.gradle. The Oracle node has the base and oracle cordapps installed, while the other (non-oracle) nodes have the base and client cordapps installed.
            – Joel
            Jan 12 '18 at 8:55










          • So let's say If I want to issue cash from node A and then use that cash in another node then how should I distribute the app so that the same state could be used between both the nodes
            – Paradox
            Jan 12 '18 at 15:08
















          If the concept of services would be removed then how can I ensure that only one single node would be able to issue assets and others would use them
          – Paradox
          Jan 11 '18 at 12:08




          If the concept of services would be removed then how can I ensure that only one single node would be able to issue assets and others would use them
          – Paradox
          Jan 11 '18 at 12:08












          You could encode this constraint directly in the contract code or in the flows. Instead of identifying this issuer by their service, you'd identify them simply by name.
          – Joel
          Jan 11 '18 at 12:44




          You could encode this constraint directly in the contract code or in the flows. Instead of identifying this issuer by their service, you'd identify them simply by name.
          – Joel
          Jan 11 '18 at 12:44












          But if I create a constraint then those flows and contract would still be shown on the list. In CoradaDemobench you cant even see the flows in the node if you have not selected that service before initializing the node. Can you point me to some examples that would help me in implementing this?
          – Paradox
          Jan 12 '18 at 6:30






          But if I create a constraint then those flows and contract would still be shown on the list. In CoradaDemobench you cant even see the flows in the node if you have not selected that service before initializing the node. Can you point me to some examples that would help me in implementing this?
          – Paradox
          Jan 12 '18 at 6:30














          You control which flows appear on which nodes simply by installing or not installing the CorDapp jar containing them on a node. See the deployNodes task here for example: github.com/CaisR3/cordapp-optionv1/blob/master/build.gradle. The Oracle node has the base and oracle cordapps installed, while the other (non-oracle) nodes have the base and client cordapps installed.
          – Joel
          Jan 12 '18 at 8:55




          You control which flows appear on which nodes simply by installing or not installing the CorDapp jar containing them on a node. See the deployNodes task here for example: github.com/CaisR3/cordapp-optionv1/blob/master/build.gradle. The Oracle node has the base and oracle cordapps installed, while the other (non-oracle) nodes have the base and client cordapps installed.
          – Joel
          Jan 12 '18 at 8:55












          So let's say If I want to issue cash from node A and then use that cash in another node then how should I distribute the app so that the same state could be used between both the nodes
          – Paradox
          Jan 12 '18 at 15:08




          So let's say If I want to issue cash from node A and then use that cash in another node then how should I distribute the app so that the same state could be used between both the nodes
          – Paradox
          Jan 12 '18 at 15:08


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f48189906%2fhow-to-create-a-custom-advertisedservices%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

          SQL update select statement

          'app-layout' is not a known element: how to share Component with different Modules