659e6d5b45
Add in Sentry, WebRTC Statistics ( #345 )
...
Collect WebRTC Statistical Information
Add in some instrumentation to track the duration of the setup phase,
and set up a job to make periodic use of the WebRTC Statistics API
to collect information about the connection (specifically, each track),
including transport-level information, timing information and bandwidth
information.
Sentry isn't the best place for that information, but it'll work until we
can work out a good long-term solution for it.
Signed-off-by: Paul Tagliamonte <paul@kittycad.io >
2023-08-30 10:34:14 -04:00
6f0fae625f
quick fik ( #339 )
2023-08-29 10:28:27 +10:00
33eb6126d4
bump rust types ( #321 )
...
* get rid of noisy log
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fix types in rust
Signed-off-by: Jess Frazelle <github@jessfraz.com >
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com >
2023-08-25 11:29:18 -07:00
b56a3398ad
Fix up message structure to match the new Engine messages ( #316 )
...
* Fix up message structure to match the new Engine messages
The types are still jacked up, I reckon we need to bump the node
@KittyCAD dep.
Signed-off-by: Paul Tagliamonte <paul@kittycad.io >
* update types
* fmt
* export tsc
* fmt again
---------
Signed-off-by: Paul Tagliamonte <paul@kittycad.io >
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch >
2023-08-25 14:16:37 +10:00
de255acc59
Port executor ( #287 )
...
* parent
initial types
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
more port
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
fixups
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
fixups
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com >
fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
fixups
Signed-off-by: Jess Frazelle <github@jessfraz.com >
fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com >
use the function
Signed-off-by: Jess Frazelle <github@jessfraz.com >
ipdates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com >
fixups
Signed-off-by: Jess Frazelle <github@jessfraz.com >
fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
pipe sjhit
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
cleanup and pipes
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
fixups
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
attempt to call the function
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
fix tests
Signed-off-by: Jess Frazelle <github@jessfraz.com >
better
Signed-off-by: Jess Frazelle <github@jessfraz.com >
add first function
Signed-off-by: Jess Frazelle <github@jessfraz.com >
start of stdlib
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
organize better
Signed-off-by: Jess Frazelle <github@jessfraz.com >
fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com >
cleanup
Signed-off-by: Jess Frazelle <github@jessfraz.com >
fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com >
boilerplace
Signed-off-by: Jess Frazelle <github@jessfraz.com >
boilerplace
Signed-off-by: Jess Frazelle <github@jessfraz.com >
more functions
Signed-off-by: Jess Frazelle <github@jessfraz.com >
more stuff
Signed-off-by: Jess Frazelle <github@jessfraz.com >
more path segment functions
Signed-off-by: Jess Frazelle <github@jessfraz.com >
reorganize files
Signed-off-by: Jess Frazelle <github@jessfraz.com >
extrude boilerplate
Signed-off-by: Jess Frazelle <github@jessfraz.com >
extrude
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
sketch boilerplate
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
comment out extrude for now
Signed-off-by: Jess Frazelle <github@jessfraz.com >
more executor test passing
Signed-off-by: Jess Frazelle <github@jessfraz.com >
rename meta
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
cleanup unneeded deps
Signed-off-by: Jess Frazelle <github@jessfraz.com >
generate executor typoes
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
remove path to node
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates for tests js
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
ignore wasm file
Signed-off-by: Jess Frazelle <github@jessfraz.com >
fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com >
start of websocket connection
Signed-off-by: Jess Frazelle <github@jessfraz.com >
boilerplate for engine connection
Signed-off-by: Jess Frazelle <github@jessfraz.com >
fix
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
send the modeling cmd
Signed-off-by: Jess Frazelle <github@jessfraz.com >
implement close
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
remove refid
Signed-off-by: Jess Frazelle <github@jessfraz.com >
remove refid
Signed-off-by: Jess Frazelle <github@jessfraz.com >
do sketch start
Signed-off-by: Jess Frazelle <github@jessfraz.com >
almost done w sketch port
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
add more tests
Signed-off-by: Jess Frazelle <github@jessfraz.com >
fix deserialize and tests
Signed-off-by: Jess Frazelle <github@jessfraz.com >
fix tests remove logging
Signed-off-by: Jess Frazelle <github@jessfraz.com >
fix the return type
Signed-off-by: Jess Frazelle <github@jessfraz.com >
make compile
Signed-off-by: Jess Frazelle <github@jessfraz.com >
more tests pass
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
expect any string
Signed-off-by: Jess Frazelle <github@jessfraz.com >
add failing test
Signed-off-by: Jess Frazelle <github@jessfraz.com >
fix the tests
Signed-off-by: Jess Frazelle <github@jessfraz.com >
fix tests
Signed-off-by: Jess Frazelle <github@jessfraz.com >
fix more tests
Signed-off-by: Jess Frazelle <github@jessfraz.com >
replace wasm_execute
Signed-off-by: Jess Frazelle <github@jessfraz.com >
fix more tests
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
add more tests
Signed-off-by: Jess Frazelle <github@jessfraz.com >
make all tests pass
Signed-off-by: Jess Frazelle <github@jessfraz.com >
fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com >
fix remaining tests
Signed-off-by: Jess Frazelle <github@jessfraz.com >
add a warpper
Signed-off-by: Jess Frazelle <github@jessfraz.com >
start of server side ws/webrtc
Signed-off-by: Jess Frazelle <github@jessfraz.com >
more nonweb working
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com >
add test mock
Signed-off-by: Jess Frazelle <github@jessfraz.com >
fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com >
mutable engine
Signed-off-by: Jess Frazelle <github@jessfraz.com >
blocking snd engine cmd
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
tmp
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* tmp
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fix clippy
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fixups
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* build wasm only
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fix cargo builds
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fix tests
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* more logging
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* push
Signed-off-by: Jess Frazelle <github@jessfraz.com >
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com >
2023-08-24 15:34:51 -07:00
d33ddb2f1b
fix typo in function name, cleanup unused args ( #317 )
...
Signed-off-by: Jess Frazelle <github@jessfraz.com >
2023-08-24 11:41:38 -07:00
a0730ded4e
Remove EventTarget from EngineConnection ( #315 )
...
Signed-off-by: Paul R. Tagliamonte <paul@kittycad.io >
2023-08-24 10:46:02 -04:00
afd2b507ef
refactor engine connection to use callbacks ( #314 )
...
Less type maintenence
2023-08-24 09:46:45 -04:00
9dd708db5d
Make the timeout for a WebRTC/WebSocket connection pair configurable ( #310 )
...
Signed-off-by: Paul Tagliamonte <paul@kittycad.io >
2023-08-24 06:49:04 +10:00
c25dd1800c
Track the connection time in the console ( #311 )
...
In the future, this should be sent as telemetry, but at least this would
give us a bit of info about the latency sitatuion locally if we start
seeing the refresh happen a lot.
Signed-off-by: Paul Tagliamonte <paul@kittycad.io >
2023-08-23 15:29:03 -04:00
e56e7ba0fa
Detect when a video stream fails from the server ( #307 )
...
It's not clear /what/ is breaking the connection, but this will add
retry when it does. The term 'muted' here is a bit hard to grok, it's a
read-only indication of the *peer*'s state
https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/muted
Signed-off-by: Paul R. Tagliamonte <paul@kittycad.io >
2023-08-22 20:07:39 -04:00
dbe4e7faa6
Clean up after a closed EngineConnection ( #304 )
...
Because we gate a lot of things off this.foo?, leaving the closed
websocket/pc/etc in-place was causing a noisy log, and mucking with
reestablishing a broken connection.
While I was in here, I fixed a style nit from yarn.
Signed-off-by: Paul R. Tagliamonte <paul@kittycad.io >
2023-08-22 18:18:22 -04:00
75bb91c7e1
Build out EngineConnection's retry and timeout logic ( #299 )
...
* Build out EngineConnection's retry and timeout logic
* Migrate the EngineConnection to be an EventTarget for other parts of the
code (mostly the EngineManager, but maybe others?) to listen to, rather
than having a boolean 'done' promise, and remove callbacks in favor of
the eventListeners.
* When a WebRTC connection is online, send a 'ping' command every 10 seconds.
The UDP stream likely needs something similar, but the connection is
maintained by the WebRTC video stream for now.
* Begin to migrate code to use a more generic object "send" helper
which can handle the JSON encoding, as well as connection retry logic
in the future.
* Add a watchdog to trigger 5 seconds after a connection is initiated
to cancel and retry the connection if it's not become ready by the
time it wakes up. This won't watch an established connection yet.
Signed-off-by: Paul R. Tagliamonte <paul@kittycad.io >
2023-08-21 16:53:31 -04:00
965d2b23cf
Xstate Auth migration ( #250 )
...
* auth migrate progress, web only
* wrap home in state provider
* use consistent logged spelling
* use createActorContext
* typo
* fix wraping problem
2023-08-22 05:34:20 +10:00
01f95d4ace
Start a refactor of the connection to the Engine ( #284 )
...
The front-end and the back-end communicate with three channels. The
first is the WebSocket connection to the Engine API. Once that
connection is online, a WebRTC connection is negotiated, which contains
one video stream from the server to us for the GUI, and a second, which
is a binary data channel from us to the server, which we send JSON over
for real-time events like mouse positioning.
The lifecycle of the WebRTC connection and the WebSocket connection are
tied, since if the WebSocket connection breaks down, the WebRTC
connection must get restarted (to get a connection to the *same* backend
that we have an open WebSocket connection to).
This starts a move to split the WebRTC and WebSocket pair to be managed
by a new class (EngineConnection), which will only start and maintain
the WebSocket and WebRTC channels. Anything using the EngineConnection
will be able to communnicate commands without needing to add control
logic for the underlying data channels.
Signed-off-by: Paul R. Tagliamonte <paul@kittycad.io >
2023-08-18 16:16:16 -04:00
108827075d
fix export types ( #271 )
...
* fix export types
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* update kittycad lib
* fix wasm
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com >
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch >
2023-08-18 08:12:32 -07:00
8ebb8b8b94
re implement selections ( #243 )
2023-08-09 20:49:10 +10:00
cd4672c98d
Export ( #213 )
...
* initial
Signed-off-by: Jess Frazelle <github@jessfraz.com >
update
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* start of tauri
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* better
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* set the default type
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* add comments
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fix
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* dialog for save tauri
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* partial tsc fix
* bump kittycad lib
* Update src/lib/exportSave.ts
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch >
* updates;
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* default coords
Signed-off-by: Jess Frazelle <github@jessfraz.com >
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com >
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch >
2023-08-02 16:23:17 -07:00
c190122240
Add trickle_ice back ( #220 )
...
* Add trickle_ice back
* Only select from relay when provided ice servers
* Format
---------
Co-authored-by: Adam Chalmers <adam.s.chalmers@gmail.com >
2023-08-02 17:27:14 -04:00
1962af760c
snake case fix ( #221 )
2023-08-03 05:51:52 +10:00
8be7805ac2
Log the Websocket events ( #218 )
2023-08-02 13:51:05 -05:00
64772f5c98
remove old types ( #215 )
2023-08-02 18:46:40 +10:00
5419039fae
add client lib @kittycad/lib ( #214 )
...
* add client lib
* tsc after build
* update after spec update
* remove uneeded check
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fix camera drag
* fix throttle typing
* comment with link to issue
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com >
Co-authored-by: Jess Frazelle <github@jessfraz.com >
2023-08-02 15:41:59 +10:00
7181ff0c33
Configurable URL for the API ( #205 )
...
* Configurable engine URL
Fixes #206
* fix import.meta problem (#210 )
---------
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch >
2023-08-01 09:36:40 -05:00
87aecf7f50
Integrate sketch mode debug ( #186 )
...
integrate sketch mode debug
2023-07-21 16:53:06 +10:00
1666e17ca5
Add support for camera Pan ( #182 )
2023-07-20 14:08:32 -04:00
317dc6d0b2
rough tauri auth ( #167 )
2023-07-11 20:34:09 +10:00
cda301997e
Get tests passing without engine connection ( #155 )
...
We can create a enginelessExecutor that can be used for many of the
executor tests that will be much more performant for tests that don't
need the engine to actually do any modeling work.
2023-07-10 15:15:07 +10:00
3510abfcb9
delay execute till after stream ready ( #143 )
2023-06-23 14:19:15 +10:00
fb3c34d5f3
send sequence with UDP packets ( #140 )
2023-06-23 10:54:19 +10:00
7289965916
send mouse drag over wrtc ( #139 )
...
* send mouse drag over wrtc
* add more debugging code
* wrtc data channel working
2023-06-23 09:56:37 +10:00
2d3c73d46a
asyncronise executor ( #115 )
...
* Intital async of executor
The execture now sends websocket message instead of calling functions
directly from the engine, When it does so it holds onto the id.
The engine is still returning geo/polys directly but I'm working make it
so that the UI doesn't need to know about that, so that we can switch
over the streaming ui.
Things left to do:
- it is still making both direct function calls and websockets, and the former should be removed.
- It does highlighting of segments and sourceRanges not through websockets and that needs to be fixed.
- Tests have not been adjusted for these changes.
- Selecting the head of a segment is not working correctly again yet.
* Rough engine prep changes (#135 )
* rough changes for engine prep
* mouse movements working again
* connect to engine for startsketch, line, close and extrude
2023-06-22 16:43:33 +10:00