Wednesday, November 26, 2014

What is a cluster?

Cluster is a group of the computer that work as one.



Storage cluster, as we work with RAIDS but over a network.



服务由多个服务器来实现。解释为什么资源可能被转移

在它们之间。难道是满意,为客户多播的所有请求组

服务器作为实现流动性的透明度,为客户的一种方式?

Tuesday, November 25, 2014

Kernel en ubuntu


3
down voteaccepted
To install the latest kernel you can always visit kernel.ubuntu.com to see what's going on.
To install the latest 3.16 kernel all you need to do is:
cd /tmp
for 32bit:
wget \
http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16-utopic/linux-headers-3.16.0-031600-generic_3.16.0-031600.201408031935_i386.deb \
http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16-utopic/linux-headers-3.16.0-031600_3.16.0-031600.201408031935_all.deb \
http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16-utopic/linux-image-3.16.0-031600-generic_3.16.0-031600.201408031935_i386.deb
for 64bit:
wget \
http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16-utopic/linux-headers-3.16.0-031600-generic_3.16.0-031600.201408031935_amd64.deb \
http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16-utopic/linux-headers-3.16.0-031600_3.16.0-031600.201408031935_all.deb \
http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16-utopic/linux-image-3.16.0-031600-lowlatency_3.16.0-031600.201408031935_amd64.deb
then, making sure you have no other .debs in /tmp
sudo dpkg -i *.deb
then
sudo reboot

Todo el texto es una copia de 
http://askubuntu.com/questions/506956/how-can-i-install-3-16-kernel-on-ubuntu-14-04

Thursday, November 13, 2014

Replication NFS



Multiple location support in the automounter implements a simple network load-balancing scheme for replicated filesystems. At first glance, this seems to be a bit of overkill; after all, you don't need or want replication for read-write filesystems. However, serving large, read-only filesystems such as the manpages may add to an NFS server's request load. Having multiple servers share this load improves performance by reducing the total load placed on the most heavily used servers. Ideally, you want clients that are "close" to each server to mount its filesystems, reducing the amount of traffic that must go through bridges or routers.



For example, if you have four NFS servers that each export the manpages, the best client mounting scheme is probably not to have one-quarter of the clients mount/usr/man from each server. Instead, clients should mount the manpages from the server that is closest to them. Replicated filesystems are included in automounter maps simply by listing all possible servers in the map:


/usr/man -ro wahoo:/usr/man mahimahi:/usr/man \ thud:/usr/man onaga:/usr/man

The backslash at the end of the first line continues this indirect map entry onto the next line. If more than one server:directory pair is listed in an automounter map, the automounter pings all servers by sending a request to the null procedure of all NFS servers. From the set that responds, the automounter picks one that is "closest" by comparing the address of the servers with that of the clients. Ties are broken by using the server that responded to the ping first. The selected server is used by the automounter to serve the mount point.



Friday, October 24, 2014

Postfix SPAM BUG

Postfix Bug

Sometimes you think that 2+3 =5 and 3+2 you will get also 5. But on point of  view of programmer, you will get differents answers.


One of my servers was under attack, i realize  because  i have a lot of traffic. I got some calls, the system is broken,  slow.....

I got into the server   and nothing wrong. But the calls were up. The second time, when i was in the server, i find something wrong. What i see, a new user lol....  i mean, the email xyz@mydomain.com  was sending a bulk emails to comcast.

The xyz@mydomian.com doesn't  exist, but postfix dont realize about it. if you are using sender controller over postfix, you have to know this bug.


My old main.cf was

smtpd_recipient_restrictions =
 permit_mynetworks,
 permit_sasl_authenticated,
 reject_sender_login_mismatch,
 reject_unauth_destination,
 reject_unlisted_recipient,
 reject_invalid_hostname,
 reject_unauth_pipelining,
         reject_invalid_hostname,
         reject_unknown_recipient_domain,
         reject_unauth_pipelining,
 reject_unknown_sender_domain,
 reject_non_fqdn_recipient,
 reject_non_fqdn_sender,


