Code Monkey home page Code Monkey logo

reticulum's Introduction

Reticulum

Note: Due to our small team size, we don't support setting up Reticulum locally due to restrictions on developer credentials. Although relatively difficult and new territory, you're welcome to set up this up yourself. In addition to running Reticulum locally, you'll need to also run Hubs and Dialog locally because the developer Dialog server is locked down and your local Reticulum will not connect properly)

Reference this discussion thread for more information.

A hybrid game networking and web API server, focused on Social Mixed Reality.

Development

1. Install Prerequisite Packages:

PostgreSQL (recommended version 11.x):

Linux:

On Ubuntu, you can use

apt install postgresql

Otherwise, consult your package manager of choice for other Linux distributions

Windows: https://www.postgresql.org/download/windows/

Windows WSL: https://github.com/michaeltreat/Windows-Subsystem-For-Linux-Setup-Guide/blob/master/readmes/installs/PostgreSQL.md

Erlang (v23.3) + Elixir (v1.14) + Phoenix

https://elixir-lang.org/install.html

Note: On Linux, you may also have to install the erlang-src package for your distribution in order to compile dependencies successfully.

https://hexdocs.pm/phoenix/installation.html

Ansible

https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html

2. Setup Reticulum:

Run the following commands at the root of the reticulum directory:

  1. mix deps.get
  2. mix ecto.create
    • If step 2 fails, you may need to change the password for the postgres role to match the password configured dev.exs.
    • From within the psql shell, enter ALTER USER postgres WITH PASSWORD 'postgres';
    • If you receive an error that the ret_dev database does not exist, (using psql again) enter create database ret_dev;
  3. From the project directory mkdir -p storage/dev

3. Start Reticulum

Run scripts/run.sh if you have the hubs secret repo cloned. Otherwise iex -S mix phx.server

Run Hubs Against a Local Reticulum Instance

1. Setup the hubs.local hostname

When running the full stack for Hubs (which includes Reticulum) locally it is necessary to add a hosts entry pointing hubs.local to your local server's IP. This will allow the CSP checks to pass that are served up by Reticulum so you can test the whole app. Note that you must also load hubs.local over https.

On MacOS or Linux:

nano /etc/hosts

From there, add a host alias

Example:

127.0.0.1   hubs.local
127.0.0.1   hubs-proxy.local

2. Setting up the Hubs Repository

Clone the Hubs repository and install the npm dependencies.

git clone https://github.com/mozilla/hubs.git
cd hubs
npm ci

3. Start the Hubs Webpack Dev Server

Because we are running Hubs against the local Reticulum client you'll need to use the npm run local command in the root of the hubs folder. This will start the development server on port 8080, but configure it to be accessed through Reticulum on port 4000.

4. Navigate To The Client Page

Once both the Hubs Webpack Dev Server and Reticulum server are both running you can navigate to the client by opening up:

https://hubs.local:4000?skipadmin

The skipadmin is a temporary measure to bypass being redirected to the admin panel. Once you have logged in you will no longer need this.

5. Logging In

To log into Hubs we use magic links that are sent to your email. When you are running Reticulum locally we do not send those emails. Instead, you'll find the contents of that email in the Reticulum console output.

With the Hubs landing page open click the Sign In button at the top of the page. Enter an email address and click send.

Go to the reticulum terminal session and find a url that looks like https://hubs.local:4000/?auth_origin=hubs&auth_payload=XXXXX&auth_token=XXXX

Navigate to that url in your browser to finish signing in.

6. Creating an Admin User

After you've started Reticulum for the first time you'll likely want to create an admin user. Assuming you want to make the first account the admin, this can be done in the iex console:

  1. Open the iex console. From the reticulum folder run:
iex -S mix
  1. Then run the following code:
Ret.Account |> Ret.Repo.all() |> Enum.at(0) |> Ecto.Changeset.change(is_admin: true) |> Ret.Repo.update!()

Make sure to run the Maybe try iex -S mix where the reticulum mix.exs file is.

7. Enabling Room Features

Rooms are created with restricted permissions by default, which means you can't spawn media objects. You can change this setting in the admin panel, or run the following code in the iex console:

  1. Open the iex console. From the reticulum folder run:
