communicaton between central instance - volttron

I have a question about volttron.
I installed two volttron_central instance(called VC_1, VC_2).
Also installed 3 volttron_sub instance(called VS_1, VS_2, VS_3).
and then VS_1 and VS_2 connect to VC_1 like this below picture.
Also, VS_3 connect to VC_2 like this below picture.
Actually, I want to connect between two VOLTTRON_Central instance but I don't
know how.

This is not something that is supported out of the box (at the present time) with volttron. You can follow the same pattern as the ForwarderAgent to make connections between two different volttron instances, however.

Related

Why does React Dev Tools profiler show me two "AppContainers"?

React dev tools profiler has started showing me two "AppContainers", whereas before I did not see one, or have any option to choose one. By selecting either one, I get different profiling data:
What do they represent and how can I go back to not having to choice between choosing one?
I think you might have the app/instance running in multiple instances.
Say a browser(tab) and one on phone (thus the reason for multiple containers which shows different profiles)
The solution to only getting one instance would be to stop/run only at one instance.
(Sidenote: With the limited information provided this is all I could think of/speculate)

connect to a database server without exposing a network share

this is quite simple to do in many databases, but I have not yet found a way to achieve this with Advantage in Server-mode over the network.
assume 2 PCs:
SERVER: running Advantage Database Server, and contains A database
CLIENT: contains a simple application, or even just Advantage Architect.
If the folder containing this database was shared via the OS (network share, with read/write permissions), then establishing connection is straight-forward.
I am however, precisely trying to avoid exposing a network share.
In Firebird, for example, this can be done using connection path:
SYSDBA#SERVER:C:\SomePrivateFolder\myapp.FDB
Isn't this the reason for exposing a port for the database (6262)?
What's interesting is that they offer something called "internet" connection. I highly doubt they would require a network share over the internet to access the database.
So, is this doable, and if so, would love a hint.
Thanks!
Edit:
following the answer below, adding more details.
SERVER contains 2 folders, each one with its ADV Dictionary:
C:\Data\mydata.add (not a shared folder)
C:\DataShared\mydata.add (shared folder)
I am able to connect to the second one using the connect path \\SERVER:6262\DataShared\mydata.add
to connect to the first one i've tried:
\\SERVER:6262\C:\Data\mydata.add
\\SERVER:6262\Data\mydata.add
\\SERVER:6262:C:\Data\mydata.add
none of which worked.
Note that I am not calling the stored procedure directly, but using the Delphi ADS components, which certainly internally call that same stored procedure.
I am certainly connecting as Remote (have the ADS Server launched on SERVER). For the other parameters, I am using TCP/IP as comm. type, and default ADSSYS / blank password.
with this setup in mind, what would the path be to connect to C:\Data\mydata.add on \\SERVER?
Thanks again
No need to expose your database on a shared folder. You'd only do that if using the LOCAL connection. If using INTERNET or REMOTE, then simply connect using API AdsConnect60(). Look it up on the help file.
UNSIGNED32 AdsConnect60( UNSIGNED8 *pucConnectPath,
UNSIGNED16 usServerTypes,
UNSIGNED8 *pucUserName,
UNSIGNED8 *pucPassword,
UNSIGNED32 ulOptions,
ADSHANDLE *phConnect );
Furthermore, you can hide the path where your data resides by using a server side Alias. Look it up on the help files. It is quite simple.
To simplify things, do this:
Run ads server configuration utility, go to "Configuration Utility" tab and inside that, go to "File Locations" tab. Write down path for Error and Assert Log Path. Let's assume it is c:. Let's also assume server is 192.168.1.1.
Now create a file named AdsServer.ini in that path (c:) with section: [ServerAliases] and a line adsdata=c:\data. Now use API function AdsConnect60 like this: AdsConnect60( "\\192.168.1.1\Adsdata\Mydata.add", ADS_REMOTE_SERVER, "adssys", "password", ADS_DEFAULT, &hConn ) ;
If you are working from Delphi or some other language make sure you check out the clases that are already built wrappers for the API.
It is all really-really well documented: http://devzone.advantagedatabase.com/dz/WebHelp/Advantage11.1/index.html?ace_adsconnect60.htm

