Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member194504
Active Contributor

The enterprises are drifting fast towards Node.js, especially because of its proven performance characteristics. Here, I have tried to utilize some of its features in SAP BusinessObjects Design Studio.

Here’s how I have implemented the Real-time Chat prototype component based on Node.js, express and socket.io.

1. I have used the socket.io chat example from its official website. I installed the node server on my local machine by installing required dependencies such express, node, socket.io libraries using package.JSON and started server file by a command node index.js.

socket.io

2. Once the server got started, I created a simple chat component in SAP BusinessObjects Design Studio as a socket client. To load socket.io library, I used the require.js module.

3. After the completion of socket client code in component.js file, I executed the SAP BusinessObjects Design Studio application in browser. As you can see, the component looks like this in design mode,

SAP BusinessObjects Design Studio_Real time chat component_design mode

4. Each session will be considered as an individual user. When application is executed on the browser, the user can enter their name to join the chat server. I executed the application locally on a browser (the server is locally running on my system as I mentioned before).

SAP BusinessObjects Design Studio_Real time chat component_browser1

5. To actually use the component, I opened the application URL in a different Google Chrome window and joined as another user. The application will indicate the number of participants for that session.

SAP BusinessObjects Design Studio_Real time chat component_browser2

6. As you can see below, the server has detected that there are two participants.

SAP BusinessObjects Design Studio_Real time chat component_nodeJS

SAP BusinessObjects Design Studio_Real time chat component_node-JS

7. The chat messages appear in both the windows as shown above. When one of the users quits the session (closes the browser window), a message appears as shown below:

SAP BusinessObjects Design Studio_Real time chat component with NodeJS

As mentioned above, each session will be considered as an individual user. This real time chat component can be implemented as part of a dashboard, wherein a number of users who have opened the same application can view and communicate through the dashboard.

Lot more can be done by incorporating Node.js in SAP BusinessObjects Design Studio and this is just an example. So what are we waiting for? Let’s chat!

Source:http://visualbi.com/blogs/design-studio/real-time-chat-component-in-sap-businessobjects-design-studi...

10 Comments
Labels in this area