Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

With Linux the ODYSSEUS_HOME (ODYSSEUS_HOME) is ~/.odysseus, there you can change the odysseusNet.config to

Code Block
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<comment>OdysseusNet Property File edit only if you know what you are doing</comment>
<entry key="net.networkoperatorgenerator">websocket</entry>
<entry key="net.node.default.username">System</entry>
<entry key="net.dd.local">true</entry>
<entry key="net.node.name">OdysseusNode_1554</entry>
<entry key="net.discoverer.name">BroadcastOdysseusNodeDiscoverer,IPListOdysseusNodeDiscoverer</entry>
<entry key="net.querydistribute.allocation">querycount</entry>
<entry key="net.source.lifetime">3600000</entry>
<entry key="net.connect.selector.name">GroupSelectorComponent</entry>
<entry key="net.nodemanager.storetype">filestore</entry>
<entry key="net.nodemanager.filename">/home/$USER/.odysseus/store/nodes.store</entry>
<entry key="net.dd.checkinterval">30000</entry>
<entry key="net.remoteUpdate">false</entry>
<entry key="net.node.communicator">rest</entry>
<entry key="net.node.preserveid">false</entry>
<entry key="net.querydistribute.minport">10000</entry>
<entry key="net.autostart">true</entry>
<entry key="net.querydistribute.partition">querycloud</entry>
<entry key="net.querydistribute.randomport">false</entry>
<entry key="net.discoverer.interval">5000</entry>
<entry key="net.node.default.password">manager</entry>
<entry key="net.node.group">OdysseusGroup</entry>
<entry key="net.querydistribute.maxport">20000</entry>
<entry key="net.logging.receive">false</entry>
</properties>

if you want to persist your registered nodes, you could also add:

Code Block
<entry key="net.nodemanager.storetype">filestore</entry>
<entry key="net.nodemanager.filename"><PATHTOHOME>/store/nodes.store</entry>

In this case you should replace <PATHTOHOME> e.g. with the ODYSSEUS_HOME folder.Replace $USER with your local user

Setup of Odysseus worker nodes

...

Code Block
version: '3.3'

services:
    nexmark:
        image: odysseusol/nexmark
        ports:
           - 65440-65443:65440-65443
    worker01:
        image: odysseusol/odysseusnet
        stdin_open: true
        ports:
            - 18881:8888
        volumes:
            - ./worker01:/var/lib/odysseus

    worker02:
        image: odysseusol/odysseusnet
        stdin_open: true
        ports:
            - 18882:8888
        volumes:
            - ./worker02:/var/lib/odysseus

    worker03:
        image: odysseusol/odysseusnet
        stdin_open: true
        ports:
            - 18883:8888
        volumes:
            - ./worker03:/var/lib/odysseus
Note

As of now a normal Ubuntu 20.04 only supports docker-compose yml syntax to version 3.3 instead of 3.8 in Windows as stated in other yml files, but most of them are downwards compatible, because newer features are not that widespread at the moment.


As a workaround make sure the worker01-03 directories have the 777-permissions with:

...

Code Block
docker-compose up -d

Configuring inside docker compose

As the nodes read their configuration from sytem-properties and enviroment before looking into the config file, you can overwrite the configuration like in the following docker compose example:

Code Block
version: '3.8'

services:
    nexmark:
        image: odysseusol/nexmark
        ports:
           - 65440-65443:65440-65443

    node01:
        image: odysseusol/odysseusnet
        stdin_open: true
        ports:
            - 18881:8888
        environment:
            - net.node.name=node01
            - net.net.discoverer.name=MulticastOdysseusNodeDiscoverer,BroadcastOdysseusNodeDiscoverer,IPListOdysseusNodeDiscoverer
            - net.node.communicator=rest
        volumes:
            - ./node01:/var/lib/odysseus

    node02:
        image: odysseusol/odysseusnet
        stdin_open: true
        ports:
            - 18882:8888
        environment:
            - net.node.name=node02
            - net.net.discoverer.name=MulticastOdysseusNodeDiscoverer,BroadcastOdysseusNodeDiscoverer,IPListOdysseusNodeDiscoverer
            - net.node.communicator=rest
        volumes:
            - ./node02:/var/lib/odysseus

    node03:
        image: odysseusol/odysseusnet
        stdin_open: true
        ports:
            - 18883:8888
        environment:
            - net.node.name=node03
            - net.net.discoverer.name=MulticastOdysseusNodeDiscoverer,BroadcastOdysseusNodeDiscoverer,IPListOdysseusNodeDiscoverer
            - net.node.communicator=rest
        volumes:
            - ./node03:/var/lib/odysseus

    node04:
        image: odysseusol/odysseusnet
        stdin_open: true
        ports:
            - 18884:8888
        environment:
            - net.node.name=node04 
            - net.net.discoverer.name=MulticastOdysseusNodeDiscoverer,BroadcastOdysseusNodeDiscoverer,IPListOdysseusNodeDiscoverer
            - net.node.communicator=rest
        volumes:
            - ./node04:/var/lib/odysseus


Setup of Odysseus Webstudio

You can use the Odysseus Webstudio (WebStudio) for monitoring and interacting with the worker nodes. There are two options:

  • Only use the webstudio
  • Develop the webstudio

