A high-level RPC framework to make remote controlling super easy.
What you can do with SUGOS is:
- Declare a function on a client.
- Call the function from another client.
SUGOS magically connect two clients on remote networks, and provides pseudo function interface as if they are on the same environment.
It also supports event driven architecture. You can emit or listen remote events in Node.js events style. This feature greatly helps you to build applications for IoT or Cloud Robotics.
Table of Contents
- Requirements
- Installation
- Getting Started
- Advanced Usage
- Tutorials
- API Docs
- Related Packages
- Contributors
- License
- Links
Requirements
Installation
# Install sugos as a global module $ npm install -g sugos
Getting Started
3 steps to be getting started
Setup SUGO-Hub
Setup a SUGO-Hub server for actors and callers.
#!/usr/bin/env node/** * This is an example of SUGO-Hub * @see https://github.com/realglobe-Inc/sugo-hub */'use strict' const sugoHub = const co =
Declare modules on SUGO-Actor
Create a SUGO-Actor instance and declare modules. Then, connect to the hub server.
#!/usr/bin/env /** * This is an example of SUGO-Actor * @see https://github.com/realglobe-Inc/sugo-actor */'use strict' const sugoActor = const Module = sugoActorconst co =
Access to modules from SUGO-Caller
Create a SUGO-Caller instance and connect to the actor with key. Then get access to modules and call functions as you like.
#!/usr/bin/env /** * This is an example of SUGO-Caller * @see https://github.com/realglobe-Inc/sugo-caller */'use strict' const sugoCaller = const co =
Advanced Usage
Using Event-Emit Interface
On actors, each module provides EventEmitter interface like .on(ev, handler)
and .emit(ev, data)
functions.
/** * This is an example module */'use strict' const co = const Module = // Example of event emitting function { const s = this return } { return ...args} moduleexports = newTimeBomb // Pass factory method
#!/usr/bin/env /** * This is an example of SUGO-Caller to use event emit */'use strict' const sugoCaller = const co =
Tutorials
API Docs
Related Packages
There are a bunch of related package and there are listed in sugos-index page
- Core packages - Core of SUGOS
- Demo packages - Demo for SUGOS scaffolding
- Example packages - Example project using SUGOS framework
- Module packages - Module plugins for SUGOS-Actor
- Middleware packages - Middleware plugins for SUGO-Cloud
- Endpoint packages - Endpoint plugins for SUGO-Cloud
- Agent packages - Agent of endpoints
- Helper packages - Helper packages.
Contributors
License
This software is released under the Apache-2.0 License.