Versions Compared

Key

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

...

Code Block
languageshell
docker compose up -d

After this, you should see something like this:

Image Added

Now you can use your browser and open http://localhost:4200/ (change, if you run the docker compose on another server, in the following we assume, that you will use localhost)

Image Added

Here you can add the credential that are per default: "System" and "manager"

On the left side, there is the menu bar, that can be extended by clicking on the burger menu.

Image Added

When you want to change the password for the System user or create new users, you could use the "Users" entry.

As WebStudio can be used to connect to different Odysseus servers at the same time, the first step is to add new servers under the "Connection" entry.

You could use any Odysseus server, but in this tutorial we will use the server, that is delivered with the docker compose file.

In the Connections menu klick on Image Added

Image Added

See the docker compose file for the port. If you change the port or add additional servers, you will need to choose this port.

Code Block
languagedocker
   standalone01:
    image: odysseusol/odysseus
    stdin_open: true
    restart: always
    ports:
        - 18888:8888
    volumes:
       - ./standalone01:/var/lib/odysseus 

Afterwards you should see something like

Image Added

Now, it is important to log into the server (at the moment it is only connected). For this, click on the Image Added button and fill out the login credentials
Image Added
if you didn't change anything, this is again System and manager.

Afterwards you will see the following:

Image Added

You can useImage Added to log out again from this server.

Image Added can be used to edit or delete the connection.

With Image Added you get to the IDE for this server.

Image Added

The first step now, is to create a new project with the Image Addedon the left lower side.

Name the project e.g. Nexmark

Image Added

You will see

Image Added

Now click on the "New File in current directory" 

Name the file nexmark.qry

Now copy and paste the following script.

Remark: Because nexmark and this is Odysseus instance are inside a docker environment you cannot use localhost for nexmark queries → use "nexmark" instead.

Code Block
languageshell
#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
nexmark:bid := ACCESS({source='nexmark:bid',
    wrapper='GenericPush',
    transport='TCPClient',
    protocol='SizeByteBuffer',
    dataHandler='Tuple',
    options=[
        ['host', 'nexmark'],
        ['port', '65442'],
        ['ByteOrder', 'LittleEndian']
        ],
    schema=[
        ['nexmark:bid','timestamp', 'STARTTIMESTAMP'],
        ['nexmark:bid','auction', 'INTEGER'],
        ['nexmark:bid','bidder', 'INTEGER'], 
        ['nexmark:bid','datetime', 'LONG'],
        ['nexmark:bid','price', 'DOUBLE']
        ]
    })

#RUNQUERY    
nexmark:auction := ACCESS({source='nexmark:auction',
    wrapper='GenericPush',
    transport='TCPClient',
    protocol='SizeByteBuffer',
    dataHandler='Tuple',
    options=[
        ['host', 'nexmark'],
        ['port', '65441'],
        ['ByteOrder', 'LittleEndian']
        ],
    schema=[
        ['timestamp', 'STARTTIMESTAMP'],
        ['id', 'INTEGER'],
        ['itemname', 'STRING'],
        ['description', 'STRING'],
        ['initialbid', 'INTEGER'],
        ['reserve', 'INTEGER'],
        ['expires', 'LONG'],
        ['seller', 'INTEGER'],
        ['category', 'INTEGER']
        ]
    })

#RUNQUERY    
nexmark:category := ACCESS({source='nexmark:category',
    wrapper='GenericPush',
    transport='TCPClient',
    protocol='SizeByteBuffer',
    dataHandler='Tuple',
    options=[
        ['host', 'nexmark'],
        ['port', '65443'],
        ['ByteOrder', 'LittleEndian']
        ],
    schema=[
        ['id', 'INTEGER'],
        ['name', 'STRING'],
        ['description', 'STRING'],
        ['parentid', 'INTEGER']
        ]
    })

Image Added

And klick on "Run" in the lower right corner of the editor pane.

Image Added

In the lower right corner, you should see the following:

Image Added

You connect to a odysseus instance, you will need to use localhost, because the connection is done from the browser that is outside of docker!

If there are errors, they are not (yet) shown in this view. You will ne to navigate to Image Added

And you will see error messages. 
Here everything went fine:

Image Added

Now you can create another query, e.g. filtering all bids with a price higher than 200.

For this, you could use PQL (same as the source definition)

Image Added

and press Run.

In the Queries windows you will see this query:

Image Added

To see results, right click on the line and select "Show in table"

Image Added

a new window opens at the upper right side and shows the results.

Image Added

You can use this Image Added icon the show the query plan for this query (Remark. Does not work atm).

An alternative, is to click on the "Monitor" entry in the menu.

Image Added

There you will see for any installed query, the plan. A click on the operators shows information at the bottom
Image Added

Including output of each operator

Image Added


For all registered connections, the sources, sinks and queries can be found under "Streams", "Sinks" and "Queries" resp.

The "Evaluation" entry can be used to evaluate query regarding runtime. 

Remark: At the moment, this is browser based only, so for running a evaluation, the browser must be kept open.Image Removed