Friday May 08, 2009

So long and thank you for all the fish

I bid you all a good fare well. I will be leaving as a CA from the 31th of may.

I thank you all for a great time and let us still work to make Sun present at campuses all over the world. 

Actor-based framework for SunSPOTs

For my master thesis did I made an Actor-based framework for SunSPOTs.

Background

The actor model for programming is getting more and more common. The model can be used to program both distributed programs and to program more than one  core in multi core systems.

Languages which use the actor model is Erlang and Scala the most populars ones. Scala do even run on the JVM. Erlang is made of Ericsson in Sweden and have been used in telephones systems since 1984.

There do not exists an actor framework for the SunSPOT, so I sat out to make one.

The SunSPOT

The SunSPOT provide a SquawkVM, which support the CLDC and MIDlet. When sending messages using the built-in radio communication on the SunSPOT it is not possible to get an acknowlegde of the message sent. Therefore a communication layer is made, which is added to make sure that every message is received at the end, if the host exists, else an error is returned to the user.

User Interface

To make it easy for the user to use the framework, is the interface reduced to only nine functions.

Load balancing

To make load balancing is the load calculated and send out to the others SunSPOTs using broadcasts. This was not possible to do. Somehow did the broadcast messages not received, so this part was set on hold. 

Actors

The actors of the system is implemented using a Thread. The actor class is an abstract class which the user must extend to use the functions given in the actor. The actor acts as an entrance to the MCP. The user must implement the run method of the actor, to get the actor do some work. Each actor have an unique id used in communication.

MCP

The MCP (Master Control Program) is a class which holds function to create other actors, and handling messages. The actor ask the MCP to create an actor, local or non-local. The actor then ask the non-local MCP to create the actor, and returns the id to the calling actor.

Messages

There are different kind of messages in the system, which is send to different parts of the program.

 

But read more and see the dirty code in my thesis

Sunday Mar 29, 2009

Open Solaris on the EeePC 701 4G

To get OpenSolaris to work on the EeePC 701 4G is here some steps:

1. Install OpenSolaris 2008.11

Easy step :-) I used an external CD-ROM driver over USB to boot from. It might be needed to change boot order in bios. I installed to the SSD.

2. Get wireless working

Read http://wiki.genunix.org/wiki/index.php/EeePC which present the way to get wireless working. If you want to connect to a hidden wireless wpa2 secure network read here: http://blogs.sun.com/lubos/entry/joining_a_hidden_wpa2_secured 

You need to remove the old SUNWatheros like this:

	pfexec pkg uninstall SUNWatheros

and install the new with:

	pfexec pkg-add -d SUNWatheros

pfexec update_drv -a -i '"pci168c,1c"' ath

	pfexec devfsadm -i ath  

3. Remove unneeded software (This step is not needed, unless you want something else than the standard install of software on the PC)

	just use pfexec pkg uninstall <package> I removed evolution and some other things 

4. Get wired working

I could not get it to work :-( http://wiki.genunix.org/wiki/index.php/EeePC demostrate a way to get it to work...

5. Install extra software

I installed j6jdk and openoffice3 

 

The page: http://www.storyq.net/boxes/2813 mention something that do not work, and shows how to get a 3g modem to work on open solaris. 

Tuesday Mar 17, 2009

Presentations

I will use OpenOffice.org 3 to present my thesis (off course :-) ) but a cool extension which you all should use is this http://extensions.services.openoffice.org/project/presenter-screen it will let you choose which screen the presenstion is one, and on the other will it show the current slide, next slides, notes and time spend. It is a great and cool extenstion to use!!!

Sunday Mar 15, 2009

Thesis is done!!

I have completed my thesis, so I will post more info about it, in the next week.

 

I can give the title: "Actor-based framework for the SunSPOTs" 

Wednesday Mar 04, 2009

How to get WTK2.5.2 runing on Mac OS X

It is very easy. Download the linux edition of WTK2.5.2. 

 

When asked for a Java interprenter paste this string: /Library/Java/Home/bin/ (or wherever you must hide your Java on your Mac)

 

When the toolkit is installed, copy the WTK2.5.2/wtklib/Linux to WTK2.5.2/wtklib/Mac and you can run it.

 

Now to compile and build project. The preverify tool is made for linux, but I will try later on to use the one for sunspots and return any result i got. 

The SunSPOT preverify tool cannot be used. So before a Mac Edition of the Wireless Toolkit is released must you use windows or linux to develop for mobilephones. 

 

The page http://developers.sun.com/mobility/midp/articles/osx/ show a way to get up and runing without using the toolkit. 

 

UPDATE:

To get the MIDP packege running on 10.5.6 using XQuartz some libraries need to be relinked.

Run the following commands:

cd /usr/X11R6/lib
ln -s libXpm4.11.0.dylib libXpm4.11.dylib 
ln -s libXt6.dylib libXt6.0.dylib 
ln -s libX116.2.0.dylib libX116.2.dylib 
ln -s libICE6.3.0.dylib libICE6.3.dylib 
ln -s libSM6.0.0.dylib libSM6.0.dylib  

