Posted by
seon on Thursday, July 10
This is probably old news, but I still get excited thinking about all the interesting solutions that are possible now using Mule and Gigaspaces for SOA problems requiring low latency and highly scalable architectures.
Gigaspaces released 6.5 with API integration with Mule 2.0 … this is just plain awesome. You can use Gigaspaces as the transport (e.g. in place of JMS) and quickly get a SBA up and running utilizing the same concepts I used at RHG when we were servicing B2B problems. You also get the advantage of the clustering ability and fault tolerance that comes with Gigaspaces – which is just pure sex – not to mention all the other great features that come with this advanced Javaspaces implementation (i.e. management tools, monitoring tools, data partitioning, performance features like batching).
Gigaspaces would have made a fantastic backend transport and shared data grid in place of ActiveMQ JMS, but at the time it wasn’t as fully integrated with Mule. We would have been able to solve alot of the high availability and clustering concerns regarding single points of failure with the messaging database and JMS brokers. I never felt comfortable with ActiveMQ’s clustering and fail-over features. Configuration seemed a bit fussy and it doesn’t seem to be as easy to scale out as a Gigaspace cluster.
Posted by
seon on Wednesday, July 09
Google’s awesome, they release some nifty software to the open source community. Here is the link to Google’s Protocol Buffer and more details are available on Google’s Open Source Blog
From what I can tell, it’s a solid format that can replace XML in most scenarios. It’s not as easily human-readable as XML, but then again from experience not many humans are actively reading the XML anyways. The proto format reminds me of a json structure, minus the curly brackets. Also, from skimming the proto java documentation there isn’t support for primitive arrays (at least for java). You should be using List containers instead along with the proto “repeated” scalar.
They include code for data binding source .proto files to C++, Java and Python. This makes it easier to adopt in your next project. I think this is a good data format for internal use, but you’ll probably still have to deal with XML/SOAP and other RPC formats (JSON, etc) on your external interfaces. This would require transforming the internal data format (.proto) into the external format. There is also stub generating code for producing server interfaces that you can drop into your native rpc server implementations. This is pretty cool also.
Hmmm, I see some useful Mule and Camel transformers that could be made to take advantage of this new format. And possibly service adaptors for Mule and Camel too.
Posted by
seon on Monday, September 03
I’ve replaced tcpmon with ngrep as my tool of preference for debugging service interaction while working with Mule. Tcpmon required modifications to service configurations in order pass data through the tcpmon proxies for monitoring. However ngrep is transparent and doesn’t require these configuration changes. It has a simple and fast text interface. No complicated gui to navigate. The output can be piped to grep or saved to file. Run on *nix and Win32. Sweet!
On OSX (version 10.4.10) I decided to compile and install the latest ngrep using the following steps…
1
2
3
4
5
6
7
|
wget http://prdownloads.sourceforge.net/ngrep/ngrep-1.45.tar.bz2?download
tar -jxvf ngrep-1.45.tar.bz2
cd ngrep-1.45
./configure --prefix=/usr/local
make
sudo make install
|
I use ifconfig to determine the interface I want to monitor with ngrep…
1
2
3
4
5
6
7
8
9
|
ifconfig
en1: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
inet6 fe80::216:cbff:feb7:5de%en1 prefixlen 64 scopeid 0x5
inet 172.16.1.3 netmask 0xffffff00 broadcast 172.16.1.255
ether 00:16:cb:b7:05:de
media: autoselect status: active
supported media: autoselect
|
Then startup ngrep on eth1 monitoring port 80. The -Wbyline detects linebreaks in the packet data…
1
2
3
4
5
|
sudo ngrep -Wbyline -d en1 port 80
Password:
interface: en1 (172.16.1.0/255.255.255.0)
filter: (ip) and ( port 80 )
|
Example ngrep output…
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
####
T 172.16.1.3:57867 -> a.b.c.d:80 [AP]
GET /usage.html HTTP/1.1.
Host: ngrep.sourceforge.net.
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6.
Accept: HTTP Accept=text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5.
Accept-Language: en-us,en;q=0.5.
Accept-Encoding: gzip,deflate.
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7.
Keep-Alive: 300.
Connection: keep-alive.
Referer: http://ngrep.sourceforge.net/.
Cookie: __utmz=191645736.1188003977.1.1.utmccn=(referral)|utmcsr=jibx.sourceforge.net|utmcct=/mail-lists.html|utmcmd=referral; __utma=191645736.2030039243.1188003977.1188003977.1188003977.1.
.
##
T a.b.c.d:80 -> 172.16.1.3:57867 [A]
HTTP/1.0 200 OK.
Date: Mon, 03 Sep 2007 21:43:32 GMT.
Server: Apache/1.3.33 (Unix) PHP/4.3.10.
Last-Modified: Thu, 24 Feb 2005 04:41:08 GMT.
ETag: "219bb8-4827-421d5ae4".
Accept-Ranges: bytes.
Content-Length: 18471.
Content-Type: text/html.
X-Cache: MISS from sims.sofast.net.
Connection: keep-alive.
.
<?xml version="1.0" encoding="UTF-8"?>
<!doctype html public "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head><title>ngrep - network grep</title>
</head>
<style>
body {
text-align: center;
padding: 20px;
margin: 0;
background: #888;
color: #000;
font: 10px/15px verdana, geneva, helvetica, arial, sans-serif;
}
h2 {
text-align: center;
margin: auto;
width: 600px;
}
...snip...
|