» tagged pages
» logout

sorted by: recent | see : popular
Content Tagged with services + technology

REST With Rails Part 1

In this first part I will show you how to build RESTful services using Rails. REST is an architectural style modeled after the Web. Basically, it codifies the principles and methods behind Web servers that lead to the creation of the largest distributed system ever built. For some people "distributed" is about the plumbing – sending messages to remote servers – we're also thinking of the way large scale systems emerge from smaller services, built independently by different groups of people—distributed in design and in implementation.

technology: dzone.com: tech links

How to Create a Real-Time Web Traffic Map for Your Site

That's when I created Visitr, a way to see where your site visitors are coming from in near real-time, and after plenty of hearty discussion – it's complete with open source code, so you can customize Visitr for your own site or application.

technology: dzone.com: tech links

Satellite-Internet.cc - Satellite Internet

Satellite Internet – HughesNet – Satellite-Internet.cc

Satellite-Internet.cc - Satellite Internet

Satellite Internet services brings High Speed Internet access to anyone nationwide. HughesNet offers high speed satellite internet to your home or business. HughesNet® is America’s #1 choice for broadband by satellite. You’ll enjoy faster surfing, faster downloads and instant email access – all without tying up your phone line. No more dialing in or waiting for Internet access – HughesNet gives you an instant online connection! And it’s available everywhere – even where cable Internet and DSL don’t reach1. HughesNet offers a suite of connectivity solutions for your home, small office, business or government agency, with download speeds ranging from 1000 Kbps to 3 Mbps.

PHP Rest Server (part 1 of 3)

I recently had reason to write a REST server in PHP, which was very interesting. There aren't a whole lot of resources on this topic around so I thought I'd write an outline of what I did. There is quite a lot to it so I'm publishing in multiple sections - this is part 1, which covers the central functionality and handling the incoming request.

technology: dzone.com: tech links

How Big Is The Entire EJB 3.1 API Needed To Compile Your Session Beans?

The recurring question was: how big is the jar needed for compiling / unit test of the EJB 3 pojos? The preview of EJB 3.1 distributed with Glassfish prelude v3 (javax.ejb-10.0-SNAPSHOT.jar) is: 42.2 KB (not MB).

technology: dzone.com: tech links

Using REST along other architecture styles

Following my latest post on evolving the architecture Dru asked me for more details on our RESTful control channels. For one you can take a look at slide 25 of my presentation on REST which talks about the Sessions resource. The session resource returns an AtomPub feed of the current active sessions and then if you follow a link to a session you get the current status, the URIs of the participating resources etc.

technology: dzone.com: tech links

Google Chrome - Hidden Pixels

Google Chrome is Google’s open source browser project.

technology: dzone.com: tech links

Basic Useful Tips for Website Optimization And Speed

Here are some basic tips to optimize your website! Brought to you by Sticktacular Productions!

technology: dzone.com: tech links

Detailed S3 statistics and charts for your buckets with a single click

Introducing integrated S3 statistics for your buckets. Look at who's accessing files in your buckets, traffic patterns, and other details. Super simple to setup and just a single click away.

technology: dzone.com: tech links

More Adventures in Amazon EC2 (and EBS)

Short Version: You can find a fantastic video here about bundling customized AMIs and registering them with Amazon so that you can launch as many instances of your new AMI as you want. The video is so good that I don’t bother writing out the steps to do the bundling (it would be pretty darn long). These are some notes about launching an AMI, customizing it, and mounting an EBS volume to it (the video linked above doesn’t cover EBS). Also, check out the ElasticFox tool which is a very good GUI for doing simple EC2 operations. Nice if you’re just getting started or doing some simple tests.

There are two ways you can go about creating a custom machine image (AMI) for use with Amazon EC2: You can create an image locally by dd’ing to a file, mounting it with “-o loop” creating a filesystem on it, and bootstrapping the whole thing yourself, or you can grab an existing AMI that will serve as a “good enough” base for you to make your customizations, then bundle the customized image.

I’ll be talking about the latter option, where you identify a “good enough” image, customize it for your needs, and save that as your AMI. Unless you’re doing some kind of highly specialized installation, or are a control freak, you shouldn’t really need to start from scratch. I was just building a test image, and wanted a CentOS 5.2 base installation.

