wiki:jazz/09-01-04

Version 16 (modified by jazz, 16 years ago) (diff)

--

2009-01-04

Cloud Computing

  • Did Google's Eric Schmidt Coin "Cloud Computing"?
    • Cloud Computing一辭的起源為 2006 年 Google CEO Eric Schmidt 用來描述自家的 SaaS 服務。
      When Google CEO Eric Schmidt  used it in 2006 to describe their own stuff and then Amazon included the word 
      “cloud” in EC2 when it was launched a few weeks later (August 24), the term became mainstream.
      
  • JumpBox Releases 38 Open Source Virtual Appliances for Amazon Cloud Service
    • JumpBox 的 Logo / Website 先前有逛過,至於展示攤位我也有在 LinuxWorld 2008 看過,我也覺得它蠻有趣的。它把目前熱門的 Open Source 專案都變成以前網頁虛擬主機(Hosting)的一種軟體服務(Software as a Service)。
    • 如何使用 VirtualBox 執行 JumpBox - 從影片可以學到他們把 VM 的根目錄(root)跟資料碟(data)分開,此外用網頁的方式讓使用者去試用這些 JumpBox VM。(OS: 原來光賣設定好的 VM 也可以賺錢?!不會吧?!)

Web Service : JavaScript

  • 測試 RhinoRhino/env.js
    • 作者說可以參考Rhino Shell來了解 Rhino 的使用方法
      ~$ wget ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino1_7R1.zip
      ~$ unzip rhino1_7R1.zip
      ~$ cd rhino1_7R1/
      ~/rhino1_7R1$ wget http://jqueryjs.googlecode.com/svn/trunk/jquery/build/runtest/env.js
      ~/rhino1_7R1$ java -jar js.jar        ### 執行 Rhino
      Rhino 1.7 release 1 2008 03 06
      js> load('env.js');                   ### 載入 env.js
      js> window.location = 'some.html';    ### 載入存在 DOM 的
      ### 作者說在載入任何與 DOM 相關的程式碼之前,一定要先指定 window.location
      js> window.onload = function(){       
      ### 從這裡就可以開始寫自己的 JavaScript
      }
      js> quit()                            ### 離開 Rhino
      
  • 另一個互動式 JavaScript Shell - SpiderMonkey
    • [安裝] Debian 已經有套件 - spidermonkey-bin
      $ sudo apt-get install spidermonkey-bin
      $ dpkg -L spidermonkey-bin
      $ smjs
      js> help()
      JavaScript-C 1.8.0 pre-release 1 2007-10-03
      Command                  Description
      =======                  ===========
      version([number])        Get or set JavaScript version number
      options([option ...])    Get or toggle JavaScript options
      load(['foo.js' ...])     Load files named by string arguments
      readline()               Read a single line from stdin
      print([exp ...])         Evaluate and print expressions
      help([name ...])         Display usage and help messages
      quit()                   Quit the shell
      gc()                     Run the garbage collector
      gcparam(name, value)
        Wrapper for JS_SetGCParameter. The name must be either 'maxBytes' or
        'maxMallocBytes' and the value must be convertable to a positive uint32
      countHeap([start[, kind]])
        Count the number of live GC things in the heap or things reachable from
        start when it is given and is not null. kind is either 'all' (default) to
        count all things or one of 'object', 'double', 'string', 'function',
        'qname', 'namespace', 'xml' to count only things of that kind
      trap([fun, [pc,]] exp)   Trap bytecode execution
      untrap(fun[, pc])        Remove a trap
      line2pc([fun,] line)     Map line number to PC
      pc2line(fun[, pc])       Map PC to line number
      stackQuota([number])     Query/set script stack quota
      stringsAreUTF8()         Check if strings are UTF-8 encoded
      testUTF8(mode)           Perform UTF-8 tests (modes are 1 to 4)
      throwError()             Throw an error from JS_ReportError
      build()                  Show build date and time
      clear([obj])             Clear properties of object
      intern(str)              Internalize str in the atom table
      clone(fun[, scope])      Clone function object
      seal(obj[, deep])        Seal object, or object graph if deep
      getpda(obj)              Get the property descriptors for obj
      getslx(obj)              Get script line extent
      toint32(n)               Testing hook for JS_ValueToInt32
      evalcx(s[, o])
        Evaluate s in optional sandbox object o
        if (s == '' && !o) return new o with eager standard classes
        if (s == 'lazy' && !o) return new o with lazy standard classes
      sleep(dt)                Sleep for dt seconds
      scatter(fns)             Call functions concurrently (ignoring errors)
      js> quit()
      

Lighttpd

SQLite