iex -S mix
  1. Then run the following code:
Ret.AppConfig.set_config_value("features|permissive_rooms", true)

8. Start the Admin Panel server in local development mode

When running locally, you will need to also run the admin panel, which routes to hubs.local:8989 Using a separate terminal instance, navigate to the hubs/admin folder and use:

npm run local

You can now navigate to https://hubs.local:4000/admin to access the admin control panel

Run Spoke Against a Local Reticulum Instance

  1. Follow the steps above to setup Hubs
  2. Clone and start spoke by running ./scripts/run_local_reticulum.sh in the root of the spoke project
  3. Navigate to https://hubs.local:4000/spoke

Run Reticulum against a local Dialog instance

  1. Update the Janus host in dev.exs:
dev_janus_host = "hubs.local"
  1. Update the Janus port in dev.exs:
config :ret, Ret.JanusLoadStatus, default_janus_host: dev_janus_host, janus_port: 4443
  1. Add the Dialog meta endpoint to the CSP rules in add_csp.ex:
default_janus_csp_rule =
   if default_janus_host,
      do: "wss://#{default_janus_host}:#{janus_port} https://#{default_janus_host}:#{janus_port} https://#{default_janus_host}:#{janus_port}/meta",
      else: ""
  1. Edit the Dialog configuration file turnserver.conf and update the PostgreSQL database connection string to use the coturn schema from the Reticulum database:
   psql-userdb="host=hubs.local dbname=ret_dev user=postgres password=postgres options='-c search_path=coturn' connect_timeout=30"

reticulum's People

Contributors

brianpeiris avatar bryanenders avatar cvan avatar easelify avatar gfodor avatar infinitelee avatar ivarvong avatar johnshaughnessy avatar keianhzo avatar lalalune avatar mozilla-github-standards avatar mqp avatar netpro2k avatar pattersonbl2 avatar robertlong avatar robinkwilson avatar takahirox avatar taku1201 avatar tanfarming avatar zfox23 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reticulum's Issues

Roadmap

Hello, nice to see the elixir is being used for social XR stuff. I've been dubbing with elixir+aframe combination for few months a little while ago but dropped work on it since I've moved to decentralized social WebVR at Decentraland.

I want to ask if there is any roadmap for this API/repo or what features it should have, so if I wanted to contribute, what should I do?

P.S. There are two of my tests with elixir+aframe, very experimental: In first one, one user can see another user's avatar moving around (used incognito for another users), but re-logging to previous session is not implemented so it's kinda funny after while. In second one, there's also an authentication (but WebVR part is unfinished).

The goal in both was to have the ability to drop the scene (any A-Frame scene) and have the entities synced without adding networked-aframe component to each entity manually. Is this something that's also on the roadmap?

Automagically handle dropbox file urls

