I have platform A and platform B and I want to call an RPC method on platform A from platform B. Note I've read this question already: In VOLTTRON, how to use VIP to get agents talk across remote platform instances? I feel like this might be outdated since it doesn't mention anything about the known hosts file and the new volttron-ctl auth add interface. Also do I still have to include that massive url mentioned in the comments with the serverkey, secretkey parameters? I also read the SimpleForwarder source code: https://github.com/VOLTTRON/volttron/blob/5cc71e9982338e242bf801da372aa66ed14abbd9/examples/SimpleForwarder/simpleforwarder/simpleforwarder.py The url for the vip connection in this example is: "destination-vip": "ipc://@/tmp/v4home/run/vip.socket", But this doesn't match the answers provided in the stack overflow question. http://volttron.readthedocs.io/en/4.1/core_services/messagebus/VIP/VIP-Authentication.html This section in the documentation gives some information about how to authenticate over vip, but what steps are needed with this to call an RPC in an agent on the other platform? Can someone clarify what is the updated way to do this (for volttron 4.1), hopefully step by step?
Calling an @RPC method on a remote platform
145 Views Asked by Kirtan Patel At
1
There are 1 best solutions below
Related Questions in VOLTTRON
- new thread blocks main thread
- Extracting viewCount & SubscriberCount from YouTube API V3 for a given channel, where channelID does not equal userID
- Display images on Django Template Site
- Difference between list() and dict() with generators
- How can I serialize a numpy array while preserving matrix dimensions?
- Protractor did not run properly when using browser.wait, msg: "Wait timed out after XXXms"
- Why is my program adding int as string (4+7 = 47)?
- store numpy array in mysql
- how to omit the less frequent words from a dictionary in python?
- Update a text file with ( new words+ \n ) after the words is appended into a list
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Calling an RPC call on a remote agent is very similar to performing pub/sub on another platform. For a working example, you can consult the DataMover agent which calls an RPC method on a remote historian.
First it gets the serverkey for the destination if it's in the known hosts file:
If not, it will get it from the agent configuration file.
Then, its historian_setup method uses the building_agent method in vip agent utils to create a link to the other platform by passing in address, serverkey, public, and secret key so you don't have to construct the URL.
Then when it does a publish it calls:
Steps for this process are:
vctl auth serverkey
Add PlatformA to known hosts on PlatformB:
vctl add-known-host --host tcp://tcp://xxx.xxx.xxx.xxx:YYYY --serverkey SERVERKEY_FOR_A
or Configure SendingAgent on PlatformB with serverkey from step 2, destination VIP address for PlatformA (tcp://xxx.xxx.xxx.xxx:YYYY)Install SendingAgent on PlatformB
vctl auth publickey
vctl auth add
SendingAgent should now be able to call RPC methods on TargetAgent