Posts

Showing posts with the label javascript

How long NodeJS setTimeout takes on various environments?

Image
A while ago, I posted about latency spikes while sending messages through RabbitMQ. I'm back to the latency topic with a bit more measurements. The results back then turned out to be a bit of mystery and surprise to me, and latency is not something that can be easily debugged. It took many small steps to better understand what's happening. First of them, was closer look at what impact does the environment have on the test. One of the things that I tried back then was running benchmarks in VirtualBox on idle MacBook Pro - my primary home machine. I was also using an ageing ThinkPad laptop with 32bit CPU, but it's results were hardly comparable to 64bit architectures so I left it. Anyway, VBox+MacBookPro turned out to be fairly bad idea, because those extra layers add a lot of noise, whereas latency test is exactly that moment in time when you don't want any noise. Running the tests in the cloud (i.e. DigitalOcean) appeared to be much better because that way, each...

Orion PHP Support demo

Image
If you're following Eclipse planet , you couldn't have missed Karol Gusak's weekly status reports about PHP support that's being built for Orion. If you still haven't tried PHP in Orion yourself, here's a little demo now on YouTube that nicely shows syntax highlighting, content-assist as well as overall PHP experience in Orion. Click below to check it now.

Extending Eclipse Orion

Image
Yesterday Eclipse E4 team announced Orion - an experimental Eclipse Web IDE. There's plenty of information about the project on Orion wiki . Orion is a set of JavaScript and HTTP APIs that simplify common development part of rich applications, like file storage, preferences, authentication, dialogs, selection. Since it's coming from Eclipse, Orion is skewed towards IDE development, so from start it also includes text editor with some decent features, like JavaScript syntax highlighting and JSLint integration. The project may go towards strengthening it's JS IDE feature set, as well as enhancing it's core side - extensibility, client APIs ...or do it all at once. In any case it's going to be fascinating journey! So how to extend Orion? One can re-implement existing HTTP API in language other than Java; add more HTTP APIs, e.g. for task management, calendar, etc. Same with JavaScript API - it seems fairly easy to add more. Looking at this from classic Eclipse adopter...

Extend Eclipse in JavaScript... or PHP :-)

Image
The JavaScript unit tests view for Eclipse I blogged last time, wouldn't be anything special, unless you're JavaScript guy. Except the fact that it's implemented in plain HTML+JavaScript for GUI part and business logic. Ah.. and it uses jQuery too, so I think I can label the view as an example of jQuery plugins for Eclipse :-) This has several advantages: - I don't need to know Java to extend Eclipse. This is great for such Eclipse IDE users as JavaScript, or PHP developers. - many things are easier to calculate in web languages, than Java. E.g. (running JS tests, running a web poll, etc.) - writing simple UI in HTML is dead easy. and you can use CSS :-) The main disadvantage is difficult communication with workbench. Java APIs are complicated and hard to map 1:1 in JavaScript, however for start I'm looking at exposing only few most useful features, like selection service. The inner workings are pretty simple. Some HTML is rendered by browser widget embedded in tra...

JavaScript unit tests in Eclipse

Image
Anybody knows what's currently the most popular tool for javascript unit testing? While figuring this out, I made up a simple javascript unit tests integration with Eclipse to easily run precious tests from my favourite environment :-) Unit tests are simple objects with functions to test and there's a couple of JUnit-style assertions. I wonder if the above view could be integrated with some real JS unit test tool.