Google+ Hangouts API Developer Preview Release

Google+ is a new social networking site and Google+ Hangouts is a feature supports real time video communication among up to 10 participants run inside browser.

Google+ just released its Google+ Hangouts API Developer Preview at 14 December 2011 which introduced JavaScript interface that enables our apps to interact with the Hangouts stuff, such as list out the participants, controlling some aspects of user interface, sharing data between our created apps. Currently Hangouts API is in developer preview release to collect the feedbacks from developers and it is subjected to change.

Link to Google+ Hangouts API: https://developers.google.com/+/hangouts/reference

Bson – Binary JSON

BSON, short for Bin­ary JSON, is a bin­ary-en­coded seri­al­iz­a­tion of JSON-like doc­u­ments. Like JSON, BSON sup­ports the em­bed­ding of doc­u­ments and ar­rays with­in oth­er doc­u­ments and ar­rays.

BSON is used by MongoDB to represent its document-oriented database structure.

Related Links:

1) BSONhttp://bsonspec.org
2) MongoDBhttp://mongodb.org

Node.JS playground 20111211

This weekend I played around with Node.JS, all around JavaScript. Here some notes.

I sign up for Tropo and set up some sample code to play with the telephony related stuff. It is free to test when in developing mode until your apps run into production mode then need to pay.

I simply played say.js, it is a text-to-speech engine in Node.JS, supports Mac OS X and Linux. It used Mac built-in text to speech engine while in Linux it requires Festival to be installed.

Another great library brain.js, it is able to build neural networks on Node.JS and client browser, purely written in JavaScript. Neural network is an Artificial Intelligence technique that mostly used in forecasting and prediction field.

Another library cron.js, it is able to schedule recurring jobs in Node.JS. It used Unix’s Cron liked expression to trigger the job.

Both of them just provide easier to use API that easily integrated into any enterprise application.

Node.JS is a relatively new programming language but its community grows extremely fast. There are many exciting libraries built into Node.JS. It may still not yet suitable for enterprise application but some of the organizations had tried to use it in production, for example, Linked In used Node.JS to build its entire mobile site platform.

DiscuzX 2.5 新功能亮点

《站长》第35期 介绍了下一个 Discuz 版本, DiscuzX 2.5,之新功能亮点。

http://zz.comsenz.com/mt35/

我最喜欢的就是自动升级系统,可以自动升级安全补丁等。另外,我也期待它的手机客户端。原本也想自己开发的,但是 Discuz 官方都要出了,当然我还是想自己开发一个,因为可以在里面内建  Imgshow  插件!!!

Bringing Node.JS WebSockets with Java

To add real time capability with Java, what you can do is through Comet (CometD Framework) or Jetty Continuations, however, these technologies had outdated, made worse performance. And currently most web server framework is based on thread-based, and thread-based does not scale when introducing in real time.

This post introduced us to build another separate server running Node.JS WebSockets, and using Redis to bridge Java and Node.JS based on publish/subscribe model, to plug in real time capability to Java. Java can push the data to Redis, when Node.JS subscribed to Redis, whenever got new data, it broadcasts the data to the WebSockets clients.

Links:

  1.  http://spreadthesource.com/2010/11/bringing-realtime-to-your-java-applications-with-websockets-nodejs-redis-tapestry-5/

socket.io Library for Titanium Mobile

Found a socket.io Library for Titanium Mobile.

https://github.com/nowelium/socket.io-titanium

socket.io Library is originally included in Node.JS, and someone brilliant migrated into Titanium Mobile.

And, currently there is no nowJS implementation for Titanium Mobile. But I investigated nowJS source code it used socket.io, and *maybe* it is possible to migrate into Titanium mobile as well. However, this is not impossible, because Kosso had made it, but just didn’t open source yet.

Showcase on Real time video sharing built on nowJS

I am learning nowJS, a framework to build real time application built on Node.JS, and had made a simple web application that is able to share screen to the other clients in real time. This apps includes client side and server side is 100% completely written in JavaScript.

I had recorded a video and exported into HTML5 Webkit compatible video clip, and included into web page using HTML5 <video> tags. And then, the screens will be copied into HTML5 <canvas>. After that, the magic comes, the screen in HTML5 <canvas> will be real time broadcasted to the other client browsers (tested on Google Chrome, Apple Safari, and Apple Safari Browser runs on iPhone, or webkit browser). I had applied some algorithms to manipulate the video as well. The canvas also allows simple line drawing. At the end, the results of the canvas will broadcast to the other client browsers in real time.

Attached is the showcase video:

 

Fork me on Github: https://github.com/fyhao/Real-time-video-sharing-built-on-nowJS-and-Node.JS