<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="http://unixmonkeys.com/amnesiac/blog/gadgets/Blog/templates/atom.xsl"?><feed version="0.3" xmlns="http://purl.org/atom/ns#" xml:lang="en-us">
<title type="text/plain" mode="xml">Amnesiac's weblog</title>
<link rel="alternate" type="text/html" href="http://unixmonkeys.com/amnesiac/blog" title="Object" />
	<author>
		<name>Marco Antonio Manzo</name>
		<url>http://unixmonkeys.com/amnesiac/blog</url>
		<email>amnesiac@unixmonkeys.com</email>
	</author>
<tagline type="text/plain" mode="xml">A webpage to place all my rants and undefined behaviors</tagline>
<generator>JAWS 0.6.1</generator>
<copyright type="text/plain" mode="xml">2006, Marco Antonio Manzo</copyright>
<modified>2007-04-10T13:47:32-05:00</modified>
<entry>
	<title type="text/plain" mode="xml"><![CDATA[ Seminario Perl Básico en el DF ]]></title>
	<link rel="alternate" type="text/html" href="http://unixmonkeys.com/amnesiac/blog/index.php?gadget=Blog&amp;action=SingleView&amp;id=9" title="Object" />
	<author>
		<name>Marco Antonio Manzo</name>
		<url>http://unixmonkeys.com/amnesiac/blog</url>
		<email>amnesiac@unixmonkeys.com</email>
	</author>
	<id>http://unixmonkeys.com/amnesiac/blog/9</id>
	<modified>2007-04-10T13:47:32-05:00</modified>
	<issued>2007-04-10T13:41:18-05:00</issued>
	<created>2007-04-10T13:41:18-05:00</created>
	<summary type="text/html" mode="escaped"><![CDATA[ 	<p>Cómo este post no tendría mucho chiste escribirlo en inglés (y creo que es el primero que escribo en español, claro, no significa que realmente escriba mucho), me permito utilizar mi espacio de ideas aleatorias (llámese blog)¡ para hacer un anuncio:<br />
<div align="center">
<a href="http://perlenespanol.baboonsoftware.com/training" target="_blank"><br />
<img src="http://perlenespanol.baboonsoftware.com/training/img/logo.png" border="0" /></a></div>
El sitio de <a href="http://perlenespanol.baboonsoftware.com">Perl en Español</a> y un servidor les extiende una cordial invitación para asistir al seminario de <b>Perl Básico</b> que se llevará a cabo los días 12-14 de Mayo del presente año (si, los 3 días son de seminario) en la Ciudad de México, en las instalaciones de la <i>CANIETI Sur</i>.</p>
	<p>El seminario es teórico-práctico y será impartido por Uriel Lizama (autor de Perl en Español) y su servidor. El principal objetivo es presentar una introducción completa y amena al lenguaje, así como proveer de las herramientas y técnicas necesarias para comenzar a desarrollar aplicaciones de uso múltiple y con esto brindarte la confianza de mezclar dichos conocimientos con alguna otra tecnología. </p>
	<p>La información completa del seminario, datos, costos y temario se encuentran en la haciendo click a la imagen que aparece en la parte de arriba.</p>
	<p>Saludos.
</p>
 ]]></summary>
	<content type="text/html" mode="escaped"><![CDATA[ 	<p>Cómo este post no tendría mucho chiste escribirlo en inglés (y creo que es el primero que escribo en español, claro, no significa que realmente escriba mucho), me permito utilizar mi espacio de ideas aleatorias (llámese blog)¡ para hacer un anuncio:<br />
<div align="center">
<a href="http://perlenespanol.baboonsoftware.com/training" target="_blank"><br />
<img src="http://perlenespanol.baboonsoftware.com/training/img/logo.png" border="0" /></a></div>
El sitio de <a href="http://perlenespanol.baboonsoftware.com">Perl en Español</a> y un servidor les extiende una cordial invitación para asistir al seminario de <b>Perl Básico</b> que se llevará a cabo los días 12-14 de Mayo del presente año (si, los 3 días son de seminario) en la Ciudad de México, en las instalaciones de la <i>CANIETI Sur</i>.</p>
	<p>El seminario es teórico-práctico y será impartido por Uriel Lizama (autor de Perl en Español) y su servidor. El principal objetivo es presentar una introducción completa y amena al lenguaje, así como proveer de las herramientas y técnicas necesarias para comenzar a desarrollar aplicaciones de uso múltiple y con esto brindarte la confianza de mezclar dichos conocimientos con alguna otra tecnología. </p>
	<p>La información completa del seminario, datos, costos y temario se encuentran en la haciendo click a la imagen que aparece en la parte de arriba.</p>
	<p>Saludos.
</p>
 ]]></content>