I spend all day and i see that it was a bug, very simple to fix only change the lines. Now only pepelupe can send email by pepelupe@mydomian( no more xyz@mydomain)

smtpd_recipient_restrictions =
 permit_mynetworks,
 reject_sender_login_mismatch,
 permit_sasl_authenticated,
 reject_unauth_destination,
 reject_unlisted_recipient,
 reject_invalid_hostname,
 reject_unauth_pipelining,
         reject_invalid_hostname,
         reject_unknown_recipient_domain,
         reject_unauth_pipelining,
 reject_unknown_sender_domain,
 reject_non_fqdn_recipient,
 reject_non_fqdn_sender,


i hope that no  one have to waste time with it.

Tuesday, October 21, 2014

Lets talk about Interprocess Communication


An Overview of RMI Applications

RMI applications often comprise two separate programs, a server and a client. A typical server program creates some remote objects, makes references to these objects accessible, and waits for clients to invoke methods on these objects. A typical client program obtains a remote reference to one or more remote objects on a server and then invokes methods on them. RMI provides the mechanism by which the server and the client communicate and pass information back and forth. Such an application is sometimes referred to as a distributed object application.
Distributed object applications need to do the following:
  • Locate remote objects. Applications can use various mechanisms to obtain references to remote objects. For example, an application can register its remote objects with RMI's simple naming facility, the RMI registry. Alternatively, an application can pass and return remote object references as part of other remote invocations.
  • Communicate with remote objects. Details of communication between remote objects are handled by RMI. To the programmer, remote communication looks similar to regular Java method invocations.
  • Load class definitions for objects that are passed around. Because RMI enables objects to be passed back and forth, it provides mechanisms for loading an object's class definitions as well as for transmitting an object's data.


Wednesday, October 15, 2014

Broadcast on RPC

According to Peters broadcasting is the audio or video distribution  to a dispersed client via any electronic mass communications medium, it usually use spectrum (radio waves), in a "one to many" model.[1]

Tuesday, October 14, 2014

What is RPC

Remote Procedure Call:


As you has seen before The sockets are very useful, but one of the most common problems is transformations data on the network. This transformation data will be use as the representation used by the application and its called as "Presentation Formatting" (Morgan Kaufman,2007).






Thursday, October 2, 2014

Lazaro get up and walk

Today , i was talk' with one of my students . He asked to me "how to run a linux over pentium II".

I realized that its a very old device. And the new linux only work for P IV up to.

Then i find the link that could be good to work about it.
https://help.ubuntu.com/community/LubuntuLinks#Section_B:_Lubuntu_101

i hope that it could be good for us.

Thursday, September 25, 2014

Socket JAVA

"A socket is a software endpoint that establishes bidirectional communication between a server program and one or more client programs. " ref


Wednesday, September 24, 2014

SMTP Protocol

Objective:
   This lesson is focus in learn how to create a smtp app.

Issues:
-Sockets
-RFC
-TCP Frame

Steps:
1) Install php5 over ubuntu.
2) Read http://php.net/manual/en/intro.sockets.php
3) Read https://www.ietf.org/rfc/rfc2821.txt
4) Download  https://drive.google.com/file/d/0B8fTeB-2yen7MDJYeC00SHozZW8/edit?usp=sharing

Thursday, September 4, 2014

SSH

Algo básico de túneles.... buen documento

http://blog.sensible.io/2014/05/17/ssh-tunnel-local-and-remote-port-forwarding-explained-with-examples.html

Wednesday, July 30, 2014

Código para obtener Alumnos del Esima de la UAA

Este codigo es en php, bajando la lista del sistema de calificaciones de la UAA como lista.xsl.


Thursday, June 12, 2014

Como leer discos de linux en Mac

Tenemos un blog que les puede ayudar a las personas que intercambian información entre mac y linux.  Y en ocasiones NTFS..



http://osxdaily.com/2014/03/20/mount-ext-linux-file-system-mac/

