Posts Tagged ‘Open-Source’

Are “open-source” concepts horizontal to every domain?

Wednesday, August 8th, 2007

In a reply to my post “Open-sourcing a processor?”, Paulo argued that more than open-sourcing a processor, “Sun is adapting the concept of OpenSource Software to the microelectronics field”.

Until this point, I have to agree with Paulo. We have been assisting to this strategy from Sun in the last years: Java, OpenSolaris, and now the UltraSPARC T2. It’s… good! But the arguments Paulo presents just don’t seem enough for them to make this move. Let’s analyse:

  1. “There’s no market competition”: Just because nobody is doing it, makes it a good idea; still, Paulo rightfully argues that Sun is trying to make other companies make servers powered by the UltraSPARC T2. Altough, this is different from open-sourcing: this is licensing. Sun could try and persuade OEMs to use their processor without open-sourcing it. The real power in the open-source move would be if other semi-conductor companies have the factories to actually build this kind of processor. Besides AMD, IBM and Intel, who’s out there?
  2. “More eyes, less bugs”: Once again, works great in environments where acquiring and reproducing the product is easy. With software, it’s almost free: all you need is the right computer. With processors, well… How much would it cost to build a processor like this without a dedicated factory? Emulators, maybe? FPGA? I’ll wait to see how many hackers will emulate this SPARC in order to improve it and find bugs. Not that it wouldn’t be cool, I just think it isn’t practical at this time.
  3. “Faster market adoption”: My number 2 arguments still apply here.
  4. “Boost other Sun products adoption”: Sun is doing a great job making OpenSolaris being adopted under x86 processors (which are commodity processors). I highly believe the boost would either be a) marginal or b) due to OpenSolaris itself.
  5. “The “do-good-instead-of-evil” market effect”: Now this is a philosophical argument that could lead us to pages and pages of discussion. This effect is pure and simple “marketing”. It may work well, it may not. But picking up in your ‘Google’ example, just look at the Censorship by Google we are assisting these days. I surely would want to live in a world where this kind of argument would be the number 1 top priority in companies, but we don’t. Open-sourcing is good for a company if it makes it profit. Marketing is good for a company if it makes it profit. “Do-Good-Instead-Of-Evil” works as long as it profits. One may argue that companies can choose to profit less and do more good (I know some), but in the end they all bend to the mighty Euro (or Dollar, or…)

In conclusion, I believe Paulo’s arguments to be plausible, but I still have the feeling to only be looking at the tip of the iceberg. Having the opinion that ‘hacking’ through the specifications and actually playing with them will be very impractical at this time, I still find myself wondering the actual reasons on why Sun have done this move.
I have been known to be wrong sometimes, though…

Open-sourcing a processor?

Wednesday, August 8th, 2007

Today, as we’ve seen in several spots, Sun has released its UltraSPARC T2 processor, featuring eight cores and 64 threads, Multi-threaded 10 GbE networking, crypto acceleration, and PCI-Express I/O expansion in a single die.

But, the really big news here is that “Sun is giving developers a first look at the inner workings of the processor by releasing the OpenSPARC T2 Technology Programmer Reference Manual and the OpenSPARC T2 Technology Microarchitecture Specification through the GPL, and launching an NDA Developer Beta program.” This specifications can be found at opensparc.net.

This is something… Big! Personally, it’s the first time I’ve ever saw a move like this in the micro-electronics area. Though, I can’t help but wonder: What will Sun gain doing this? What will consumers gain? And what will be the practical value?

Don’t take me wrong: I’m all in favor of open knowledge. But in terms of software, practical value of open-source software is simple: everyone can use it, see how is done and change it; all it takes is a computer (and computers today are commodities). However, not everyone carries a semiconductor factory in her pocket. Will this move be of interest only to the Academic world and R&D? Will we see other companies making the chip?

Interesting times we are living in, no doubt…

Blender workshop in Portugal

Thursday, June 28th, 2007

A Blender workshop will take place in Porto, Portugal on July 14 and 15. Promoted by doubleMV - R&D together with Audiência Zero this workshop, to be held in “Cidade das Profissões / Porto Digital”, is “aimed at people that have little or no knowledge of 3D CGI (Computer Generated Imagery), specially 3D modeling, but have the interest and willingness in learning it.” If you are interested in more information, check this link.

Fractal Glass

Friday, December 22nd, 2006

mushroom.jpg

Done with Blender and Indigo.

Windows Inter-process Synchronization in Python

Tuesday, December 5th, 2006

Suppose you have two processes that need to sync information between them. If you were using Linux, a SIGHUP signal would do the trick. But Windows don’t have signals…

Fear no more… We have Named Events to the rescue… I’ve found the need to use these for inter-process synchronization when I was confronted with the problem of having an external application reacting to database triggers. Of course, the RDBMS we are talking about is PostgreSQL, and the external application is made in Python.

Anyway, the trick consists of setting a well-known named Event in the external application (server), and then Pulsing this event inside a ‘plpython’ function in postgreSQL. So, the server would be something like:

import win32event
event = win32event.CreateEvent(None, 0, 0, ‘Global\EventXPTO’)
win32event.WaitForSingleObject(event, win32event.INFINITE)
print ‘Received event…’

But there’s a catch… If PostgreSQL is not running as the same user as the script, it will give an ‘Access is Denied’ error when trying to open the Event. Thus, we need to change the PySECURITY_ATTRIBUTES (first parameter of CreateEvent) from None to something that allows the world to access it. Here’s how:

import pywintypes
import ntsecuritycon

def createEventSecurityObject():

sa = pywintypes.SECURITY_ATTRIBUTES()
sidEveryone = pywintypes.SID()
sidEveryone.Initialize(ntsecuritycon.SECURITY_WORLD_SID_AUTHORITY,1)
sidEveryone.SetSubAuthority(0, ntsecuritycon.SECURITY_WORLD_RID)
sidCreator = pywintypes.SID()
sidCreator.Initialize(ntsecuritycon.SECURITY_CREATOR_SID_AUTHORITY,1)
sidCreator.SetSubAuthority(0, ntsecuritycon.SECURITY_CREATOR_OWNER_RID)acl = pywintypes.ACL()
acl.AddAccessAllowedAce(win32event.EVENT_MODIFY_STATE, sidEveryone)
acl.AddAccessAllowedAce(ntsecuritycon.FILE_ALL_ACCESS, sidCreator)

sa.SetSecurityDescriptorDacl(1, acl, 0)
return sa

Of course, change the event setup to:

event = win32event.CreateEvent(createEventSecurityObject(), 0, 0, ‘Global\EventXPTO’)

And the client:

import win32event
event = win32event.OpenEvent(win32event.EVENT_ALL_ACCESS, 0, ‘EventXPTO’)
win32event.PulseEvent(event)

You can certainly figure the rest on your own ;) It would be advisable though to read this MSDN article if you want to know more about inter-process synchronization in Windows.

P.S. Don’t forget to check win32api.GetLastError() when creating or opening events.

Boost, Python and Dijkstra

Thursday, November 30th, 2006

Boost “provides free peer-reviewed portable C++ source libraries.” It also provides some very good Graph manipulation functions, one of which is a very fast Dijkstra shortest-path implementation that I wanted to use from within Python.

Bear in mind that for this project I need to host Python in a Windows 2003 Server machine. First thing to do is to get the Python bindings for the Boost Graph Library. Problem is, it isn’t very clear how do you install it… After trying a while, I copied the contents of bgl-python-0.9/python/boost/graph to $python$/lib/site-packages/boost/… it worked :)

Second problem is to understand all this C++ templating world. If you try to invoke a binded function from within Python you can get something really cryptic (try writting boost.dijkstra_shortest_paths() in the interpreter).

After trying to read the documentation, looking at the usage example of BGL, and banging my head into a wall several times, I finally found how to make it work… I leave a simple example here for anyone who’s interested.

Java will take on the world

Thursday, November 30th, 2006

18136_full.jpgOpen source Java campaign:

open_source_java.jpg

Day of the Tentacle:

Does anyone else find this similarities… uh… disturbing?