Commit 444bea57 authored by Cristiano Urban's avatar Cristiano Urban
Browse files

Code cleanup.

parent 68dc195b
Loading
Loading
Loading
Loading
+13 −16
Original line number Diff line number Diff line
@@ -48,8 +48,7 @@ docker volume prune

- Client (container_name: client), is used to provide to the user some useful command line tools to interact with the backend
- Transfer service (container_name: transfer_service) is the core of the backend architecture
- RabbitMQ (container_name: rabbitmq), is a AMQP broker used to deliver messages containing requests from the user command line tools and from the VOSpace REST APIs
- Redis (container_name: job_cache), is used as a cache for job queues
- Redis (container_name: job_cache), is used as a cache for job queues and as message broker to deliver messages containing requests from the user command line tools and from the VOSpace REST APIs
- File catalog (container_name: file_catalog), now available [here](https://www.ict.inaf.it/gitlab/vospace/vospace-file-catalog), is a posgresql database used to store information on VOSpace nodes, but also on storage locations, jobs and users.


@@ -83,17 +82,6 @@ On this container, hosted on the so-called transfer node, each user will find hi
The user will copy the data to be stored within the *store* folder, while he/she will find the requested data within the *retrieve* folder.
This use case was implemented in order to try to offer support to users providing huge amounts of data in the order of terabytes.

#### RabbitMQ

You can access the RabbitMQ web interface via browser in two steps.

1. Find the IP address of the RabbitMQ broker:
```
docker network inspect vospace-transfer-service_backend_net | grep -i -A 3 rabbitmq
```
2. Open your browser and point it to http://IPv4Address:15672 (user: guest, password: guest)


#### Redis

You can access the Redis server from the **client** container by following the steps here below.
@@ -109,10 +97,19 @@ redis-cli -h job_cache
```

3. You can obtain some info about the jobs by searching them on the following queues:
   - For write operations the queues are *write_pending*, *write_ready* and *write_terminated*
   - For read operations the queues are *read_pending*, *read_ready* and *read_terminated*.
   - for write operations the queues are *write_pending*, *write_ready* and *write_terminated*
   - for read operations the queues are *read_pending*, *read_ready* and *read_terminated*.

4. Some of the messages sent by the VOSpace REST APIs are handled by the following queues:
   - for starting async recalls the queue is *start_job_queue*.

5. The messages sent by the user command line tools are handled by the following queues:
   - for vos_data the queue is *data_queue*
   - for vos_import the queue is *import_queue*
   - for vos_job the queue is *job_queue*
   - for vos_storage the queue is *storage_queue*.

Example: list the first six elements of the *write_ready* queue
Example: list the first six elements of the *write_ready* job queue
```
redis:6379> lrange write_ready 0 5
```
+2 −2
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ import json
import redis
import uuid

class RedisRpcClient(object):
class RedisRPCClient(object):

    def __init__(self, host, port, db, rpcQueue):
        self.client = redis.Redis(host, port, db)
@@ -17,5 +17,5 @@ class RedisRpcClient(object):
        return response


#client = RedisRpcClient("job_cache", "testList")
#client = RedisRPCClient("job_cache", "testList")
#client.call()
+3 −3
Original line number Diff line number Diff line
@@ -2,12 +2,12 @@

import sys

from redis_rpc_client import RedisRpcClient
from redis_rpc_client import RedisRPCClient
from config import Config
from tabulate import tabulate


class VOSData(RedisRpcClient):
class VOSData(RedisRPCClient):

    def __init__(self):
        config = Config("/etc/vos_cli/vos_cli.conf")
+8 −8
Original line number Diff line number Diff line
@@ -3,11 +3,11 @@
import os
import sys

from redis_rpc_client import RedisRpcClient
from redis_rpc_client import RedisRPCClient
from config import Config


class VOSImport(RedisRpcClient):
class VOSImport(RedisRPCClient):

    def __init__(self):
        config = Config("/etc/vos_cli/vos_cli.conf")
+10 −10
Original line number Diff line number Diff line
@@ -3,12 +3,12 @@
import json
import sys

from redis_rpc_client import RedisRpcClient
from redis_rpc_client import RedisRPCClient
from config import Config
from tabulate import tabulate


class VOSJob(RedisRpcClient):
class VOSJob(RedisRPCClient):

    def __init__(self):
        config = Config("/etc/vos_cli/vos_cli.conf")
Loading