I'm very intrigued by derby and spent last night reading through the documentation. My current architectural thoughts are very much geared towards building a RESTful API which is used by the corresponding rich client application, or by anybody else with access to the API.
Derby impresses me not just because of its focus on speed, but because it works very much like the web is supposed to (with URLs matching pages). However with the move these days to have a mobile application that fits into a product, it seems that having an API necessary if one wants to develop both for the mobile and the browser sphere.
My question is twofold.
Could derby be used to interface with an API, essentially writing an API adapter and swap that out with the mongoadapter. I haven't looked at the adapter but the docs insinuate that writing an adapter isn't too difficult. Alternatively could derby produce a json response to the API call if the accepts header asks for json. That way it could play the role as an API along with serving the webapp.
Should derby be seen as an application as whole and not used at all for any other apps (ie mobile). Ie the common factor between a browser and mobile app will be the database, not the API. The downside to not having the API as a common factor would be that features might not be consistent across apps (not as in amount of features, but one might be buggy the other one not).
I'd very much like to use derby in our next project, but need some clarity whether it is the tool for the job. (Incidentally the project will be a big web application, but needs to have mobile integration. Having an API might also be a great idea but i'm not sure yet of its usefulness)