I'm trying to use OrientDB to map the relationship between servers that are managed by multiple different systems (with some overlap). Suppose that each server from each system was a vertex, is there a way to create an edge automatically between two servers that have the same property (e.g. IP address)
Suppose this is my starting data (in CSV format)
System, Name, IP
---------------------------------
Alpha, compute-1, 192.168.0.1
Alpha, compute-2, 192.168.0.2
Beta, storage-1, 192.168.0.1
Beta, storage-2, 192.168.0.3
Question 1 Can I automatically create edges between the first and third entry?
Question 2 If I added a fifth entry Beta, storage-3, 192.168.0.2 , would the link be efficiently (and preferable automatically) created between the second and fifth entry?
Question 3 What if I added a third system Gamma, where only the last byte is specified, and it is assumed that the first three are 192.168.0, can I concatenate the two together and still automatically create edges against Alpha and Beta entries?
Take a look at the OrientDB ETL tool:
http://orientdb.com/docs/last/ETL-Introduction.html
It can load from CSVs:
http://orientdb.com/docs/last/Extractor.html#csv-extractor
And transform to Vertexes and Endges
http://orientdb.com/docs/last/Transformer.html
Of course, you can write some custom code to load your specific CSV to OrientDB.
Related
I have a simple BLE mesh (using Espressif's ESP-BLE-MESH) consisting of two nodes; one containing 3 generic onoff server elements publishing to a group, and one containing a single generic onoff client subscribed to that group. Each node is a little ESP32 dev board with an RGB LED built in. I'm programming in C, using the ESP-IDF extension for Visual Studio Code.
I want the 3 onoff servers to control the R, G and B of the LED, respectively, but all I have to distinguish a server from the others is the address of its element, which is the primary address of the node + some offset. I want to get that offset to determine which of R, G and B are being switched, but I can't figure out how to access the primary address of the publishing node to work that out. I've trawled the documentation and tried every member of the esp_ble_mesh_generic_client_cb_param_t struct passed to the example_ble_mesh_generic_client_cb function, going down such rabbit holes as param->params->model->pub->publish_addr, but have been unsuccessful. Is what I'm trying to achieve even possible?
Server and client code used: ble mesh node
I am just starting to get into PostGIS and pgRouting and stumbled upon the following problem:
I imported a Network-Graph into my DB, and the routing inside of that Table (from node A to node B) works fine. However I would like to find a route between Points that are in another table (e.g. Customers and Shops). Can someone help me out on how to use Points (Nodes) from a different table than the network as start/end (or source/target)?
Thanks
I am on Enterprise Architect 13.5, creating a deployment diagram. I am defining our servers as nodes, and using attributes on them so that I can specify their details, such as Disk Controller = RAID 5 or Disks = 4 x 80 GB.
When dragging instances of these nodes onto a diagram, I can select "Set Run State" on them and set values for all attributes I have defined - just like it is done in the deployment diagram in the EAExample project:
Since our design will have several servers using the same configuration, my plan was to use the "initial value" column in the attribute definition on the node to specify the default configuration so that all instances I create automatically come up with reasonable values, and when the default changes, I would only change the Initial Values on the original node instead of having to go to all instances:
My problem is that even though I define initial values, all instances I create do not show any values when I drag them onto the diagram. Only by setting the Run State on each instance, I can get them to show the values I want:
Is this expected behavior? Btw, I can reproduce the same using classes and instances of them, so this is not merely a deployment diagram issue.
Any ideas are greatly appreciated! I'm also thankful if you can describe a better way to achieve the same result with EA, in case I am doing it wrong.
What you could do is to either write a script to assist with it or even create an add-in to bring in more automation. Scripting is easier to implement but you need to run the script manually (which however can add the values in a batch for newly created diagram objects). Using an add-in could do this on element creation if you hook to EA_OnPostNewElement.
What you need to do is to first get the classifier of the object. Using
Repository.GetElementByID(object.ClassifierID)
will return that. You then can check the attributes of that class and make a list of those with an initial value. Finally you add the run states of the object by assigning object.RunState with a crude string. E.g. for a != 33 it would be
#VAR;Variable=a;Value=33;Op=!=;#ENDVAR;
Just join as many as you need for multiple run states.
I built a custom CHAID tree in SPSS modeler. I would like to assign the particular terminal nodes to all of the records in the dataset. How would I go about doing this from within the software?
Assuming that you used the regular node called CHAID, if you select inside the diamond icon (created chaid model) in the tab configurations the rule identifyer, the output will add another variable called $RI-XXX that will classify all the records within the terminal nodes. Just check that option and then put a table node after that and all the records will be classified.
You just need to apply the algorithm to whatever data set you need, and you only need to inputs to be the same (type and eventually storage).
The diamond contains the algo and you can disconnect it and connects to whatever you want.
http://beyondthearc.com/blog/wp-content/uploads/2015/02/spss.png
I'm running the matlab extension for netlogo in headless(non-gui) mode. I've downloded the extension source and am trying to access the command line arguments from the java code in the extension. The command line arguments are stored in LabInterface.Settings. I would like to be able to access that object in the java code of the extension. I've been working on this for a couple of days but have had not success. It seems the extension process is designed to create primitives to be used inside netlogo. These primitives have knowledge of the different netlogo objects but there is no way for the extension java code to access it. I would appreciate any help.
I would like to be able to run multiple netlogo-matlab analyses with varying parameters, in batch mode accross multiple machines, perhaps a flux cluster. I need to run in headless because of the batch nature. Sometimes the runs will be on the same machine, sometimes split accross multiple machines, flux or condor. I know a similar functionality exist in netlogo for running varying parameters in a single session. Is there some way to split these accross multiple machines?
Currently, I create a series of setup files for netlogo. Each setup file represents the paramenters that vary for that run. Then I submit each netlogo - setup file combination as a single run. Each run can be farmed out to a seperate machine or processor. Adding the matlab extension complicates this. The matlab extension connects it's server to port 9999. With multiple servers running they all get attached to port 9999 and this causes problems. I was hoping to get information from the setup-file name to create independent port numbers tied to the setup file names. This way I could create a unique socket for each setup file, and hence a unique server connection for each netlogo run.
NetLogo doesn't provide a facility for distributing model runs on a cluster, but various people have done it anyway. See:
http://ccl.northwestern.edu/netlogo/docs/faq.html#cluster
https://github.com/jurnix/netlogo-cluster
http://mass.aitia.ai/index.php/intro/meme
and past threads about it on the netlogo-users group. There is no single standard solution.
As for getting access to LabInterface.Settings, it appears to me from looking through the NetLogo source code that the settings object isn't actually stored anywhere. It's just handed off from method to method, ultimately to lab.Lab.run, without ever actually being kept. So trying to get access to the name of the setup file won't work.
So you'll need to some other way for to make the extension generate unique port numbers. Seems to me like there's any number of possible solutions to this. At the time you generate the setup file you know its name, so you could generate a port number at the same time and include it in the experiment definition contained in the file. Or you could pass a port number in a Java system property (using -D) at the time you start NetLogo. Or you could generate a port number based on the process id of the JVM process. Or you could have the extension try port 9999 and see if it's already in use, and if it is, then try a different port number. That's just a few ideas... I could probably come up with ten more.