How to access CouchDB server from another computer?

I created a couchDB on my computer, that is I used the Python line server = couchdb.Server('http://localhost:5984')
I want to share this database with two other colleagues. How can I make it available to them? For the moment, I am comfortable giving them full admin privileges until I get a better handle on this.
I tried to read the relevant parts of CouchDB: The Definitive Guide, but I still don't get it.
How would they access it? They can't just type in my computer's IP address?
In order to avoid NAT problems, I would use an external service like Cloudant or Iris Couch. You can replicate your local database against the common DB in the cloud and your colleagues can connect to it.
sure they can.
Start your server like this:
server = couchdb.Server('http://192.168.56.1:5984')
Where the IP address is the IP address of your PC. Find this out via the cmd prompt and ipconfig. Then they type in their python console
server = couchdb.Server('http://192.168.56.1:5984')
Yep, exactly the same. The IP identifies it for both you and everyone else. If you want them to access it in a browser then I guess you'll need to write that front end however.
If you are not on the same local network the the same more or less applies, except you'll have to add port forwarding into the mix.
I would use ngrok (https://ngrok.com/) its free and it will expose your localhost to colleagues in order to access the db.
once you download and execute, in the command line type ngrok http 192.168.56.1:5984 and they should be able to access it when you provide them the url ngrok returns, which exposes your localhost externally

CakePHP use MS Access database (.mdb, not accdb): Do I need to write a driver? How to build it?

I'm in the unlucky situation where my client requires to use a read-only MS Access database to render some webpage contents on his website (built by me).
Because this MS Access file will be updated roughly once per month and I don't want to do it manually by converting it into sql query and import in Mysql, I would like to make some webpages read directly from it.
What I discovered is that there isn't a driver (at least in my cakephp installation) for MS Access database (but in older versions of cake exist) or at least I didn't find any of them.
I need to know where eventually I can find such drivers or how to correctly implement one of them only for read operations (I think I should implement DboSource class, but I don't know what should I override because there isn't anything such virtual or abstract or interface that guide me through this).
I didn't even understand if I should create an Adodb driver or an OleDB driver. I also think that Sqlserver driver is a lot similar to what I should build (except for connectionand some details); if I can use it in some way to shorten my job, it will be helpful.
Edit 1:
Because no one is answering, I can say I'm ok to use MS Access also with "normal" queries (without requiring each table to be bound to a model) but I must be sure that are sanitized and will output arrays similar to what cakes output actually: $jobs['jobs']['name']
Any suggestion on how to achieve this?
Maybe the Adodb or Odbc datasources from https://github.com/cakephp/datasources/tree/2.0/Model/Datasource/Database work with MS Access?
This example is to big to write here it-s from cake bakery Please test it and i'm here for other problems

Implementing Domain Name System

I am working on a project in embedded c.The project is the electronic Cash Register.In this
project i need to send the sale data through gprs on to a server our own made application
in C#. Now i have to change the ip of the server on the machine side because of dynamic ip.i
want to implement dns in my Machine so that idont need to change ip every time.plz anyone
in this.And what changes does i need to do on the server side.
Is your IP dynamic because of your ISP setup?
If so i'd say the easiest way would be to sign up to someone like no-ip.com. their free service will give you a url and an application to install on your server. When your ip changes on the server the application updates their records so the url is routed to the correct IP. Basically in short, going to the url there give you will alway go to your server.
Hope this helps.
I'm not sure that you want or need to implement a DNS server (and this is a very complex task, because DNS is a complex protocol, and you need to think of security issues). You only need to use a library call (like getaddrinfoand friends) which use eventually DNS to transform a host name to an IP address or vice versa.

Resources