The difference between Cumula DataStores and DataServices
One of the core parts of Cumula is the DataStore and DataService infrastructure. These two base classes provide a consistent interface for working with services and databases. However, they do different things, and it is important to know the differences as you dive into Cumula.
DataStores
DataStores are wrappers for services that, as the name suggests, store information. These service may do a lot more, but at the core they store information. Examples of these DataStore services are Twitter, Searchify and Amazon SimpleDB. Because the DataStore services store information, the DataStore class methods are designed to make accessing, writing and finding that information easy.
Each DataStore implements all or a subset of the 8 common data access methods. These are:
create: creates an object in the DataStore.update: updates an object in the DataStore.destroy: removes an object from the DataStore.get: retrieves a single object from the DataStore.
Each DataStore also implements some or all of the query functions:
findByFullText: finds all objects by a full text query. The service defines how the full text query is applied.findByAllFilters: finds objects that match all filters supplied. The service defines how filter matching is done.findByAnyFilter: finds objects that match any filters supplied. The service defines how filter matching is done.findRecent: retrieves a list of the most recent objects.
It is important to note that each DataStore may only implement a subset of each of these methods, depending on what the underlying service supports. Twitter for example, only offers findByFullText and findRecent.
DataServices
DataServices on the other hand, wrap services that process an object and provide back some new information. Some examples of DataServices that do information processing are Viralheat for sentiment analysis, or OpenCalais for semantic analysis/entity extraction.
DataStores implement a common process method that accepts an object and returns a result. The result varies based on the service. You can think of a DataStore as a single API URL call. Some API services provide many processing functions; these are split out into multiple Cumla DataServices, each with its own process method. DataStores may be packaged together to represent all of a services from a provider. An example of this is the AlchemyAPI package.
To find out more about how to use each, and which DataStores and DataServices are available, check out the documentation.
[...] The difference between Cumula DataStores and DataServices [...]