BUG Community

Welcome! Log In

Forums BUG SDK Per-Bundle Storage?

Subscribe to Per-Bundle Storage?  8 posts, 4 voices

Log in to reply to this topic
 
Oct 2, 2007 10:35pm
Medium Bug Labs team finsprings 268 posts

Is there going to be an abstraction on top of persistent storage for bundles to use? I’m thinking of a method they can query that gives them their own persistent folder to do with what they will: save config, log to, whatever. This would of course sit on top of the file system in a directory that’s mounted via JFFS2 or something similar. I’ve found this sort of abstraction useful in the past on other mobile devices.

Oct 3, 2007 11:04am
Medium Bug Labs team kgilmer 215 posts

finsprings,

Yeah, this is an interesting idea. I can see something like an IBundleStorage service being very useful for providing a consistent way of saving/loading state. Eclipse has such a mechanism at the plugin level. We don't have anything like this currently. This would be a great place to add some functionality.

In regards to logging, we use the standard OSGi log service:

org.osgi.service.log.LogService

Again there is work here because the log implementation we use simply writes any log messages to System.out. There are probably other implementations we could use from KF or Apache Felix, but we haven't looked into that yet.
Oct 6, 2007 7:17pm
Img_missing_medium matt.gauger 15 posts

This is somewhat-related to a question I was going to ask.

Any chance that each bundle could get its own sqlite3 file?
http://www.sqlite.org
There is a Java library/wrapper for it, I just can’t seem to find it on google atm. The device could enforce space-quotas on the db files, I imagine, and it would be easier to interact with and implement than a full-fledged MySQL daemon running onboard or working with actual files on the FS.

Oct 8, 2007 7:30am
Medium Bug Labs team kgilmer 215 posts

Matt,

SQLite looks cool! Yeah, let me know if you find the Java API. This looks like something that would be really handy for developers.

Oct 8, 2007 3:26pm
Img_missing_medium rbpasker 22 posts

i highly recommend db4objects, an 800K GPL’d embeddable java object database that can work with any kind of persistence mechanism.

i know them very well, and am happy to make an intro.

http://www.db4o.com/about/productinformation/fe…

Oct 14, 2007 10:44am
Medium Bug Labs team finsprings 268 posts

kengilmer
In regards to logging, we use the standard OSGi log service:

org.osgi.service.log.LogService


Ken,

Is the LogService registered in the VirtualBUG? I ask because I tried to make an app dependent on it and canStart() didn't return true until I removed LogService from my required services list.
Oct 15, 2007 9:05am
Medium Bug Labs team kgilmer 215 posts

There is a simple default log service in Concierge that can be turned on and off via system properties. Refer to the CTE launch configuration dialog for more details. IRT your specific issue, this doesn’t seem right. After the Virtual BUG starts, type "services" and see if org.osgi.service.log.LogService is listed. If it is and canStart() returns false can you upload a test case?

Oct 17, 2007 9:38pm
Medium Bug Labs team finsprings 268 posts

kengilmer
There is a simple default log service in Concierge that can be turned on and off via system properties. Refer to the CTE launch configuration dialog for more details. IRT your specific issue, this doesn't seem right. After the Virtual BUG starts, type "services" and see if org.osgi.service.log.LogService is listed. If it is and canStart() returns false can you upload a test case?

I confirmed that the LogService shows in my services list, but it still hangs (canStart returns false). To make this happen I took my currently-posted BUGer app and added the single line:

getServices().add("org.osgi.service.log.LogService");

to the bottom of BUGerServiceTracker.initServices.

(: services
Svc Id__Object Class______________________________________Other Properties______________
1 org.osgi.service.startlevel.StartLevel
2 org.osgi.service.log.LogService
3 org.osgi.service.event.EventAdmin
4 ch.ethz.iks.slp.Advertiser
5 ch.ethz.iks.slp.Locator
6 org.osgi.service.http.HttpService openPort = 8082, port = 8082
7 com.buglabs.services.ws.PublicWSAdmin
8 com.buglabs.bug.base.pub.IBatteryInfoProvider slot = type = demo,
9 com.buglabs.bug.base.pub.ITimeProvider type = demo,
14 com.buglabs.menu.IMenuProvider
15 com.buglabs.status.IStatusBarProvider
20 com.buglabs.bug.module.motion.pub.IMotionSubject
21 com.buglabs.module.IModuleControl
22 com.buglabs.osgi.shell.IShellCommandProvider
23 com.buglabs.bug.module.gps.pub.IPositionProvider
24 com.buglabs.module.IModuleControl
10 com.buglabs.bug.module.pub.IModletFactory
11 com.buglabs.bug.module.pub.IModletFactory
12 com.buglabs.device.IBaseDisplay
13 com.buglabs.device.IButtonEventProvider
16 com.buglabs.bug.module.pub.IModletFactory
17 com.buglabs.bug.module.pub.IModletFactory
18 com.buglabs.osgi.shell.IShellCommandProvider
19 com.buglabs.osgi.shell.IShellCommandProvider
Log in to reply to this topic
Forums BUG SDK Per-Bundle Storage?

Powered by Community Engine

Top
Login
Close