1. #1
    Sencha - Community Support Team mschwartz's Avatar
    Join Date
    Nov 2008
    Location
    San Diego, Peoples' Republic of California
    Posts
    2,053
    Vote Rating
    17
    mschwartz will become famous soon enough mschwartz will become famous soon enough

      0  

    Default Announcing SilkJS

    Announcing SilkJS


    I am pleased to announce SilkJS, a V8 based Swiss Army Knife (and HTTP server).

    SilkJS currently compiles for Linux and Mac OSX, but should port trivially to any flavor of Unix. It was originally written for Ubuntu Linux and ported to OSX (a FreeBSD flavored Unix) in under 2 hours.

    So what is it?

    SilkJS is a C++ program that links with the Google V8 JavaScript engine and several other libraries. It provides as simple and direct as it can, methods that make calling operating system and those other libraries' functions from JavaScript context.

    Running SilkJS is as simple as:
    Code:
    path_to/SilkJS some_javascript_file.js
    SilkJS simply loads the specified JavaScript file, compiles it, runs it, then calls a main() function provided by the script. Any additional arguments on the command line are passed to the main() function.

    SilkJS is not NodeJS. It merely provides the "glue" to the operating system and other library functions to make them callable from your JavaScript program.

    I wrote an HTTP server almost entirely in JavaScript using SilkJS that's included with SilkJS. The HTTP server is a pre-fork model server, and it's very fast. I was able to run ab (apache benchmark) against it with 20,000 concurrent requests and it served a 13.3K file 50,000 times in under 3 seconds with no errors. It is several times faster than NodeJS at serving NodeJS' sample "hello, world" demo on the nodejs.org home page. It is 30x or more faster than Apache and PHP 5.3 at running real world server-side business logic.

    I also wrote a console program in JavaScript using ncurses that technically minded webmasters will find quite useful. It refreshes the screen once per second, displaying in real-time the CPU usage, memory usage, disk activity, and virtual memory. With this program, you can tell if a busy WWW server is CPU, memory, and/or disk bound. Or if it's swapping heavily.

    SilkJS comes with a number of library interfaces built-in. These include console I/O, file system I/O, the gd2 graphics library, MySQL, ncurses, networking, and process management (fork, wait, etc.).

    nodejs.org is served by ngnix, not by nodejs. SilkJS can be viewed at http://silkjs.org/ and it is entirely served by SilkJS itself.

    SilkJS may be downloaded and used freely from github at http://github.com/mschwartz/SilkJS.

    Please see the Wiki http://github.com/mschwartz/SilkJS/wiki, it contains more details about building SilkJS, benchmarks, example programs, etc. Of particular interest to us ExtJS developers is the ORM, which fully supports ExtJS DataStore.

    I've started a Google Group for supporting SilkJS at http://groups.google.com/group/silkjs

    Check it out!

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,795
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Dude... this is awesome! I have just converted my stuff from Apache to Node but will play around with this. When I do get time and any updates... expect some forking going on!
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha - Community Support Team mschwartz's Avatar
    Join Date
    Nov 2008
    Location
    San Diego, Peoples' Republic of California
    Posts
    2,053
    Vote Rating
    17
    mschwartz will become famous soon enough mschwartz will become famous soon enough

      0  

    Default


    To add to my previous post...

    The idea of compiling and running the script on the command line, then calling its main() function is so you can load up your library or API, then actually run your main business logic.

    So:

    Code:
    include('lib/Util.js');
    // include more stuff...
    
    function main() {
      // call stuff in lib/Util.js
    }
    SilkJS comes with an installer (for Linux):
    Code:
    ./SilkJS Install.js
    It creates a /usr/local/bin/SilkJS binary, and /usr/share/SilkJS where it copies lib/ and appropriate other files.

    If you pass include() an absolute path, it looks for the file there, otherwise it looks in the current directory then /usr/share/SilkJS.

    It also supports shebang:

    Code:
    #!/usr/local/bin/SilkJS
    
    // file is ./hello.js
    function main() {
      println('hello, world');
    }
    chmod 755 ./hello.js

    then you can run hello.js:
    ./hello.js

    If you don't have access to Ubuntu, you can install it in VirtualBox (http://virtualbox.org). Download the ISO from http://ubuntu.com (I use the server version, not the desktop one).

    The ORM works on top of MySQL. It's documented here: http://github.com/mschwartz/SilkJS/wiki/Schema.js.

    The ORM is designed to work with ExtJS and DataStores, though it's flexible enough to do anything.

  4. #4
    Sencha - Community Support Team mschwartz's Avatar
    Join Date
    Nov 2008
    Location
    San Diego, Peoples' Republic of California
    Posts
    2,053
    Vote Rating
    17
    mschwartz will become famous soon enough mschwartz will become famous soon enough

      0  

    Default


    Not on the wiki yet is Jst.

    The HTTP server will statically serve .html, .css, .js, .jpg, etc., files. If it sees a .jst extension on a file, it loads it and runs it.

    What is Jst? It's a lot like JSP (or PHP), except the language is JavaScript AND you can call any function of any class you've done include() on in your main program.

    Code:
    <% var title = 'Hello from Jst'; %>
    <html>
      <head>
        <title><%= title %></title>
      </head>
      <body>
        <h1>Users</h1>
        <ul>
    
    <% forEach(SQL.getDataRows('SELECT * FROM Users'), function(user) { %>
          <li><%= user.username %></li>
    <% } %>
    
        </ul>
      </body>
    </html>
    <%
    // any JavaScript can go here
    %>

    <%= JavaScript expression %>
    (emits result of the expression)

  5. #5
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,669
    Vote Rating
    110
    tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all

      0  

    Default


    sounds promising, i will check it out when i find some free time!
    Best regards
    Tobias Uhlig
    __________

    S-CIRCLES Social Network Engine

  6. #6
    Sencha - Community Support Team mschwartz's Avatar
    Join Date
    Nov 2008
    Location
    San Diego, Peoples' Republic of California
    Posts
    2,053
    Vote Rating
    17
    mschwartz will become famous soon enough mschwartz will become famous soon enough

      0  

    Default


    28 people watching the repository on github after 2 days.

  7. #7
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,669
    Vote Rating
    110
    tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all

      0  

    Default


    it's a start
    Best regards
    Tobias Uhlig
    __________

    S-CIRCLES Social Network Engine

  8. #8
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,962
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default


    Sweet Mike!
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.


    Got Sencha licensing questions? Find out more here.


  9. #9
    Sencha - Community Support Team mschwartz's Avatar
    Join Date
    Nov 2008
    Location
    San Diego, Peoples' Republic of California
    Posts
    2,053
    Vote Rating
    17
    mschwartz will become famous soon enough mschwartz will become famous soon enough

      0  

    Default


    26 of those 28 yesterday alone. 13 overnight.

    I haven't even been doing any "marketing" of it yet. I'm hoping to have silkjs.org WWW site up this week and then I have people who run JS blog sites wanting to write about it.

    For my next JSMag article, I will write about how to integrate SilkJS' ORM with ExtJS grids in 250 lines of code or less.

  10. #10
    Sencha User
    Join Date
    Jan 2008
    Posts
    64
    Vote Rating
    0
    ZeusTheTrueGod is on a distinguished road

      0  

    Default


    I am mostly interested in applications for this project for developing / testing extjs app .
    Can we use that for unit testing, for intellisense or for anything useful?

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi