Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any experience programming for BOINC?

I am attracted by BOINC for a little project of mine. I heard of BOINC but not read much about how it works, mostly because I am focusing on other priorities right now. What I would like to know is if any of you actually tried to program for BOINC and have a program run on the distributed computer network. In particular I am interested in the following questions:

  1. How does it work? do you compile the code, post it somewhere and the clients download it and you receive workunit requests and results ?
  2. What languages does it support? how does it deal with runtimes (I guess you will be able to provide a full, independent package with all the required stuff)
  3. How do people know that your project exists, and opt-in to participate?
  4. What services does it provide to make my life easier ? Is there a pre-made library for common tasks ?

I prefer real life experience. Wikipedia can be a great source of info but I prefer actual use cases.

like image 470
Stefano Borini Avatar asked Dec 11 '09 14:12

Stefano Borini


People also ask

Why is Boinc on my computer?

The BOINC app, running on your computer, downloads scientific computing jobs and runs them invisibly in the background. It's easy and safe. About 30 science projects use BOINC. They investigate diseases, study climate change, discover pulsars, and do many other types of scientific research.


3 Answers

I have admin'd a BOINC project (now defunct), I have been a bit involved in development of BOINC (and in many flamewars with the developers!), there is at least one feature I implemented that is now in the server, and I have hacked one or two BOINC projects that don't understand the importance of "keeping software up to date". I'm now working with three other people on a fork of the BOINC client. Is that enough? :)

Unless you're looking for somebody to hire (hint!), you should just ask specific questions on SO on actual problems you're having while setting up a BOINC server or developing an app or whatever, instead of "does anyone know anything about the topic?"

On the questions you asked:

How does it work? do you compile the code, post it somewhere and the clients download it and you receive workunit requests and results ?

You have to install your own server with LAMP and BOINC. (Note that SETI@Home used to use Solaris instead of Linux; and I'm pretty sure you can use non-Apache webservers if you write the config yourself).

You create an app that uses the BOINC API (or modify an existing computation app to use it), install it on the server, create "workunits", and get clients to attach to your project. Clients download the work, process it, and upload it back. (That's a bit oversimplified...)

Once on the server, the completed task goes through a "validator" (which you write or use one of the sample ones) that checks the computation is valid, and an "assimilator" (which you write) that does something useful with the result; such as parsing the output file and putting the data into a relational database, or email you that you found The Answer To Life, The Universe, And Everything. Or package up the results of several workunits, and send them back to the "scientist".

What languages does it support? how does it deal with runtimes (I guess you will be able to provide a full, independent package with all the required stuff)

It mainly supports C++. The API is compatible with C, and there are production projects using it from Fortran (climateprediction.net is a ~million lines of Fortran).

I also wrote a wrapper for Python. The Python app inside doesn't get much access to the API, but that's easy to add. I just exposed the minimal I needed. But it's probably a bad idea. If you need BOINC, it's because you need lots of CPU time. And in that case you wouldn't be using a slow interpreted language to begin with.

How do people know that your project exists

Broadly, the same way they would know your blog exists: that's your marketing/SEO problem ;)

However you get a few unique things related to the community:

  • There are BOINCaholics who will attach to any project that comes around, and actively search for them. And tell their friends and team-mates. Put your project online, enable forums, get it linked from at least one website so it appears in Google, and I guarantee that within a few days a forum thread will appear with 'ATA' in the subject (Alpha Testers Anonymous). I could even tell you the usernames of people who will be there, if you want. They are that predictable. (To be fair, you might find me there too :D)
  • There are many stats sites that collect users' credit statistics from multiple projects and aggregate them. Your project's presence on one of those sites is an important way for people to see it. But just exporting stats doesn't mean you'll get there; you have to show the stats sites' admins your project is doing something useful (to their opinion) and that it can be trusted.
  • If you keep good communication with your users, good stability in the apps, etc. you'll get more users through word-of-mouth and, maybe more importantly, you will get your existing users to stay and/or give you a bigger share of CPU time. Careful about "you only have one opportunity to make a first impression". Don't advertise your project big at first launch, let word of mouth take care of it at first, until it gets stable enough.

Of course, it's pretty obvious that the proportion of the computer-owning world population who are BOINCaholics is insignificant. And less than 10% use BOINC at all. If you want to target the broad population: back to usual website marketing, and I can't assist you on that. Note that in that case you will also have to explain them how BOINC works and how to install it!

and opt-in to participate?

They attach the project from their BOINC client (or download it first if they're new to BOINC). They can create an account from the BOINC GUI directly.

Please don't even think of trying to develop your own BOINC project until you have used BOINC yourself as a user for a while. That's like making a website without experience using a web browser (“I think it's working but how do I look at it now?”). Go download the client, find a cool project, attach, and watch it work.

I once tried to help someone set up a project, then found he had no experience with either LAMP nor with BOINC from the user side. It was a painful experience.

What services does it provide to make my life easier ? Is there a pre-made library for common tasks ?

I can't elaborate on this; you'll have to be more specific on what your project will do, where the "work" comes from, what processing needs to be done server-side, what language/runtime/library your client-side app uses, etc. and then I could tell you if BOINC has something that can help you with that.

...and I guess that's enough for now (whew, 3:15 am!).

like image 124
Nicolás Avatar answered Oct 20 '22 17:10

Nicolás


Did you try reading the BOINC software development overview? It looks pretty comprehensive, but I have not used BOINC myself.

like image 40
lothar Avatar answered Oct 20 '22 16:10

lothar


I have "my little own" project, so perhaps I can also help.

  1. You can seperate between the science app and the server/client side. Make sure your science app is working stable on the desired os, the rest is duty of boinc's client/server. it will send your app and do the logistic stuff. you shouldjust be aware of some dc related issues, but that is not the starting point, in my opinion.

  2. It supports c++ directly, but as long as it can "run from a usb pen drive" it's okay. There is a boinc wrapper, that can handle non c++ programmes. We use java for one application. We just have to send java runtime environment as well and not just the jar, but it works fine. We are currently testing Scilab for an app :).

  3. Propaganda :). The boinc community is really dense and fast. just start your project, THEY will find you ;).

  4. What is a common task for you?

http://aerospaceresearch.net/constellation/

Andreas

like image 1
Andreas Hornig Avatar answered Oct 20 '22 16:10

Andreas Hornig