Cookbook API

Case number:699969-991187
Topic:General
Opened by:ptfrog
Status:Open
Type:Suggestion
Opened on:Wednesday, November 30, 2011 - 12:47
Last modified:Wednesday, November 30, 2011 - 19:30

While it seems unlikely that foldit will be open-sourced, perhaps part of it can be safely opened for public development. The cookbook seems a likely possibility.

This is a comment I had actually entered elsewhere -- but the I realized that it really did not belong in that thread. (Sorry!)

This might be a good way to leverage the power of the community of developers who fold. If done properly, this could take some pressure off the UW coding team, and it could result in real enhancements that the entire community could benefit from. The cookbook seems a perfect place for this, since it doesn't involve the scoring algorithm or other aspects of foldit that might entice cheaters.

One possibility for sharing would be to simply open-source the cookbook. But there are gotchas here, and depending upon the current codebase this has the potential of making more work for the developers -- reviewing many many code submissions, trying to decide what to incorporate.

That's why I suggest setting up an API. If the cookbook is set apart from the main body of Foldit code by a simple and well-defined series of calls, such as

-- Calls From Foldit:
apiDisplayCookbook -- call the cookbook module

-- Calls To Foldit:
apiLoadScript
apiSaveScript -- returns info on syntax errors, if they exist
apiRunScript
apiShareScript
apiRunScript
apiExitCookbook

I'm not sure if this is the right list, but it gives the general idea. My guess is that many folks will write Lua code to create cookbooks, and that many of these will be shared with the community. Folks who use Eclipse or some other development environment may also develop really cool interfaces to Foldit.

There will be those who wish to share their results, and therein lies the rub. How do you ensure the quality of these submissions? Once you open up code to the community, sharing cannot be prevented, and there is an element of danger in downloading unreviewed code. A web area where code is shared and reviewed (akin to the current recipe area) might mitigate this, along with a requirement that all source code must be submitted.

A few trusted and dedicated members of the foldit community -- and I would imagine that there are dozens to choose from -- might be enlisted to review and recompile Lua submissions prior to allowing them to be shared in binary form. This makes the barrier to downloading unreviewed code high enough that the bulk of the foldit community would not bother with it. And it would prevent someone from sharing a compiled version with some hidden "features" not shown in the source code.

The web page would probably need certain caveats:
1) Be careful of untested code.
2) This is a community supported web project. If your submission takes months to be reviewed, or if it never gets reviewed at all, we are sorry. But look at the bright side: you now have a recipe book of your own design, and it has made your folding life better.

(Wed, 11/30/2011 - 12:47  |  2 comments)


B_2's picture
User offline. Last seen 4 years 25 weeks ago. Offline
Joined: 11/29/2008
Groups: None

What does this do that the current system does not? The functions to create, edit, share and run scripts and recipes already exists, with the web based sharing options of public, group and private shares.

ptfrog's picture
User offline. Last seen 5 years 31 weeks ago. Offline
Joined: 09/29/2011

Ultimately, what I hope this will get us is a really cool cookbook. :-)

But the reason I suggest an API is that it opens the development to a thriving community of talented people. There are many advanced features that people want, and limited resources available to the folks at UW. If we can free those resources to work on the core of foldit and at the same time get a vastly improved cookbook interface, then it's a win-win. (After all, isn't this what crowd-sourcing is all about?)

Some folks might even take this in further, in directions that UW never could. I, for instance, would be delighted to be able to maintain my recipes via Eclipse -- where I do a good deal of other development. Of course, this is just icing on the cake; the real benefit to the Foldit community would be the creation of a more powerful and flexible Lua-based cookbook and editor.

I might mention that strictly from a design standpoint, separating modules in this way is good coding practice. It may even be that the cookbook already has such an API, and all that remains is to find a way to make it publicly available.

Sitemap

Developed by: UW Center for Game Science, UW Institute for Protein Design, Northeastern University, Vanderbilt University Meiler Lab, UC Davis
Supported by: DARPA, NSF, NIH, HHMI, Amazon, Microsoft, Adobe, RosettaCommons