Right now, if you paste a dropbox file (example: https://www.dropbox.com/s/rds4qdmo5jvzw2l/2020-02-29%2009.23.19-1.jpg?dl=0) Hubs resolves the media as a website screenshot since Dropbox redirects this to their viewer.

However, if you swap the ?dl=0 with ?raw=1, the URL resolves directly to the image

It would be great if we could try to handle that automatically when the default "share" is pasted into a Hubs room, so we could handle the share intent more effectively.

Address warnings from Credo and add Credo check to circle CI

Credo emits a lot of warnings that we've ignored.

When I run mix credo --strict, I see:
1486 mods/funs, found 7 consistency issues, 1 warning, 36 refactoring opportunities, 202 code readability issues, 54 software design suggestions.

If we like credo, we should address these warnings (either by fixing the code or adding exceptions to a credo config file) and add it as part of our automatic linting process. We already do use mix compile --warnings-as-errors but adding credo will catch even more. (I don't know how mix compile determines what to warn on.)

Background info #399 (comment)

CODE_OF_CONDUCT.md file missing

As of January 1 2019, Mozilla requires that all GitHub projects include this CODE_OF_CONDUCT.md file in the project root. The file has two parts:

  1. Required Text - All text under the headings Community Participation Guidelines and How to Report, are required, and should not be altered.
  2. Optional Text - The Project Specific Etiquette heading provides a space to speak more specifically about ways people can work effectively and inclusively together. Some examples of those can be found on the Firefox Debugger project, and Common Voice. (The optional part is commented out in the raw template file, and will not be visible until you modify and uncomment that part.)

If you have any questions about this file, or Code of Conduct policies and procedures, please see Mozilla-GitHub-Standards or email [email protected].

(Message COC001)

500 Endpoint terminated error

While installing and executing $DB_HOST docker_compose up I am getting the following output on the terminal:

ret_1 | [info] GET /
ret_1 | [info] Sent 500 in 24ms
ret_1 | [error] #PID<0.2351.0> running RetWeb.Endpoint (cowboy_protocol) terminated
ret_1 | Server: 172.16.180.147:4000 (https)
ret_1 | Request: GET /
ret_1 | ** (exit) an exception was raised:
ret_1 | ** (ArgumentError) response body cannot be set to nil
ret_1 | (plug) lib/plug/conn.ex:583: Plug.Conn.resp/3
ret_1 | (plug) lib/plug/conn.ex:555: Plug.Conn.send_resp/3
ret_1 | (phoenix) lib/phoenix/router.ex:278: Phoenix.Router.call/1
ret_1 | (ret) lib/plug/error_handler.ex:64: RetWeb.Router.call/2
ret_1 | (ret) lib/ret_web/endpoint.ex:1: RetWeb.Endpoint.plug_builder_call/2
ret_1 | (ret) lib/plug/debugger.ex:122: RetWeb.Endpoint."call (overridable 3)"/2
ret_1 | (ret) lib/ret_web/endpoint.ex:1: RetWeb.Endpoint."call (overridable 4)"/2
ret_1 | (ret) lib/ret_web/endpoint.ex:1: RetWeb.Endpoint.call/2
ret_1 | (plug_cowboy) lib/plug/cowboy/handler.ex:18: Plug.Adapters.Cowboy.Handler.upgrade/4
ret_1 | (cowboy) /ret/deps/cowboy/src/cowboy_protocol.erl:442: :cowboy_protocol.execute/4

Same output is displayed on the browser: http://localhost:4000

Any thoughts?

Add dev API keys config for local development of the media API

Currently if you want to work with a local instance of reticulum you need to gather API keys for each of the media services. This can be quite a pain. We should have a set of development keys and be able to hit the development copy of Reticulum when developing Spoke / Hubs locally.

(ArgumentError) argument error:

[error] GenServer #PID<0.3890.0> terminating
** (ArgumentError) argument error: [[], {:jose_jws, {:jose_jws_alg_rsa_pkcs1_v1_5, :RS512}, :undefined, %{"typ" => "JWT"}}, %{"aud" => :ret_perms, "create_hub" => true, "exp" => 1587718257, "iat" => 1587717957, "iss" => "", "jti" => "60fd98da-244a-4f08-a6ca-cc2600d1320e", "nbf" => 1587717956, "sub" => "anon", "tweet" => false, "typ" => "access"}]
(jose 1.10.1) src/jwt/jose_jwt.erl:184: :jose_jwt.sign/3
(guardian 1.2.1) lib/guardian/token/jwt.ex:257: Guardian.Token.Jwt.create_token/3
(guardian 1.2.1) lib/guardian.ex:756: Guardian.returning_tuple/1
(guardian 1.2.1) lib/guardian.ex:582: Guardian.encode_and_sign/4
(ret 1.0.0) lib/ret/perms_token.ex:24: Ret.PermsToken.token_for_perms/1
(ret 1.0.0) lib/ret_web/channels/ret_channel.ex:39: RetWeb.RetChannel.handle_in/3
(phoenix 1.4.16) lib/phoenix/channel/server.ex:280: Phoenix.Channel.Server.handle_info/2
(stdlib 3.12.1) gen_server.erl:637: :gen_server.try_dispatch/4
(stdlib 3.12.1) gen_server.erl:711: :gen_server.handle_msg/6
(stdlib 3.12.1) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Last message: %Phoenix.Socket.Message{event: "refresh_perms_token", join_ref: "435", payload: nil, ref: "436", topic: "ret"}
State: %Phoenix.Socket{assigns: %{session_id: "4e899c16-dad9-4bc8-b782-7d2ff1f95d79", started_at: ~N[2020-04-24 08:45:52]}, channel: RetWeb.RetChannel, channel_pid: #PID<0.3890.0>, endpoint: RetWeb.Endpoint, handler: RetWeb.SessionSocket, id: "session:4e899c16-dad9-4bc8-b782-7d2ff1f95d79", join_ref: "435", joined: true, private: %{log_handle_in: :debug, log_join: :info}, pubsub_server: Ret.PubSub, ref: nil, serializer: Phoenix.Socket.V2.JSONSerializer, topic: "ret", transport: :websocket, transport_pid: #PID<0.3857.0>}

serve `gzip` responses for non-binary assets (HTML, JS, SVG, JSON)

if the User-Agent makes a request for gzip'd content, the response should be a gzip'd response. it appears a setting needs to be enabled and these few lines altered: https://github.com/mozilla/reticulum/blob/b0162be/lib/ret_web/endpoint.ex#L14-L16 (e.g., index.html should be included; favicon.ico and hub-preview.png should be removed, etc.)


to test:

curl -H 'Accept-Encoding: gzip' -i https://hubs.mozilla.com

notice there's no header for content-encoding: gzip

image


notice for the Amazon S3 assets (on https://asset-bundles-prod.reticulum.io) are properly served as gzip'd responses:

curl -H 'Accept-Encoding: gzip' -i 'https://asset-bundles-prod.reticulum.io/rooms/meetingroom/MeetingRoom.bundle.json'

image


examples w/ gzip:

examples w/o gzip:

Disable Cloudflare without UI

Hi, because of the CDN misconfiguration I'm become locked from my Hubs Cloud instance. Any way I can config CDN on the server-side?

Auto-handle URLs to Flickr images

Is your feature request related to a problem? Please describe.
If I go to a Flickr page (e.g., https://www.flickr.com/photos/189067843@N06/50042692202/in/photostream/) and get the URL from the "share" button (e.g., https://flic.kr/p/2jf6SVY), pasting that URL in hubs results in a web page link, not an image.

Describe the solution you'd like
Hubs should find the image in that page and use it.

Describe alternatives you've considered
none

Additional context
May actually be a bug/feature-request for a package dependency, unsure.

Fetch concurrent janus session count

can be done via curl -d "{ \"janus\": \"list_sessions\", \"transaction\": \"abc123\", \"admin_secret\": \"SECRET\" }" "http://10.32.2.97:7000/admin"

can't see screen of skipadmin in my Local machine.

my problem is totally same as below link.

https://stackoverflow.com/questions/62337760/how-to-run-mozilla-hubs-on-my-local-machine

I think I followed the instruction, but the URL which is 'https://hubs.local:4000?skipadmin ' returns white page says 'Missing file index.html. Please try again.' as pasted here.
image

My current emviroment is like this.

Ubunts 18.04
nodeJS = v12.19.0
(PostgreSQL) 11.9
Elixir 1.10.4 (compiled with Erlang/OTP 22)
ansible 2.9.14
python version = 2.7.17
hubs⇒ cloned from the original repository today

The output of reticulum console when accessed the url is like this..

[debug] QUERY OK db=0.1ms decode=1.7ms queue=7.4ms idle=0.0ms
CREATE SCHEMA IF NOT EXISTS ret0 []
[debug] QUERY OK db=0.1ms queue=1.2ms idle=6.1ms
CREATE SCHEMA IF NOT EXISTS coturn []
[debug] QUERY OK db=5.7ms queue=0.1ms idle=7.3ms
ALTER DATABASE ret_dev SET search_path TO ret0 []
[info] Already up
[debug] QUERY OK db=7.6ms queue=0.4ms idle=28.4ms
INSERT INTO coturn.turn_secret (realm, value, inserted_at, updated_at) values ($1, $2, now(), now()) ["ret", "e35e79c7b17b33758fe8147497f2b99f"]
[debug] QUERY OK db=0.6ms queue=0.5ms idle=17.5ms
DELETE FROM coturn.turn_secret WHERE inserted_at < now() - interval '15 minutes' []
[info] Running RetWeb.Endpoint with cowboy 2.6.3 at 0.0.0.0:4000 (https)
[info] Access RetWeb.Endpoint at https://hubs.local:4000
Interactive Elixir (1.10.4) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> 04:37:30 - info: compiled 6 files into 2 files, copied 2 in 1.0 sec
[info] TLS :server: In state :certify received CLIENT ALERT: Fatal - Certificate Unknown

[info] GET /
[debug] Processing with RetWeb.PageController
Parameters: [UNFETCHED]
Pipelines: [:secure_headers, :parsed_body, :browser]
[debug] QUERY OK source="app_configs" db=0.9ms queue=0.9ms idle=9281.6ms
SELECT a0."app_config_id", a0."key", a0."value", a0."owned_file_id", a0."inserted_at", a0."updated_at" FROM "ret0"."app_configs" AS a0 WHERE (a0."key" = $1) ["features|default_room_id"]
[debug] QUERY OK source="app_configs" db=0.5ms queue=1.0ms idle=8285.3ms
SELECT a0."app_config_id", a0."key", a0."value", a0."owned_file_id", a0."inserted_at", a0."updated_at" FROM "ret0"."app_configs" AS a0 []
[info] Sent 503 in 10040ms

I am waiting for your replying.
Thanks.

configure RetWeb.Endpoint

Is there any way someone can clarify the ReadMe about configuring the RetWeb.Endpoint? It is pretty vague and not very helpful to those discovering the project for the first time.

Janus crash 10/19

Load spike on Janus then crash, this was in the log:

Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O): ASAN:DEADLYSIGNAL
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O): =================================================================
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O): ==9536==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000018 (pc 0x7f1458a2e831 bp 0x7f14416781b0 sp 0x7f1441678180 T122)
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O): ==9536==The signal is caused by a READ memory access.
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O): ==9536==Hint: address points to the zero page.
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):     #0 0x7f1458a2e830 in g_socket_send_message (/hab/pkgs/core/glib/2.50.3/20180718153537/lib/libgio-2.0.so.0+0x9a830)
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):     #1 0x7f145a5a668b in socket_send_message (/hab/pkgs/mozillareality/libnice/0.1.15/20180914001451/lib/libnice.so.10+0x3768b)
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):     #2 0x7f145a5a68a1 in socket_send_messages (/hab/pkgs/mozillareality/libnice/0.1.15/20180914001451/lib/libnice.so.10+0x378a1)
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):     #3 0x7f145a5a4273 in nice_socket_send_messages (/hab/pkgs/mozillareality/libnice/0.1.15/20180914001451/lib/libnice.so.10+0x35273)
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):     #4 0x7f145a5a6f20 in socket_send_messages (/hab/pkgs/mozillareality/libnice/0.1.15/20180914001451/lib/libnice.so.10+0x37f20)
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):     #5 0x7f145a5a4273 in nice_socket_send_messages (/hab/pkgs/mozillareality/libnice/0.1.15/20180914001451/lib/libnice.so.10+0x35273)
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):     #6 0x7f145a587659 in nice_agent_send_messages_nonblocking_internal (/hab/pkgs/mozillareality/libnice/0.1.15/20180914001451/lib/libnice.so.10+0x18659)
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):     #7 0x7f145a587ca7 in nice_agent_send (/hab/pkgs/mozillareality/libnice/0.1.15/20180914001451/lib/libnice.so.10+0x18ca7)
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):     #8 0x43fd95 in janus_dtls_fd_bridge /hab/cache/src/meetecho/janus-gateway/dtls.c:993
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):     #9 0x43c03d in janus_dtls_srtp_send_alert /hab/cache/src/meetecho/janus-gateway/dtls.c:906
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):     #10 0x49dac6 in janus_ice_outgoing_traffic_handle /hab/cache/src/meetecho/janus-gateway/ice.c:3582
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):     #11 0x44de0c in janus_ice_outgoing_traffic_dispatch /hab/cache/src/meetecho/janus-gateway/ice.c:272
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):     #12 0x7f14573550ca  (/hab/pkgs/core/glib/2.50.3/20180718153537/lib/libglib-2.0.so.0+0x570ca)
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):     #13 0x7f1457355f4f in g_main_context_dispatch (/hab/pkgs/core/glib/2.50.3/20180718153537/lib/libglib-2.0.so.0+0x57f4f)
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):     #14 0x7f1457356133  (/hab/pkgs/core/glib/2.50.3/20180718153537/lib/libglib-2.0.so.0+0x58133)
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):     #15 0x7f1457356559 in g_main_loop_run (/hab/pkgs/core/glib/2.50.3/20180718153537/lib/libglib-2.0.so.0+0x58559)
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):     #16 0x486325 in janus_ice_thread /hab/cache/src/meetecho/janus-gateway/ice.c:2631
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):     #17 0x7f1457384dbc  (/hab/pkgs/core/glib/2.50.3/20180718153537/lib/libglib-2.0.so.0+0x86dbc)
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):     #18 0x7f1456b714d6  (/hab/pkgs/core/glibc/2.27/20180608041157/lib/libpthread.so.0+0x74d6)
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):     #19 0x7f145555c4ee in __clone (/hab/pkgs/core/glibc/2.27/20180608041157/lib/libc.so.6+0xf24ee)
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O): AddressSanitizer can not provide additional info.
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O): SUMMARY: AddressSanitizer: SEGV (/hab/pkgs/core/glib/2.50.3/20180718153537/lib/libgio-2.0.so.0+0x9a830) in g_socket_send_message
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O): Thread T122 (iceloop 4975448) created by T9 here:
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):     #0 0x7f145ac03de0 in pthread_create (/hab/pkgs/core/gcc/7.3.0/20180608051919/lib/../lib/libasan.so.4+0x39de0)
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):     #1 0x7f14573aae23  (/hab/pkgs/core/glib/2.50.3/20180718153537/lib/libglib-2.0.so.0+0xace23)
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):     #2 0x7f1457384f14  (/hab/pkgs/core/glib/2.50.3/20180718153537/lib/libglib-2.0.so.0+0x86f14)
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):     #3 0x7f1457384ea4 in g_thread_try_new (/hab/pkgs/core/glib/2.50.3/20180718153537/lib/libglib-2.0.so.0+0x86ea4)
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):     #4 0x495d18 in janus_ice_setup_local /hab/cache/src/meetecho/janus-gateway/ice.c:3196
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):     #5 0x4d63cf in janus_plugin_handle_sdp /hab/cache/src/meetecho/janus-gateway/janus.c:2835
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):     #6 0x4d0dc0 in janus_plugin_push_event /hab/cache/src/meetecho/janus-gateway/janus.c:2710
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):     #7 0x7f144e1bfefc in janus_plugin_sfu::push_response::h197f831be24b55d2 (/hab/pkgs/mozillareality/janus-gateway/0.4.3/20180914003418/lib/janus/plugins/li
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O): Thread T9 created by T0 here:
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):     #0 0x7f145ac03de0 in pthread_create (/hab/pkgs/core/gcc/7.3.0/20180608051919/lib/../lib/libasan.so.4+0x39de0)
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):     #1 0x7f144e1c0f36 in janus_plugin_sfu::init::h2032dc67500f2ced (/hab/pkgs/mozillareality/janus-gateway/0.4.3/20180914003418/lib/janus/plugins/libjanus_pl
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O):
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(O): ==9536==ABORTING
Oct 19 12:58:31 dazzling-druid.reticulum.io bash[1392]: hab-launch(SV): Child for service 'janus-gateway.default@mozillareality' with PID 9533 exited with code exit code: 0
Oct 19 12:58:32 dazzling-druid.reticulum.io bash[1392]: janus-gateway.default@mozillareality(SV): Starting service as user=hab, group=hab
Oct 19 12:58:32 dazzling-druid.reticulum.io hab[15126]: Janus commit: 3c5ad1b125f696a32c85420f31a24eec79b35028
Oct 19 12:58:32 dazzling-druid.reticulum.io hab[15126]: Compiled on:  Fri Sep 14 00:37:21 UTC 2018
Oct 19 12:58:32 dazzling-druid.reticulum.io hab[15126]:

