Shop Mobile More Submit  Join Login
About Deviant TobyMale/United States Recent Activity
Deviant for 10 Years
Needs Core Membership
Statistics 112 Deviations 121 Comments 5,030 Pageviews

Newest Deviations

OpenCL first program
//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:
//openCL reference:
#ifdef __APPLE__
#define DATA_SIZE (1024)
/*This is the kernel. it is what the code that will actually run on the graphics card.
* Coding for the graphics card is very particular. Firstly, have a few conditionals
* as possible. you'll notice there is one here. I'm not going to go into why here
* because this is about openCL, not graphics card architecture. Just know, ifs are
* really hard for a GPU to deal with.
* So, what code can you put on the graphics card? Your
:iconjaqbenny:jaqbenny 1 1
Chapter 10: Client
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 component works with the system server. it is responsible for getting the current system's information, enrollment, and WU management.
As I look at it now I'm not sure which would actually be simplier. but I need to think about this. what would both of these systems look like. and what does the server look like? what data packets are transfered around. I th
:iconjaqbenny:jaqbenny 0 0
Chapter 9: Unit Testing
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 to go through as you are making the unit test and tell it what is expect so that it knows where it went wrong, approximately.
I'm going to start by working with the network layer. Start making unit tests of it. basically each function should have it's own set of tests. a set of tests because you need to test various kinds of input. and because of th
:iconjaqbenny:jaqbenny 0 0
Chapter 8: User Friendly
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 as well as forming layers of abstraction.
But one other thing I want to stop and consider is my objective. yes my objective is to build a distributed computing system, but who cares, those already exist, why not simply use one of those? why should Ceranubis exist (aside from an exercise for me)? Well what I've decided on is relatively simple. Yes, t
:iconjaqbenny:jaqbenny 0 0
Chapter 7: Beta
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 of these items is already done, there is just the final peices that need to be put in place before it can fully which I need to do now. So lets begin the work down the list! at the 0.4 release of this program will have a functional, minimal, but still functional system, and to celebrate that fact, I will open a new project on source forge!
Boot up server
Booting up
:iconjaqbenny:jaqbenny 0 0
Chapter 6: Project
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 status of the project. as what ever needs to be done is unknown be the server, this is the way things must be. this leads to 2 functions at least for the server: get work units and get status. There are certain kinds of simulations that require iteration, for example my gravity simulation requires all the information for each frame to be completed
:iconjaqbenny:jaqbenny 0 0
Chapter 5: Arch and Arg
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 kind which will allow for more complex commands while also still being easier to implement. I'm going to use the argparse library from python 2.7x to parse my commands for me in a very easy and extensible way.
and really that's all I've got for now. I'm going to list here though the requirements for 0.2 version of the server.
Ceranubis Server 0.2:
:iconjaqbenny:jaqbenny 0 0
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, wait for next command.
It may seem like that is a little bit simple, but really, it is that easy, even when you break away from command line and are doing everything in the background. think, your high level program with a GUI and all sends a command, parses the response and fills those lovely text boxes with the information you wanted. you may do
:iconjaqbenny:jaqbenny 0 0
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:
Manage projects:
maintain a list of work items
maintain all data dealing with any project
load in a new project on the fly
report a project complete and close it
manage clients:
keep a list of:
computer names
ip addresses
work items in progress
work items completed
Provide programing framework:
it is to be as simple as possible, not any simplier.
send data to clients
recieve data from clients
send programs to clients
:iconjaqbenny:jaqbenny 0 0
Chapter 2: Data Transfer
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 number of bytes it transfered. recv takes a numeric argument for the maximum buffer size to recieve this round and returns a string. so you can see how they mirror each other. send takes string returns bytes transfered, recv takes bytes to recieve and returns a string.
neither one of these is server client specific. after the connection has been for
:iconjaqbenny:jaqbenny 0 0
Chapter 1: Networking
Chapter one: Networking
The first step in understanding how server clinet-systems work is understanding the networking that goes into to it. In this case we will be dealing directly with the socket class in python. Documentation of this class can be found on python's documentation here: you can read that for your self, but I will cover most of the important bits of information here.
There reason for starting here in server-client systems is the fact that the first and foremost task that these systems do is transfer data to and from the server and the client. ergo, with out networking, there is no system. I will talk about optimization and tasks in the next chapter, this chapter is simply concerned about getting data from the server to the client and back. Get used to typing "import socket".
So what is a socket eh? Simply put it is a conceptualization of exactly what it sounds like, it's a place for something to plug in. The serve
:iconjaqbenny:jaqbenny 0 0
Python Server: intro
Writing A python client-server application bigginer's guide:
I'm writing this guide because it is something I need. Know, reader, that as I write this I am learning to do it my self. My intent on this is 1. that I might learn it better having need to explain what is going on and 2. might come across any issues you mihgt have as I go as I don't know what I'm doing yet either.
My intended audience for this is some one who is looking to understand how client-server software is programed to create something of their own. I expect that you know how to program in python. I am only intending this to be an introduction to the concepts, as such, I'm not going to be using any frame works through out this guide. There are a lot of frame works out there, and at the end I might point to some for futher reading. Because I am not using any frame works, only what comes built in to python, examples should work cross platform. know, however, that I am programing on Ubuntu Linux. The exampl
:iconjaqbenny:jaqbenny 0 0
Novus Astrum MRT 316 by jaqbenny Novus Astrum MRT 316 :iconjaqbenny:jaqbenny 0 0 Novus Astrum MRT 127 by jaqbenny Novus Astrum MRT 127 :iconjaqbenny:jaqbenny 1 0 Novus Astrum SRT 351 by jaqbenny Novus Astrum SRT 351 :iconjaqbenny:jaqbenny 0 0
I'm next
3 brothers down.
and now it comes to me.
i'm not dating anyway.
but eventually it will be.
I'm next.
I've lived so long
with this buffer between
me and marriage,
but now it can be seen
I'm next.
This is exciting,
This is terrifying,
This is long waited for,
This is coming so fast.
I'm next.
I'm next in my brothers
to be the one to wed
To find that one person
for life's journey together tred.
I'm next to graduate
To leave mothers nest
to go out into the world
and join all the rest.
I'm next one to be,
My time is now up me
What my future holds
I can't wait to behold
it will be sight to see.
:iconjaqbenny:jaqbenny 0 0

Random Favourites

Claudia by sambees Claudia :iconsambees:sambees 12,993 0 Super Mario 128 by DogmanSP Super Mario 128 :icondogmansp:DogmanSP 1,753 265 For valentine's day by stormystranger For valentine's day :iconstormystranger:stormystranger 1,949 218 Positive Energy by Uribaani Positive Energy :iconuribaani:Uribaani 466 41 Sweet Darling Eternal by vishstudio Sweet Darling Eternal :iconvishstudio:vishstudio 1,499 147 Photorealism Tutorial by markcrilley Photorealism Tutorial :iconmarkcrilley:markcrilley 5,142 290 Between Light and Nature by WhiteBook Between Light and Nature :iconwhitebook:WhiteBook 478 132 0122 by KariLiimatainen 0122 :iconkariliimatainen:KariLiimatainen 612 0 The Hypnotize Island by JonhyBlaze The Hypnotize Island :iconjonhyblaze:JonhyBlaze 612 72 heartbreaker by SabrinaCichy heartbreaker :iconsabrinacichy:SabrinaCichy 721 73 Last Night, Good Night: II by hexlord Last Night, Good Night: II :iconhexlord:hexlord 835 49 How We Got So Blue 7 by hakanphotography How We Got So Blue 7 :iconhakanphotography:hakanphotography 1,747 72 close your eyes by glowingkitten close your eyes :iconglowingkitten:glowingkitten 384 21 Something worthful by meago Something worthful :iconmeago:meago 3,237 216 given up,... by navidsanati given up,... :iconnavidsanati:navidsanati 138 50


  • Listening to: Avatar sound track
  • Reading: Game Engine Architecture
  • Watching: My Little Pony: Friendship is Magic
  • Playing: gcc
  • Eating: starving
  • Drinking: Water
this is just going to point to a deviant I just did. it's actually a chunk of code. but I commented the living snot out of it and so now it is a tutorial for writing your first openCL program. it explains the entire process of getting a program on to the device, setting the data and the arguments, running, and retrieving(just in a few more steps). and I would have killed to have it when i was trying to figure this out on my own. but there it is now. happy fun and joy!…

Also, my insurance company put me on amphetamines. this is really weird. I don't think it will help with my narcolepsy, but I will give it an honest run.


United States
Current Residence: Twin Lakes
deviantWEAR sizing preference: XL
Favourite genre of music: Symphonic
Favourite photographer: Big Bro
Favourite style of art: Music, Scetching, and 3D rendering
Operating System: Windows 7
MP3 player of choice: Samsung Omnia
Shell of choice: Power-Shell
Skin of choice: Flesh
Favourite cartoon character: Neji
Personal Quote: Communism works great on paper. But paper planes don't fly.


Add a Comment:
Gender-Ninja Featured By Owner Aug 31, 2011
I didn't know you had a DA account. 0.o this is a certain clarinet player you know.
Child-of-Eire Featured By Owner Jun 28, 2011  Hobbyist General Artist
woah, I didn't know you had a dA account! Hi!
LeBebeChat Featured By Owner Feb 23, 2011
Thank you very much for the favorite. :heart:
WhiteBook Featured By Owner Apr 28, 2010

LalunaLoverly Featured By Owner Jan 2, 2010
:tighthug: Haven't heard from you in a while. Busy?
Well- either way just wanted to say hi!


Bex-Tenshira Featured By Owner Dec 1, 2009
thnx for the fav^^
dianar87 Featured By Owner Oct 29, 2009  Hobbyist Digital Artist
:iconangelitoplz: thank you so much :iconangelitoplz:
goddessaragon Featured By Owner Jul 30, 2009  Professional Artisan Crafter
thanks so much for the fave!!
since92 Featured By Owner Sep 14, 2008
thanks for the fav dude :D
HoroscopeJunkie Featured By Owner Aug 13, 2007
Why hello thar!!!!
Add a Comment: