//these lines are to include the OpenCL libaries. apple does things a little different.
//so you will need this inorder to make it compile on Linux or Mac. something I grabbed
//from one tutorial to add the the one from the Mac Lab one.
//Mac lab: http://developer.apple.com/library/mac/#samplecode/OpenCL_Hello_World_Example/Listings/hello_c.html#//apple_ref/doc/uid/DTS40008187-hello_c-DontLinkElementID_4
//openCL reference: http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/
#ifdef __APPLE__
#include
#else
#include
#endif
#include
#define DATA_SIZE (1024)
/*This is the kernel. it is what the code that will actually run o
Chapter 10: Client
The 2 servers remaining to write are the client and the System. I want to start with the client, as it is a much more closed system. Meaning that I don't have to worry much about the interfacing. I just have to deal with how to get data to the client and back. well suprise. I've already done that with the file server! (in hind sight I might have been able to build the file server off the clinet server system. to late now)
So my plan for the client is relatively simple. 2 main components. 1 component deals with the project end of things. it takes the WU, requests the files, imports code, and then runs it. the other compone
Chapter 9: Unit Testing
The concept of unit tests is not a hard one to grasp. But never before have I had such a code base to maintain that this has been an issue so this is my first foray in to this concept. The idea isn't to complicated. you create a roster of tests that the system has to run through in order to pass. you test each unit of the code so to speak. this way you always know it is behaving the way you think it should be. aside from providing a method of making sure everything is proper, it also gives you a better understanding of your own code. inorder to perform a unit test properly you need to know what to expect, so you have
Chapter 8: User Friendly
As I stop and reflect on version 0.4 where the system almost got up and running I am a not encouraged. True, this was a major accomplishment, a nearly functional system, but there was a lot lacking. I'm not actually that happy with how the system came out and I need to do some major achritectural reworking. As Agile Has so neatly put it, It now costs me more not to change this than it would to continue with my current system. but there are a couple systems that I need to implement which will also help in some other aspects, and I can start building a common library for things shared between the server and the client
Chapter seven: Beta
Version 0.4, by the end of this itteration Ceranubis will be able to:
Boot up server
Login to it with an administration command line interface
accept at least one client machine
Get a list of work units that have their own ID for making as completed
Priority que work items
Shutdown gracefully
boot up client
enroll client
get work item
get data
process work item
return data
clear work item
send status update
read status update from server
That is a lot of things that need to be done. but these are just the final touches. each of these items is a very small amount of work. in fact most of the work for each
and now for one of the key features of this project, projects. projects encompass the concept of a set of programs for the server and client as well as associated data to be processed. the way that this can be done easiest is making mini-server instances. these instances need to be unaware of the connections that are used to transfer data and work units. they are aware of work units and incharge of parceling the work units but the server is responsible for getting the program, work units and data to and from the the clients as well as informing the server instance of completed work units.
The instance also is the only one who is aware of the
Chapter 5: Architecture decisions
Now that I've got the basic design concept in my head I need to start really considering how to build a frame work that I can work with later. I'm personally found of the concept in agile of not making architecture decisions until the are nessisary, at least in this case. I'm not proficient in this type of system, there is no way I would be able to predict what all will be nessisary so I can't make a lot of architecture decisions, but the ones I am capable of doing now I will.
the first is I'm breaking from the original command structure that I came up with in chapter three and addopting a more traditional
Chapter 4: Command line Client by jaqbenny, literature
Literature
Chapter 4: Command line Client
Chapter four: Command line client
The simplest and most straight for ward client one could probably write would be a command line client. as the server only understands commands passed to it, the command line client is the basic level as it prints everything straight to the screen. Ceranubis works by sending commands to the server and then getting a response. which is the essense of a command line interface. you tell it something to do, it does it, outputs nothing or something, then asks for the next command.
so a command line client will work just like that. prepare the socket, connect to the server, ask for a command, send, recieve, print
Chapter 3: Ceranubis Server by jaqbenny, literature
Literature
Chapter 3: Ceranubis Server
Chapter Three: Ceranubis Server
My objective in this project is to take advantage of the idle computers around campus by making a distributed computing system. The name Ceranubis (k air a n00b is) refelects that as nubis is latin for cloud and Cera- is take from a different latin word, beaten and given drugs and ends up as a prefex meaning red. so "Red Cloud" red because I'm an NWC student and it is the school color. kind of lame, but it made a cool name, and I just needed a name really. Ceranubis as a system must have the following features:
Server:
Manage projects:
maintain a list of work items
maintain all data dealing with any p
Chapter two: data transfer
Now that you are connected it is time to transfer information. After this things should start falling in place. I said in chapter one that networking is the most key concept for you to understand to make a client-server system. well, it is almost the only new concept you need to understand to make said system work. now that you are connecte and will soon be transfering data you know all you need to make a very simple system. yes, it is that easy.
So then, lets talk about data transfer. firstly the two base commands we are dealing with here are send and recv. send takes a string argument and transfers it return the