Here’s the command you can use to browse the AMIs you have access to (they’re either public, or they’re yours):

$ ec2dim -a

If that command looks funny to you, it’s likely because you’re used to seeing the really long versions of the AWS commands. Amazon also provides shorter versions of the commands. No, really - have a look! The long version of this command is:

$ ec2-describe-images -a

Too long for my taste, but it’s nice to know it’s there.

So, rather than start from scratch, I grabbed a base image that was close enough for my needs, and customized it. It’s a 5.1 base image, pretty well stripped of things that I don’t need, and a few that I do, but that’s ok. I’d rather start with less than more.

So step one is to launch an instance of the AMI I’ve chosen to be my ‘base’. Simple enough to do:

$ ec2run ami-0459bc6d -k ec2-keypair

And that’s pretty much it. It takes a couple of minutes (literally) for the machine to actually become available. You can check to see if it’s still in “pending” state or if it’s available by running ‘ec2din’. Without arguments, that’ll show you the status of any instances you have pending or runnning. Once the instance is running, you’ll be able to glean the hostname from the information provided.

An important note at this point: Don’t confuse “image” with “instance”. For the OO types in the crowd, an “image” is an object. It does nothing by itself until you instantiate it and create an “instance” of that object. For sysadmins, the “image” is like a PXE boot image, which does nothing until you boot it, thereby creating an “instance”.

The reason I used “PXE” and “object” in the above is because of the implication it makes: you can launch as many instances of an object as you want from a single object definition. You can boot as many machines as you want from a single PXE boot image. Likewise, you can launch as many Amazon EC2 instances from an image as you want.

So, in the time it took you to read those last two paragraphs, your instance is probably running. I now grab the hostname for my instance, and ssh to it using my keypair:

$ ssh -i ec2-keypair root@<hostname>

Now that I’m in, I can customize the environment, and then “bundle” it, which will create a new AMI with all of my customizations. With the instance in question, I installed a LAMP stack, and a few other sundry tools I need to perform my testing. I also ran “yum -y upgrade” which will go off and upgrade the machine to CentOS 5.2.

One thing I want to do with this instance is test out the process for creating an EBS volume. The two pieces of information I need to do this are the size of the volume I want to create, and the “zone” I want to create it in. You can figure out which zone your instance is running in using ‘ec2din’ on your workstation (not in your instance). I took that information and created my image in the same zone using the ‘ec2addvol’ command. If you don’t have that command on your workstation, then you don’t have the latest version of the Amazon command line tools. Here’s the command I ran:

$ ec2addvol -z us-east-1b -s 25

To see how it went, run ‘ec2dvol’ by itself and it’ll show you the status of all of your volumes, as well as the unique name assigned to your volume, which you’ll need in order to attach the volume to your instance. To do the ‘attachment’, you need the name of the volume, the name of the instance (use ‘ec2din’), and you need to choose a device that you’ll tell your instance to mount. Here’s what I ran (on my workstation):

$ ec2attvol -d /dev/sdx -i i-xxxxxxxx -v vol-xxxxxxxx

Now you can go back to the shell on your instance, mount the device, create a file system, create a mount point, add it to fstab, and, as they say in the UK, “Bob’s yer uncle”. By the time I wrote this post, I had already shut down my instance, but here are the commands (caveat emptor: this is from memory):

# mkfs.ext3 /dev/sdx
# mkdir /vol
# mount /dev/sdx /vol

If that all works ok, you can add a line to /etc/fstab so that it’ll be mounted at boot time, but I haven’t yet figured out how to attach a volume to an instance at boot time. The mount doesn’t work if you don’t attach the volume to the instance first. You’ll get a “device doesn’t exist” error if you try it. Clues hereby solicited. I assume I could probably use ‘boto’ and some Python code to get this done, but doing the same with a shell script wrapper around the Amazon tools might also be possible — but I don’t know how reliable that would be, because you’re at the mercy of Amazon and how they decide their tools should present the data (and *if* they provide the data you need for a particular operation down the road).

