Erbix:相容於 CommonJS 的服務端 JavaScript 主機平台

來源:互聯網
上載者:User

Erbix 為構建和部署 JavaScript 應用程式的雲端平台。除了支援 RinjoJS,CommonJS 模組,PostgreSQL 外,還支援具延展性的按需調配主機。

Erbix is a platform for building and deploying JavaScript applications on the Cloud. It features support for RinjoJS,CommonJS
modules, PostgreSQL and on-demand scalable hosting.

Erbix 近來也啟動了針對JavaScript 程式的市場,提供若干教程,和兩個完全用 JavaScript 寫好的開來源程式,以供借鑒。

Also it has recently launched a
marketplace for JavaScript Apps, featuring some tutorials and two new open-source applications written completely in JavaScript.

InfoQ 就和來自 Erbix 團隊的 Mihai Roman 進行了一次小型的交流,感謝他們的撥冗。

InfoQ had a small Q&A with Mihai Roman from the Erbix Team, regarding their offering:

 

InfoQ:能否介紹一下 Erbix 的構思是如何的,怎麼演變為一種架構,以及其程式的結構大致如何?

InfoQ: Could you give us an architectural overview of how Erbix is setup and how an application is structured?

使用者在Erbix建立、安裝或租用服務端的JavaScript程式,首先要有一個Web賬戶。使用者可以申請一個或使用OpenID來開始亦可。

各個賬戶之間是孤立開來的,不能直接共用資源。每個賬戶擁有以下的資源:

Erbix offers web accounts that can be used for creating, installing or hosting server-side JavaScript apps. Users can sign up or simply log in with OpenID to get started.

All accounts are isolated from each other and cannot share resources directly. Each account has the following resources:

  • 一個虛擬化的檔案系統(用於存放 JavaScript 代碼、圖片的這些靜態資源)a virtual file system (used for storing the JavaScript code and static resources such as images)
  • 專門的 PostgreSQL 資料庫(儲存程式資料)a dedicated PostgreSQL database (for storing apps data)
  • 網站列表,每個網站描述 URL 首碼路徑是如何映射到條目點函數的(我們採用 CommonJS JSGI 0.3 標準作為條目點)a list of sites, each describing how URL prefix paths are mapped to JS entry point functions (we use the CommonJS JSGI 0.3 standard as entry-points).

每次請求就有一個特定的 URL,對應載入一個映射好的模組,從而就會調用 JSGI 條目點的函數。根據 CommonJS 1.0的模組規範,還可以載入別的 JavaScript 模組。

Every time a request is made for a specific URL, a mapped module is loaded and the JSGI entry point function is called. Other JavaScript modules can be loaded according to CommonJS Module 1.0 specs.

這些模組檔案打包到應用程式目錄下。加入到該目錄下的檔案就可視作為符合 CommonJS 包規範1.0的檔案(application.json),打包後就可以將程式發布到 Erbix Marketplace,與大家分享成果。

Several module files can be packed into an application folder. By adding in that folder a CommonJS Packages 1.0 specs file (application.json) it can then be published to the Erbix Marketplace and shared with others.

可以通過兩種方式安裝 Marketplace 的程式(發行者可選擇其中的一種或兩種都選):

Apps from the Marketplace can be installed in two ways (the publisher has the option to choose one or both possibilities):

  • 負責檔案到帳號 copy files into account
  • 直接從 Marketplace 運行程式run app directly from the Marketplace

對於沒有 JavaScript 編碼經驗的使用者,也可以快速地安裝 Marketplace 的程式。程式產生的所有資料都儲存在 PostgreSQL 資料庫。Users with no (JavaScript) coding experience can install and run apps from the Marketplace in seconds. All the data produced by those apps resides in the account's PostgreSQL database.

 

InfoQ:若與其他常見的 JavaScript 平台去比較,如 Node.js,Akshell,你會提供哪些方面的材料支撐?How does youroffering compare to the other JavaScript platforms out there, likeNode.js, Akshell, etc.

Erbix 經過認真地考慮,才選擇基於 Ringo 的 JavaScript 引擎,簡單說,RingoJS乃是不錯的 Mozilla RhinoJavaScript 編譯器封裝器。NodeJS 是 RingoJS 替選。RingoJSErbix is based on the RingoJavaScript engine, which was chosen after careful consideration; simplyput, RingoJS is a brilliant wrapper around
Mozilla Rhino JavaScriptinterpreter. Node.JS is a RingoJS alternative.

技術上,Erbix 是相容於 CommonJS 服務端 JavaScript 主機平台。我們沒有限定廠商,而且從 Erbix 移植程式時候都是希望花最小的力氣。使用者能夠匯出它們的程式運行在私自的 RingoJS 主機或其他的服務端的 JavaScript 平台。。

