Monday, August 12, 2013

Embedded JavaScript programming



First there was client side JavaScript, then we got server side JavaScript, called Node.JS. Next step is embedded side JavaScript programming.

As you know, JavaScript is not Java. JS has many characteristics that makes it behave much unlike Java. First of all, in JS external function calls are asynchronous, non-blocking. This means when you request for certain resource, your call returns immediately, and your request is served later. Then, callback function you provided may be invoked or not. This approach makes JavaScript ideal for distributed computing, as the same phenomena occurs over there. You request something, and you may or may not get the response. 

Second, server sessions are stateless, as session management is typically off-loaded to the client side as well.  In Java implementation, memory consumption and CPU load is increased proportionally to number of concurrent sessions. In JS, all calls are served in a single-threaded event loop. Thus no new context is created for each new session, which reduces memory consumption dramatically.  These same features, which make JavaScript superscalar in heavy load server systems, makes it suitable for low-end embedded systems as well. Client side session management and asynchronous calls both makes your embedded implementation more lightweight. 

Of course, JavaScript is not suitable for the most time-critical sections of your code, help of other languages is needed for that. However, real-time requirements typically covers only small fraction of the whole code base. Integrating external native functions calls is much easier with JavaScript than in Java. Last but not least, JavaScript integrates with your web UI by nature, yet another reason why to choose JS over Java.

My recommendation; implement real-time and performance critical parts of your embedded code with just plain C, and do the rest with JavaScript. This way you get both the performance and productivity at once.

3 comments:

  1. If you need to hire a real hacker to help spy on your partner's cell phone remotely, change your grades or boost your credit score. Contact this helpline 347.857.7580 or the email address expressfoundations@gmail.com

    ReplyDelete
  2. Statics shows that every hour an online internet user or trader come in contact with a fraudulent broker or trader who scam them of their money and most times get away with it...If you have ever been a victim of internet scam you can now fight back with professional assistance of wealth recovery PAULHASTING01@GMAIL.COM to help you get your financial life back on track

    ReplyDelete
  3. TOOLS&FULLZ SHOP
    _______________

    hi EveryonE!

    Are you been stuck for looking valid products or been scammed by scammers

    Here the Valid store available for all kind of tools,tutorials & Fullz with quality

    Learn hacking and spamming and do it on your own way & enjoy..........

    _______________

    1)FRESHLY SPAMMED USA FULLZ
    2)HACKING & SPAMMING TOOLS
    3)TUTORIALS
    _______________

    *Contact*
    *ICQ :748957107
    *Telegram : @James307
    *Skype : Jamesvince$
    _______________
    USA SSN FULLZ WITH ALL PERSONAL DATA+DL NUMBER
    -FULLZ FOR PUA & SBA
    -FULLZ FOR TAX REFUND
    *fullz/lead with DL num
    *SSN+DOB
    *Premium info
    *EIN PIN LEADS
    (TAX RETURN)
    *ELECTRONIC FILING LEADS

    ID's Photos For any state (back & front)
    ________________
    +US cc Fullz
    +(Dead Fullz)
    +(Email leads with Password)
    +(Dumps track 1 & 2 with pin and without pin)
    +HACKING & CARDING TUTORIALS
    +SMTP LINUX
    +SAFE SOCK
    +CPANEL
    +RDPs
    +Spamming Tutorial
    +SERVER I.Ps
    +EMAIL COMBO
    +DUMPS TUTORIAL
    +BTC FLASHER
    +KEYLOGGER COMP&MOB
    +EMAIL BOMBER
    +SQLI INJECTOR
    +ETHICAL HACKING TUTORIAL
    +GMAIL HACKING TUTORIAL
    +PENETRATION TESTING TUTORIAL
    +PayPal Cracker
    +BTC Cracker
    +BLUE PRINTS BLOCKCHAIN
    +EMAIL BLASTER
    +SMS SENDER
    +NORD VPN
    +ONION LINKS AND TOR BROWSER (LATEST VERSION)
    +DARK HORSE TROJAN
    +NETFLIX CHECKER
    +IP ROUTING
    +KEYSTROKE LOGGER
    +WESTERN UNION LOGINs
    +ALI BABA IPs
    +KEYLOGGER
    +SHELL SCRIPTING
    _______________
    *Let's do a long term business with good profit
    *Contact for more details & deal

    *Contact*
    *ICQ :748957107
    *Telegram :@James307
    *Skype : Jamesvince$

    ReplyDelete