CrowdOS is a ubiquitous operating system for Crowdsoucring and Mobile Crowdsensing, which can deal with multiple types of crowdsourcing problems simultaneously.
CrowdOS are available on Maven Central.
If you use Maven or Gradle, add a dependency with following coordinates to your build script:
<dependencies>
<dependency>
<groupId>cn.crowdos</groupId>
<artifactId>crowdos-kernel</artifactId>
<version>1.0.1</version>
</dependency>
</dependencies>
You can use the features provided by CrowdOS in any way you want, but if you want to develop a springboot application, you only need the following few simple steps:
- You need a CrowdKernelComponent.java like this one, which is used by the Spring Framework.
// CrowdKernelComponent.java
import cn.crowdos.kernel.CrowdKernel;
import cn.crowdos.kernel.Kernel;
import org.springframework.stereotype.Component;
@Component
public class CrowdKernelComponent {
public CrowdKernel getKernel(){
CrowdKernel kernel = Kernel.getKernel();
if (!kernel.isInitialed())kernel.initial();
return kernel;
}
}
- You need to create the Participant class as you want, you should either implement the Participant interface, or inherit directly from the_AbstractParticipant_ class.
import cn.crowdos.kernel.constraint.Condition;
import cn.crowdos.kernel.constraint.wrapper.*;
import cn.crowdos.kernel.resource.*;
import com.fasterxml.jackson.annotation.JsonFormat;
public class User extends AbstractParticipant {
@ability
private IntegerCondition userId;
@ability
@JsonFormat(pattern = "yyyy.MM.dd")
private DateCondition activeTime;
//...
}
- You need to create the task class as you want, and you should either implement the Task interface or inherit directly from the AbstractTask class or any other task class we provide.
import cn.crowdos.kernel.constraint.Constraint;
import cn.crowdos.kernel.resource.SimpleTask;
import java.util.List;
public class Task extends SimpleTask {
private int taskId;
public Task(List<Constraint> constraints, TaskDistributionType taskDistributionType) {
super(constraints, taskDistributionType);
}
// ...
}
- To use the features provided by the CrowdOS kernel, you should first register participants and submit tasks.
// use
crowdKernelComponent.getKernel().registerParticipant(user);
// and
crowdKernelComponent.getKernel().submitTask(task);
- Do everything you want.
This is a simple demo of a Springboot application powered by CrowdOS (CrowdOS-demo). and WeSense is an actual running application, it is based on CrowdOS and you can download it from the app store on Android and IOS.
if you have any trouble with CrowdOS, the following may be of help to you.
- Visit our website www.crowdos.cn.
- Check the reference documentation.
- Or email us: [email protected]
CrowdOS uses GitHub's integrated issue tracking system to record bugs and feature requests. If you want to raise an issue, please follow the recommendations below:
- Before you log a bug, please search the issue tracker to see if someone has already reported the problem.
- If the issue doesn't already exist, create a new issue.
- Please provide as much information as possible with the issue report. We like to know the CrowdOS version, operating system, and JVM version you’re using.
- If you need to paste code or include a stack trace, use Markdown. ``` escapes before and after your text.
- If possible, try to create a test case or project that replicates the problem and attach it to the issue.
Note: CrowdOS is still in the development stage, only the kernel part is completed at present.
crowdos-kernel. The main library providing features that support the other parts of CrowdOS kernel.
algorithms contains three algorithms used by Scheduler. this part will be moved to crowdos-aaas feature.
Contains some constraints to used when construct a task.
Contains participant and task.
Provide some way to access system resources.
crowdos-aaas(CrowdOS Algorithms as a Service). Coming soon.
crowdos-dataservice. Coming soon.
Coming soon.
The www.crowdos.cn site contains some detail information of CrowdOS.
The CrowdOS Project is released under version 2.0 of the Apache License.