Archive for category Ajax/Web 2.0

Sun’s Attempt at a Web-Based OS?

Every now and then, Sun's Research group comes out with something that seems very interesting and leaves me wondering if this is the direction we might be heading in. It's difficult to describe Sun Labs Lively Kernel, so I'll simply quote from their website:

The Sun Labs Lively Kernel is a novel web programming environment developed by Project Flair at Sun Labs. The main goal of the Lively Kernel is to bring the same kind of simplicity, generality and flexibility to web programming that we have known in desktop programming for thirty years, but without the installation and upgrade hassles than conventional desktop applications have.

Remember all those rumors about how Google was developing an OS which would run in a browser? Well, this is the closest thing that I've seen to such a beast. When you visit the Sun Labs Lively Kernel page, click on the 'Enter Lively Kernel' tab to see the prototype in action. While performance was slow for me, it gives you a good idea of where we could be heading in the future.

Sun Labs Lively Kernel – http://research.sun.com/projects/lively/index.html

No Comments

Client Side Load Balancing for Web 2.0

So you’re writing a large web application, with multiple web servers on the front-end waiting to serve your users. First thing you do is start to think about a Load Balancing solution, be it a hardware solution such as a Coyote Point Systems box, or even a ‘software’ solution, such as Round Robin DNS. Now, with the advent of ‘Web 2.0′, we’re slowly seeing another ‘solution’ starting to gain some traction; Client Side Load Balancing.

To put it simply, we let each ‘client’ decide which server to connect to. Each client has a list of all available servers, and randomly selects one and attempts to exchange data. If the client receives a message indicating the server is busy, or no response at all within a set period of time, it moves to another server on the list until it can complete its transaction. Lei Zhu, a contributor at Digital Web, has this to say about the advantages of such a solution:

  1. Distribute loads among a cluster of application servers. Since the client randomly selects the server it connects to, the loads should be distributed evenly among the servers.
  2. Handle failover of an application server gracefully. The client has the ability to failover to another server when the chosen server does not respond within a preset period of time. The application server connection seamlessly fails over to another server.
  3. Ensure the cluster of servers appears to the end user as a single server. In the example, the user simply points a browser to http://www.myloadbalancedwebsite.com/. The actual server used is transparent to the user.

A big advantage to such a solution is that you don’t need to spend money on a hardware device, at least in the short-term. You can have some code on your back-end that monitors the web servers and removes any unavailable servers from the server list sent to each client.

Another advantage that Lei points out is that the web servers can be distributed anywhere geographically. Sure, this can be done with a load balancer, but it’s a far trickier and complicated setup then just having to change a server entry in a file sent to each client.

Lei’s article also includes a short write-up of an application, Voxlite, using such a design.

Overall, while I still have some doubts regarding the scalability of such a solution, it’s an interesting use of Web 2.0.

Digital Web Magazine – Client Side Load Balancing for Web 2.0 Applications

No Comments

Firebug – The Web Development tool/add-on

I use Firefox as my main browser about 99% of the time, and one feature I love is the ability to extend its’ capabilities through the installation of ‘Add-ons’. One add-on that I’ve been using lately that has been a huge time saver for me is Firebug.

Firebug integrates with Firefox to put a wealth of web development tools at your fingertips while you browse. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page.

It’s all there, all in your browser. Instant feedback on any changes you make during some CSS tweaking, etc.

Firebug – Web Development Evolved

No Comments

Javascript Gallery and Slideshow System

I'm always on the lookup for a slick way to display a series of images within a webpage. Jonathan Schemoul over at JonDesign has released SmoothGallery 2.0, and it looks very slick. Here's a small quote from his site that sums it all up:

"So, what is so cool about it ?

Unlike other systems out there, JonDesign's SmoothGallery is designed from the ground up to be standard compliant: You can feed it from any document, using custom css selectors.

And even better, this solutions is very lightweight: The javascript file is only 24kb."

For now, Jonathan's solution definitely is leaps and bounds ahead of other similar offerings, which either have less features, too many features, or horribly coded.

JonDesign's Smoothgallery 2.0 – http://smoothgallery.jondesign.net/

No Comments

Coding a simple Ajax Calendar with a MySQL backend

When doing any kind of web development, I always come across a time when I need to implement some sort of calendar; be it a small ‘applet’ enabling the user to select a date more effectively, or something a bit ‘larger’, displaying something more relevant for certain days.

Jamie over at www.nodstrum.com wrote up some code that can be used as an effective base for many ‘calendaring’ needs most web developers come across. It’s PHP and MySQL, so it should meet the needs of most folks out of the box, but can also be easily ported to another development language.

One word of caution; Jamie makes it clear that his priority was functionality and not security. As such, if you use his code, make sure to apply best-practices in regards to SQL injection, etc.

Jamie’s MYSQL Calendar code

If you’re interested in how Jamie’s code evolved, check out these articles also on his site:

Calendar System – Easily using PHP & Script.aculo.us
MySQL Calendar

If all you’re looking for is a simple, elegant date ‘selector’, give DatePicker a look.

No Comments