Comments (2)
maybe it's just me, maybe it's some of the git lingo
This can be the start of a beautiful song 🎶 I totally agree there's some naming problems that cause confusion. Relying on git lingo was a partially conscious choice, on the lines of "if you're a developer working with core programatically, you hopefully use a VCS, and grok some of the terminology". Regardless, I'm happy to revisit that choice, as I feel as well it's not the best, and, as demonstrated, potentially causes confusion.
Based on your input, I'll try and unpack some of it to move the discussion forward. Important preamble: the current api in core is the "low level" one, and most of these DX problems can be solved by exposing "higher level", friendlier routes down the line (which we'll figure out while developing connectors; which is what you've started doing, and I guess, these questions arise).
Transports
Transports can be local or remote, and ultimately they're agnostic if you write to/read from the local hard drive, a local db, a remote db, or the server, or a different server. The main difference is how they're used, especially when reading in the deserialisation process (to a lesser extent it's similarly important in the writing process during serialisation). One way they are used is synchronous, and the other way is asynchronous.
So rather than renaming ITransport to IRemote, I'd just differentiate to ITransportSync
and ITransportAsync
. This will also solve the confusion you pointed out below:
rename ITransport to IRemote. I find it confusing that we have both transports and remotes and that Remote is a type of transport and that we also have a class named Remote
The Remote is definitively not a type a transport! Which brings us to:
Remotes
rename Remote.cs to SpeckleServer
Down with that.
Upload/Download
rename Upload to Send and Download to Receive (sorry did't think about this before)
You actually did 😄 The history of the names of these functions is (a) Push/Pull at the beginning, then based on your input (b) Send/Receive, then I changed them to (c) Upload/Download after a bit. The last name change, from (b) to (c) happened because I felt that sending something is, in speckle lingo, tied to an actual stream (ie, I'm sending to a stream, same for receiving: I'm receiving from a stream).
In 2.0, what these two functions actually do is send objects to (or receive from) one or more remotes rather than an actual stream/commit. Important note here: one still needs to tag a "commit" (this is going to be another long naming discussion based on @izzylys latest user test) on an object hash from what has just been sent.
In my mind, the jury's out on this one. I feel like renaming them might cause other confusion down the line ("Q: but i just sent to speckle, why does it not show up in my stream; A: you need to create a commit afterwards") and will not necessarily solve it.
Perhaps adding (1) Send
method that does upload + commit creation in one go and (2) Receive
method that takes a commit's id on the Remote/SpeckleServer
class would be better?
Move methods Upload/Download (Send/Receive) to IRemote
We've discussed this previously, and it's a nope. The static Upload/Send
method can take one or more transports, and uploads objects to all of them in parallel - this is the most efficient way. For clarity and simplicity, we can definitively add to the Remote/SpeckleServer
class an Upload
method that just sends to one transport, namely the async one associated with that server.
from speckle-sharp.
After a voice dicussion it was decided:
- keep
ITransport
and various transports named the same - rename
Remote.cs
toClient.cs
as it's an actual Speckle client, calling the Speckle API - rename Upload to Send and Download to Receive
- remove the
StreamId
property fromRemote.cs/Client.cs
from speckle-sharp.
Related Issues (20)
- Bug: Reading in `speckle_type` from Server HOT 5
- Meshes in displayValue have area and volume as zero. HOT 2
- Enhancement: Integrating material_quantities into the ArchiCAD converter. HOT 2
- revit: cutback parameters not set for framing on receive HOT 1
- Compatibility with ETABS 21
- My Fake ticket, testing! HOT 6
- New issue
- ARCHICAD Converter: No BuildingMaterial for Windows and not all Components HOT 3
- ARCHICAD converter: Beams and columns do not have the profile information.
- SetRelationship (in CommitObjectBuilder) throws "an item with the same key has already been added" exception HOT 6
- Enhancement: Civil 3D Corridor Baseline and Cross Section Data
- feat(archicad): Add support for openings
- feat(archicad): Add certification to "ConnectorArchicad.exe"
- feat(archicad): Update connector icon on Mac HOT 1
- feat(archicad): Add default commit message
- Civil connector will not allow selection of corridors to push
- Revit floors with slab shape points
- Bug: Rhino Converter throws an error when unnamed collections are filtered HOT 2
- Revit Connector: doesn't apply ParameterUpdater using applicationId HOT 1
- bug(Archicad): Properties of Objects not showing in viewer HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from speckle-sharp.