So now I have an EBS volume, and an instance. The volume is attached to the instance, and I can do things with it. I’m testing some database stuff, so I copied a database over to the volume, which was now mounted, so I could just ’scp mydb.tbz root@<instance>:/vol/.’

Once my database is there, I can attach it to pretty much whatever I want, which makes it nice, because I can test the same database, and the same database code, and see how the different size Amazon instances affect the performance, which gives me more performance data to work with. For production purposes, I’ll have to look more closely at the IO metrics, play with attaching multiple volumes and spreading out the IO, and I also want to test the ’snapshot’ capabilities. It’s also nice to know that if I needed to launch this in production (there are no plans to do so, but you never know), I could upgrade the database “hardware” more or less instantly -D

If anyone has code or tools to help automate the management of all of this stuff, please send links! If I come up with any myself, I’ll most likely post it here.

Now that I have a customized AMI with all of my packages installed and my config changes made, I need to bundle this so that I can boot as many instances of this particular configuration as I want. An important note about bundling this *particular* image is that you MUST run ‘depmod -a; modprobe loop’ before bundling, since this process basically abstracts the manual process of bundling an image, which involves mounting a file as a volume, which requires a loopback mount.

The video I used to do the bundling is here, and if you can live through the disgustingly bad burps and chirps in the (Flash version) audio, it’s an excellent tutorial for bundling custom AMIs. While the process *is* pretty straightforward, it involves a number of steps, and the video goes through all of them, and it worked perfectly the first time through.

addthis_url = 'http%3A%2F%2Fwww.protocolostomy.com%2F2008%2F08%2F27%2Fmore-adventures-in-amazon-ec2-and-ebs%2F'; addthis_title = 'More+Adventures+in+Amazon+EC2+%28and+EBS%29'; addthis_pub = 'jonesy';

MySQL: Planet MySQL

Sustained IO on EBS == No Bueno

I have a small EC2 instance running with a 25GB EBS volume attached. It has a database on it that I need to manipulate by doing things like dropping indexes and creating new ones. This is on rather large (multi-GB, millions of rows) tables. After running one DROP INDEX operation that ran all day without finishing, I killed it and tried to see what was going on. Here’s the results of the first 10 minutes of testing:

-bash-3.2# dd if=/dev/zero of=/vol/128.txt bs=128k count=1000
1000+0 records in
1000+0 records out
131072000 bytes (131 MB) copied, 0.818328 seconds, 160 MB/s

This looks great. I’d love to get 160MB/s all the time. But wait! There’s more!