Public API

I saw that IEEEVR event Hubs Cloud installation uses reticulum API without authentification token. How this can be configured?

How to share authenticate information with other OAuth provider?

Hi, as the title says, I want to connect Hubs with another website to achieve Single-Sign-On.

My purpose is to provide users to sign-in at once, use our system & hubs with only one-time registration or signing in.
I feel reticulum is independent by Hubs. So I think we can connect with other systems. (with internal API? or OpenID Connect?)
It's okay to use reticulum as a primary user information datastore, or use another system and use its information by reticulum.

I'm a newbie of Hubs/Reticulum, but I understand about general API/OAuth/OpenID. Could you give me some advice about this?

Make test config use environment variables for postgres config

The test.exs config hardcodes the postgres admin user as admin. This causes issues when testing locally where the admin user is postgres. It would be nice to be able to configure this via an environment variable so the same config can be used on CI and locally.

ExRated prune expired buckets

Hi,
I'm learning Elixir and Phoenix, I looked at how you rate-limit calls to external services. I see you use https://hex.pm/packages/ex_rated in media_resolver
https://github.com/mozilla/reticulum/blob/13c932e81869096ad73879abf0c5cb2a5410c537/lib/ret/media_resolver.ex#L564
but doing a "rated" search in the code
https://github.com/mozilla/reticulum/search?q=rated&type=Code
I didn't find that you start the ex_rated GenServer application that is needed to prune expired buckets from the ETS table at periodic interval (cleanup_rate, default to 60s). Maybe you do and I just didn't find it, if so please close the issue.
Otherwise look at https://github.com/grempe/ex_rated#installation