Technically, Erbix is a CommonJS compliant server-side JavaScript hosting platform. There's no vendor lock-in and minimal to none effort is necessary to port apps to and from Erbix. Users will be able to export their apps on privately hosted RingoJS or other
server-side JavaScript platforms.

不同於 Akshell 或 AppJet(現在由 JGate 寄存),Erbix 提供建立真正成熟 Web 程式的工具。專設有 PostgreSQL 資料庫可訪問,表示可以通過 SQL console 或代碼的方式達到 SQL 全面的支援,不得不說,這是 Erbix 才有的功能。

Unlike Akshell or AppJet (currently hosted by JGate), Erbix provides the tools to create fully fledged web applications. The dedicated PostgreSQL database is accessible by the means of an SQL console or programaticaly with full SQL support; a feature found
only in Erbix.

InfoQ: Erbix 中,開發、調試、測試、部署和監控一個程式其典型的流程大概如何呢?What is the typical workflow for developing, debugging, testing, deploying and monitoring an app in Erbix?

可以通過線上編輯器或上傳輕鬆建立檔案和檔案夾。檔案夾可以以 .zip 或者 .tat.gz 的形式上傳或下載。未來加入源碼的版本控制功能。所以使用者既可以在 Erbix.com 的線上環境中建立程式,也可以在離線的狀態下,利用 IDE 完成。

Files and folders can be created using the online editor or can be uploaded easily. Folders can be uploaded/downloaded from/to a .zip or .tar.gz archive. Future source versioning support may be added. So users can choose to create the apps online on Erbix.com
or offline in their IDE of choice.

通過映射URL首碼到JSGI條目點函數,應用程式可以立刻進行部署。

Apps are deployed instantly by mapping an URL prefix to the JSGI entry point function.

要調試或監控的話,單元測試和 logging 模組準備可用。我們在改善這些功能和模組。

Unit testing and logging modules are available for debugging and monitoring purposes. We are currently working on improving these features/modules.

InfoQ: Erbix 適合拿來做什麼呢,您看到了哪種使用者案例?What are the common use cases you see Erbix being more suitable for?

對於小型企業建立或安裝程式,Erbix 十分適合;對於開發人員和消費者,Erbix 也很友好:我們為開發人員提供極具生產力的工具(Marketplace、JS寄存主機、瀏覽器編輯器)來建立您的程式。於消費者而言,他們可以輕鬆地從 Marketplace 挑選並安裝應用程式,從而保持控制屬於他們的 PostgreSQL 帳號中資料內容。

結合當前的服務端JavaScript生態而言,我們覺得Erbix將是測試、推廣、分享服務端JavaScript程式的優秀不二的解決方案。

Erbix is a great environment to create or install apps for small businesses. Erbix is both developer and consumer friendly: we offer to developers excellent productivity tools (marketplace, JS hosting, browser editor) for creating great apps; the customers
can easily install the apps from the marketplace and keep control of their data in their own PostgreSQL account.

Given the current status for the server-side JavaScript, we consider Erbix to be the best solution for testing, promoting and sharing server-side JavaScript apps.

InfoQ: 當前服務到了什麼的狀態,以及將來來說,會告訴我們什麼的線路圖?What is the current status of the service and what is your roadmap for the future?

我們現在公測 beta 之中。每一位有 OepnID 的使用者可以享有我們的服務。好比運行著的 www.erbix.com 則是一個 Erbix 程式,還有兩個通過線上編輯器構建的示範程式,而且我們打算下 次 major 發布的時候,就可擺脫 beta。

We are currently in open beta testing. Everyone can log in with OpenID and start using the service.  We are running www.erbix.com as an Erbix app, we've built two apps by only using the online editor and we expect to get out of beta in the next major release.

我們正在改進平台的以下幾個方面:We are working on improving many aspects of the platform:

  • 文檔。documentation
  • 可用性(為非技術使用者感覺更直觀)。usability (make it more intuitive for non technical users)
  • 自訂網域名的 UI 支援。UI support for custom domain names
  • 更好的動態資源撫平(針對高峰期)。better dynamic resource scaling (handle traffic peaks)
  • 監視/統計。monitoring/statistics

同時,我們團隊還有人負責開發現成可用的程式,發布到 Marketplace,讓人人去用或者客制化。Meanwhile, part of ourteam will develop production-ready apps that will be published on theMarketplace for everyone to use and customize.

Erbix 是一系列 JavaScript 雲端平台中的一員,過去幾個月不斷出現這些平台,包括 Akshell,曾經由 InfoQ 報導過。

The Erbix offering is one of a series of JavaScript Cloud hosting platforms that have emerged in the last months, such asAkshell, which has been covered by InfoQ.

你在 InfoQ 這兒,找到有關 JavaScript,Node.js 和 CommonJS 更多的資訊。

You can find more information regarding JavaScript,Node.js andCommonJS,
right here on InfoQ!

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.