Skip to content

Instantly share code, notes, and snippets.

View relu91's full-sized avatar
👨‍💻
Coding...

Cristiano Aguzzi relu91

👨‍💻
Coding...
  • University of Bologna and VAIMEE
  • Italy,Bologna
  • X @relucri
View GitHub Profile
@relu91
relu91 / td.md
Last active November 4, 2021 15:50
A rendering test having wot logo in each WoT repository
@relu91
relu91 / WoT Scripting API use cases.md
Last active May 25, 2020 09:23
A curated list of use cases and examples about scripting api

WoT scripting API use cases

The following document describes some possible scenarios of the interactions between WoT Scripts and the underlying runtime. In particular, it focuses on how scripts will use interaction affordances to communicate with a remote Consumed Thing.

The use cases are divided into three categories: high, middle, and low-level interactions. The different levels express a different level of control about data transmission/acquisition/translation. At the lowest level the application has the complete control of the data packets transmitted/acquired over the network, wheres at the highest level most of these details are hidden by the implementation.

note: Currently, security use cases are ignored

High level interactions [DRAFT]

In this use case the application does not have any particular requirements about how the data is retrieved or transmitted. Therefore, it seeks the easiest way to obtain/communicate the desired information. Those scenarios can be further dived in to two

@relu91
relu91 / Readme.md
Last active March 22, 2019 15:36
Connecting a WebSocket with a self-signed certificate in Nodejs

Recently I have been working on a secure javascript API to interact with SPARQL Event Processing Architecture (SEPA).  I found that there is no good or straightforward documentation about this topic and I decide to write this very short gits to help others.

Basically webSocket client has the same configuration paramenters that https request has. there you can find some explenation on how to configure an https client.

@relu91
relu91 / gist:9f94c439ec60b2a6f2a4
Created July 3, 2015 14:33
Limited Prolog Meta-Interpreter
//rule types rule(A,B).
rule(a,(b,c)).
rule(b,d).
rule(c,true).
rule(d,true).
solve1(true,X,true,0):- !.
solve1(X,0,false,0):-!.
solve1((A,B),MSp,Succes,TStep):- Sp1 is MSp - 1,!,solve1(A,Sp1,Succes,TStep1),solve1(B,Sp1,Succes,TStep2),TStep is TStep1+TStep2.