Use the webstudio

If you just want to use the Webstudio you should just download the docker-compose.yml file from here:

https://git.swl.informatik.uni-oldenburg.de/projects/API_APPS/repos/webstudio/browse/deploy/docker-compose.yml

For Linux: As this is not a root container, you need to give read access to the user of the docker container. The easiest way is to use 777


Develop the webstudio

To install it, first clone the Webstudio-repo (https://git.swl.informatik.uni-oldenburg.de/projects/API_APPS/repos/webstudio/browse?at=refs%2Fheads%2Fdevelopment) and checkout the development-branch with

Code Block
git clone https://git.swl.informatik.uni-oldenburg.de/scm/api_apps/webstudio.git
git checkout -b development

Then create and give the all permissions to everyone to the following directories as a workaround:

Code Block
sudomkdir backend 
chmod 777 -R backend deploy frontend odysseushome

For starting the docker stack you can set the images accordingly in the docker-compose.yml file:

Code Block
version: '3.3'

services:
  frontend:
    image: odysseusol/webstudio_frontend
    #build: frontend
    ports:
      - "4200:80"
    environment:
      NODE_ENV: ${NODE_ENV}
    restart: always
    depends_on:
      - backend

  backend:
    image: odysseusol/webstudio_backend
    #build: backend
    ports:
      - "3000:3000"
    environment:
      NODE_ENV: ${NODE_ENV}
      MONGODB_URI: ${MONGODB_URI}
      SECRET_TOKEN: ${SECRET_TOKEN}
      DOWNLOAD_TOKEN: ${DOWNLOAD_TOKEN}
      PROJECTS_FOLDER: ${PROJECTS_FOLDER}
    restart: always
    depends_on:
      - database
    volumes:
      - backenddata:/home/node/app/projects
      - ./backend/logs:/home/node/app/logs

  database:
    image: mongo
    restart: always
    ports:
      - "27017:27017"
    volumes:
      - mongodbdata:/data/db

  odysseus:
    image: odysseusol/odysseus
    restart: always
    ports:
      - "8889:8888"
    volumes:
      - ./odysseushome:/var/lib/odysseus

volumes:
  mongodbdata:
  backenddata:
  odysseushome:

At last you can start the stack with:

...

in the home dir

At last you can start the stack with:

Code Block
docker-compose up -d

Add the nodes in Odysseus Studio

It the view is not available, you should use Window/Show View/other... and then select Nodes from the OdysseusNet section.

Image Added

Before you can install queries on the nodes, you have to add the worker nodes with:

Code Block
#CONFIG DISTRIBUTE true
#PARSER PQL

#DEFINE HOST 192.168.188.36
#ADD_NODE (name=worker_1) (serverAddress=${HOST}) (serverPort=18881) (username=System) (password=manager)
#ADD_NODE (name=worker_2) (serverAddress=${HOST}) (serverPort=18882) (username=System) (password=manager)
#ADD_NODE (name=worker_3) (serverAddress=${HOST}) (serverPort=18883) (username=System) (password=manager)


Install the remote query

Run the following OdysseusScript query in Odysseus Studio.

Code Block
#REMOTEQUERY (name=worker_1)
#PARSER PQL


#RUNQUERY
nexmark:person := ACCESS({source='nexmark:person',
    wrapper='GenericPush',
    transport='TCPClient',
    protocol='SizeByteBuffer',
    dataHandler='Tuple',
    options=[
        ['host', 'nexmark'],
        ['port', '65440'],
        ['ByteOrder', 'LittleEndian']
        ],
    schema=[
        ['timestamp', 'STARTTIMESTAMP'],
        ['id', 'INTEGER'],
        ['name', 'STRING'],
        ['email', 'STRING'],
        ['creditcard', 'STRING'],
        ['city', 'STRING'],
        ['state', 'STRING']
        ]
    })
    
    

#RUNQUERY
out = nexmark:person
Note

Remark, that the host is 'nexmark' instead of 'localhost', because the remote worker node 'worker_01' is started in the default docker network and access the nexmark by the DNS resolved service name 'nexmark'


See the remote query output

Here is described how you can see the remote query output.

Odysseus Studio

You can the following query in Odysseus Studio to access the output (Reading Query Results via REST/Websocket):

Code Block
#PARSER PQL
#RUNQUERY
in = ACCESS({
    transport = 'WebsocketClient', 
    wrapper = 'GenericPush',
    datahandler = 'Tuple',
    protocol = 'CSV',
    source = 'access',
    readMetadata = 'true',
    options = [
        ['uri','ws://localhost:18881/queries/0/a2e1a574-6c72-4961-b304-111c01708445/0/CSV/fif8htets00ql9q71okbuu7qs9']
    ],
    schema = [['timestamp','StartTimestamp'],['id','Integer'],['name','String'],['email','String'],['creditcard','String'],['city','String'],['state','String']]
    }
)

You have to adjust the optioins-uri in the query with the rootOperators-websockets-CSV uri from http://localhost:18881/queries/0 

You can then show the last x elements:

Image Added


Odysseus Webstudio

In Webstudio you can see the query output unter the queries tab:

Image Added

...