Difference between revisions of "Connecting Neos to Other Applications"

From Neos Wiki
Jump to navigation Jump to search
(add translation tag)
(Marked this version for translation)
 
Line 1: Line 1:
 
<languages/>
 
<languages/>
 
<translate>
 
<translate>
 +
<!--T:1-->
 
When creating items and worlds within Neos, you may want to connect Neos to the outside world. To applications, software and systems that are outside of it. This guide will provide some information on how you can achieve that.
 
When creating items and worlds within Neos, you may want to connect Neos to the outside world. To applications, software and systems that are outside of it. This guide will provide some information on how you can achieve that.
  
= Example Scenarios =
+
= Example Scenarios = <!--T:2-->
 
Some example things you might want to do this with are:
 
Some example things you might want to do this with are:
 
* Communicating with Web Servers
 
* Communicating with Web Servers
Line 9: Line 10:
 
* Receiving data such as stock information, the weather and more
 
* Receiving data such as stock information, the weather and more
  
= Options =
+
= Options = <!--T:3-->
 
You have a number of options to achieve communication with other applications. With all of these options do remember that Neos '''does not''' support JSON or Collections/Arrays so you will have to handle parsing these yourself within LogiX.
 
You have a number of options to achieve communication with other applications. With all of these options do remember that Neos '''does not''' support JSON or Collections/Arrays so you will have to handle parsing these yourself within LogiX.
  
== Webserver Communication using HTTP ==
+
== Webserver Communication using HTTP == <!--T:4-->
  
 +
<!--T:5-->
 
Neos has two nodes that can allow you to make HTTP Requests:
 
Neos has two nodes that can allow you to make HTTP Requests:
 
* [[GET String (LogiX_node)| HTTP GET]] - Submits an HTTP GET Request
 
* [[GET String (LogiX_node)| HTTP GET]] - Submits an HTTP GET Request
 
* [[POST String (LogiX_node)| HTTP POST]] - Submits an HTTP POST Request  
 
* [[POST String (LogiX_node)| HTTP POST]] - Submits an HTTP POST Request  
  
 +
<!--T:6-->
 
You can use these to communicate with any HTTP capable webserver, API or system.  
 
You can use these to communicate with any HTTP capable webserver, API or system.  
  
== Web Socket Communication ==
+
== Web Socket Communication == <!--T:7-->
 
Neos has [[:Category:LogiX: WebSocket| WebSocket capabilities]]. These allow Neos to communicate with any WebSocket capable server. This is useful for real time communication between Neos and an Application.
 
Neos has [[:Category:LogiX: WebSocket| WebSocket capabilities]]. These allow Neos to communicate with any WebSocket capable server. This is useful for real time communication between Neos and an Application.
  
== Sending other Protocols over WebSockets ==
+
== Sending other Protocols over WebSockets == <!--T:8-->
 
While Neos only supports HTTP and WebSockets you can send messages over WebSockets which resemble or contain messages in other protocols. Users have done this with:
 
While Neos only supports HTTP and WebSockets you can send messages over WebSockets which resemble or contain messages in other protocols. Users have done this with:
 
* DMX
 
* DMX
Line 29: Line 32:
 
* OSC
 
* OSC
  
== Using a WebSocket / HTTP Proxy ==
+
== Using a WebSocket / HTTP Proxy == <!--T:9-->
  
 +
<!--T:10-->
 
You can also use WebSockets or HTTP as a proxy to communicate to another device. Users have done this with:
 
You can also use WebSockets or HTTP as a proxy to communicate to another device. Users have done this with:
 
* Heart Rate Sensors
 
* Heart Rate Sensors
Line 36: Line 40:
 
* Complex APIs that needed simplifying
 
* Complex APIs that needed simplifying
  
== Using Plugins ==
+
== Using Plugins == <!--T:11-->
 
Neos has [[Plugins]] which allow you to write custom functionality into Neos. This functionality can be vast and varied as you have full implementation control in C#. When you use plugins you will be isolated from the rest of the Neos Community as they will only be able to join your sessions if they have the same Plugins installed. Please see the [[Plugins|plugin page]] for more information.
 
Neos has [[Plugins]] which allow you to write custom functionality into Neos. This functionality can be vast and varied as you have full implementation control in C#. When you use plugins you will be isolated from the rest of the Neos Community as they will only be able to join your sessions if they have the same Plugins installed. Please see the [[Plugins|plugin page]] for more information.
  
= Security / Consent =
+
= Security / Consent = <!--T:12-->
 
Always consider Security, talking to outside systems can open up all sorts of security issues. At this time anything involving Payments, Passwords or personal information is not recommended.
 
Always consider Security, talking to outside systems can open up all sorts of security issues. At this time anything involving Payments, Passwords or personal information is not recommended.
  
 +
