coatyio / coaty-examples Goto Github PK
View Code? Open in Web Editor NEWA set of fully documented code examples that demonstrate best practices and typical usage patterns for Coaty applications.
Home Page: https://coaty.io
License: MIT License
A set of fully documented code examples that demonstrate best practices and typical usage patterns for Coaty applications.
Home Page: https://coaty.io
License: MIT License
I tried to run the hello-world example (js) as specified in the README.md on my windows 10 laptop. I installed PostgreSQL 11 with the default username and password. The example runs as expected; however, I can't see the newly created DB (DB_NAME = "helloworld_db") on PGAdmin 4 UI nor on the SQL shell. I added shouldPersistLocalSnapshots: true; to the HistorianController and added the port on functions: getConnectionString() and getAdminConnectionString() (following this link) but still, the DB doesn't seem to be created.
My question is: do you have any idea why the DB is not created?
Affected example
[email protected]
Is your feature request related to a problem? Please describe.
I am using the example to create i) Things that advertise their description and observations and ii) a consumer agent that discovers advertised Things.
If I assume a situation where Things are running first, then the consumer agent is switched on, it can't detect already advertised Things.
Also, if I assume both Things and consumer agents are switched on, then one of the Things goes off and on again, the consumer agent considers it as a new sensor since it has a new UUID.
Describe the solution you'd like
Ideally, the consumer agent should keep track of newly registered Things, previously registered Things, and Things that are deregistered in order to have an updated status of Things available in the specific context at all times.
Describe alternatives you've considered
I used the sensor-things-controller.ts for creating Things
In the consumer agent, I used
this.registeredSensorsChangeInfo$.subscribe(changeInfo => {
// changeInfo.added.forEach(sensor => this._dbCtx.insertObjects(Db.COLLECTION_SENSOR, sensor, true));
// changeInfo.added.forEach(sensor => this._dbCtx.insertObjects(Db.COLLECTION_THING, sensor["thing"] as Thing, true));
changeInfo.changed.forEach(sensor => console.log("changed Thing: ", sensor["thing"] as Thing));
changeInfo.added.forEach(sensor => console.log("New Thing: ", sensor["thing"] as Thing));
changeInfo.removed.forEach(sensor => console.log("Removed Thing: ", sensor["thing"] as Thing));
});
But this doesn't seem to solve it.
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.