Proto commits in asynchronics/nexosim

These 45 commits are when the Protocol Buffers files have changed:

Commit:42eb361
Author:Maciej Główka
Committer:GitHub

Allow query scheduling on a server (#168)

Commit:7c8f6a0
Author:maciek.glowka

protobuf comment

Commit:026158b
Author:maciek.glowka

Merge remote-tracking branch 'origin/main' into server-schedule-query

Commit:bdd3ff4
Author:Maciej Główka
Committer:GitHub

Protect initialized bench from being discarded by a build request (#170)

Commit:3c37495
Author:maciekglowka

simplify bench lock

Commit:222f1c2
Author:maciekglowka

updated state guard

Commit:15bdcd5
Author:maciekglowka

idle flag

Commit:3127f2e
Author:maciekglowka

initial schedule query on server

Commit:8aa8f4d
Author:Serge Barral
Committer:Serge Barral

Expose the global injector via gRPC

Commit:12e0c9a
Author:Serge Barral
Committer:Serge Barral

Separate build and init/restore steps via gRPC Most important changes: - `Simulation:step_unbounded` was renamed to `run`. - gRPC no longer saves the configuration within the simulation assets. - gRPC `InitAndRun` and `RestoreAndRun` were added to reduce the risk of real-time loss between the invocations of `Init/Restore` and `Run`. - gRPC now requires a `Build` request before any `Init/Restore(AndRun)` invocation.

Commit:ea1f513
Author:Serge Barral

Handle bench construction errors It is now possible to return a `boxed std::error::Error` from a bench construction function, with special-casing of gRPC errors reporting when the error is a `BenchError`. `InitError`was also renamed to `BenchError`.

Commit:a095845
Author:Serge Barral
Committer:Serge Barral

Use Paths instead of Strings for source & sinks

Commit:a7caefd
Author:Serge Barral
Committer:Serge Barral

Simplify the Sink API This commits also attempts to normalize the bench construcion style in examples and tests.

Commit:f7617aa
Author:Serge Barral
Committer:Serge Barral

Massive rewrite of sink traits, endpoints and gRPC Sorry for this mammoth :-( This was intended as a sanitization of the bench endpoint API, but because it was tightly integrated with the sink-related traits (which had to be changed) and with the gRPC server (a lot of ttechnical debt that had to be finally paid), this ended up as a way too large commit. There are probably too many breaking changes to enumerate them all, but the main ones are probably: - The EventSinkReader traits has been rewritten fully to make it less weird and more similar to channel APIs. Instead of making blocking a configurable mode, the trait now exposes at the same time: (i) a non-blocking API, now in the form of try_read() instead of the Iterator super-trait (which was a bit of an abuse), (ii) a blocking API in the form of read(), (iii) an async API in the form of a Stream super-trait. - EventSlot has been temporarily removed until an implementation that conforms to the new API comes. - EventQueue has now been rewritten using an MPSC queue (the MPMC queue was actually a band aid but was dangerously closed of becoming part of the API). - Scheduler::halt is now a non-mutating method (the &mut self was probably an unintentional mistake?) - The gRPC API has been sanitized, with lots of new errors etc. This is totally non-compatible with prior versions. - The gRPC server architecture is now much saner and uses async mutexes and RW locks whenever it makes sense, with as well a better (and objective) rationale for the split into different services. - The endpoint API has been sanitized but is still in a state of flux, with currently a known issue with the event source registry that will be fixed when the new simulator API based on source/query IDs is merged.

Commit:03e5b92
Author:maciekglowka

resolve merge main

The documentation is generated from this commit.

Commit:036efd5
Author:maciekglowka

Merge remote-tracking branch 'origin/main' into serialization_macro

Commit:156b222
Author:maciek.glowka

docs

Commit:fd56e19
Author:maciek.glowka

proto naming

Commit:3db9b02
Author:maciekglowka

initial endpoints

Commit:7c5f56e
Author:maciekglowka

list sources:

Commit:c30621e
Author:maciekglowka

refactor

Commit:37a6a87
Author:maciek.glowka

server init

Commit:9a34ef4
Author:maciekglowka

proto renaming

Commit:6815197
Author:maciek.glowka

server save

Commit:18c2549
Author:Jaŭhien Piatlicki

Rename gRPC call shutdown to terminate.

Commit:02afc05
Author:Jaŭhien Piatlicki
Committer:Jaŭhien Piatlicki

Implement server shutdown.

Commit:0fb8bc0
Author:Jaŭhien Piatlicki
Committer:Jaŭhien Piatlicki

Blocking read in gRPC.

Commit:3a23d81
Author:Serge Barral

Add server support for halting the simulation

Commit:e526071
Author:Serge Barral

Unix socket server support + rename grpc -> server

Commit:1b08f10
Author:Jaŭhien Piatlicki
Committer:Jaŭhien Piatlicki

Add possibility to halt simulation

Commit:7a95a4d
Author:Serge Barral
Committer:Serge Barral

OVarious gRPC improvements This patch in particular allows asynchronous gRPC access to the scheduler and to the monitoring functions.

Commit:a87bf49
Author:Serge Barral
Committer:Serge Barral

Rename gRPC package as simulation.v1

Commit:d4192e8
Author:Serge Barral
Committer:Serge Barral

Report an error if a message cannot be delivered

Commit:b1a02bd
Author:Serge Barral

Detect lost messages Messages sent to a mailbox that wasn't added to the simulation are now specifically detected. Earlier this would be wrongly reported as a deadlock.

Commit:5ab898a
Author:Serge Barral

Rename crate to NeXosim

Commit:84ad02a
Author:Serge Barral
Committer:Serge Barral

Make the gRPC init more general Instead of producing a SimInit object, a bench is now expected to return a fully constructed simulation with its scheduler. This means that the client does not necessarily need to provide the starting time for the simulation. This start time may be hardcoded in the bench, or may be taken as a parameter for the bench configuration. This change make it possible for benches to do more, for instance to pre-schedule some events, or to do less, for instance by hardcoding the simulation time rather than accept an arbitrary simulation time.

Commit:ba1e668
Author:Serge Barral
Committer:Serge Barral

Report panics as errors + identify panicking model The build context is now passed as a mutable reference due to the need to mutate data when adding a model. Contains small unrelated cleanups and documentation improvements too.

Commit:49e7132
Author:Serge Barral
Committer:Serge Barral

Check clock sync with configurable tolerance

Commit:e690138
Author:Serge Barral
Committer:Serge Barral

Add support for simulation timeouts

Commit:1cfaa00
Author:Serge Barral

Make execution failible, impl deadlock detection TODO: return the list of models involved in a deadlock. Note that Many execution errors are not implemented at all at the moment and will need separate PRs, namely: - Terminated - ModelError - Panic

Commit:6b43fcf
Author:Serge Barral
Committer:Serge Barral

Simplify gRPC backend arch + remove wasm backend

Commit:1b0395f
Author:Serge Barral
Committer:Serge Barral

Accept an arbitrary argument for remote init

Commit:59d2af5
Author:Serge Barral
Committer:Serge Barral

Expose the Protobuf simulation service to WASM/JS

Commit:9b4f69c
Author:Serge Barral
Committer:Serge Barral

gRPC: small fix + minor changes

Commit:e84e802
Author:Serge Barral

Initial (g)RPC implementation