<!--T:13-->
 
Additionally, outside connections via HTTP and WebSockets are controlled by a User's Consent, They can block and allow access to specific domain names and servers. Always use the [[Is Host Access Allowed_(LogiX node)| Is Host Access Allowed]] and [[Request Host Access (LogiX node)| Request Host Access]] Nodes to check if a User has blocked a connection and to request access to a host. When requesting access, please specify a logical reason.
 
Additionally, outside connections via HTTP and WebSockets are controlled by a User's Consent, They can block and allow access to specific domain names and servers. Always use the [[Is Host Access Allowed_(LogiX node)| Is Host Access Allowed]] and [[Request Host Access (LogiX node)| Request Host Access]] Nodes to check if a User has blocked a connection and to request access to a host. When requesting access, please specify a logical reason.
  
 +
<!--T:14-->
 
If a user has blocked access, try to make your systems gracefully fail with a clear message about what is going on.
 
If a user has blocked access, try to make your systems gracefully fail with a clear message about what is going on.
  
= Recommendations =
+
= Recommendations = <!--T:15-->
 
When deciding what to do here, it's entirely up to you but some recommendations are presented here to assist you in making a decision.
 
When deciding what to do here, it's entirely up to you but some recommendations are presented here to assist you in making a decision.
 
* Only use WebSockets if you need real time communication - WebSockets have extra overhead for both servers and clients/Neos users. If you just need to make requests and receive responses consider HTTP instead.
 
* Only use WebSockets if you need real time communication - WebSockets have extra overhead for both servers and clients/Neos users. If you just need to make requests and receive responses consider HTTP instead.
 
* Ensure that you're running the requests / connections from the right users. Connections need to be made from a user. For example when you make a request a single user is in charge of running that request. Make sure this is the correct user and that you're not running requests for more than one user.
 
* Ensure that you're running the requests / connections from the right users. Connections need to be made from a user. For example when you make a request a single user is in charge of running that request. Make sure this is the correct user and that you're not running requests for more than one user.
 
</translate>
 
</translate>

Latest revision as of 03:40, 26 April 2021

Other languages:
English • ‎日本語 • ‎한국어

When creating items and worlds within Neos, you may want to connect Neos to the outside world. To applications, software and systems that are outside of it. This guide will provide some information on how you can achieve that.

Example Scenarios

Some example things you might want to do this with are:

  • Communicating with Web Servers
  • Talking to Real world Hardware or devices such as Heart Rate Sensors, Lights or Sound Equipment
  • Receiving data such as stock information, the weather and more

Options

You have a number of options to achieve communication with other applications. With all of these options do remember that Neos does not support JSON or Collections/Arrays so you will have to handle parsing these yourself within LogiX.

Webserver Communication using HTTP

Neos has two nodes that can allow you to make HTTP Requests:

You can use these to communicate with any HTTP capable webserver, API or system.

Web Socket Communication

Neos has WebSocket capabilities. These allow Neos to communicate with any WebSocket capable server. This is useful for real time communication between Neos and an Application.

Sending other Protocols over WebSockets

While Neos only supports HTTP and WebSockets you can send messages over WebSockets which resemble or contain messages in other protocols. Users have done this with:

  • DMX
  • MIDI
  • OSC

Using a WebSocket / HTTP Proxy

You can also use WebSockets or HTTP as a proxy to communicate to another device. Users have done this with:

  • Heart Rate Sensors
  • Calendars
  • Complex APIs that needed simplifying

Using Plugins

Neos has Plugins which allow you to write custom functionality into Neos. This functionality can be vast and varied as you have full implementation control in C#. When you use plugins you will be isolated from the rest of the Neos Community as they will only be able to join your sessions if they have the same Plugins installed. Please see the plugin page for more information.

Security / Consent

Always consider Security, talking to outside systems can open up all sorts of security issues. At this time anything involving Payments, Passwords or personal information is not recommended.

Additionally, outside connections via HTTP and WebSockets are controlled by a User's Consent, They can block and allow access to specific domain names and servers. Always use the Is Host Access Allowed and Request Host Access Nodes to check if a User has blocked a connection and to request access to a host. When requesting access, please specify a logical reason.

If a user has blocked access, try to make your systems gracefully fail with a clear message about what is going on.

Recommendations

When deciding what to do here, it's entirely up to you but some recommendations are presented here to assist you in making a decision.

  • Only use WebSockets if you need real time communication - WebSockets have extra overhead for both servers and clients/Neos users. If you just need to make requests and receive responses consider HTTP instead.
  • Ensure that you're running the requests / connections from the right users. Connections need to be made from a user. For example when you make a request a single user is in charge of running that request. Make sure this is the correct user and that you're not running requests for more than one user.