Tuesday, April 8, 2014

Codigo para BroadCast receiver Android


What is a Broadcast Receiver ?



A Broadcast Receiver is a kind of receptor events Android operating system.

Typically, a Broadcast Receiver is used to display notifications of events that occur in our mobile phone:

such as the discovery of a wifi network

battery depletion

the status of the phone ....

What events can I catch ?

some of them:

Event android.provider.Telephony.SMS_RECEIVED Event message received.

Event android.intent.action.PHONE_STATE received calls.

Event android.intent.action.AIRPLANE_MODE flight mode.

Event android.intent.action.BATTERY_LOW low battery.

Event android.intent.action.BOOT_COMPLETED start the operating system.

Event android.intent.action.SCREEN_OFF screen lock.

Event android.intent.action.SCREEN_ON unlock screen .

Event android.bluetooth.intent.action.DISCOVERY_STARTED

Event Start Event Scan Bluetooth enabled Bluetooth.android.bluetooth.intent.action.ENABLED .

Monday, April 7, 2014

Que es un servicio android?

Es una app que corre de forma automática, sin intervención del usuario. Estos pueden ser servidos web, servicios de comunicaciones, antivirus por mencionar algunos.
En android un servicio no es independiente, corren en el mismo proceso que la aplicación que los consume.

What is a Service?

What is a Service?

Most confusion about the Service class actually revolves around what it is not:
  • A Service is not a separate process. The Service object itself does not imply it is running in its own process; unless otherwise specified, it runs in the same process as the application it is part of.
  • A Service is not a thread. It is not a means itself to do work off of the main thread (to avoid Application Not Responding errors).

Wednesday, April 2, 2014

Intents

Intents are system messages that are responsible for notifying applications of severals events:

  • changes to the hardware (eg when the phone is inserted)
  • notifications of incoming data (eg when an SMS arrives) 
  • events in applications (eg when a activity is launched from the main menu). 


We can create activities that meet the intentions, we can also create intentions to launch activities or use them to trigger events to specific situations (eg the phone to notify us via a message when our location is 10 meters from the point of destination).
It is noteworthy that the system is choosing between the activities available on the phone and will answer the intention with the best activity.

Tuesday, April 1, 2014

ANDROID ACTIVITY

It is responsible for constructing the block UI. You can see  activity as the analog of a window in a desktop application. Activities have the responsibility of presenting the visual elements and react to user actions. While we can think of activities that do not have a user interface, the code regularly in these cases is packaged in the form of content providers  and services.


Thursday, March 27, 2014

Androis AS IS

Android Emulator


The Android SDK includes a mobile device emulator — a virtual mobile device that runs on your computer. The emulator lets you develop and test Android applications without using a physical device.

This document is a reference to the available command line options and the keyboard mapping to device keys. For a complete guide to using the Android Emulator, see Using the Android Emulator.

Wednesday, March 26, 2014

Android Components



  • The Android operating system is a multi-user Linux system in which each app is a different user.

Restful , javaEE & json



WebComponent over JAVA EE



Lets think about JSON


JSON is a text-based data exchange format derived from JavaScript that is used in web services and other connected applications. The following sections provide an introduction to JSON syntax, an overview of JSON uses, and a description of the most common approaches to generate and parse JSON.

JSON Syntax

JSON defines only two data structures: objects and arrays. An object is a set of name-value pairs, and an array is a list of values. JSON defines six data types: stringnumberobjectarraytruefalse and null.

Friday, March 21, 2014

Android for beginer


What is android?


"Android powers hundreds of millions of mobile devices in more than 190 countries around the world"[1].

Its has been growing fast-every day. Android gives you world-class platform for create anything you need. Your application can be distributed by open marketplace.







Android operating system was a virtually unknown phones owned by a company called Android Inc. until 2005 when Google bought it. Currently Andy Rubin, the creator of Android, works as vice president of engineering and Google under his command this project.

