Shop Mobile More Submit  Join Login
About Deviant TobyMale/United States Recent Activity
Deviant for 9 Years
Needs Core Membership
Statistics 112 Deviations 121 Comments 4,785 Pageviews
×

Newest Deviations

Literature
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: 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 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
:iconjaqbenny:jaqbenny 1 1
Literature
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
:iconjaqbenny:jaqbenny 0 0
Literature
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
:iconjaqbenny:jaqbenny 0 0
Literature
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
:iconjaqbenny:jaqbenny 0 0
Literature
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
:iconjaqbenny:jaqbenny 0 0
Literature
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
:iconjaqbenny:jaqbenny 0 0
Literature
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:
ad
:iconjaqbenny:jaqbenny
:iconjaqbenny:jaqbenny 0 0
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, 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
:iconjaqbenny:jaqbenny 0 0
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 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
hardware
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
client:
track
:iconjaqbenny:jaqbenny
:iconjaqbenny:jaqbenny 0 0
Literature
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
:iconjaqbenny:jaqbenny 0 0
Literature
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: http://docs.python.org/library/socket.html#module-socket 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
:iconjaqbenny:jaqbenny 0 0
Literature
Python Server: intro
Writing A python client-server application bigginer's guide:
Introduction:
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
: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
Literature
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
:iconjaqbenny:jaqbenny 0 0

Random Favourites

Positive Energy by Uribaani Positive Energy :iconuribaani:Uribaani 465 41 Sweet Darling Eternal by vishstudio Sweet Darling Eternal :iconvishstudio:vishstudio 1,498 147 Photorealism Tutorial by markcrilley Photorealism Tutorial :iconmarkcrilley:markcrilley 5,159 290 Between Light and Nature by WhiteBook Between Light and Nature :iconwhitebook:WhiteBook 480 132 0122 by KariLiimatainen 0122 :iconkariliimatainen:KariLiimatainen 618 0 The Hypnotize Island by JonhyBlaze The Hypnotize Island :iconjonhyblaze:JonhyBlaze 614 72 heartbreaker by SabrinaCichy heartbreaker :iconsabrinacichy:SabrinaCichy 724 73 Last Night, Good Night: II by hexlord Last Night, Good Night: II :iconhexlord:hexlord 837 49 How We Got So Blue 7 by hakanphotography How We Got So Blue 7 :iconhakanphotography:hakanphotography 1,755 72 close your eyes by glowingkitten close your eyes :iconglowingkitten:glowingkitten 387 21 Something worthful by meago Something worthful :iconmeago:meago 3,244 216 given up,... by navidsanati given up,... :iconnavidsanati:navidsanati 138 50 Stage by SachaKalis Stage :iconsachakalis:SachaKalis 2,654 105 shoulder constellations by nerdynotdirty shoulder constellations :iconnerdynotdirty:nerdynotdirty 1,323 94 H2O Umbrella by Stridsberg H2O Umbrella :iconstridsberg:Stridsberg 347 23

Activity


  • 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!
jaqbenny.deviantart.com/art/Op…

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.

deviantID

jaqbenny
Toby
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.
Interests

Comments


Add a Comment:
 
:icongender-ninja:
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.
Reply
:iconchild-of-eire:
Child-of-Eire Featured By Owner Jun 28, 2011  Hobbyist General Artist
woah, I didn't know you had a dA account! Hi!
Reply
:iconlebebechat:
LeBebeChat Featured By Owner Feb 23, 2011
Thank you very much for the favorite. :heart:
Reply
:iconwhitebook:
WhiteBook Featured By Owner Apr 28, 2010
:iconemotethanks1plz::iconemotethanks2plz::iconemotethanks3plz::iconemotethanks4plz::iconemotethanks5plz:

:iconwolfe01plz::iconwolfe02plz:
:iconwolfe03plz::iconwolfe04plz:
Reply
:iconlalunaloverly:
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!

<3
:poke:

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