-bash-3.2# dd if=/dev/zero of=/vol/128.txt bs=128k count=100000
dd: writing `/vol/128.txt': No space left on device
86729+0 records in
86728+0 records out
11367641088 bytes (11 GB) copied, 268.191 seconds, 42.4 MB/s

Ok, well… that’s completely miserable. Let’s try something in between.

-bash-3.2# dd if=/dev/zero of=/vol/128.txt bs=128k count=10000
10000+0 records in
10000+0 records out
1310720000 bytes (1.3 GB) copied, 15.4684 seconds, 84.7 MB/s

So the performance gets cut in half when the number of 128k blocks is increased 10x. This kinda sucks. I’ll keep plugging along, but if anyone has hints or clues, let me know. If this is the way it’s going to be, then this is no place to run a production, IO-intensive (100,000s and maybe millions of writes per day, on top of reads) database.

addthis_url = 'http%3A%2F%2Fwww.protocolostomy.com%2F2008%2F08%2F27%2Fsustained-io-on-ebs-no-bueno%2F'; addthis_title = 'Sustained+IO+on+EBS+%3D%3D+No+Bueno'; addthis_pub = 'jonesy';

MySQL: Planet MySQL

Cloud computing with Amazon Web Services, Part 2: Storage in the cloud with Amazon Simple Storage Service (S3)

New introductory article on S3 written by one of the members of the Ylastic team published by IBM Developerworks.

technology: dzone.com: tech links

REST vs WS-* :: A comparison of SOA stacks

The debate continues. Here's a stack comparison diagram I found on the SOA Wiki so that neutral parties can get a perspective.

technology: dzone.com: tech links

Qi4j: REST EntityStore and SPARQL EntityFinder = rich client web apps!

From my work on SiteVision I've become quite fond of writing rich clients using applets or JavaWebStart, with Swing, and then connect back to the server for state. I can understand why not so many others are doing it though, since you more or less need a decent framework to handle all the issues, and as far as I know there aren't any around. Now I'm in the process of adding this functionality to Qi4j! There are two parts to using objects/entities on the client: finding them and loading/storing them. In Qi4j there are two interfaces EntityFinder and EntityStore which respectively deal with these things.

technology: dzone.com: tech links

Passenger Brings Rails Apps to Apache

For many years, Apache has been the de facto standard for Web site and application deployment. The open-source Web server, which was originally created as "a patchy" version of the original NCSA HTTP server, has become a highly modular, and customizable, piece of software that can handle nearly anything that an Web site might require. Nearly every open-source Web developer used Apache -- except for programmers using the Ruby on Rails framework, for whom Apache was a poor fit. Instead, Rails developers typically deployed with lighttpd or Mongrel, using Apache or nginx for the site's static components.

technology: dzone.com: tech links

Ylastic is now live!

An intuitive and powerful user interface for managing S3, EC2, SQS and SimpleDB, along with monitoring, alerts, reporting, and other goodies. If you are developing your applications using AWS, spend your valuable time building the app and not worrying about the minutiae of the AWS environment.

technology: dzone.com: tech links

Introduction to REST

This article is the first of a two part series by Red Hat's Bill Burke. In this article, Bill introduces the basic concepts of REST including RESTful architectural principles, addressability, the Uniform, constrained interface and stateless communication.

technology: dzone.com: tech links

SOA Security 101: Patching the Firewall Hole

Service-oriented architectures have opened and connected “black box” software implementations across enterprises, resulting in a new set of interoperable heterogeneous solutions with the common thread of standard protocols. While this level of integration is unprecedented for enterprise systems, it further muddies the water for application security. The objective of this article is to first introduce the new threats associated with service-oriented solutions, and then provide fundamental design considerations to mitigate the risks resulting from these threats. Atif Ghauri Introduce you with the problem and design considerations to reduce these treats.

technology: dzone.com: tech links

7 Reasons Why You Should Pursue Your Own Projects

A look at why freelancers should be doing some things own their own for themselves in addition to client work.

technology: dzone.com: tech links

Damien Katz: "The web is built on REST. Therefore REST is good" Bullshit

The only thing that's RESTful about 99% of the web is that it uses GET (even then many applications use GET wrong). The argument that REST is great because it provides standardized caching support, well that pretty much only applies to GET requests anyway, what about PUT and DELETE?

technology: dzone.com: tech links

WSO2 Data Services Tutorial

Data Services allows you to expose database objects as web services. This link contains comprehensive list of tutorials on WSO2 Data Services.

technology: dzone.com: tech links

Damien Katz: REST, I just don't get it

As the guy who created CouchDB, I should be a big cheerleader for RESTful architectures. But the truth is, I just don't get it. For CouchDB, REST makes absolutely insanely perfect sense. Read a document, edit, put the document back. Beautiful. But for most applications, enterprise or not, I don't see what the big win is.

technology: dzone.com: tech links

Why outsourcing sucks ?

Most of you don’t even need to read this post to know why outsourcing your software development work to cheaper countries may not ultimately help you. You already know why.

technology: dzone.com: tech links

Two Exhaustive Free Tools for Web Developers

If you're a developer, or would-be developer, working on any type of web-based project, there are a couple of free resources that I recommend for following web application standards, and mastering cutting-edge web development languages.

technology: dzone.com: tech links

Mozilla Delays Firefox 3.1 Beta, Announces Other Browser Updates

Mozilla has a whole roster of news headlines related to its browsers out today. In its about:Mozilla newsletter, the company has announced that a new version of the Camino browser is available (it's developed by the Camino Project, but is based on Mozilla's Gecko layout engine). Many Mac users love Camino for its lickety-split performance. Mozilla has also confirmed that a sixth milestone version of its upcoming mobile browser, dubbed Fennec, is out. And, as ZDNet reports, the beta of the next version of Firefox--version 3.1--has been delayed from August 19th until September 9th. Here are the details.

technology: dzone.com: tech links

Creating SOAP Message Handlers in 3 Simple Steps - Part 1

This tutorial takes a look at SOAP Message handlers and how easy it is to write handlers using JAX-WS 2.0. JAX-WS 2.0 allows both regular Java classes and stateless EJBs(Session beans) to be exposed as web services. The JAX-WS 2.0 is the core specification that defines the web services standard for Java EE 5 specification. JAX-WS 2.0 is an extension of the Java API for XML-RPC (JAX-RPC) 1.0.

technology: dzone.com: tech links

Web Application Security

How would you determine whether your website is being hacked or not? Read the way hacker steals the information and hacks your website. Moreover, how you can help preventing your website being hacked. IS YOUR WEBSITE HACKABLE? Some hackers, for example, will take advantage of web application vulnerabilities and may maliciously inject code within vulnerable web applications to trick users and redirect them towards phisphing sites. This technique is called Cross-Site Scripting and may be used even when the web servers and database engine contain no vulnerabilities themselves.

technology: dzone.com: tech links

Writing your first Spring web service in WSO2 WSF/Spring

WSO2 WSF/Spring is a project build on top of Apache Axis2 to provide an easy way to way to make Spring beans into Web services. I blogged about a WSF/Spring demo app in my last post and now I am going to use that demo app to expose a Spring bean as a web service using the code first approach.We will also invoke the service and make sure that it is working as expected. Good news is to try out all these, it won't take more than 10 minutes.

technology: dzone.com: tech links

JavaFX Script and JSON Weather service

Brian Goetz recently completed the JavaFX script class "javafx.async.AsyncJsonCall" that allows one to issue a JSON webservice call in the background. Once the call is complete, a call back function "onDone" is called that indicates whether or not the call succeeded. This blog includes an example of how this JSON call might be done.

technology: dzone.com: tech links

Why All Flash Game Developers NEED A Website

The internet has grown much since its creation in 1969. It is still growing rapidly today. As a flash game developer, you must grab a spot in this ocean of links if you want to have a better experience developing your flash game.

technology: dzone.com: tech links

Testing your web application

Web applications are becoming more prevalent and increasingly more sophisticated, and as such they are critical to almost all major online businesses. As with most security issues involving client/server communications, Web application vulnerabilities generally stem from improper handling of client requests and/or a lack of input validation checking on the part of the developer.

technology: dzone.com: tech links

Asynchronous Databases: DBSlayer and HTTP

Scale your database with the help of an asynchronous DB access layer - how to guide for DBSlayer and MySQL.

technology: dzone.com: tech links

Developing Portlets using JSF, Ajax, and Seam (Part 1 of 3)

Portals have gained a lot of ground over the past few years, both in the enterprise and with the new enhancements of the portlet 2.0 (JSR 286) specification. The new 2.0 portlets allow you many freedoms in aggregating different applications and presenting them in different windows on one page. And of course, you get authentication, sophisticated personalization features, and better ways of handling AJAX out of the box.

technology: dzone.com: tech links

Practical Complex Event Processing Using JBoss

Max Yankelevich of Freedom Open Source Solutions walks attendees through a practical case study of a large Trust/Wealth Management Institution and demonstrates how CEP helped solve a complex business problem – charging their customers more money in fees. The use of JBoss Application Platform including JBoss Rules, jBPM and JBoss Messaging, were leveraged to implement the CEP Architecture and earned the client an extra $20M over the course of five years.

technology: dzone.com: tech links

JBossESB 4.4 have a new zero-code webservice invoker

We are proud to announce that recently released JBossESB 4.4 contain a wise based implementation of webservice client invoker. In a nutshell it is a zero-code webservice caller supporting smooks based mapping, and pluggable JAX-WS handler.

technology: dzone.com: tech links

Google App Engine performance - Part 1

Okay its been a few weeks now and I thought I'd take a look at the performance and how spiky it was. The highest hit element was the gadget with a few thousand hits so I took the data from the "default" image (-2,-1), (1,1) and looked at the performance over time.

technology: dzone.com: tech links

Page 1 | Next >>