What is Golgi?

2
Data Transport Made Easy Golgi manages the exchange of data between apps and between apps and servers Golgi provides developers with a toolkit for App to App and App to Server rich content and function transport. Golgi enables developers to focus on the features and design of their App, leaving data transport to Golgi. With built in features such as type-safe native code generation, store and forward, push notifications and end- to-end encryption, Golgi is easy to use while being battery efficient, reliable, fast and secure.

Transcript of What is Golgi?

Page 1: What is Golgi?

Data TransportMade EasyGolgi manages the exchange of data between apps and between apps and servers

Golgi provides developers with a toolkit for App to App and App to Server rich content and function transport. Golgi enables developers to focus on the features and design of their App, leaving data transport to Golgi. With built in features such as type-safe native code generation, store and forward, push notifications and end-to-end encryption, Golgi is easy to use while being battery efficient, reliable, fast and secure.

Page 2: What is Golgi?

struct Message{ // options of bool, byte, i16, i32 1:required string myMsg // i64, double, string} // easily extensible with backward compatibility service golgiExample{ Message Chat(1:Message myMsg2u)}

Golgi Definition File (Thrift based)

Message myMsg2u = new Message(); // creating new Message ObjectmyMsg2u.setMyMsg(“Hello World”); // setting content of messageString myFriend = “+16501234567”; // developer defined namespaceChat.sendTo(myChatReplyHandler, myFriend, myMsg2u); // Void with Asynchronous Response

Use of Class in Sender (Android Java)

Chat.RequestReceiver myChatHandler = new Chat.RequestReceiver(){ @Override public void receiveFrom(Chat.ResultSender resultSender, Message rxMsg) { System.out.println(rxMsg); // Print out received message Message myReply = new Message(); // Create reply myReply.setMyMsg(“Hello you!”); // Populate reply resultSender.success(myReply); // Send Reply with Success }};Chat.registerReceiver(myChatHandler()); // Register Handler with Golgi

Use of Class in Receiver (Android Java)

Example Golgi Code:The Golgi Definition File specifies a service called “Chat” for sending and receiving “Messages” between apps and servers. The Sender calls Chat.sentTo() to send the message and the receiver sets up a re-ceiveFrom() in registerReceiver() to receive the “Message”.

In this specific example the Sender sends “Hello World” to “+1650123457”, which is received by the receiver and the receiver sends “Hello you!” back to the sender.

www.golgi.io© Copyright Openmind Networks 2014