In November 2007, only rumors that the Internet giant had plans to launch a Mobile project, and precisely for that time, the Open Handset Alliance was launched, which brought together many mobile phone manufacturers, chipsets and Google and provided the first version of Android, along with the SDK for developers begin to build their applications for this system.


Android is a software stack for mobile phones initially thought (smartphones) that includes an operating system, middleware and application layer for the phone to make functions beyond the devices once used.
Leaving aside some technicalities, Android is another option of interfaces and features  to be found in mobile phones, and we can identify particular aspects of  whose operating system Nokia's Symbian, iOS or iPhone or even the Blackberry, also There are very specific things in phones running Android.

Now let us turn more technical. Android is based on Linux kernel operating system, that reason has embedded features to be free, free, cross-platform. any  developer can create Android applications without the need to pay annual fees for the development kit (SDK).
Android also has a modified java machine, which is called Dalvik. the operation system includes interface to  functions about gps, call, contacts ....


What i need to develop in Android .


  1. Your environment, i mean your windows, linux or mac. 
  2. SDK link here
  3. Chose eclipse plugin ADT
  4. java sdk   link here




Reference
1 http://developer.android.com/about/index.html

Thursday, March 20, 2014

My Hello World, WebService , Java & PHP

This tutorial is based on SOAP.

1.Open the netbeans.
2. Create a new project.
3. Create a Webservice standalone.
 
4. Testing by php

uaa@uaa-virtual-machine:~$ php cliente.php 
stdClass Object
(
    [return] => Hello fco !
)

uaa@uaa-virtual-machine:~$ cat cliente.php 
<?php 
try {  
    $x = @new SoapClient("http://localhost:8080/EjemploWebService/HolaMundo?WSDL");  
 print_r( $x->hello(array('name'=>'fco')));
} catch (Exception $e) {  
    echo $e->getMessage(); 
?> 
uaa@uaa-virtual-machine:~$ php cliente.php 
stdClass Object
(
    [return] => Hello fco !
)

uaa@uaa-virtual-machine:~$ 



Wednesday, March 19, 2014

Geolocation html5 & maps

<!DOCTYPE html>
<html>
  <head>
    <title>Geolocation</title>
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
    <meta charset="utf-8">
    <style>
      html, body, #map-canvas {
        height: 100%;
        margin: 0px;
        padding: 0px
      }
    </style>
    <!--
    Include the maps javascript with sensor=true because this code is using a
    sensor (a GPS locator) to determine the user's location.
    See: https://developers.google.com/maps/documentation/javascript/tutorial#Loading_the_Maps_API
    -->
    <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=true"></script>

    <script>
// Note: This example requires that you consent to location sharing when
// prompted by your browser. If you see a blank space instead of the map, this
// is probably because you have denied permission for location sharing.
var map;
function initialize() {
  var mapOptions = {
    zoom: 6
  };
  map = new google.maps.Map(document.getElementById('map-canvas'),
      mapOptions);

  // Try HTML5 geolocation
  if(navigator.geolocation) {
    navigator.geolocation.getCurrentPosition(function(position) {
      var pos = new google.maps.LatLng(position.coords.latitude,
                                       position.coords.longitude);

      var infowindow = new google.maps.InfoWindow({
        map: map,
        position: pos,
        content: 'Location found using HTML5.'
      });

      map.setCenter(pos);
    }, function() {
      handleNoGeolocation(true);
    });
  } else {
    // Browser doesn't support Geolocation
    handleNoGeolocation(false);
  }
}
function handleNoGeolocation(errorFlag) {
  if (errorFlag) {
    var content = 'Error: The Geolocation service failed.';
  } else {
    var content = 'Error: Your browser doesn\'t support geolocation.';
  }

  var options = {
    map: map,
    position: new google.maps.LatLng(60, 105),
    content: content
  };

  var infowindow = new google.maps.InfoWindow(options);
  map.setCenter(options.position);
}

google.maps.event.addDomListener(window, 'load', initialize);

    </script>
  </head>
  <body>
    <div id="map-canvas"></div>
  </body>
</html>