speckleworks / speckleserver Goto Github PK
View Code? Open in Web Editor NEWCheck a brand new Speckle at: https://github.com/specklesystems
Home Page: http://speckle.systems
License: MIT License
Check a brand new Speckle at: https://github.com/specklesystems
Home Page: http://speckle.systems
License: MIT License
As it actually is a geometry hash, not an object hash
On an update from Grasshopper, previously stored info from viewer gets overwritten by update. To check.
Read the following as a spec sheet for the future!
streams
, objects
or another comment
(allow nested discussions).An anonymous user can post/read comments only on resources that have anonymousComments===true
A logged in user can post/read comments on any public resource or a resource that is shared with him with "Read" access minimum.
To be refined once implementation takes shape.
Step 0:
The speckle image fails to run as the server is looking for a .env file
https://twitter.com/Jos_ols/status/1009066622194208769
The docker compose file should set the defaults usually set in the .env-base file, namely:
MONGODB_URI="mongodb://mongo:27017/speckle"
REDIS_URL="redis://redis:6379"
SESSION_SECRET="helloworld"
Step 0:
Server should refuse streamId
changes.
Right now you can programatically change streamIds, which is really really bad.
For example, a preliminary schema:
role: { type: String }, // enum: Receiver, ParametricSender (ie has sliders), Sender
documentGuid: { type: String }, // document unique id. / name
documentType: { type: String }, // Rhino, Grasshopper, Node, Browser, etc.
owner: { type: mongoose.Schema.Types.ObjectId, ref: 'User' },
streamId: { type: String } // stream that the client interacts with
online: { type: Boolean, default: true }
Radu [10:04 PM]
hmm, is this expected behaviour @Dimitrie? when registering a new user, the user password is dumped in cleartext in the logs
Radu [10:04 PM]
uploaded this image: image.png
Step 0:
Deploy and admin module that comes with every speckle server and rarely gets updated. This should be accessible only to "god" users and force her/his registration on initial server deployment.
Should allow for:
For the sake of simplicity, things like
Will be included with the server. This will allow an integrated deployment, which simplifies stuff.
For all models:
will be useful & needed for various frontends atomic updates. see ref for how to implement
Due to the fact that for permission checking, we enforce several fields using by adding them to fields=x,y,z
, resulting in a 404 failure (omit
and fields
are incompatible).
Solution:
check if query is asking for fields or omitting them:
POST /objects
POST /objects/bulk
Check all routes that apply:
Will sender clients push update notifications, or will they be handled by the server?
Clients push update:
Server pushes update:
I'm thinking about proposing we abstract the DB layer at some point in the future, so SpeckleServer would work with a number of databases. This would address some of the limitations we've encountered with MongoDB's max sizes, etc.
This would obviously be quite a bit of work and a major change, so this issue is a sort of feasibility study.
I'd kindly like to ask for some help & input from those more familiar with the codebase ( ๐ค @didimitrie)
Also anyone feel free to tell me off if you think it's not a worthwhile exercise ๐ค
Docker-compose should use a specific tag with image that it pulls. I updated the compose from dev -> latest as it was pulling dev image which was built 2 months ago and did not contain latest API updates. speckle/speckleserver:v1 would be a good suggested tag to use here. Todo: Build and push to dockerhub.
So that if you don't have any layers, existing clients (gh am looking at you) won't freak out and not output anything.
So: if there's a layer structure, cools - if not, just output everything into one layer (output gh/layer rhino)
what a surprise, it was doing this before
Step 0:
You should not be able to trawl for emails when searching for users.
You can get everyone's email out if you're patient enough.
Do not return email address on user search route.
Right now there's a generic history-update
announcement and a live-update
announcement.
We need a specific announcement for every historyId
. Clients should listen no more for live-update
s but for the historyId they're currently set to receive.
Phase out the live-update
, as it would be gobbled up by the above.
Step 0:
Right now plugins need to be registered manually in server.js
. We should have a system whereby on startup we scan all top level folders of the node_modules
folder and look for anything that contains a speckle plugin manifest file, eg. speckle-plugin-manifest.json
This manifest file should contain basic info about the respective plugin, ie:
{
"name": "Dashboarder",
"description": "Basic speckle project dashboard creator and viewer",
"serveLocation": "/dash",
"index": "dashboard.html"
}
This way third parties can develop their own frontends, publish to npm or the package manager of their choice, and then simply do npm install speckle-dashboards@latest
to have it running with a live speckle server.
Step 0:
API should allow for queries on *GetAll routes.
All queries are ignored.
ie:
Should be an env value.
Step 0:
For now, the end clients can update this, but it's not elegant :)
Step 0:
This is needed for passing smarter info back to users:
Create GET /clients/bystream/{streamId}
or better GET /streams/{streamId}/clients
.
Otherwise we have login problems between [email protected]
and [email protected]
It should handle gracefully other non-dangerous stream properties too, ie:
Step 0:
Right now there's a bit of a chaotic moment in the speckle server config stuff. I would suggest we move to having .env
(not committed) and .env-base
files which centralise all config options.
These can be subsequently read back in via dotenv (which does not overwrite already set vars, so docker will be fine).
Problem: on some computers and with certain node versions (...) compression fails, and zlib throws an incorrect headers
error. This manifests itself as clients not being able to send data to the server.
Solution: disabling compression middleware in express; comment out app.use( compression() )
AND remove all compression from the grasshopper components.
Compression should be enabled back in nginx or whatever your server's running and not in the nodejs app.
This will be fixed in the new-api
branch, but not backwards.
IE, ?format=speckle
or ?format=rhino
, plus scaffolding for adding future typologies. Important for speedy online clients and non massive retrieval of useless data.
This needs to happen inside AssembleObjects
and be mirrored in the GeometryGet
route (which thus should probs become an outsourced controller).
@PaulPoinet's discovery.
What happens: because a stream can contain duplicate objects, when assembling the response from routes of the like of /stream/:streamId/objects/
and /stream/:streamId/layers/:layerId/objects
, there's a reduce pass to make sure the response contains them all
So now we need to check for null insertions and be done, and flag up a warning that when querying stuff you don't have the guarantee of getting back an ordered list.
โฎ๏ธ
Open question: should the viewer be a submodule (as it is now), or essentially a step in the Dockerfile
image (RUN git clone etc
)? Bearing in mind this would/should expand to other front-end apps, etc.
any help/info welcome. bear in mind, main point is to get the install of a speckle server as simple as possible...
SpeckleObjects should have their own unique hashes.
When a user tries to insert a huge doc, ie a mesh with >100k vertices or some sort, mongo goes crazy, topology gets destroyed (sounds like a wizard spell) and a full server restart is needed (mongod + app).
How to protect from this/work around this?
From GeometryObject.find( { 'hash': { $in: geometriesToRequest.map( xx => xx.hash ) } } ).lean()
to potentially something like:
Promise.All( geometries.ToRequest.map( gO => GeometryObject.**findOne**( { 'hash': gO.hash } ) ) )
Step 0:
You should not be able to trawl for emails.
You can get everyone's emails.
Affects speckleworks/SpeckleSpecs and speckleworks/SpeckleAdmin, at least.
To get emails quickly:
Alternatively, you can abuse regex/substring matching:
john.smi[a-m].*
", narrowing down options until you find full email addressesUserGetProfileById
endpoint.EXPOSE_EMAILS
parameter in .env
, per-user publicity flag?)Step 0:
Go to your server url and actually see something informative!
You get an error: Cannot GET /
C'mon, user friendliness!
Implement a static no thrills no frills landing page for the server. Should contain basic information and potentially some links to plugins registered via #77.
so we can deprecate get layers, get name, get random field
Step 0:
Websocket clientIds are not checked on connection for uniqueness. This can be a potential hazard down the line, as client identities can get confused.
This should be checked on connection.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.