</entry>
<entry>
	<title type="text/plain" mode="xml"><![CDATA[ It's been a while... ]]></title>
	<link rel="alternate" type="text/html" href="http://unixmonkeys.com/amnesiac/blog/index.php?gadget=Blog&amp;action=SingleView&amp;id=7" title="Object" />
	<author>
		<name>Marco Antonio Manzo</name>
		<url>http://unixmonkeys.com/amnesiac/blog</url>
		<email>amnesiac@unixmonkeys.com</email>
	</author>
	<id>http://unixmonkeys.com/amnesiac/blog/7</id>
	<modified>2007-02-09T22:47:11-05:00</modified>
	<issued>2007-02-09T09:59:01-05:00</issued>
	<created>2007-02-09T09:59:01-05:00</created>
	<summary type="text/html" mode="escaped"><![CDATA[ 	<p>Definitely.... I don't make honors to the word "blogger". It's been more than 6 months since my last post and, as expected, lots of things happened while time was passing by (and of course I forgot about the blog).</p>
	<p>Let's see where to start... First of all, and maybe the most important and noteworthy event is.... that I'm getting <b>married</b> next year!. Yeah... after all, life with <a href="http://www.flickr.com/photos/marcoam/246593903/">Dafne</a> is all fun and nifty. A very productive, interesting and learning experience was acquired by those seven years of amazing relationship that needed to take us to a different landscape, a different challenge and of course, a whole different adventure. So... about that, everything is going smooth; planning, wishing and why not? dreaming.</p>
	<p>On the other hand, I've been very busy (fortunately) at work. I'm getting more involved in it day by day, improving certain aspects/components of the project, proposing design ideas and best practices and learning all about the business within. </p>
	<p>However, my personal projects didn't get my attention appropriately, they were set <i>on-hold</i> for a very big period of time, but this year (yeah.... right), hopefully, I will continue where I was left.</p>
	<p>In fact... I've been working in other projects, mostly related to my work. I wrote a <i>nice</i> JDBC framework (Java) based mostly on <a href="http://www.springframework.org/">Spring</a>'s JDBC model, integrating some design patterns like Abstract Factory, Factory method, Template pattern and Façade.</p>
	<p>What about <a href="/amnesiac/blog/index.php?gadget=Blog&#038;action=SingleView&#038;id=NetRMI__Second_Draft">Net::RMI</a>? Well... fortunately it is almost finished. Implementation is done, testing is almost done and the only thing left is documentation. Yeah, I need to document every user-land class and write more examples for it. I really hope to put it online very soon, so it will be available through CPAN.</p>
	<p>Since I tend to procrastinate (often)... my mind likes to put challenges on me. Last time I was thinking about the idea of writing a series of small articles about design pattern implementations, in at least, the languages I like (<i>ex.</i> Perl and Java). Considering something like drawbacks, pros, implementation issues, design overview and of course: code. All of this, with my very very humble point of view and sense of "where is this useful".</p>
	<p>At the end, we have a whole year in front of us again, I will try to make a good use of it, and, putting all my efforts, I'll try to make all those promises and wishes become true.</p>
	<p>Until then.... cya.
</p>
 ]]></summary>
	<content type="text/html" mode="escaped"><![CDATA[ 	<p>Definitely.... I don't make honors to the word "blogger". It's been more than 6 months since my last post and, as expected, lots of things happened while time was passing by (and of course I forgot about the blog).</p>
	<p>Let's see where to start... First of all, and maybe the most important and noteworthy event is.... that I'm getting <b>married</b> next year!. Yeah... after all, life with <a href="http://www.flickr.com/photos/marcoam/246593903/">Dafne</a> is all fun and nifty. A very productive, interesting and learning experience was acquired by those seven years of amazing relationship that needed to take us to a different landscape, a different challenge and of course, a whole different adventure. So... about that, everything is going smooth; planning, wishing and why not? dreaming.</p>
	<p>On the other hand, I've been very busy (fortunately) at work. I'm getting more involved in it day by day, improving certain aspects/components of the project, proposing design ideas and best practices and learning all about the business within. </p>
	<p>However, my personal projects didn't get my attention appropriately, they were set <i>on-hold</i> for a very big period of time, but this year (yeah.... right), hopefully, I will continue where I was left.</p>
	<p>In fact... I've been working in other projects, mostly related to my work. I wrote a <i>nice</i> JDBC framework (Java) based mostly on <a href="http://www.springframework.org/">Spring</a>'s JDBC model, integrating some design patterns like Abstract Factory, Factory method, Template pattern and Façade.</p>
	<p>What about <a href="/amnesiac/blog/index.php?gadget=Blog&#038;action=SingleView&#038;id=NetRMI__Second_Draft">Net::RMI</a>? Well... fortunately it is almost finished. Implementation is done, testing is almost done and the only thing left is documentation. Yeah, I need to document every user-land class and write more examples for it. I really hope to put it online very soon, so it will be available through CPAN.</p>
	<p>Since I tend to procrastinate (often)... my mind likes to put challenges on me. Last time I was thinking about the idea of writing a series of small articles about design pattern implementations, in at least, the languages I like (<i>ex.</i> Perl and Java). Considering something like drawbacks, pros, implementation issues, design overview and of course: code. All of this, with my very very humble point of view and sense of "where is this useful".</p>
	<p>At the end, we have a whole year in front of us again, I will try to make a good use of it, and, putting all my efforts, I'll try to make all those promises and wishes become true.</p>
	<p>Until then.... cya.
</p>
 ]]></content>
</entry>
<entry>
	<title type="text/plain" mode="xml"><![CDATA[ Net::RMI - Second Draft ]]></title>
	<link rel="alternate" type="text/html" href="http://unixmonkeys.com/amnesiac/blog/index.php?gadget=Blog&amp;action=SingleView&amp;id=5" title="Object" />
	<author>
		<name>Marco Antonio Manzo</name>
		<url>http://unixmonkeys.com/amnesiac/blog</url>
		<email>amnesiac@unixmonkeys.com</email>
	</author>
	<id>http://unixmonkeys.com/amnesiac/blog/5</id>
	<modified>2007-02-09T11:54:54-05:00</modified>
	<issued>2006-09-09T23:15:35-05:00</issued>
	<created>2006-09-09T23:15:35-05:00</created>
	<summary type="text/html" mode="escaped"><![CDATA[ 	<p>It's been a while since my last post (again), I have been very busy at work and playing with some Java EE stuff lately. However, I enjoy sharing some of my free time to my personal and open source projects.</p>
	<p>A week ago, I just gave a speech about <i>Unix Systems Programming</i>, Chapter 3 - <i>Working with files</i> for the Open Source Community at work. It was practically a two-hour technical discussion on how a Unix-like system sees/handles files and a general overview of syscalls, user-level calls and other topics like the multipurpose <i>fcntl</i> syscall and memory mapped I/O. It was quite fun.</p>
	<p>The other side of the story is about <b>Net::RMI</b>, my pure-Perl Remote Method Invocation implementation. Yes, the project is going quite <i>slow</i>, but the design and implementation is near to its final release. While coding the first version of the API, I discovered some design flaws that made me rethink the way the server part was doing its job and also rethink the request-response interchange between the proxy object and the server object.</p>
	<p>Here's the UML diagram for the second draft: </p>
	<div align="center"> <a href="/amnesiac/net-rmi2.jpg"><img src="/amnesiac/net-rmi2_small.jpg" alt="Click to enlarge" /></a></div>
	<p>As you can see, there are several changes to the API compared to the new version, new classes and a whole new idea on how stuff works internally, In the end, for the user it needs to be transparent.</p>
	<p>There's a bad symbol usage in the diagram, the <i>prmiregistry</i>, since this is a class diagram and prmiregistry is not a class, is an independent daemon that waits for requests from the Net::RMI::Registry class. But I wanted to use it to remember that Net::RMI::Registry depends on that process.</p>
	<p>Well, we will see what happens, I really hope to finish this stuff as fast as I can, provide a complete test suite and some code examples for the public release.</p>
	<p>Until then, have fun.
</p>
 ]]></summary>
	<content type="text/html" mode="escaped"><![CDATA[ 	<p>It's been a while since my last post (again), I have been very busy at work and playing with some Java EE stuff lately. However, I enjoy sharing some of my free time to my personal and open source projects.</p>
	<p>A week ago, I just gave a speech about <i>Unix Systems Programming</i>, Chapter 3 - <i>Working with files</i> for the Open Source Community at work. It was practically a two-hour technical discussion on how a Unix-like system sees/handles files and a general overview of syscalls, user-level calls and other topics like the multipurpose <i>fcntl</i> syscall and memory mapped I/O. It was quite fun.</p>
	<p>The other side of the story is about <b>Net::RMI</b>, my pure-Perl Remote Method Invocation implementation. Yes, the project is going quite <i>slow</i>, but the design and implementation is near to its final release. While coding the first version of the API, I discovered some design flaws that made me rethink the way the server part was doing its job and also rethink the request-response interchange between the proxy object and the server object.</p>
	<p>Here's the UML diagram for the second draft: </p>
	<div align="center"> <a href="/amnesiac/net-rmi2.jpg"><img src="/amnesiac/net-rmi2_small.jpg" alt="Click to enlarge" /></a></div>
	<p>As you can see, there are several changes to the API compared to the new version, new classes and a whole new idea on how stuff works internally, In the end, for the user it needs to be transparent.</p>
	<p>There's a bad symbol usage in the diagram, the <i>prmiregistry</i>, since this is a class diagram and prmiregistry is not a class, is an independent daemon that waits for requests from the Net::RMI::Registry class. But I wanted to use it to remember that Net::RMI::Registry depends on that process.</p>
	<p>Well, we will see what happens, I really hope to finish this stuff as fast as I can, provide a complete test suite and some code examples for the public release.</p>
	<p>Until then, have fun.
</p>
 ]]></content>
</entry>
<entry>
	<title type="text/plain" mode="xml"><![CDATA[ Having fun - p5bot: A pure perl pluggable IRC bot ]]></title>
	<link rel="alternate" type="text/html" href="http://unixmonkeys.com/amnesiac/blog/index.php?gadget=Blog&amp;action=SingleView&amp;id=4" title="Object" />
	<author>
		<name>Marco Antonio Manzo</name>
		<url>http://unixmonkeys.com/amnesiac/blog</url>
		<email>amnesiac@unixmonkeys.com</email>
	</author>
	<id>http://unixmonkeys.com/amnesiac/blog/4</id>
	<modified>2006-07-13T16:44:26-05:00</modified>
	<issued>2006-07-07T13:07:13-05:00</issued>
	<created>2006-07-07T13:07:13-05:00</created>
	<summary type="text/html" mode="escaped"><![CDATA[ 	<p>Some time has passed since my last entry, <i>lots</i> of fun has been invading my whole life but that's something that I will talk about later. For now, let's get in touch with the <i>latest</i> news about projects.</p>
	<p>Work has been tough, I've been doing several stuff including some speeches, courses and like always... code. In my free time, I have been working on the <a href="http://unixmonkeys.com/amnesiac/blog/index.php?gadget=Blog&#038;action=SingleView&#038;id=NetRMI__First_draft">Net::RMI </a> Perl module, that it is going slow, but going.</p>
	<p>On the other hand, I have been helping the guys of <a href="http://perlenespanol.baboonsoftware.com">Perl en Español</a> to offer some interfactive tutorials about Perl via IRC. The first session of the first tutorial was a <b>success</b>, we had more people than expected and still looking forward for more.</p>
	<p>Nevertheless, while preparing and checking the first tutorial contents with Uriel, the owner of Perl en Español, I wrote a small irc bot for the channel, an irc bot that executes perl code in a <i>secure</i> and resource-limited enviroment, that will help the interactive tutorials. However, that bot was written for a very specific task, and I didn't really like it, so, I changed that bot to become a pluggable one.</p>
	<p><b>p5bot</b> is written entirely in Perl, using an Event-Driven programming style thanks to the power of <a href="http://poe.perl.org">POE</a>. You can use it anywhere, anytime, for any needs. You can add any plugin you want to perform whatever specific task. Adding (writing) plugins is very easy, you just need to follow some conventions ( <i>ex. inheriting from Plugin.pm</i>), or you can run more tasks in a secure enviroment (<i>inheriting from TaskRunner.pm</i>).</p>
	<p>You can get the source code via svn:</p>
	<p><code>svn co http://sesshoumaru.homeunix.net/svn/p5bot</code></p>
	<p>or check the src code from <a href="http://sesshoumaru.homeunix.net/svnweb/amnesiac/browse/p5bot">svnweb</a>.</p>
	<p>By the way, congratulations <a href="mailto:uriel@baboonsoftware.com">Uriel</a> for providing the first interactive tutorial about "Perl Basics". More tutorials are in the way, check the information and schedules at <a href="http://perlenespanol.baboonsoftware.com">Perl en Español</a>.</p>
 ]]></summary>
	<content type="text/html" mode="escaped"><![CDATA[ 	<p>Some time has passed since my last entry, <i>lots</i> of fun has been invading my whole life but that's something that I will talk about later. For now, let's get in touch with the <i>latest</i> news about projects.</p>
	<p>Work has been tough, I've been doing several stuff including some speeches, courses and like always... code. In my free time, I have been working on the <a href="http://unixmonkeys.com/amnesiac/blog/index.php?gadget=Blog&#038;action=SingleView&#038;id=NetRMI__First_draft">Net::RMI </a> Perl module, that it is going slow, but going.</p>
	<p>On the other hand, I have been helping the guys of <a href="http://perlenespanol.baboonsoftware.com">Perl en Español</a> to offer some interfactive tutorials about Perl via IRC. The first session of the first tutorial was a <b>success</b>, we had more people than expected and still looking forward for more.</p>
	<p>Nevertheless, while preparing and checking the first tutorial contents with Uriel, the owner of Perl en Español, I wrote a small irc bot for the channel, an irc bot that executes perl code in a <i>secure</i> and resource-limited enviroment, that will help the interactive tutorials. However, that bot was written for a very specific task, and I didn't really like it, so, I changed that bot to become a pluggable one.</p>
	<p><b>p5bot</b> is written entirely in Perl, using an Event-Driven programming style thanks to the power of <a href="http://poe.perl.org">POE</a>. You can use it anywhere, anytime, for any needs. You can add any plugin you want to perform whatever specific task. Adding (writing) plugins is very easy, you just need to follow some conventions ( <i>ex. inheriting from Plugin.pm</i>), or you can run more tasks in a secure enviroment (<i>inheriting from TaskRunner.pm</i>).</p>
	<p>You can get the source code via svn:</p>
	<p><code>svn co http://sesshoumaru.homeunix.net/svn/p5bot</code></p>
	<p>or check the src code from <a href="http://sesshoumaru.homeunix.net/svnweb/amnesiac/browse/p5bot">svnweb</a>.</p>
	<p>By the way, congratulations <a href="mailto:uriel@baboonsoftware.com">Uriel</a> for providing the first interactive tutorial about "Perl Basics". More tutorials are in the way, check the information and schedules at <a href="http://perlenespanol.baboonsoftware.com">Perl en Español</a>.</p>
 ]]></content>
</entry>
<entry>
	<title type="text/plain" mode="xml"><![CDATA[ A simple Perl contest... ]]></title>
	<link rel="alternate" type="text/html" href="http://unixmonkeys.com/amnesiac/blog/index.php?gadget=Blog&amp;action=SingleView&amp;id=3" title="Object" />
	<author>
		<name>Marco Antonio Manzo</name>
		<url>http://unixmonkeys.com/amnesiac/blog</url>
		<email>amnesiac@unixmonkeys.com</email>
	</author>
	<id>http://unixmonkeys.com/amnesiac/blog/3</id>
	<modified>2006-04-18T09:54:00-05:00</modified>
	<issued>2006-04-18T09:47:14-05:00</issued>
	<created>2006-04-18T09:47:14-05:00</created>
	<summary type="text/html" mode="escaped"><![CDATA[ 	<p>Well, the last week was an improductive one, I took some vacations, I went to Mexico City to meet some good old friends, it was pretty nice. I haven't worked enough on <i>Net::RMI</i> but oh well, life is not always fair, we need to enjoy so many things at once.</p>
	<p>The current status of <i>Net::RMI</i> is actually good, I'm writting the Net::RMI::Registry and the prmiregistry process server, which will handle all the object activation and registration.</p>
<p>Anyways... yesterday while reading <a href="http://perlenespanol.baboonsoftware.com">Perl en Español</a> I found a post about a small Perl contest. This contest tests your parsing skills ( in a small scale ), what you need to do is to parse a certain file with a given format, in this case a .srt file, which is a movie subtitiles file format.</p>
	<p>The program accepts a filename ( the srt file ) and an amount of time to be added/substracted to each dialog. The fun part is that you cannot use any of the subtitle parsing modules from CPAN and that you need to produce a short/clean code. The output will be sent to STDOUT with the same format as the input file with each dialog modified.</p>
	<p>For Spanish readers, here's the <a href="http://perlenespanol.baboonsoftware.com/foro/viewtopic.php?p=3765">post</a>, you can read all the details from there. </p>
	<p>Here's my <a href="/amnesiac/subparse.htm">solution</a> (the post has also my solution).</p>
	<p>Nice eh? well, laziness is not always <i>that</i> bad, Have fun!.
</p>
 ]]></summary>
	<content type="text/html" mode="escaped"><![CDATA[ 	<p>Well, the last week was an improductive one, I took some vacations, I went to Mexico City to meet some good old friends, it was pretty nice. I haven't worked enough on <i>Net::RMI</i> but oh well, life is not always fair, we need to enjoy so many things at once.</p>
	<p>The current status of <i>Net::RMI</i> is actually good, I'm writting the Net::RMI::Registry and the prmiregistry process server, which will handle all the object activation and registration.</p>
<p>Anyways... yesterday while reading <a href="http://perlenespanol.baboonsoftware.com">Perl en Español</a> I found a post about a small Perl contest. This contest tests your parsing skills ( in a small scale ), what you need to do is to parse a certain file with a given format, in this case a .srt file, which is a movie subtitiles file format.</p>
	<p>The program accepts a filename ( the srt file ) and an amount of time to be added/substracted to each dialog. The fun part is that you cannot use any of the subtitle parsing modules from CPAN and that you need to produce a short/clean code. The output will be sent to STDOUT with the same format as the input file with each dialog modified.</p>
	<p>For Spanish readers, here's the <a href="http://perlenespanol.baboonsoftware.com/foro/viewtopic.php?p=3765">post</a>, you can read all the details from there. </p>
	<p>Here's my <a href="/amnesiac/subparse.htm">solution</a> (the post has also my solution).</p>
	<p>Nice eh? well, laziness is not always <i>that</i> bad, Have fun!.
</p>
 ]]></content>
</entry>
<entry>
	<title type="text/plain" mode="xml"><![CDATA[ Net::RMI - First draft ]]></title>
	<link rel="alternate" type="text/html" href="http://unixmonkeys.com/amnesiac/blog/index.php?gadget=Blog&amp;action=SingleView&amp;id=2" title="Object" />
	<author>
		<name>Marco Antonio Manzo</name>
		<url>http://unixmonkeys.com/amnesiac/blog</url>
		<email>amnesiac@unixmonkeys.com</email>
	</author>
	<id>http://unixmonkeys.com/amnesiac/blog/2</id>
	<modified>2006-04-07T01:09:17-05:00</modified>
	<issued>2006-04-06T22:57:35-05:00</issued>
	<created>2006-04-06T22:57:35-05:00</created>
	<summary type="text/html" mode="escaped"><![CDATA[ 	<p>I've been working in a small personal Perl project named <i>Net::RMI</i>. Net::RMI is a pure Perl RPC (Remote Procedure Calls)  library that will allow programmers to build simple ( but not less powerful ) distributed system applications providing an easy object oriented interface.</p>
	<p>Anyways, what is RPC? Without going into too much details, RPC is a client-server protocol that allows an application to call/invoke a remote function that is/isn't in the same host, giving us the illusion that it was a mere local function call.</p>
<p>When speaking in  the Object Oriented lingo, normally this is also known as  <i>Remote Method Invocation</i>, but isn't this a bit too much to worry about? what about all the networking layer behind this? what about all the data marshaling/serialization behind this? what about error handling and reliability?. Well, most of the existent libraries for different languages deal with all of these issues, say <a href="http://simla.colostate.edu/~mabrake/">CORBA</a> for the C++ part ( can be used in more languages ), <a href="http://pyro.sourceforge.net/">Pyro</a> at Python's side and Java and its <a href="http://java.sun.com/j2se/1.4.2/docs/guide/rmi/spec/rmiTOC.html">RMI</a> library, in which this module is mostly based ( the protocol ).</p>
<p>The model is <i>easy</i>, let's use the following diagram and explain it quickly :</p>
	<p><a href="/amnesiac/net-rmi.png" align="center"> <img src="/amnesiac/tmb_net-rmi.png" alt="Click to enlarge..." border="0" align="center" /></a></p><div style="font-size: 10px">Click to enlarge...</div>
<br />
We have 3 main actors: <i>Net::RMI::Client</i>, <i>Net::RMI::Registry</i> and <i>Net::RMI::Server</i>.  We have other classes that play an important part in the core application, just to mention them: <i>Storable</i>, <i>IO::Socket::INET</i>, <i>Net::RMI::Exception</i>, <i>Net::RMI::Base</i> and <i>POE::Component::Server::TCP</i>.</p>
	<p>The flow of a Net::RMI application looks like this:<br />
First of all, we need to create our RemoteClass class, that will have all the implementation of the methods that are going to be called remotely, but how are we supposed to do this in Perl? Well, we're going to use one of the Perl's <i>darker</i> features, named <i>subroutine attributes</i>, like this:<br />
<pre>
package RemoteClass;
sub foo : remote {
   # here goes the implementation...
   # and other cool stuff
}
1;
</pre>
With this, we're just "telling" the interpreter that this method has an attribute named _remote_, what does this mean? nothing, if we don't do something with it, it means nothing and the interpreter will cry. This is where the Net::RMI::Base class enters the game. A piece of cake, what we will need to do is, inherit from Net::RMI::Base class in our implementation class, with this, we ensure that our parent class handles all the stuff needed to make the <i>remote</i> attributes mean something.</p>
	<p>We have our implementation class ready, now what? Now, we need to play with Net::RMI::Server class, how? easy again, we just need to create a Server class that will inherit all the functionality from Net::RMI::Server, and inside it  create the implementation class objects in order to register them into the <i>prmiregistry</i>. Erm....., how? using one of the methods in Net::RMI::Registry for registering objects. We have all our objects registered, now, we need to fire up the server calling the <i>start()</i> method and start waiting for requests.</p>
	<p>That's all about the Server part, what about the registry? we said before that we needed to register objects into a registry, what does that mean? the <i>prmiregistry</i> is a process that we need to run in order to map objects to their host/port and interface information (like a nameserver), so the client will be able to fetch remote objects. The Net::RMI::Registry class provides the interface to talk to the registry process.</p>
	<p>Now, in the client side, in order to use remote objects we need to lookup for them, where? from the registry, using the <i>Net::RMI::Registry->lookup()</i> method, passing an <i>URI</i> like this: <i>prmi://host:port/obj_name</i>, if obj_name exists, it will return a Net::RMI::Client object with all the information needed to invoke methods from the implementation class.<br />
 What is this Net::RMI::Client object thing? This is a <i>proxy object</i>, that is, provides the interface to the implementation class that will make us think we're invoking those methods locally, but behind the scenes, it has all the machinery necessary to pass information to the server object and to parse the response from it (parameters serialization/marshalling, all the socket stuff, etc).</p>
	<p>If everything went alright, we can now invoke any of the methods declared as "remote" in our implementation class, without worrying much about the details.</p>
	<p>What about reliability and error handling? Good question, I will leave out those topics for another post.</p>
	<p>I hope I can finish the first working version soon, so my examples can be using code instead of tons of empty words, because at the end, we learn a lot by looking at code.</p>
 ]]></summary>
	<content type="text/html" mode="escaped"><![CDATA[ 	<p>I've been working in a small personal Perl project named <i>Net::RMI</i>. Net::RMI is a pure Perl RPC (Remote Procedure Calls)  library that will allow programmers to build simple ( but not less powerful ) distributed system applications providing an easy object oriented interface.</p>
	<p>Anyways, what is RPC? Without going into too much details, RPC is a client-server protocol that allows an application to call/invoke a remote function that is/isn't in the same host, giving us the illusion that it was a mere local function call.</p>
<p>When speaking in  the Object Oriented lingo, normally this is also known as  <i>Remote Method Invocation</i>, but isn't this a bit too much to worry about? what about all the networking layer behind this? what about all the data marshaling/serialization behind this? what about error handling and reliability?. Well, most of the existent libraries for different languages deal with all of these issues, say <a href="http://simla.colostate.edu/~mabrake/">CORBA</a> for the C++ part ( can be used in more languages ), <a href="http://pyro.sourceforge.net/">Pyro</a> at Python's side and Java and its <a href="http://java.sun.com/j2se/1.4.2/docs/guide/rmi/spec/rmiTOC.html">RMI</a> library, in which this module is mostly based ( the protocol ).</p>
<p>The model is <i>easy</i>, let's use the following diagram and explain it quickly :</p>
	<p><a href="/amnesiac/net-rmi.png" align="center"> <img src="/amnesiac/tmb_net-rmi.png" alt="Click to enlarge..." border="0" align="center" /></a></p><div style="font-size: 10px">Click to enlarge...</div>
<br />
We have 3 main actors: <i>Net::RMI::Client</i>, <i>Net::RMI::Registry</i> and <i>Net::RMI::Server</i>.  We have other classes that play an important part in the core application, just to mention them: <i>Storable</i>, <i>IO::Socket::INET</i>, <i>Net::RMI::Exception</i>, <i>Net::RMI::Base</i> and <i>POE::Component::Server::TCP</i>.</p>
	<p>The flow of a Net::RMI application looks like this:<br />
First of all, we need to create our RemoteClass class, that will have all the implementation of the methods that are going to be called remotely, but how are we supposed to do this in Perl? Well, we're going to use one of the Perl's <i>darker</i> features, named <i>subroutine attributes</i>, like this:<br />
<pre>
package RemoteClass;
sub foo : remote {
   # here goes the implementation...
   # and other cool stuff
}
1;
</pre>
With this, we're just "telling" the interpreter that this method has an attribute named _remote_, what does this mean? nothing, if we don't do something with it, it means nothing and the interpreter will cry. This is where the Net::RMI::Base class enters the game. A piece of cake, what we will need to do is, inherit from Net::RMI::Base class in our implementation class, with this, we ensure that our parent class handles all the stuff needed to make the <i>remote</i> attributes mean something.</p>
	<p>We have our implementation class ready, now what? Now, we need to play with Net::RMI::Server class, how? easy again, we just need to create a Server class that will inherit all the functionality from Net::RMI::Server, and inside it  create the implementation class objects in order to register them into the <i>prmiregistry</i>. Erm....., how? using one of the methods in Net::RMI::Registry for registering objects. We have all our objects registered, now, we need to fire up the server calling the <i>start()</i> method and start waiting for requests.</p>
	<p>That's all about the Server part, what about the registry? we said before that we needed to register objects into a registry, what does that mean? the <i>prmiregistry</i> is a process that we need to run in order to map objects to their host/port and interface information (like a nameserver), so the client will be able to fetch remote objects. The Net::RMI::Registry class provides the interface to talk to the registry process.</p>
	<p>Now, in the client side, in order to use remote objects we need to lookup for them, where? from the registry, using the <i>Net::RMI::Registry->lookup()</i> method, passing an <i>URI</i> like this: <i>prmi://host:port/obj_name</i>, if obj_name exists, it will return a Net::RMI::Client object with all the information needed to invoke methods from the implementation class.<br />
 What is this Net::RMI::Client object thing? This is a <i>proxy object</i>, that is, provides the interface to the implementation class that will make us think we're invoking those methods locally, but behind the scenes, it has all the machinery necessary to pass information to the server object and to parse the response from it (parameters serialization/marshalling, all the socket stuff, etc).</p>
	<p>If everything went alright, we can now invoke any of the methods declared as "remote" in our implementation class, without worrying much about the details.</p>
	<p>What about reliability and error handling? Good question, I will leave out those topics for another post.</p>
	<p>I hope I can finish the first working version soon, so my examples can be using code instead of tons of empty words, because at the end, we learn a lot by looking at code.</p>
 ]]></content>
</entry>
<entry>
	<title type="text/plain" mode="xml"><![CDATA[ Here I am...<again></again> ]]></title>
	<link rel="alternate" type="text/html" href="http://unixmonkeys.com/amnesiac/blog/index.php?gadget=Blog&amp;action=SingleView&amp;id=1" title="Object" />
	<author>
		<name>Marco Antonio Manzo</name>
		<url>http://unixmonkeys.com/amnesiac/blog</url>
		<email>amnesiac@unixmonkeys.com</email>
	</author>
	<id>http://unixmonkeys.com/amnesiac/blog/1</id>
	<modified>2006-04-06T15:03:17-05:00</modified>
	<issued>2006-04-05T02:09:04-05:00</issued>
	<created>2006-04-05T02:09:04-05:00</created>
	<summary type="text/html" mode="escaped"><![CDATA[ 	<p>This is the first time that I touch my weblog again in.... 6 months? I forgot, but what I do remember is that I was using <a href="http://www.bloxsom.com">blosxom</a>, a small and nice blogging system written entirely in Perl. Why the change? I like changes, and mostly because I needed a faster and better CMS for my blog, one with a good eye-candy interface.</p>
<p>But why <a href="http://www.jaws.com.mx">JAWS</a>? Why in PHP? Well... I have a good reason, <b>I swear it!</b>. First of all because it was initially wrote from scratch by my good friend <a href="http://ion.gluch.org.mx">Jonathan (ion) Hernández</a>, a mexican web designer and PHP developer, one of the good ones ( and that's hard to say, because saying "good" and "PHP" doesn't match at all, but I haven't been able to convince him to join to the right side ). JAWS is a mexican project, it has a growing and wonderful team composed by some brilliant developers around the world ( I like to praise, I can't help it ). And my final point is.... I liked the project itself, looks cool.</p>
<p>
Now... what happened all this time? <i>lots</i> of things, most of them great as far as I remember. I will list some of them in non particular order:
</p>
<ul>
	<li>I finished school, at last! Bachelor in Computer Engineering</li>
	<li>I'm not working for EL INFORMADOR newspaper anymore, I quit on Dec, 2005</li>
	<li>I joined IBM Mexico on Jan, 2006</li>
	<li>I have more time now to work on my personal stuff ( projects, my time, personal activities )</li>
	<li>I started to work in my Net::RMI module as a personal project, which I will be talking about in my next post I think</li>
	</ul>
	<p>and those are practically the most <i>interesting</i> events that happened while I was away.
<p>Anyways, it's kind of late and I need to work today, I just wanted to write a bit.</p>
 ]]></summary>
	<content type="text/html" mode="escaped"><![CDATA[ 	<p>This is the first time that I touch my weblog again in.... 6 months? I forgot, but what I do remember is that I was using <a href="http://www.bloxsom.com">blosxom</a>, a small and nice blogging system written entirely in Perl. Why the change? I like changes, and mostly because I needed a faster and better CMS for my blog, one with a good eye-candy interface.</p>
<p>But why <a href="http://www.jaws.com.mx">JAWS</a>? Why in PHP? Well... I have a good reason, <b>I swear it!</b>. First of all because it was initially wrote from scratch by my good friend <a href="http://ion.gluch.org.mx">Jonathan (ion) Hernández</a>, a mexican web designer and PHP developer, one of the good ones ( and that's hard to say, because saying "good" and "PHP" doesn't match at all, but I haven't been able to convince him to join to the right side ). JAWS is a mexican project, it has a growing and wonderful team composed by some brilliant developers around the world ( I like to praise, I can't help it ). And my final point is.... I liked the project itself, looks cool.</p>
<p>
Now... what happened all this time? <i>lots</i> of things, most of them great as far as I remember. I will list some of them in non particular order:
</p>
<ul>
	<li>I finished school, at last! Bachelor in Computer Engineering</li>
	<li>I'm not working for EL INFORMADOR newspaper anymore, I quit on Dec, 2005</li>
	<li>I joined IBM Mexico on Jan, 2006</li>
	<li>I have more time now to work on my personal stuff ( projects, my time, personal activities )</li>
	<li>I started to work in my Net::RMI module as a personal project, which I will be talking about in my next post I think</li>
	</ul>
	<p>and those are practically the most <i>interesting</i> events that happened while I was away.
<p>Anyways, it's kind of late and I need to work today, I just wanted to write a bit.</p>
 ]]></content>
</entry>
</feed>