Appstore — plugin marketplace and JAR distribution
Publishing, discovery, download and runtime installation of OSGi bundles ("apps") over the PAST storage of the overlay. Two halves: the framework package
com.p2pframework.appstore(server side, reuses the DDS remote-operation protocol) and the bundleorg.lifesocial.plugin.appstore(client side, drives the EquinoxBundleContext). 33 classes, 2 878 lines in the 2026 tree. The component is resolved and started in the current run descriptor, but it has no user-facing surface today: no SWT view, no console command, no REST handler.
Purpose
The appstore turns the platform itself into a distribution channel for its own extension mechanism:
a user publishes a local .jar (an OSGi bundle) plus metadata into the distributed storage, other
users retrieve it by name and install it into their running Equinox framework without restarting.
Roles as implemented:
- Publisher — creates/edits/deletes app entries: one
PluginMetaper app (provider, description, icon, current version, list of older versions), oneVersionMetaper release (release notes, dependency names), onePluginObjectFileper release (the JAR bytes). Keeps a private list of its own publications (ppr_<username>.app). - User — looks an app up by name, optionally resolves its dependency closure, downloads the JAR,
installs/starts/stops/uninstalls the bundle, and keeps a private list of installed apps with an
autoLoadflag so that installed apps are re-installed and re-started at boot (UserToolKit.bootInstallPlugins()).
Out of scope in the current code: repository browsing, keyword/category search, ratings, code signing beyond the metadata signature, and any GUI. Those existed in or were planned for earlier generations (see Design options and Evolution).
Current implementation (as of 2026)
Framework half, Source/com.p2pframework/src/com/p2pframework/appstore/:
| Class | Size | Role |
|---|---|---|
server/AppstoreServer.java |
206 L | abstract server object: retrieveData, storeData, deleteData, sendBack, and the two verifiers verifyData / verifyOwner over SignedAppstoreData; className = "APPSTORE" is the monitoring tag |
server/AppstoreDataServer.java |
223 L | processMessage(OperationMessage) switch over storeMeta / removeMeta / retrieveMeta / modifyMeta; every operation first does a PAST existence check, then verifies, then acts |
model/AppstoreData.java |
17 L | marker interface Serializable, StorageItem + generateKeyValue() |
model/SignedAppstoreData.java |
34 L | the object actually stored in PAST: {UserID user, AppstoreData appdata, byte[] signature} |
utils/AppstoreServerReturnCode.java |
6 L | 12-value result enum (see Technical details) |
Plugin half, Source/org.lifesocial.plugin.appstore/src/org/lifesocial/plugin/appstore/ (23 classes,
2 392 lines):
| Class | Size | Role |
|---|---|---|
AppstorePlugin.java |
78 L | OSGi DS component @Component(name = "org.lifesocial.plugin.appstore"), @Reference(policy = DYNAMIC) to Framework; singleton with lazy UserToolKit / PublisherToolKit; holds pathToPluginFolder |
AppstoreToolKit.java |
204 L | base for both roles: five AppstoreDataClients (pmClient, vmClient, poClient, uprClient, pprClient), return-code → exception mapping, read-modify-write helpers for the two private repositories |
PublisherToolKit.java |
151 L | publishPlugin, publishNewVersion, deletePlugin, modifyPluginMeta … |
UserToolKit.java |
283 L | retrievePluginMeta, findAllDependencies, downloadPlugin, installPlugin, startPlugin, stopPlugin, uninstallPlugin(AllVersions), bootInstallPlugins, checkForUpdate |
client/AppstoreClient.java |
53 L | extends RemoteOperationClient; getBytesToSign(appData, dataID) and createSignature with the node's EC private key |
client/AppstoreDataClient.java |
55 L | the four meta operations, each with key = data.generateKeyValue() |
model/* |
912 L | PluginMeta(+StorageItem), VersionMeta(+StorageItem), PluginObjectFile(+StorageItem), PrivateUserRepository(+StorageItem), PrivatePublisherRepository(+StorageItem) |
utils/SeriVersion.java |
373 L | copy of org.osgi.framework.Version made Serializable (major.minor.micro.qualifier, Comparable) |
utils/* |
216 L | ItemAlreadyExistsException, RequestNotVerifiedException, FileNotReadedException, ObjectFileIsNullException, AppstorePluginException, PluginPropertiesContainer, PrivateRepositoryInstalledEntry, PrivateRepositoryPublishedEntry |
Activator.java |
30 L | plain BundleActivator, only stores the BundleContext; Bundle-ActivationPolicy: lazy |
Sample payloads, built by the same Gradle build but not part of -runrequires:
org.lifesocial.plugin.appstore.samples.clickme, .dummy, .redplugin,
.registrationform — Eclipse-RCP bundles (Require-Bundle: org.eclipse.ui, org.lifesocial.ui,
config/plugin.xml contributing views/commands), i.e. the artefacts that were published and
installed through the store during development. settings.gradle lines 50–54 and 102–106 wire all
five bundles into the build.
Wiring
- The store does not open its own message channel. All appstore traffic rides the shared DDS
backend channel
com.p2pframework.Backend(DDS/DataBackend.java,backendChannelName), which dispatches onRemoteOperationClientIdentifier; six appstore cases (AppstorePluginObject,AppstorePluginMeta,AppstoreVersionMeta,AppstoreRepository,AppstorePrivateUserRepository,AppstorePrivatePublisherRepository) each lazily create oneAppstoreDataServer(DataBackend.java:121–158).RemoteOperation.java:25–26carries the four appstore operations. - Client side:
AppstoreDataClient→AppstoreClient→DDS/RemoteOperationClient.issueOperation(hash, op, object), which builds anOperationMessage, registers aWaitingMessageCallback(expected = 1), sends withmessageChannel.sendMessageToResponsibleNode(hash, msg)and retries every 5 000 ms until the reply arrives (no attempt cap). - Server side storage goes through
Framework.getStorageDispatcher()→storage/past/PastryStorageDispatcher→PastImplwithreplicationFactor = 4(Source/org.lifesocial.core.utilities/resources/config/LibreSocialConfig.txt). - Key namespace (
AppstoreData.generateKeyValue(), hashed bypastryIDFactory.buildId(hash)):
| Item | Key pattern |
|---|---|
PluginMetaStorageItem |
plm_<pluginName>.app |
VersionMetaStorageItem |
vrm_<pluginName>_<version>.app |
PluginObjectFileStorageItem |
jar_<pluginName>_<version>.app |
PrivateUserRepositoryStorageItem |
upr_<username>.app |
PrivatePublisherRepositoryStorageItem |
ppr_<username>.app |
- Notable parameters: local drop folder
new File(File.separator + "apps" + File.separator)→ the absolute path/appson Linux, overridable throughAppstorePlugin.setPathToPluginFolder();PluginObjectFile.readFile()reads the JAR in 32 KiB chunks into onebyte[];ConfigLoader.getIntConfigProperty("measuringData")(currently1) enablesdatacollection/MeasuringStorageImpl.collect(b, "APPSTORE", "receive", item)on every server-side retrieve, which serialises the item to measure its size under a 50 ms GuavaSimpleTimeLimiterbudget. - Local install state is the real OSGi framework:
EclipseStarter.getSystemBundleContext(), theninstallBundle("file:///<path>/jar_<name>_<version>.app"),Bundle.start()/stop()/uninstall().
What is not wired (verified in the 2026 tree)
- No
AppstorePluginHandlerinorg.lifesocial.plugin.webprovider— 19 handlers exist (profile, wall, forum, …) and none for the appstore; the REST layer of the 2015 thesis is gone. - No command in
org.lifesocial.plugin.commands; no view inorg.lifesocial.ui; the SWT UI bundleorg.lifesocial.ui.appstorewas deleted on 2015-01-15 (commitc5395abd3, "Removed old UI projects"). Nothing outside the bundle callsgetUserToolKit()/getPublisherToolKit(). RemoteOperationClientIdentifier.AppstoreRepositoryand therepositoryManagercase inDataBackendsurvive, andUserToolKiteven constructs anAppstoreDataClient reClientfor it — but noRepositorymodel class exists, so shared repositories are dead identifiers.AppstoreServer.storeServerItem(...)(both overloads) is never called; appstore items go through the ordinarystoreItempath.com.p2pframework.unittests/src/com/p2pframework/appstore/PublicAppstoreTest.java(680 lines) has its whole test body inside/* … */blocks; the compiled class incom.p2pframework.unittests-1.0.0.jarcontains onlyinitNodes()anddestroyNodes(). The active lines still referenceAppstoreUserandDataClient, classes removed from the framework in 2013, so the file only compiles because it is commented out.
Design options and decision
Three designs are documented in the corpus; the shipped code is the third one, and the second and first still leave traces.
- Central app server (classic marketplace). Not chosen anywhere in the LibreSocial line: the platform's premise (demonstrated in LifeSocial.KOM demo 2010, argued in Graffi 2010) is that no single instance may hold the data or the authority. A central store would reintroduce a censorship/availability single point of failure, and its operator would be a trivially attackable target — the reason the DHT-based design was chosen for storage and search at all (Pastry 2001, PAST 2001). This alternative is reconstructed from that architectural position; no document compares it explicitly against a centralised store.
- Repository-object model (project group 2012): a
Repositoryidentified by aRepositoryCategoryID, aRepositoryDictionary,RepositoryEntryrecords and aRepositoryOwnerClientspeaking a dedicatedRepositoryOperationRequest/RepositoryRequestTypeprotocol — five layers, own client-server protocol, own category model (PG 2012 final report, presentation). Implemented undercom.p2pframework.appstore.repository_old/and deleted on 2013-02-28 (commit61c641a67). Trade-off as it can be read from the code: a repository object is a mutable shared collection owned by an authority — it needs its own request protocol, its own authorisation, and read-modify-write conflicts against every concurrent publication. - Per-item signed storage items plus private repositories — what ships. Each app release is a
separate PAST object addressed by a deterministic name-derived key; authorisation is a signature
checked by the responsible node, not an ACL; the only mutable state is two small per-user lists.
Chosen because it reuses the already-existing generic remote-operation plumbing
(PG 2011/12 final report,
framework overview 2013):
four new enum values instead of a new protocol, no owner-role bookkeeping, and publication is
three independent
storeMetacalls that cannot conflict with other publishers. The cost is that the store has no collection: there is no way to enumerate or search apps, only to look up an exact name — the marketplace's discovery problem was traded away for a much simpler consistency story. - DDS-collection repositories (proposed, never shipped). The master's thesis
Modasia 2015 and its
slides describe exactly this step: the user's
repository list and each repository's app list as
Distributed LinkedListentries, the set of users of a repository as aDistributed Set, and anAppstorePluginHandlerREST class in the webprovider layer behind a single-page HTML5/Bootstrap/Backbone.js GUI. The current tree contains none of it. Had it landed, browsing and membership would work (the primitives exist — see DDS), at the price of the bucketed-structure overhead and merge handling for every publish. The extraction of the thesis holds only chapters 1–2, so no measured comparison of the two data models survives; the ranking above is therefore partly reconstructed.
Monitoring instead of central control: the QoS question ("is the distribution of 1.5 MB JARs
degrading the nodes that host them?") was handled by the over-overlay, not by a store operator —
SkyEye 2008,
monitored LifeSocial 2011,
tree-based monitoring with the
convex-hull watchdog 2016
as the anti-abuse refinement. The appstore's contribution is the "APPSTORE" measurement tag fed
into that pipeline. (Gossip-based monitoring was rejected in the monitoring line for its weak causal
ordering — see monitoring; this affects the appstore only
indirectly, and that ranking is reconstructed from the monitoring papers, not from any appstore
document.)
Technical details
Publish (PublisherToolKit.publishPlugin). PluginObjectFile.readFile(path) → three
storeMeta calls (plm_, vrm_, jar_) → addPublishedPluginToPrivateRepository(entry).
storeMeta signs serialize(appData) || serialize(key) with the node's EC private key
(ECAsymmetricKey.signObject); the comment in AppstoreClient.getBytesToSign flags the known
fragility: Java serialisation is not guaranteed byte-stable, so a signature may fail to verify
against a re-serialised object.
Server-side semantics (AppstoreDataServer):
storeMeta— retrieve first; if aSignedAppstoreDatais already there →ItemAlreadyExists; otherwise verify sender (user exists,UserManager.getNodeID(userID) == msg.sender, signature valid) → store →OperationDone/StoringFailed.removeMeta— retrieve; nothing there →OperationDone(idempotent); otherwiseverifyData(msg) && verifyOwner(msg, key, storedItem)→deleteItem→DeletionFailedon error. Owner check means only the publishing identity may delete.modifyMeta— retrieve; absent →ItemNotFound; else verify sender and owner of the current item, then overwrite with the newSignedAppstoreData. No version/hash precondition, unlike DDS buckets: last writer wins.retrieveMeta— returns the innerAppstoreData(unwrapped) ornull.- Result codes:
OperationDone, RequestNotVerified, ItemAlreadyExists, ItemNotFound, StoringFailed, DeletionFailed, StorageException, FileNotFoundException, IOException, ObjectFileIsNullException, FileNotReadedException. Work runs onFramework.processingThread(...)(nested twice instoreMeta/retrieveMeta), so the retrieve callback never blocks the message thread.
Install path (UserToolKit). downloadPlugin fetches the jar_… item, writes it under
/apps/jar_<name>_<version>.app; installPlugin maps that path to a file:/// URL and calls
BundleContext.installBundle, then records PrivateRepositoryInstalledEntry(name, version).
findAllDependencies does a breadth-first closure over VersionMeta.getDependencies() —
plugin-name level, not package level, self-reference removal makes it cycle-safe, but it resolves
only the current version of each dependency. bootInstallPlugins re-downloads/installs and starts
entries whose autoLoad flag is set.
Integrity model. Application code is not signed and not encrypted: PAST-level access control
and per-element encryption belong to DDS (SecureDistributedDataItem, group keys) and the appstore
deliberately bypasses it. Authenticity of metadata is proven by the EC signature over
(AppstoreData, key); the JAR itself is whatever the publisher stored. Retrieval requires knowing
the exact name and version — which today is the only practical access restriction. See
security and access control.
Integration points. DDS enums and DataBackend (protocol reuse);
StorageDispatcher / PAST, past-storage
(replication, providerListLength, capacity-aware redirection and the social cache all apply to the
JAR items exactly as to any other object — see caching);
messaging (MessageChannel.sendMessageToResponsibleNode,
overlay routing); monitoring ("APPSTORE" series in
MeasuringStorageImpl and the SkyEyeData/GLOBAL_* output); Equinox/OSGi bundle lifecycle
(INSTALLED → RESOLVED → STARTING → ACTIVE → STOPPING → UNINSTALLED);
com.p2pframework.users for user-ID ↔ node-ID resolution used by the verifiers.
Sizing limits. A JAR is one PAST object, so it is subject to the object-size behaviour measured
for the platform: publications of ~1.5 MB per object were used in the 20-machine testbed described in
PG 2012 (100 publications, and the
Byte/s figures the group recorded there were judged implausible — measurement quality open), while
the same report notes that objects above roughly 3.1–4.3 MB made storage unreliable. No DDS bucket
splitting (dds_split_size) applies to appstore items.
Evolution and supersession
| Period | State |
|---|---|
| 2008–2009 | No appstore, but the prerequisites are defined: OSGi/Equinox plugin architecture in Podrajanski 2008 and Alvite 2008; hands-on plugin/JAR handling in the plugin practicum doc 2008, Quick Start 2009 and the JAR how-to 2009. |
| 2011/12 | Project group builds the generic remote-operation protocol (RemoteOperation, RemoteOperationClient, DataBackend) that the appstore later plugs into (PG 2011/12 report). |
| Aug 2012 | com.p2pframework.appstore server appears (first commits Appstore Server not ready, 2012-08-15). |
| Jan–Feb 2013 | Plugin bundle org.lifesocial.plugin.appstore appears; the repository_old model and the IAppstorePlugin/IPublisherClient/IUserClient API interfaces are deleted (2013-02-20, 2013-02-28) in favour of ToolKits + per-item keys; Version becomes the serialisable SeriVersion. |
| Mar 2013 | Four sample bundles added; org.lifesocial.ui.appstore SWT views (RepositoryView, RepositoryBrowserView, PreciseSearchView) added. |
| 2013/14 | PG 2013 report, presentation: REST/JSON web front end per plugin (webprovider PluginHandler classes), AppstorePluginHandler, RepositoryReference in org.lifesocial.core.main; this supersedes the 2012 report's repository-object description. |
| 2015 | Modasia thesis and slides document the intended DDS-based repository model and the single-page web GUI — the design was not realised; on 2015-01-15 the old RCP UI projects (including the appstore views) are deleted, and the webprovider appstore handler disappears with them. |
| 2019–2020 | Touched by the social-cache integration (2019-10-28). The LibreSocial framework paper 2020 and Graffi's dissertation 2020 list the AppStore as a framework service rather than a user-facing feature — the accurate description for a headless build; the survey 2020 keeps it as a platform capability. |
| 2025 | Imam's revival 2025 and the setup guide 2025: the appstore bundles matter only as build/manifest/classpath objects (JDK 1.7 era, ~120 fixes), no architecture change. |
| 2026 | Gradle + bnd migration (bnd.bnd per bundle, JavaSE-17, lazy activation, DS annotations), appstore in cnf/org.libresocial.launcher.common.bndrun, code reformatted (gradlew rewriteRun), @Serial annotations. Behaviour unchanged since 2014. |
Reading order for reviewers: the 2012 report describes a component architecture with a repository layer that no longer exists; the 2015 thesis describes a GUI and DDS repositories that were never shipped; the 2020 papers and the 2025/2026 build describe what actually runs — a headless, name-keyed publication service. Only the 2020-and-later descriptions should be trusted for the current state, and only the source for the API surface.
Known open points in 2026: no discovery/browse path at all (a caller must know a plugin name);
AppstoreRepository identifiers with no model behind them; last-write-wins modifyMeta without the
hash precondition used by DDS; signature over Java-serialised bytes (fragile by the authors' own
comment); /apps absolute path; unbounded retry loop in issueOperation; a test suite that is
commented out.
Related publications
- Appstore for LibreSocial — A Repository based App-Management for P2P Framework (2015)
- Appstore for LibreSocial — A repository based App-management for P2P Framework, slides (2015)
- A Distributed Framework for Social Networks — Final Report, Project Group 2011/12 (2012)
- A Peer-to-Peer Framework for Social Networks — Dokumentation, Project Group 2012/13 (2013)
- A Peer-to-Peer Framework for Social Networks — Project Group 2012/2013 (presentation) (2013)
- A Peer-to-Peer Framework for Social Networks — Final Report, Project Group 2013/14 (2014)
- A Peer-to-Peer Framework for Social Networks — Project Group 2013/2014 (presentation) (2014)
- A P2P-Framework for Social Networks (2013)
- A Peer-to-Peer based Framework for Large-Scale Social Networking Platforms (2008)
- Design and Implementation of a Service-oriented, Dynamic and Modular P2P-based Multimedia Online Community Platform using OSGi (2008)
- LifeSocial – Masterpraktikum: Entwurf und Implementierung neuer Plug-ins (2008)
- Development of LifeSocial Plug-ins (Quick Start) (2009)
- Updating the core LifeSocial library (How-To) (2009)
- Pastry: Scalable, decentralized object location and routing (2001)
- PAST: A large-scale, persistent peer-to-peer storage utility (2001)
- Sets, Lists and Trees: Distributed Data Structures on Distributed Hash Tables (2016)
- Secure Distributed Data Structures for Peer-to-Peer-based Social Networks (2014)
- Practical Security in P2P-based Social Networks (2009)
- SkyEye.KOM: An Information Management Over-Overlay (2008)
- Monitoring and Management of Peer-to-Peer Systems (2010)
- LifeSocial.KOM: A Secure and P2P-based Solution for Online Social Networks (2011)
- SkyEye: A tree-based peer-to-peer monitoring approach (2017)
- Convex Hull Watchdog: Mitigation of Malicious Nodes in Tree-based P2P Monitoring Systems (2016)
- LibreSocial: A peer-to-peer framework for online social networks (2020)
- Peer-to-Peer Mechanisms for Fully Decentralized, Secure and Scalable Online Social Networks (2020)
- Peer-to-Peer based Social Networks: A Comprehensive Survey (2020)
- LifeSocial.KOM: A P2P-based Platform for Secure Online Social Networks, demo paper (2010)
- Reviving LibreSocial: Error Fixes and a Baseline Evaluation on Modern Systems (2025)
- Running LibreSocial: A Legacy Java Project Setup Guide (2025)