Then will the MIDP package work, and you can start developing J2ME apps for your phone. More about this later. 

Monday Jan 26, 2009

SunSPOT TechTalk

In the middle of the cold (at least in Denmark) month, January, was a point of light and warmth. 

It was a techtalk about SunSPOT. 

I told about the SunSPOT and the technology used, and there was some good questions, which we have a good discussion about.

Afterwards did we some SunSPOT hacking an people where very fast to write their own programs like reading temparature of the sensor board, and an extended bouncing ball, with three balls, moving with different speed.

Alas where the only 4 pepole where two had computers to do hacking. The ones without computers (and me) did a lot of talk of the hardware of the SunSPOT instead.

Tuesday Dec 23, 2008

Another SunSPOT car using Lego

The SunSPOT demoboard have a TC4469 IC which is a CMOS driver. This driver is like a relay, which you can control an abitary current, with the one in the SunSPOT.

Therefore, a system, which connects to the H0-H3, VH and GND, will be able to use a different current, than the 3.3V hvis would be the output on D0-D3.

A sample setup could be this:

External side ------ SunSPOT side 

VH-----------------------------VH

OUT----------------------------H0

GND---------------------------GND

This setup will be able to switch the out between VH and GND. If a motor is to be controlled, a setup like this:

VH-----------------------------VH

OUT1----------------------------H0

OUT2----------------------------H1

GND---------------------------GND

By setting H0 and H1 a table like the one given after the break will be made:

 H0  H1  Current
 0  0  0
 0  1  -VH
 1  0  +VH
 1  1  0

It is the difference in current which is measured. By this the motor also can be controlled to go both ways. 

 

This could be old lego motors, or other electronic equiment, which need more than 3.3V. By doing so, some lego motors, could be used without using a motor contoller, or another external board for the motors. 

A code stub, which implement this control, can downloaded.

In the example, the variable, which descide which ports that should go high and not, is recieved from another SunSPOT, and be this making is a remote controlled unit.

This is used to make a SunSPOT remote controlled car, using some old Lego motors, and two SunSPOTs. Pictures will be avaible, as soon I get to build the actually car. 

The plan for the future

The spring of 2009 will show new ways to use your SunSPOT (more about this will be posted on the blog)

Also different aspects of OpenSolaris will be discussed. Subject will be ZFS and DTrace.

aside from this will there also be competions, where you can win tshirts. So in a way is it free tshirts. 

Thursday Nov 27, 2008

The future of programming and the challenge of Multi-Core

Thorbiörn from Sun Sweden was at DTU today to talk about programming with a parallel aspect. There was around 60 people present.

 He talked about different kinds of CPUs and how they did concurrency, and parallelism.

 To see the the diffrence, see here: http://blogs.sun.com/yuanlin/entry/concurrency_vs_parallelism_concurrent_programming

He talked about the language Fortress http://projectfortress.sun.com/Projects/Community

which have some ability to do parallel programming easy, using symbols, known from math.

Wednesday Nov 05, 2008

Updates, netbeans, php

I have installed Netbeans 6.5 rc2. It is a great editor. I use it for everything, my Mater thesis with sunspots. And to develop PHP sites.

I have made a little more on my jMARS2, and a lot on projecteuler.net. A fun site to relax and at the same time, get some puzzels to solve.

Wednesday Oct 22, 2008

Core Wars and other Java Gaming

I have discovered Core Wars (http://www.corewars.org/index.html) It is a great game where you need to write your own warrior to fight for cores in a VM.

I have started a project of write my own Mars because the one in java is written in old-java and because I wanted to try to make a simple VM.

I will post more about this when I got more to post about :-)

Another thing that I have found on the interwebs is http://projecteuler.net/index.php a great page with small problems which is fun to try to solve in breaks, and for getting your head of things.

Sunday Oct 19, 2008

HPC with UltraSPARC T2

Thursday the 16nd of October was Ruudvan der Pas at DTU to talk about Throughput Performance on the UltraSPARC T2 processor.

It was an interresting talk for which something like 30 people where attending.

I handed some open solaris out and got contact to different teachers at DTU.

At th moment I am planning a speech about opensolaris as a storage solution, with a speaker from OpenSource Days 2008.

Saturday Oct 11, 2008

Latest news

A lot of stoff had happend since last i blogged.

I have installed OpenSolaris, and getting it to work as my server at my dorm room.

I have held a tech-demo of solaris with zones. Even though there where only 6 people it went pretty succefully. I got some more people interested in Solaris, and handed a few starter kits out.

I have done some traning and learned a great deal about unit testing with JUnit and some java tricks that i did not know beforehand.

So I can only recommend to use the SAI. If you are at a Danish University, then contact me for info about how to connect and use SAI.

Saturday Sep 20, 2008

SFD @ DTU

We celebrated Software Freedom Day at DTU, by talking about FOSS, and tried OpenSolaris. We where 8 people all togheter.
About

David Askirk

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
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
   
       
Today