Slug generation is broken for most Unicode inputs

In our current implementation, when we try to generate slugs for hubs, scenes, and avatars, we generate them based on the name, but the slugification library we use barfs and returns invalid output for inputs that contain Unicode characters outside of a small whitelist. This causes a malformed SQL update, which causes the renaming operation to fail.

You can see someone complaining about the slugifier behavior here: h4cc/slugger#33

To the best of my understanding, it will fail if given as inputs any non-ASCII characters except the ones that are keys in this file, although there might be subtleties that I missed: https://github.com/h4cc/slugger/blob/master/lib/replacements.exs

I suggest killing our dependency on this slugification library and creating slugs by e.g. replacing non-URL-safe-characters in names with dashes.

Investigate EFS sync latency

Occasionally a photo can fail to spawn and the theory I have is that it's due to the fact that the read from a reticulum node for a file immediately after the file was written may fail because EFS has yet to sync the file. We should determine the semantics around EFS wrt consistency and potentially add a retry loop around EFS reads.

Inconsistent image transparency with hosted images

I was guessing this was a reticulum bug because the issue happens outside of the Hubs room render, but if I'm wrong, I can move this over to the main Hubs repo.

Issue:
Transparency issues are present in reticulum image, but not when the image is taken and rendered in Hubs.

Image from the camera, taken and as it appears in Hubs:
image

Image Link opened in the browser:
image

Link to reticulum hosted image: https://uploads-prod.reticulum.io/files/087edc54-57a4-4802-811f-a9a6b420e992.png?token=f1b1edac1f01598aa06e73d3a6c5efab

Extend media/search api to filter public rooms by tags

Despite being able to tag scenes in admin there appears to be no way to filter rooms by these tags using the internal v1/media/search API. The only room filtering available atm appears to be via "public".

As a CSD I would like to be able to query for a list of rooms by scene tag to support generating more dynamic room listings.

e.g.
/api/v1/media/search?source=rooms&filter=<custom_tag>&cursor=5
OR
/api/v1/media/search?source=rooms&filter=public&cursor=5&tag=

Wiki changes

FYI: The following changes were made to this repository's wiki:

These were made as the result of a recent automated defacement of publically writeable wikis.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.