Release GContext Node.js Module!
How to write a native desktop application in Node.js? Perhaps you know many modules can do that easily, something's like node-gui and jsdx-toolkit. In order to develop system program, DBus module is the most important thing you must have as well. With Dbus module, you can handle all communications between programs. Furthermore, you can control low-level functions system provided via DBus, which includes hardware, networking and operation system features. Unfortunately, all things do not work at all since new version of Node.js.
Many system libraries are based on GLib, and work with GLib event loop. For writing a node.js binding with such libraries, libev is the only way to integrate event loop between node.js event loop and GLib main context. The problem is that libev is deprecated since 0.8 node.js cause modules which depends on libev will be broken on latest and higher version. Nothing works if there is no libev.
In fact, upstream announced that libuv is being only one way to handle all low-level operations(I/O, threads, timer and poll). However, there is no people to re-work integration of GLib event loop with new libuv APIs, even six months have passed already. This problem must be solved if we want to write system program and native application in Node.js.
Besides, modules which works with GLib event loop have own implementation for event loop integration in the past, conflict occurs properly between each module. Your program always crashes or hangs when normal process of event loop is interrupted by another module.
For theses reasons, I wrote a Node.js module "GContext" to do GLib main context integration, used libuv APIs to support latest version of Node.js. It's an individual module, so it's possible to be used directly by other modules. As long as it uses GContext module, it can run a GLib event loop on Node.js and share this loop with other modules. There is no need to re-implement this mechanism by themselves anymore.
You can install it from NPM directly:
Initiate main context and run a GLib loop on Node.js event engine:
Many system libraries are based on GLib, and work with GLib event loop. For writing a node.js binding with such libraries, libev is the only way to integrate event loop between node.js event loop and GLib main context. The problem is that libev is deprecated since 0.8 node.js cause modules which depends on libev will be broken on latest and higher version. Nothing works if there is no libev.
In fact, upstream announced that libuv is being only one way to handle all low-level operations(I/O, threads, timer and poll). However, there is no people to re-work integration of GLib event loop with new libuv APIs, even six months have passed already. This problem must be solved if we want to write system program and native application in Node.js.
Besides, modules which works with GLib event loop have own implementation for event loop integration in the past, conflict occurs properly between each module. Your program always crashes or hangs when normal process of event loop is interrupted by another module.
For theses reasons, I wrote a Node.js module "GContext" to do GLib main context integration, used libuv APIs to support latest version of Node.js. It's an individual module, so it's possible to be used directly by other modules. As long as it uses GContext module, it can run a GLib event loop on Node.js and share this loop with other modules. There is no need to re-implement this mechanism by themselves anymore.
You can install it from NPM directly:
npm install gcontext
Initiate main context and run a GLib loop on Node.js event engine:
var GContext = require('gcontext'); GContext.init();
Good Job!
回覆刪除hi~
回覆刪除qt and nodejs,how to do that???
you can found node-qt, it's a node.js binding for Qt.
刪除Enjoyed reading the article above, really explains everything in detail, the article is very interesting and effective. Thank you and good luck for the upcoming articles Nodejs training
回覆刪除One of our visitors recently recommended the following website. 토토사이트
回覆刪除Its like you read my mind 야동 ! You appear to know so much about this, like you wrote the book in it or something. I think that you can do with some pics to drive the message home a bit, but instead of that, this is magnificent blog. An excellent read. I’ll definitely be back.
回覆刪除Enjoyed reading the article above , really explains everything in detail,the article is very interesting and effective.Thank you and good luck for the upcoming articles.
回覆刪除건마탑
Great work ! This is the type of information that are supposed to be shared across the internet. 슬롯머신
回覆刪除Amazing article. Your blog helped me to improve myself in many ways thanks for sharing this kind of wonderful informative blogs in live. I have bookmarked more article from this website. Such a nice blog you are providing. Feel free to visit my website; 온라인카지노
回覆刪除Really i am impressed from this post....the person who create this post it was a great human. Feel free to visit my website; 온라인카지노
回覆刪除smm panel
回覆刪除smm panel
İş ilanları blog
instagram takipçi satın al
Hırdavatçı
Www.beyazesyateknikservisi.com.tr
SERVİS
tiktok jeton hilesi
Congratulations on your article, it was very helpful and successful. d4add36077f28b9435423894644f9801
回覆刪除sms onay
website kurma
numara onay
Thank you for your explanation, very good content. 15f22b0800773276d8d2f19fb344a279
回覆刪除altın dedektörü
Good content. You write beautiful things.
回覆刪除vbet
mrbahis
sportsbet
korsan taksi
mrbahis
hacklink
hacklink
taksi
sportsbet
Success Write content success. Thanks.
回覆刪除kıbrıs bahis siteleri
canlı poker siteleri
canlı slot siteleri
deneme bonusu
betturkey
betpark
betmatik
دهانات خارجية
回覆刪除دهانات