├── .gitignore ├── README.textile ├── doc └── images │ ├── tinkubator-logo.graffle │ └── tinkubator-logo.png ├── gitgraph-sandbox ├── README.txt └── graph │ ├── edges │ ├── eprops │ ├── extras │ └── josh │ │ ├── edges │ │ ├── eprops │ │ ├── vertices │ │ └── vprops │ ├── vertices │ └── vprops ├── gitgraph └── src │ ├── main │ └── java │ │ └── com │ │ └── tinkerpop │ │ └── blueprints │ │ └── pgm │ │ └── impls │ │ └── git │ │ ├── GitGraph.java │ │ └── GitGraphHelper.java │ └── test │ └── java │ └── com │ └── tinkerpop │ └── blueprints │ └── pgm │ └── impls │ └── git │ └── GitGraphTest.java ├── graphdb-bench ├── .gitignore ├── README.textile ├── cloud1_specs.txt ├── data │ ├── datasets │ │ └── README.textile │ └── results │ │ └── README.textile ├── doc │ ├── graphdb-bench.wiki │ │ ├── Acknowledgements.textile │ │ ├── Benchmark.textile │ │ ├── Creating-Artificial-Graphs.textile │ │ ├── Evaluator.textile │ │ ├── Frequently-Asked-Questions.md │ │ ├── Home.textile │ │ ├── Introduction.textile │ │ ├── Operation.textile │ │ ├── OperationFactory.textile │ │ ├── Overview.textile │ │ ├── Plotting-Results.md │ │ ├── Published-Benchmark-Results.textile │ │ ├── Reading-Result-Logs.textile │ │ └── Running-Benchmarks.textile │ └── images │ │ ├── graphdb-bench-evaluator-distribution.png │ │ ├── graphdb-bench-evaluator-graph.png │ │ ├── graphdb-bench-logo.png │ │ └── graphdb-bench-structure.png ├── pom.xml ├── runBenchmarkSuite.sh └── src │ ├── assembly │ ├── distribution.xml │ └── standalone.xml │ └── main │ ├── java │ └── com │ │ └── tinkerpop │ │ └── bench │ │ ├── Bench.java │ │ ├── BenchRunner.java │ │ ├── BenchmarkSuite.java │ │ ├── GraphDescriptor.java │ │ ├── LogUtils.java │ │ ├── StatisticsHelper.java │ │ ├── benchmark │ │ ├── Benchmark.java │ │ ├── BenchmarkEchoVersusDepth.java │ │ └── BenchmarkReadWriteVersusSize.java │ │ ├── evaluators │ │ ├── Evaluator.java │ │ ├── EvaluatorDegree.java │ │ ├── EvaluatorInDegree.java │ │ ├── EvaluatorOutDegree.java │ │ ├── EvaluatorProperty.java │ │ └── EvaluatorUniform.java │ │ ├── log │ │ ├── OperationLogEntry.java │ │ ├── OperationLogReader.java │ │ ├── OperationLogWriter.java │ │ └── SummaryLogWriter.java │ │ ├── operation │ │ ├── Operation.java │ │ ├── OperationDeleteGraph.java │ │ ├── OperationDoGC.java │ │ ├── OperationOpenGraph.java │ │ ├── OperationShutdownGraph.java │ │ └── operations │ │ │ ├── OperationGremlin.java │ │ │ ├── OperationIndexGetElements.java │ │ │ ├── OperationIndexPutAllElements.java │ │ │ ├── OperationLoadGraphML.java │ │ │ ├── OperationPipesEchoIntensive.java │ │ │ └── OperationPipesEchoLazy.java │ │ └── operationFactory │ │ ├── OperationArgs.java │ │ ├── OperationFactory.java │ │ ├── OperationFactoryBase.java │ │ ├── OperationFactoryGeneric.java │ │ ├── OperationFactoryLog.java │ │ └── factories │ │ ├── OperationFactoryGremlinOutNeighbors.java │ │ ├── OperationFactoryIndexGetElements.java │ │ └── OperationFactoryPipesEcho.java │ ├── python │ ├── graph-creator.py │ └── pyjavaproperties.py │ ├── r │ └── graph-creator.r │ └── resources │ └── com │ └── tinkerpop │ └── bench │ ├── bench.properties │ └── log4j.properties ├── lopsided ├── LICENSE.txt ├── README.textile ├── doc │ ├── images │ │ ├── farm-gui-login.png │ │ ├── farm-gui-main-vms.png │ │ ├── farm-gui-main.png │ │ ├── icons │ │ │ ├── countryside.png │ │ │ ├── farm.png │ │ │ ├── job.png │ │ │ ├── registry.png │ │ │ ├── security.png │ │ │ ├── villein.png │ │ │ └── vm.png │ │ ├── lop-cloud.png │ │ ├── lop-hierarchy.png │ │ ├── lop-logo-mini.graffle │ │ ├── lop-logo-mini.png │ │ ├── lop-logo.graffle │ │ ├── lop-logo.png │ │ ├── lop-overview.graffle │ │ │ ├── Icon │ │ │ ├── data.plist │ │ │ ├── image2.png │ │ │ ├── image3.png │ │ │ ├── image4.png │ │ │ ├── image5.png │ │ │ └── image6.png │ │ ├── lop-overview.png │ │ ├── lop-sequence.graffle │ │ │ ├── Icon │ │ │ ├── data.plist │ │ │ ├── image3.png │ │ │ ├── image4.png │ │ │ └── image5.png │ │ ├── lop-sequence.png │ │ ├── lop-xmpp-communication.graffle │ │ │ ├── Icon │ │ │ ├── data.plist │ │ │ ├── image1.tiff │ │ │ ├── image6.png │ │ │ ├── image7.pdf │ │ │ ├── image8.pdf │ │ │ └── image9.pdf │ │ ├── lop-xmpp-communication.png │ │ ├── lopsided-logo.graffle │ │ ├── lopsided-logo.png │ │ ├── villein-gui-login.png │ │ ├── villein-gui-main-spawn.png │ │ ├── villein-gui-main-vms.png │ │ ├── villein-gui-main.png │ │ └── villein-gui-vm.png │ ├── lopsided.wiki │ │ ├── A-Tutorial-with-the-Villein-GUI.textile │ │ ├── Deploying-a-Farm.textile │ │ ├── Developing-a-Villein.textile │ │ ├── Home.textile │ │ ├── Introduction-to-Linked-Process.textile │ │ ├── Linked-Process-and-XMPP.textile │ │ ├── Managing-Farm-Permissions.textile │ │ └── Use-Cases-for-Linked-Process.textile │ └── spec │ │ ├── lop.html │ │ ├── lop_files │ │ └── xmpp.css │ │ ├── xep │ │ ├── ref.xsl │ │ ├── xep-lop.xml │ │ ├── xep.dtd │ │ ├── xep.ent │ │ └── xep.xsl │ │ └── xmpp.css ├── laboratory │ ├── josh │ │ └── lopsided-linkeddata │ │ │ ├── create-demo-triplestore.sh │ │ │ ├── pom.xml │ │ │ ├── run-ld-server.sh │ │ │ └── src │ │ │ ├── assembly │ │ │ └── full.xml │ │ │ └── main │ │ │ ├── java │ │ │ └── org │ │ │ │ └── linkedprocess │ │ │ │ └── linkeddata │ │ │ │ ├── Experiment.java │ │ │ │ ├── LinkedDataWalker.java │ │ │ │ ├── ScriptEngineGateway.java │ │ │ │ ├── SingleUriResolution.java │ │ │ │ ├── nquads │ │ │ │ ├── ModifiedNTriplesParser.java │ │ │ │ ├── NQuadsFormat.java │ │ │ │ └── NQuadsParser.java │ │ │ │ ├── server │ │ │ │ ├── DemoServer.java │ │ │ │ └── rewriter │ │ │ │ │ ├── RewriterSail.java │ │ │ │ │ ├── RewriterSailConnection.java │ │ │ │ │ ├── RewritingSchema.java │ │ │ │ │ └── URIRewriter.java │ │ │ │ └── tools │ │ │ │ └── CreateDemoTripleStore.java │ │ │ └── resources │ │ │ └── org │ │ │ └── linkedprocess │ │ │ └── linkeddata │ │ │ ├── LinkedDataWalker.groovy │ │ │ └── SingleUriResolution.groovy │ ├── max │ │ └── python-villein │ │ │ ├── lop_managers.py │ │ │ ├── lop_protocols.py │ │ │ └── villein.py │ └── peter │ │ └── villein-15-app │ │ ├── .classpath │ │ ├── .project │ │ ├── Android.patch │ │ ├── AndroidManifest.xml │ │ ├── README.txt │ │ ├── assets │ │ ├── defaults.properties │ │ ├── demo.properties │ │ ├── findPrimes.groovy │ │ ├── lop-default.properties │ │ ├── smack-config.xml │ │ └── smack.providers │ │ ├── default.properties │ │ ├── res │ │ ├── drawable │ │ │ ├── icon.png │ │ │ └── lop.png │ │ ├── layout │ │ │ ├── config_primes.xml │ │ │ ├── createjob.xml │ │ │ ├── main.xml │ │ │ ├── overview.xml │ │ │ └── row.xml │ │ ├── values │ │ │ └── strings.xml │ │ └── xml │ │ │ └── preferences.xml │ │ └── src │ │ └── main │ │ └── java │ │ ├── logging.properties │ │ └── org │ │ └── linkedprocess │ │ ├── farm │ │ └── android │ │ │ └── AndroidFarm.java │ │ ├── smack │ │ └── AndroidProviderManager.java │ │ └── villein │ │ └── android │ │ ├── ConfigurePrimes.java │ │ ├── ConnectionListener.java │ │ ├── CreateJob.java │ │ ├── EditPreferences.java │ │ ├── Prefs.java │ │ ├── ShowProgress.java │ │ ├── Villein.java │ │ ├── VilleinOverview.java │ │ ├── VilleinService.java │ │ └── VmPollVisualProgressTask.java ├── lopsided-core │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── linkedprocess │ │ │ │ ├── Connection.java │ │ │ │ ├── Jid.java │ │ │ │ ├── LinkedProcess.java │ │ │ │ ├── LopError.java │ │ │ │ ├── LopIq.java │ │ │ │ ├── LopPacketListener.java │ │ │ │ ├── LopXmppException.java │ │ │ │ ├── ProbePresence.java │ │ │ │ ├── XmppClient.java │ │ │ │ ├── XmppConnectionWrapper.java │ │ │ │ └── farm │ │ │ │ ├── AbortJob.java │ │ │ │ ├── AbortJobProvider.java │ │ │ │ ├── FarmIq.java │ │ │ │ ├── ManageBindings.java │ │ │ │ ├── ManageBindingsProvider.java │ │ │ │ ├── PingJob.java │ │ │ │ ├── PingJobProvider.java │ │ │ │ ├── SpawnVm.java │ │ │ │ ├── SpawnVmProvider.java │ │ │ │ ├── SubmitJob.java │ │ │ │ ├── SubmitJobProvider.java │ │ │ │ ├── TerminateVm.java │ │ │ │ ├── TerminateVmProvider.java │ │ │ │ ├── os │ │ │ │ ├── Job.java │ │ │ │ ├── JobResult.java │ │ │ │ ├── TypedValue.java │ │ │ │ ├── VmBindings.java │ │ │ │ └── errors │ │ │ │ │ ├── InvalidValueException.java │ │ │ │ │ ├── NoSuchDatatypeException.java │ │ │ │ │ └── SchedulerException.java │ │ │ │ └── security │ │ │ │ ├── PathPermissions.java │ │ │ │ ├── PermissionType.java │ │ │ │ ├── ServiceDiscoveryConfiguration.java │ │ │ │ ├── SystemInfo.java │ │ │ │ ├── VmSandboxedThread.java │ │ │ │ ├── VmSecurityManager.java │ │ │ │ └── VmSecurityManagerListener.java │ │ ├── resources │ │ │ ├── META-INF │ │ │ │ └── services │ │ │ │ │ └── javax.script.ScriptEngineFactory │ │ │ ├── log4j.properties │ │ │ ├── logging.properties │ │ │ └── org │ │ │ │ └── linkedprocess │ │ │ │ ├── LoPFarm.owl │ │ │ │ └── lop-default.properties │ │ └── ruby │ │ │ └── org │ │ │ └── linkedprocess │ │ │ ├── demos │ │ │ └── prime_finder.rb │ │ │ └── xmpp-rb │ │ │ ├── farm_struct.rb │ │ │ ├── host_struct.rb │ │ │ ├── job.rb │ │ │ ├── linked_process.rb │ │ │ ├── lop_villein.rb │ │ │ ├── packet_maker.rb │ │ │ ├── struct.rb │ │ │ └── vm_struct.rb │ │ └── test │ │ └── java │ │ └── org │ │ └── linkedprocess │ │ ├── ConcurrencyTest.java │ │ ├── JidTest.java │ │ ├── XmppClientTest.java │ │ └── farm │ │ └── security │ │ ├── PathPermissionsTest.java │ │ └── ServiceDiscoveryConfigurationTest.java ├── lopsided-farm │ ├── LICENSE.txt │ ├── README.txt │ ├── demo_fortytwo_countryside.properties │ ├── demo_lanl_countryside.properties │ ├── farm-nogui.bat │ ├── farm-nogui.sh │ ├── fortytwo_countryside.properties │ ├── lanl_countryside.properties │ ├── pom.xml │ ├── src │ │ ├── assembly │ │ │ ├── distribution.xml │ │ │ └── standalone.xml │ │ ├── main │ │ │ ├── java │ │ │ │ └── org │ │ │ │ │ └── linkedprocess │ │ │ │ │ ├── JavaScriptEngineFactory.java │ │ │ │ │ └── farm │ │ │ │ │ ├── AbortJobPacketListener.java │ │ │ │ │ ├── Farm.java │ │ │ │ │ ├── FarmPacketListener.java │ │ │ │ │ ├── LinkedProcessFarm.java │ │ │ │ │ ├── ManageBindingsPacketListener.java │ │ │ │ │ ├── PingJobPacketListener.java │ │ │ │ │ ├── PresenceSubscriptionFilter.java │ │ │ │ │ ├── PresenceSubscriptionPacketListener.java │ │ │ │ │ ├── SpawnVmPacketListener.java │ │ │ │ │ ├── StatusEventHandler.java │ │ │ │ │ ├── SubmitJobPacketListener.java │ │ │ │ │ ├── TerminateVmPacketListener.java │ │ │ │ │ ├── VmJobResultHandler.java │ │ │ │ │ └── os │ │ │ │ │ ├── SimpleBlockingQueue.java │ │ │ │ │ ├── Vm.java │ │ │ │ │ ├── VmScheduler.java │ │ │ │ │ ├── VmSequencer.java │ │ │ │ │ ├── VmWorker.java │ │ │ │ │ └── errors │ │ │ │ │ ├── JobAlreadyExistsException.java │ │ │ │ │ ├── JobNotFoundException.java │ │ │ │ │ ├── UnsupportedScriptEngineException.java │ │ │ │ │ ├── VmAlreadyExistsException.java │ │ │ │ │ ├── VmIsFullException.java │ │ │ │ │ ├── VmNotFoundException.java │ │ │ │ │ └── VmSchedulerIsFullException.java │ │ │ └── resources │ │ │ │ └── META-INF │ │ │ │ └── services │ │ │ │ └── org.openrdf.rio.RDFParserFactory │ │ └── test │ │ │ └── java │ │ │ └── org │ │ │ └── linkedprocess │ │ │ ├── LopPacketTest.java │ │ │ ├── MockFarmXmppConnection.java │ │ │ ├── OfflineFarmTest.java │ │ │ ├── OfflineVmTest.java │ │ │ ├── OnlineFarmTest.java │ │ │ ├── ScriptEngineTest.java │ │ │ └── farm │ │ │ ├── SpawnVmProviderTest.java │ │ │ └── os │ │ │ ├── VmSchedulerTest.java │ │ │ └── VmWorkerTest.java │ └── sweden_countryside.properties ├── lopsided-gui │ ├── LICENSE.txt │ ├── README.txt │ ├── farm-gui.bat │ ├── farm-gui.sh │ ├── pom.xml │ ├── src │ │ ├── assembly │ │ │ ├── distribution.xml │ │ │ └── standalone.xml │ │ └── main │ │ │ ├── java │ │ │ └── org │ │ │ │ └── linkedprocess │ │ │ │ └── gui │ │ │ │ ├── GenericErrorHandler.java │ │ │ │ ├── ImageHolder.java │ │ │ │ ├── LoginArea.java │ │ │ │ ├── PacketSnifferPanel.java │ │ │ │ ├── RosterPanel.java │ │ │ │ ├── TreeRenderer.java │ │ │ │ ├── farm │ │ │ │ ├── FarmGui.java │ │ │ │ ├── FarmGuiStatusEventHandler.java │ │ │ │ ├── FarmLoginArea.java │ │ │ │ ├── VmArea.java │ │ │ │ └── vmviewer │ │ │ │ │ ├── MetadataPanel.java │ │ │ │ │ ├── ViewBindingsPanel.java │ │ │ │ │ └── VmViewerFrame.java │ │ │ │ └── villein │ │ │ │ ├── CloudArea.java │ │ │ │ ├── ViewFarmConfigurationPanel.java │ │ │ │ ├── ViewRegistryCountrysidesPanel.java │ │ │ │ ├── VilleinGui.java │ │ │ │ ├── VilleinLoginArea.java │ │ │ │ └── vmcontrol │ │ │ │ ├── JobPane.java │ │ │ │ ├── ManageBindingsPanel.java │ │ │ │ └── VmControlFrame.java │ │ │ └── resources │ │ │ └── org │ │ │ └── linkedprocess │ │ │ └── gui │ │ │ ├── active.png │ │ │ ├── add.png │ │ │ ├── countryside.png │ │ │ ├── cow-background.png │ │ │ ├── farm-background.png │ │ │ ├── farm-password.png │ │ │ ├── farm.png │ │ │ ├── inactive.png │ │ │ ├── letter.png │ │ │ ├── lop-logo.png │ │ │ ├── mailbox.png │ │ │ ├── password.png │ │ │ ├── registry.png │ │ │ ├── remove.png │ │ │ ├── species.png │ │ │ ├── status.png │ │ │ ├── time.png │ │ │ ├── villein.png │ │ │ └── vm.png │ ├── villein-gui.bat │ └── villein-gui.sh ├── lopsided-registry │ ├── LICENSE.txt │ ├── README.txt │ ├── lanl_registry.properties │ ├── pom.xml │ ├── registry-nogui.bat │ ├── registry-nogui.sh │ └── src │ │ ├── assembly │ │ ├── distribution.xml │ │ └── standalone.xml │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── linkedprocess │ │ │ └── registry │ │ │ ├── PresencePacketListener.java │ │ │ ├── PresenceSubscriptionFilter.java │ │ │ ├── PresenceSubscriptionListener.java │ │ │ ├── Registry.java │ │ │ └── RegistryPacketListener.java │ │ └── test │ │ └── java │ │ └── org │ │ └── linkedprocess │ │ └── registry │ │ ├── MockRegistryXmppConnection.java │ │ └── OfflineRegistryTest.java ├── lopsided-util │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── linkedprocess │ │ └── testing │ │ └── offline │ │ ├── MockXmppConnection.java │ │ ├── MultiCaptureMatcher.java │ │ └── OfflineTest.java ├── lopsided-villein │ ├── LICENSE.txt │ ├── pom.xml │ └── src │ │ ├── assembly │ │ └── distribution.xml │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── linkedprocess │ │ │ │ ├── demos │ │ │ │ ├── polling │ │ │ │ │ └── ProgressPolling.java │ │ │ │ └── primes │ │ │ │ │ └── PrimeFinder.java │ │ │ │ └── villein │ │ │ │ ├── Dispatcher.java │ │ │ │ ├── Handler.java │ │ │ │ ├── NoHandlerForPacketException.java │ │ │ │ ├── PresenceHandler.java │ │ │ │ ├── PresencePacketListener.java │ │ │ │ ├── Villein.java │ │ │ │ ├── VilleinPacketListener.java │ │ │ │ ├── commands │ │ │ │ ├── AbortJobCommand.java │ │ │ │ ├── Command.java │ │ │ │ ├── GetBindingsCommand.java │ │ │ │ ├── HandlerSet.java │ │ │ │ ├── PingJobCommand.java │ │ │ │ ├── SetBindingsCommand.java │ │ │ │ ├── SpawnVmCommand.java │ │ │ │ ├── SubmitJobCommand.java │ │ │ │ └── TerminateVmCommand.java │ │ │ │ ├── patterns │ │ │ │ ├── BindingsChecker.java │ │ │ │ ├── EntityAllocationPattern.java │ │ │ │ ├── PollBindingsPattern.java │ │ │ │ ├── ScatterGatherPattern.java │ │ │ │ ├── SynchronousPattern.java │ │ │ │ └── TimeoutException.java │ │ │ │ └── proxies │ │ │ │ ├── CloudProxy.java │ │ │ │ ├── CountrysideProxy.java │ │ │ │ ├── FarmProxy.java │ │ │ │ ├── JobProxy.java │ │ │ │ ├── ParentProxyNotFoundException.java │ │ │ │ ├── RegistryProxy.java │ │ │ │ ├── ResultHolder.java │ │ │ │ ├── VmProxy.java │ │ │ │ └── XmppProxy.java │ │ └── resources │ │ │ └── org │ │ │ └── linkedprocess │ │ │ └── demos │ │ │ ├── demo.properties │ │ │ └── primes │ │ │ └── FindPrimes.groovy │ │ └── test │ │ └── java │ │ └── org │ │ └── linkedprocess │ │ └── proxies │ │ ├── CloudProxyTest.java │ │ └── JobProxyTest.java └── pom.xml ├── multigraph ├── pom.xml └── src │ ├── main │ └── java │ │ └── com │ │ └── tinkerpop │ │ └── blueprints │ │ └── pgm │ │ └── impls │ │ └── multi │ │ ├── MultiEdge.java │ │ ├── MultiElement.java │ │ ├── MultiGraph.java │ │ ├── MultiIterable.java │ │ └── MultiVertex.java │ └── test │ └── java │ └── com │ └── tinkerpop │ └── blueprints │ └── pgm │ └── impls │ └── multi │ └── MultiGraphTest.java ├── mutant ├── .gitignore ├── LICENSE.txt ├── README.textile ├── doc │ ├── images │ │ ├── mutant-logo-raw.svg │ │ ├── mutant-logo.graffle │ │ ├── mutant-logo.png │ │ ├── mutant-system-arch.graffle │ │ └── mutant-system-arch.png │ └── mutant.wiki │ │ ├── Basic-Examples.textile │ │ ├── Home.textile │ │ ├── Introduction.textile │ │ ├── Mutant-Language.textile │ │ └── Supported-Engines.textile ├── mutant.bat ├── mutant.sh ├── pom.xml └── src │ ├── assembly │ ├── distribution.xml │ └── standalone.xml │ ├── main │ ├── bin │ │ ├── mutant.bat │ │ └── mutant.sh │ ├── java │ │ └── com │ │ │ └── tinkerpop │ │ │ └── mutant │ │ │ ├── Console.java │ │ │ ├── EngineHolder.java │ │ │ ├── MutantBindings.java │ │ │ ├── MutantScriptEngine.java │ │ │ ├── MutantScriptEngineFactory.java │ │ │ └── Tokens.java │ └── resources │ │ └── META-INF │ │ └── services │ │ └── javax.script.ScriptEngineFactory │ └── test │ └── java │ └── com │ └── tinkerpop │ └── mutant │ └── MutantScriptEngineTest.java └── wrender ├── .gitignore ├── README.textile ├── data ├── graph-example-1.xml └── graph-example-2.xml ├── doc ├── images │ ├── demo-screen-1.png │ ├── demo-screen-2.png │ ├── demo-screen-3.png │ ├── demo-screen-4.png │ ├── wrender-logo.graffle │ └── wrender-logo.png └── wrender.wiki │ ├── Home.textile │ └── Introduction.textile ├── pom.xml ├── src ├── assembly │ ├── distribution.xml │ └── standalone.xml ├── main │ ├── bin │ │ └── wrender.sh │ └── java │ │ └── com │ │ └── tinkerpop │ │ └── wrender │ │ └── Wrender.java └── test │ └── java │ └── com │ └── tinkerpop │ └── wrender │ └── WrenderTest.java └── wrender.sh /.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | target/ 3 | .idea/ 4 | *.iml -------------------------------------------------------------------------------- /README.textile: -------------------------------------------------------------------------------- 1 | !https://github.com/tinkerpop/tinkubator/raw/master/doc/images/tinkubator-logo.png! 2 | 3 | The Tinkubator is a laboratory repository for emerging "TinkerPop":http://tinkerpop.com projects. Furthermore, it also contains historic, low-activity projects. If you feel like contributing to TinkerPop, perhaps start a fresh project in the Tinkubator. 4 | 5 | Selected Tinkubator projects: 6 | # "PropertyGraphSail":https://github.com/tinkerpop/tinkubator/wiki/PropertyGraphSail, which provides an RDF view of any Blueprints graph 7 | 8 | -------------------------------------------------------------------------------- /doc/images/tinkubator-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/doc/images/tinkubator-logo.png -------------------------------------------------------------------------------- /gitgraph-sandbox/graph/edges: -------------------------------------------------------------------------------- 1 | 0 extras/josh/0 4 parent 2 | 10 4 5 created 3 | 11 4 3 created 4 | 12 6 3 created 5 | 7 1 2 knows 6 | 8 1 4 knows 7 | 9 1 3 created 8 | -------------------------------------------------------------------------------- /gitgraph-sandbox/graph/eprops: -------------------------------------------------------------------------------- 1 | 10 weight Float 1.0 2 | 11 weight Float 0.4 3 | 12 weight Float 0.2 4 | 7 weight Float 0.5 5 | 8 weight Float 1.0 6 | 9 weight Float 0.4 7 | -------------------------------------------------------------------------------- /gitgraph-sandbox/graph/extras/josh/edges: -------------------------------------------------------------------------------- 1 | 2 0 1 favorite color 2 | -------------------------------------------------------------------------------- /gitgraph-sandbox/graph/extras/josh/eprops: -------------------------------------------------------------------------------- 1 | 2 comment String as far as we can tell 2 | -------------------------------------------------------------------------------- /gitgraph-sandbox/graph/extras/josh/vertices: -------------------------------------------------------------------------------- 1 | 0 2 | 1 3 | -------------------------------------------------------------------------------- /gitgraph-sandbox/graph/extras/josh/vprops: -------------------------------------------------------------------------------- 1 | 0 age Double 0.5 2 | 0 full name String Leon Shinavier 3 | 1 name String yellow 4 | -------------------------------------------------------------------------------- /gitgraph-sandbox/graph/vertices: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | 3 4 | 4 5 | 5 6 | 6 7 | -------------------------------------------------------------------------------- /gitgraph-sandbox/graph/vprops: -------------------------------------------------------------------------------- 1 | 1 age Integer 29 2 | 1 name String marko 3 | 2 age Integer 27 4 | 2 name String vadas 5 | 3 lang String java 6 | 3 name String lop 7 | 4 age Integer 34 8 | 4 full name String Joshua Shinavier 9 | 4 name String josh 10 | 5 lang String java 11 | 5 name String ripple 12 | 6 age Integer 35 13 | 6 name String peter 14 | -------------------------------------------------------------------------------- /graphdb-bench/.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | *.edgelist 3 | #*.graphml 4 | *.pyc 5 | *~ 6 | target/ 7 | bin/ 8 | wiki/ 9 | blog/ 10 | doc/old wiki entries/ 11 | #data/datasets/ 12 | #!data/datasets/barabasi.graphml 13 | #data/results/ 14 | .settings/ 15 | .project 16 | .pydevproject 17 | .classpath 18 | .idea/ 19 | graphdb-bench.iml 20 | 21 | -------------------------------------------------------------------------------- /graphdb-bench/README.textile: -------------------------------------------------------------------------------- 1 | !https://github.com/tinkerpop/graphdb-bench/raw/master/doc/images/graphdb-bench-logo.png! 2 | 3 | GraphDB-Bench is a collection of benchmarks for analyzing the performance of various graph frameworks. In order to use GraphDB-Bench, please ensure that the following are installed on the testing system: 4 | 5 | * "Java 1.6+":http://java.sun.com/: All benchmarks are currently evaluated from the perspective of using Java as the primary graph accessing language 6 | * Statistical Framework 7 | ** "R:Statistics":http://www.r-project.org/: Used to generate graphs and plot analyses 8 | *** "iGraph":http://igraph.sourceforge.net/: Used to generate artificial graphs 9 | ** "Python":http://python.org/: Used to generate graphs and plot analyses 10 | *** "iGraph":http://igraph.sourceforge.net/: Used to generate artificial graphs 11 | 12 | The documentation for GraphDB-Bench can be found at this "location":http://graphdb-bench.tinkerpop.com. Questions can be asked on the "Gremlin mailing list":http://groups.google.com/group/gremlin-users/topics. Finally, please visit "TinkerPop":http://tinkerpop.com for other software products. 13 | -------------------------------------------------------------------------------- /graphdb-bench/cloud1_specs.txt: -------------------------------------------------------------------------------- 1 | Linux version 2.6.35-23-server 2 | CPU 2 x Six-Core AMD Opteron(tm) Processor 2435 (2.6 GHz) 3 | RAM 32 GB 4 | FS ext2 or ext4 5 | JVM HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode) 6 | JRE JRE 1.6.0_22-b04 7 | 8 | 9 | -------------------------------------------------------------------------------- /graphdb-bench/data/datasets/README.textile: -------------------------------------------------------------------------------- 1 | This directory is the primary location whereby graph datasets are saved and loaded. 2 | Please refer to bench.properties in order to change this location. -------------------------------------------------------------------------------- /graphdb-bench/data/results/README.textile: -------------------------------------------------------------------------------- 1 | This directory is the primary location whereby graph analyses results are saved. 2 | Please refer to bench.properties in order to change this location. -------------------------------------------------------------------------------- /graphdb-bench/doc/graphdb-bench.wiki/Acknowledgements.textile: -------------------------------------------------------------------------------- 1 | This section provides a list of the people that have contributed in some way to the creation of GraphDB-Bench. 2 | 3 | # "Alex Averbuch":http://se.linkedin.com/in/alexaverbuch -- co-designed core concepts, main developer, and documenter of GraphDB-Bench. 4 | # "Marko A. Rodriguez":http://markorodriguez.com -- creator of GraphDB-Bench, and writer of initial code base and documentation. 5 | # "Martin Neumann":http://se.linkedin.com/pub/martin-neumann/19/5a6/553 -- co-designed core concepts, and helped develop initial version of current code base. 6 | 7 | Please review GraphDB-Bench's "pom.xml":http://github.com/tinkerpop/graphdb-bench/blob/master/pom.xml. GraphDB-Bench would not be possible without the work done by others to create these useful packages. 8 | 9 | For more information join the Gremlin (GraphDB-Bench does not have a users group at present) users group at "http://groups.google.com/group/gremlin-users":http://groups.google.com/group/gremlin-users. -------------------------------------------------------------------------------- /graphdb-bench/doc/graphdb-bench.wiki/Frequently-Asked-Questions.md: -------------------------------------------------------------------------------- 1 | Put stuff here... -------------------------------------------------------------------------------- /graphdb-bench/doc/graphdb-bench.wiki/Home.textile: -------------------------------------------------------------------------------- 1 | !https://github.com/tinkerpop/graphdb-bench/raw/master/doc/images/graphdb-bench-logo.png! 2 | 3 | GraphDB-Bench is an extensible graph database benchmarking tool. Its goal is to provide an easy-to-use library for defining and running application/domain-specific benchmarks against different graph database implementations. To achieve this the core code-base has been kept relatively simple, through extensive use of lower layers in the "TinkerPop":http://github.com/tinkerpop stack. 4 | 5 | In addition to the benchmarking framework, GraphDB-Bench also includes a collection of artificial graph generation code. 6 | 7 | The documentation herein will provide all the information necessary for understanding how to define benchmarks, generate synthetic graphs, run benchmarks on these loaded graphs, and evaluate benchmark results. 8 | 9 | Finally, note that each benchmark described in this documentation has provided results for those not desiring to run the benchmarks on their local machines. 10 | 11 | ==
== 12 | 13 | # [[Introduction]] 14 | # [[Creating Artificial Graphs]] 15 | # Defining Benchmarks 16 | ** [[Overview]] 17 | ** Extending [[Operation]] 18 | ** Extending [[OperationFactory]] 19 | *** About [[Evaluator]] 20 | ** Extending [[Benchmark]] 21 | # [[Running Benchmarks]] 22 | # Analyzing Benchmark Results 23 | ** [[Reading Result Logs]] 24 | ** [[Plotting Results]] *TODO* 25 | # [[Published Benchmark Results]] 26 | # [[Frequently Asked Questions]] *TODO* 27 | # [[Acknowledgements]] 28 | 29 | ==
== 30 | 31 | For more details please ask questions on the "Gremlin mailing list":http://groups.google.com/group/gremlin-users/topics or git clone! -------------------------------------------------------------------------------- /graphdb-bench/doc/graphdb-bench.wiki/Introduction.textile: -------------------------------------------------------------------------------- 1 | GraphDB-Bench is a collection of benchmarks for graph database systems. There are four primary aspects to the benchmarking process: 2 | 3 | # *Generating Graph Datasets:* creates the datasets that are loaded into the various graph systems for analysis. For more on this see [[Creating Artificial Graphs]]. 4 | # *Defining Benchmarks:* creation of a benchmark definition that contains a set of interesting algorithms/operations. For more on this start at [[Overview]]. 5 | # *Generating Benchmark Results:* evaluates algorithms that test the performance of various graph systems. For more on this see [[Running Benchmarks]] 6 | # *Analyzing Benchmark Results:* creating informative plots/charts from the benchmark results. For more on this see [[Plotting Results]] -------------------------------------------------------------------------------- /graphdb-bench/doc/graphdb-bench.wiki/Plotting-Results.md: -------------------------------------------------------------------------------- 1 | Put stuff here... -------------------------------------------------------------------------------- /graphdb-bench/doc/images/graphdb-bench-evaluator-distribution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/graphdb-bench/doc/images/graphdb-bench-evaluator-distribution.png -------------------------------------------------------------------------------- /graphdb-bench/doc/images/graphdb-bench-evaluator-graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/graphdb-bench/doc/images/graphdb-bench-evaluator-graph.png -------------------------------------------------------------------------------- /graphdb-bench/doc/images/graphdb-bench-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/graphdb-bench/doc/images/graphdb-bench-logo.png -------------------------------------------------------------------------------- /graphdb-bench/doc/images/graphdb-bench-structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/graphdb-bench/doc/images/graphdb-bench-structure.png -------------------------------------------------------------------------------- /graphdb-bench/runBenchmarkSuite.sh: -------------------------------------------------------------------------------- 1 | export MAVEN_OPTS="-server -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -Xms15G -Xmx15G" 2 | mvn -e exec:java -Dexec.mainClass="com.tinkerpop.bench.BenchmarkSuite" -Dexec.args="" 3 | -------------------------------------------------------------------------------- /graphdb-bench/src/assembly/distribution.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | zip 4 | 5 | 6 | 7 | 8 | pom.xml 9 | 10 | 11 | 12 | src 13 | 14 | 15 | target/apidocs 16 | 17 | 18 | target/site 19 | 20 | 21 | target 22 | 23 | graphdb-bench-*.jar 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /graphdb-bench/src/assembly/standalone.xml: -------------------------------------------------------------------------------- 1 | 2 | standalone 3 | 4 | jar 5 | 6 | false 7 | 8 | 9 | 10 | target/classes 11 | / 12 | 13 | 14 | 15 | 16 | 17 | / 18 | true 19 | runtime 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /graphdb-bench/src/main/java/com/tinkerpop/bench/Bench.java: -------------------------------------------------------------------------------- 1 | package com.tinkerpop.bench; 2 | 3 | import org.apache.log4j.Logger; 4 | import org.apache.log4j.PropertyConfigurator; 5 | 6 | import java.io.IOException; 7 | import java.util.Properties; 8 | 9 | /** 10 | * @author Marko A. Rodriguez (http://markorodriguez.com) 11 | */ 12 | public class Bench { 13 | 14 | public static Logger logger = Logger.getLogger(Bench.class); 15 | public static Properties benchProperties = new Properties(); 16 | 17 | // DATASETS - GraphML & Databases 18 | public static final String DATASETS_DIRECTORY = "bench.datasets.directory"; 19 | 20 | // LOGS - Operation Logs 21 | public static final String LOGS_DELIMITER = "bench.logs.delimiter"; 22 | 23 | // RESULTS - Logs, Summaries, Plots 24 | public static final String RESULTS_DIRECTORY = "bench.results.directory"; 25 | 26 | // GRAPH GENERAL 27 | public static final String GRAPH_PROPERTY_ID = "bench.graph.property.id"; 28 | public static final String GRAPH_LABEL = "bench.graph.label"; 29 | public static final String GRAPH_LABEL_FAMILY = "bench.graph.label.family"; 30 | public static final String GRAPH_LABEL_FRIEND = "bench.graph.label.friend"; 31 | 32 | // GRAPH FILES 33 | public static final String GRAPHML_BARABASI = "bench.graph.barabasi.file"; 34 | 35 | static { 36 | try { 37 | benchProperties.load(Bench.class 38 | .getResourceAsStream("bench.properties")); 39 | System.out.println(benchProperties); 40 | } catch (IOException e) { 41 | e.printStackTrace(); 42 | } 43 | PropertyConfigurator.configure(Bench.class 44 | .getResource("log4j.properties")); 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /graphdb-bench/src/main/java/com/tinkerpop/bench/BenchmarkSuite.java: -------------------------------------------------------------------------------- 1 | package com.tinkerpop.bench; 2 | 3 | import com.tinkerpop.bench.benchmark.BenchmarkReadWriteVersusSize; 4 | 5 | public class BenchmarkSuite { 6 | public static void main(String[] args) throws Exception { 7 | BenchmarkReadWriteVersusSize.run(); 8 | // BenchmarkEchoVersusDepth.run(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /graphdb-bench/src/main/java/com/tinkerpop/bench/StatisticsHelper.java: -------------------------------------------------------------------------------- 1 | package com.tinkerpop.bench; 2 | 3 | import java.util.Random; 4 | 5 | import com.tinkerpop.bench.evaluators.Evaluator; 6 | import com.tinkerpop.blueprints.pgm.Graph; 7 | import com.tinkerpop.blueprints.pgm.Vertex; 8 | 9 | /** 10 | * @author Marko A. Rodriguez (http://markorodriguez.com) 11 | * @author Alex Averbuch (alex.averbuch@gmail.com) 12 | * @author Martin Neumann (m.neumann.1980@gmail.com) 13 | */ 14 | public class StatisticsHelper { 15 | 16 | private static Random rand = new Random(42); 17 | private static long time = -1l; 18 | 19 | public static Object[] getSampleVertexIds(Graph db, Evaluator evaluator, 20 | int sampleSize) { 21 | 22 | Object[] samples = new Object[sampleSize]; 23 | Double[] sampleVals = new Double[sampleSize]; 24 | 25 | double totalVal = evaluator.evaluateTotal(db); 26 | 27 | for (int i = 0; i < sampleVals.length; i++) { 28 | sampleVals[i] = rand.nextDouble() * totalVal; 29 | samples[i] = null; 30 | } 31 | 32 | boolean finished = true; 33 | 34 | for (Vertex currentVertex : db.getVertices()) { 35 | 36 | double currentVal = evaluator.evaluate(currentVertex); 37 | 38 | finished = true; 39 | 40 | for (int i = 0; i < sampleVals.length; i++) { 41 | if (samples[i] == null) { 42 | sampleVals[i] -= currentVal; 43 | if (sampleVals[i] <= 0) 44 | samples[i] = currentVertex.getId(); 45 | else 46 | finished = false; 47 | } 48 | } 49 | 50 | if (finished == true) 51 | break; 52 | } 53 | 54 | return samples; 55 | } 56 | 57 | public static long stopWatch() { 58 | if (time == -1l) { 59 | time = System.currentTimeMillis(); 60 | return time; 61 | } else { 62 | long temp = System.currentTimeMillis() - time; 63 | time = -1l; 64 | return temp; 65 | } 66 | } 67 | 68 | } 69 | -------------------------------------------------------------------------------- /graphdb-bench/src/main/java/com/tinkerpop/bench/benchmark/Benchmark.java: -------------------------------------------------------------------------------- 1 | package com.tinkerpop.bench.benchmark; 2 | 3 | import java.io.File; 4 | import java.util.ArrayList; 5 | 6 | import com.tinkerpop.bench.BenchRunner; 7 | import com.tinkerpop.bench.GraphDescriptor; 8 | import com.tinkerpop.bench.operationFactory.OperationFactoryLog; 9 | import com.tinkerpop.bench.operationFactory.OperationFactory; 10 | import com.tinkerpop.blueprints.pgm.impls.tg.TinkerGraph; 11 | 12 | /** 13 | * @author Alex Averbuch (alex.averbuch@gmail.com) 14 | */ 15 | public abstract class Benchmark { 16 | 17 | private String log = null; 18 | 19 | public Benchmark(String log) { 20 | this.log = log; 21 | } 22 | 23 | private void createOperationLogs() throws Exception { 24 | GraphDescriptor graphDescriptor = new GraphDescriptor(TinkerGraph.class); 25 | 26 | try { 27 | BenchRunner benchRunner = new BenchRunner(graphDescriptor, 28 | new File(log), getOperationFactories()); 29 | 30 | benchRunner.startBench(); 31 | } catch (Exception e) { 32 | throw e; 33 | } 34 | } 35 | 36 | protected abstract ArrayList getOperationFactories(); 37 | 38 | public final void loadOperationLogs(GraphDescriptor graphDescriptor, 39 | String logOut) throws Exception { 40 | if (new File(log).exists() == false) 41 | createOperationLogs(); 42 | 43 | OperationFactory operationFactory = new OperationFactoryLog(new File( 44 | log)); 45 | 46 | BenchRunner benchRunner = new BenchRunner(graphDescriptor, new File( 47 | logOut), operationFactory); 48 | 49 | benchRunner.startBench(); 50 | } 51 | 52 | } -------------------------------------------------------------------------------- /graphdb-bench/src/main/java/com/tinkerpop/bench/evaluators/Evaluator.java: -------------------------------------------------------------------------------- 1 | package com.tinkerpop.bench.evaluators; 2 | 3 | import com.tinkerpop.blueprints.pgm.Graph; 4 | import com.tinkerpop.blueprints.pgm.Vertex; 5 | 6 | /** 7 | * @author Alex Averbuch (alex.averbuch@gmail.com) 8 | * @author Martin Neumann (m.neumann.1980@gmail.com) 9 | */ 10 | public abstract class Evaluator { 11 | 12 | private double total = -1; 13 | 14 | public double evaluateTotal(Graph db) { 15 | if (total != -1) 16 | return total; 17 | 18 | total = 0d; 19 | for (Vertex vertex : db.getVertices()) 20 | total += evaluate(vertex); 21 | 22 | return total; 23 | } 24 | 25 | public abstract double evaluate(Vertex vertex); 26 | } 27 | -------------------------------------------------------------------------------- /graphdb-bench/src/main/java/com/tinkerpop/bench/evaluators/EvaluatorDegree.java: -------------------------------------------------------------------------------- 1 | package com.tinkerpop.bench.evaluators; 2 | 3 | import com.tinkerpop.blueprints.pgm.Edge; 4 | import com.tinkerpop.blueprints.pgm.Vertex; 5 | 6 | /** 7 | * @author Alex Averbuch (alex.averbuch@gmail.com) 8 | * @author Martin Neumann (m.neumann.1980@gmail.com) 9 | */ 10 | public class EvaluatorDegree extends Evaluator { 11 | 12 | @Override 13 | @SuppressWarnings("unused") 14 | public double evaluate(Vertex vertex) { 15 | double degree = 0; 16 | for (Edge edge : vertex.getOutEdges()) { 17 | degree++; 18 | } 19 | for (Edge edge : vertex.getInEdges()) { 20 | degree++; 21 | } 22 | return degree; 23 | } 24 | } -------------------------------------------------------------------------------- /graphdb-bench/src/main/java/com/tinkerpop/bench/evaluators/EvaluatorInDegree.java: -------------------------------------------------------------------------------- 1 | package com.tinkerpop.bench.evaluators; 2 | 3 | import com.tinkerpop.blueprints.pgm.Edge; 4 | import com.tinkerpop.blueprints.pgm.Vertex; 5 | 6 | /** 7 | * @author Alex Averbuch (alex.averbuch@gmail.com) 8 | * @author Martin Neumann (m.neumann.1980@gmail.com) 9 | */ 10 | public class EvaluatorInDegree extends Evaluator { 11 | 12 | @Override 13 | @SuppressWarnings("unused") 14 | public double evaluate(Vertex vertex) { 15 | double inDegree = 0; 16 | for (Edge edge : vertex.getInEdges()) { 17 | inDegree++; 18 | } 19 | return inDegree; 20 | } 21 | } -------------------------------------------------------------------------------- /graphdb-bench/src/main/java/com/tinkerpop/bench/evaluators/EvaluatorOutDegree.java: -------------------------------------------------------------------------------- 1 | package com.tinkerpop.bench.evaluators; 2 | 3 | import com.tinkerpop.blueprints.pgm.Edge; 4 | import com.tinkerpop.blueprints.pgm.Vertex; 5 | 6 | /** 7 | * @author Alex Averbuch (alex.averbuch@gmail.com) 8 | * @author Martin Neumann (m.neumann.1980@gmail.com) 9 | */ 10 | public class EvaluatorOutDegree extends Evaluator { 11 | 12 | @Override 13 | @SuppressWarnings("unused") 14 | public double evaluate(Vertex vertex) { 15 | double outDegree = 0; 16 | for (Edge edge : vertex.getOutEdges()) { 17 | outDegree++; 18 | } 19 | return outDegree; 20 | } 21 | } -------------------------------------------------------------------------------- /graphdb-bench/src/main/java/com/tinkerpop/bench/evaluators/EvaluatorProperty.java: -------------------------------------------------------------------------------- 1 | package com.tinkerpop.bench.evaluators; 2 | 3 | import com.tinkerpop.blueprints.pgm.Vertex; 4 | 5 | /** 6 | * @author Alex Averbuch (alex.averbuch@gmail.com) 7 | */ 8 | public class EvaluatorProperty extends Evaluator { 9 | 10 | private String property = null; 11 | 12 | public EvaluatorProperty(String property) { 13 | this.property = property; 14 | } 15 | 16 | @Override 17 | public double evaluate(Vertex vertex) { 18 | return (Double) vertex.getProperty(property); 19 | } 20 | } -------------------------------------------------------------------------------- /graphdb-bench/src/main/java/com/tinkerpop/bench/evaluators/EvaluatorUniform.java: -------------------------------------------------------------------------------- 1 | package com.tinkerpop.bench.evaluators; 2 | 3 | import com.tinkerpop.blueprints.pgm.Vertex; 4 | 5 | /** 6 | * @author Alex Averbuch (alex.averbuch@gmail.com) 7 | * @author Martin Neumann (m.neumann.1980@gmail.com) 8 | */ 9 | public class EvaluatorUniform extends Evaluator { 10 | 11 | @Override 12 | public double evaluate(Vertex vertex) { 13 | return 1d; 14 | } 15 | } -------------------------------------------------------------------------------- /graphdb-bench/src/main/java/com/tinkerpop/bench/log/OperationLogEntry.java: -------------------------------------------------------------------------------- 1 | package com.tinkerpop.bench.log; 2 | 3 | public class OperationLogEntry { 4 | 5 | private int opId = -1; 6 | private String name = null; 7 | private String type = null; 8 | private String[] args = null; 9 | private long time = -1; 10 | private String result = null; 11 | 12 | public OperationLogEntry(int opId, String name, String type, String[] args, 13 | long time, String result) { 14 | super(); 15 | this.opId = opId; 16 | this.name = name; 17 | this.type = type; 18 | this.args = args; 19 | this.time = time; 20 | this.result = result; 21 | } 22 | 23 | public int getOpId() { 24 | return opId; 25 | } 26 | 27 | public String getName() { 28 | return name; 29 | } 30 | 31 | public String getType() { 32 | return type; 33 | } 34 | 35 | public String[] getArgs() { 36 | return args; 37 | } 38 | 39 | public long getTime() { 40 | return time; 41 | } 42 | 43 | public String getResult() { 44 | return result; 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /graphdb-bench/src/main/java/com/tinkerpop/bench/operation/OperationDeleteGraph.java: -------------------------------------------------------------------------------- 1 | package com.tinkerpop.bench.operation; 2 | 3 | /** 4 | * @author Alex Averbuch (alex.averbuch@gmail.com) 5 | */ 6 | public class OperationDeleteGraph extends Operation { 7 | 8 | @Override 9 | protected void onInitialize(String[] args) { 10 | } 11 | 12 | @Override 13 | protected void onExecute() throws Exception { 14 | try { 15 | getGraphDescriptor().deleteGraph(); 16 | setResult("DONE"); 17 | } catch (Exception e) { 18 | throw e; 19 | } 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /graphdb-bench/src/main/java/com/tinkerpop/bench/operation/OperationDoGC.java: -------------------------------------------------------------------------------- 1 | package com.tinkerpop.bench.operation; 2 | 3 | /** 4 | * @author Alex Averbuch (alex.averbuch@gmail.com) 5 | */ 6 | public class OperationDoGC extends Operation { 7 | 8 | @Override 9 | protected void onInitialize(String[] args) { 10 | } 11 | 12 | @Override 13 | protected void onExecute() throws Exception { 14 | try { 15 | System.gc(); 16 | System.gc(); 17 | try { 18 | Thread.sleep(500); 19 | } catch (InterruptedException e) { 20 | } 21 | System.gc(); 22 | System.gc(); 23 | try { 24 | Thread.sleep(500); 25 | } catch (InterruptedException e) { 26 | } 27 | System.gc(); 28 | System.gc(); 29 | try { 30 | Thread.sleep(500); 31 | } catch (InterruptedException e) { 32 | } 33 | System.gc(); 34 | System.gc(); 35 | try { 36 | Thread.sleep(500); 37 | } catch (InterruptedException e) { 38 | } 39 | System.gc(); 40 | System.gc(); 41 | try { 42 | Thread.sleep(500); 43 | } catch (InterruptedException e) { 44 | } 45 | setResult("DONE"); 46 | } catch (Exception e) { 47 | throw e; 48 | } 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /graphdb-bench/src/main/java/com/tinkerpop/bench/operation/OperationOpenGraph.java: -------------------------------------------------------------------------------- 1 | package com.tinkerpop.bench.operation; 2 | 3 | /** 4 | * @author Alex Averbuch (alex.averbuch@gmail.com) 5 | */ 6 | public class OperationOpenGraph extends Operation { 7 | 8 | @Override 9 | protected void onInitialize(String[] args) { 10 | } 11 | 12 | @Override 13 | protected void onExecute() throws Exception { 14 | try { 15 | getGraphDescriptor().openGraph(); 16 | setResult("DONE"); 17 | } catch (Exception e) { 18 | throw e; 19 | } 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /graphdb-bench/src/main/java/com/tinkerpop/bench/operation/OperationShutdownGraph.java: -------------------------------------------------------------------------------- 1 | package com.tinkerpop.bench.operation; 2 | 3 | /** 4 | * @author Alex Averbuch (alex.averbuch@gmail.com) 5 | */ 6 | public class OperationShutdownGraph extends Operation { 7 | 8 | @Override 9 | protected void onInitialize(String[] args) { 10 | } 11 | 12 | @Override 13 | protected void onExecute() throws Exception { 14 | try { 15 | if (getGraphDescriptor().getPersistent() == true) 16 | getGraphDescriptor().shutdownGraph(); 17 | setResult("DONE"); 18 | } catch (Exception e) { 19 | throw e; 20 | } 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /graphdb-bench/src/main/java/com/tinkerpop/bench/operation/operations/OperationGremlin.java: -------------------------------------------------------------------------------- 1 | package com.tinkerpop.bench.operation.operations; 2 | 3 | import com.tinkerpop.bench.operation.Operation; 4 | import com.tinkerpop.gremlin.Gremlin; 5 | import com.tinkerpop.pipes.Pipe; 6 | 7 | /** 8 | * @author Alex Averbuch (alex.averbuch@gmail.com) 9 | */ 10 | public class OperationGremlin extends Operation { 11 | 12 | private String gremlinScript = null; 13 | private Pipe compiledScript = null; 14 | 15 | // args 16 | // -> 0 gremlinScript 17 | @Override 18 | protected void onInitialize(String[] args) { 19 | this.gremlinScript = args[0]; 20 | this.compiledScript = Gremlin.compile(this.gremlinScript); 21 | // compiledScript.setStarts(graph.getVertex(1)); // FIXME necessary? 22 | } 23 | 24 | @Override 25 | protected void onExecute() throws Exception { 26 | try { 27 | int resultCount = 0; 28 | 29 | for (Object result : compiledScript) 30 | resultCount++; 31 | 32 | setResult(Integer.toString(resultCount)); 33 | } catch (Exception e) { 34 | throw e; 35 | } 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /graphdb-bench/src/main/java/com/tinkerpop/bench/operation/operations/OperationIndexGetElements.java: -------------------------------------------------------------------------------- 1 | package com.tinkerpop.bench.operation.operations; 2 | 3 | import java.util.ArrayList; 4 | 5 | import com.tinkerpop.bench.operation.Operation; 6 | import com.tinkerpop.blueprints.pgm.Element; 7 | import com.tinkerpop.blueprints.pgm.Index; 8 | import com.tinkerpop.blueprints.pgm.IndexableGraph; 9 | import com.tinkerpop.blueprints.pgm.Vertex; 10 | 11 | /** 12 | * @author Alex Averbuch (alex.averbuch@gmail.com) 13 | */ 14 | public class OperationIndexGetElements extends Operation { 15 | 16 | private String[] propertyKeys = null; 17 | private String[] propertyValues = null; 18 | 19 | // args 20 | // -> 0 property keys 21 | // -> 1 property values 22 | @Override 23 | protected void onInitialize(String[] args) { 24 | this.propertyKeys = args[0].split(","); 25 | this.propertyValues = args[1].split(","); 26 | } 27 | 28 | @Override 29 | protected void onExecute() throws Exception { 30 | try { 31 | if ((getGraph() instanceof IndexableGraph) == false) 32 | throw new Exception("Graph is not IndexableGraph"); 33 | 34 | Index vIndex = ((IndexableGraph) getGraph()).getIndex( 35 | Index.VERTICES, Vertex.class); 36 | 37 | ArrayList elements = new ArrayList(); 38 | 39 | for (int i = 0; i < propertyKeys.length; i++) { 40 | for (Element element : vIndex.get(propertyKeys[i], 41 | propertyValues[i])) 42 | elements.add(element); 43 | } 44 | 45 | setResult(elements); 46 | } catch (Exception e) { 47 | throw e; 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /graphdb-bench/src/main/java/com/tinkerpop/bench/operation/operations/OperationLoadGraphML.java: -------------------------------------------------------------------------------- 1 | package com.tinkerpop.bench.operation.operations; 2 | 3 | import java.io.FileInputStream; 4 | 5 | import com.tinkerpop.bench.operation.Operation; 6 | import com.tinkerpop.blueprints.pgm.util.graphml.GraphMLReader; 7 | 8 | /** 9 | * @author Alex Averbuch (alex.averbuch@gmail.com) 10 | */ 11 | public class OperationLoadGraphML extends Operation { 12 | 13 | private String graphmlPath = null; 14 | private final int TRANSACTION_BUFFER = 1000; 15 | 16 | // args 17 | // -> 0 graphmlDir 18 | @Override 19 | protected void onInitialize(String[] args) { 20 | this.graphmlPath = args[0]; 21 | } 22 | 23 | @Override 24 | protected void onExecute() throws Exception { 25 | try { 26 | GraphMLReader.inputGraph(getGraph(), new FileInputStream( 27 | graphmlPath), TRANSACTION_BUFFER, null, null, null); 28 | setResult("DONE"); 29 | } catch (Exception e) { 30 | throw e; 31 | } 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /graphdb-bench/src/main/java/com/tinkerpop/bench/operationFactory/OperationArgs.java: -------------------------------------------------------------------------------- 1 | package com.tinkerpop.bench.operationFactory; 2 | 3 | /** 4 | * @author Alex Averbuch (alex.averbuch@gmail.com) 5 | */ 6 | public class OperationArgs { 7 | 8 | private String[] args = null; 9 | private Class type = null; 10 | private String tag = null; 11 | 12 | public OperationArgs(String[] args, Class type) { 13 | this(args, type, ""); 14 | } 15 | 16 | public OperationArgs(String[] args, Class type, String tag) { 17 | super(); 18 | this.args = args; 19 | this.type = type; 20 | this.tag = tag; 21 | } 22 | 23 | public String[] getArgs() { 24 | return args; 25 | } 26 | 27 | public Class getType() { 28 | return type; 29 | } 30 | 31 | public String getName() { 32 | return ("".equals(tag)) ? type.getSimpleName() : type.getSimpleName() 33 | + "-" + tag; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /graphdb-bench/src/main/java/com/tinkerpop/bench/operationFactory/OperationFactory.java: -------------------------------------------------------------------------------- 1 | package com.tinkerpop.bench.operationFactory; 2 | 3 | import java.lang.reflect.Constructor; 4 | import java.util.Iterator; 5 | 6 | import com.tinkerpop.bench.GraphDescriptor; 7 | import com.tinkerpop.bench.operation.Operation; 8 | 9 | /** 10 | * @author Alex Averbuch (alex.averbuch@gmail.com) 11 | * @author Martin Neumann (m.neumann.1980@gmail.com) 12 | */ 13 | public abstract class OperationFactory implements Iterator, 14 | Iterable { 15 | 16 | // 17 | // Getter methods 18 | // 19 | public abstract int getCurrentOpId(); 20 | 21 | // 22 | // Event methods 23 | // 24 | public abstract void initialize(GraphDescriptor graphDescriptor, 25 | int firstOpId); 26 | 27 | protected abstract void onInitialize(); 28 | 29 | // 30 | // Iterator/Iterable methods 31 | // 32 | @Override 33 | public final Iterator iterator() { 34 | return this; 35 | } 36 | 37 | @Override 38 | public final void remove() { 39 | throw new UnsupportedOperationException(); 40 | } 41 | 42 | // 43 | // Helper methods 44 | // 45 | protected final Operation loadOperation(int opId, String type, 46 | String[] args, String name) throws Exception { 47 | Constructor operationConstructor = null; 48 | Operation operation = null; 49 | 50 | try { 51 | operationConstructor = Class.forName(type).getConstructors()[0]; 52 | operation = (Operation) operationConstructor 53 | .newInstance(new Object[] {}); 54 | operation.setId(opId); 55 | operation.setArgs(args); 56 | operation.setName(name); 57 | } catch (Exception e) { 58 | throw e; 59 | } 60 | 61 | return operation; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /graphdb-bench/src/main/java/com/tinkerpop/bench/operationFactory/OperationFactoryBase.java: -------------------------------------------------------------------------------- 1 | package com.tinkerpop.bench.operationFactory; 2 | 3 | import com.tinkerpop.bench.GraphDescriptor; 4 | import com.tinkerpop.bench.operation.Operation; 5 | import com.tinkerpop.blueprints.pgm.Graph; 6 | 7 | /** 8 | * @author Alex Averbuch (alex.averbuch@gmail.com) 9 | */ 10 | public abstract class OperationFactoryBase extends OperationFactory { 11 | 12 | private GraphDescriptor graphDescriptor = null; 13 | private int opId = 0; 14 | 15 | // 16 | // Event methods 17 | // 18 | @Override 19 | public final void initialize(GraphDescriptor graphDescriptor, int firstOpId) { 20 | this.graphDescriptor = graphDescriptor; 21 | this.opId = firstOpId; 22 | onInitialize(); 23 | } 24 | 25 | abstract protected OperationArgs onCreateOperation() throws Exception; 26 | 27 | // 28 | // Getter methods 29 | // 30 | @Override 31 | public final int getCurrentOpId() { 32 | return opId; 33 | } 34 | 35 | protected final GraphDescriptor getGraphDescriptor() { 36 | return graphDescriptor; 37 | } 38 | 39 | protected final Graph getGraph() { 40 | return graphDescriptor.getGraph(); 41 | } 42 | 43 | // 44 | // Iterator/Iterable methods 45 | // 46 | @Override 47 | public final Operation next() { 48 | OperationArgs operationArgs = null; 49 | try { 50 | operationArgs = onCreateOperation(); 51 | } catch (Exception e) { 52 | throw new RuntimeException("Error in onCreateOperation", e 53 | .getCause()); 54 | } 55 | 56 | opId++; 57 | 58 | try { 59 | return loadOperation(opId, operationArgs.getType().getName(), 60 | operationArgs.getArgs(), operationArgs.getName()); 61 | } catch (Exception e) { 62 | throw new RuntimeException("Error in loadOperation", e.getCause()); 63 | } 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /graphdb-bench/src/main/java/com/tinkerpop/bench/operationFactory/OperationFactoryGeneric.java: -------------------------------------------------------------------------------- 1 | package com.tinkerpop.bench.operationFactory; 2 | 3 | /** 4 | * @author Alex Averbuch (alex.averbuch@gmail.com) 5 | */ 6 | public class OperationFactoryGeneric extends OperationFactoryBase { 7 | 8 | private Class operationType = null; 9 | private int opCount = -1; 10 | private String[] args = null; 11 | private String tag = null; 12 | 13 | public OperationFactoryGeneric(Class operationType) { 14 | this(operationType, -1, new String[] {}); 15 | } 16 | 17 | public OperationFactoryGeneric(Class operationType, int opCount) { 18 | this(operationType, opCount, new String[] {}); 19 | } 20 | 21 | public OperationFactoryGeneric(Class operationType, int opCount, 22 | String[] args) { 23 | this(operationType, opCount, args, ""); 24 | } 25 | 26 | public OperationFactoryGeneric(Class operationType, int opCount, 27 | String[] args, String tag) { 28 | this.operationType = operationType; 29 | this.opCount = opCount; 30 | this.args = args; 31 | this.tag = tag; 32 | } 33 | 34 | @Override 35 | public void onInitialize() { 36 | } 37 | 38 | @Override 39 | public boolean hasNext() { 40 | return (-1 == opCount) ? true : (opCount > 0); 41 | } 42 | 43 | @Override 44 | protected OperationArgs onCreateOperation() throws Exception { 45 | if (-1 != opCount) 46 | opCount--; 47 | return new OperationArgs(args, operationType, tag); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /graphdb-bench/src/main/java/com/tinkerpop/bench/operationFactory/OperationFactoryLog.java: -------------------------------------------------------------------------------- 1 | package com.tinkerpop.bench.operationFactory; 2 | 3 | import java.io.File; 4 | import java.util.Iterator; 5 | 6 | import com.tinkerpop.bench.GraphDescriptor; 7 | import com.tinkerpop.bench.LogUtils; 8 | import com.tinkerpop.bench.log.OperationLogEntry; 9 | import com.tinkerpop.bench.operation.Operation; 10 | 11 | /** 12 | * @author Alex Averbuch (alex.averbuch@gmail.com) 13 | */ 14 | public final class OperationFactoryLog extends OperationFactory { 15 | 16 | private Iterator operationLogIterator = null; 17 | 18 | public OperationFactoryLog(File file) { 19 | operationLogIterator = LogUtils.getOperationLogReader(file).iterator(); 20 | } 21 | 22 | @Override 23 | public void initialize(GraphDescriptor graphDescriptor, int firstOpId) { 24 | } 25 | 26 | @Override 27 | protected void onInitialize() { 28 | } 29 | 30 | @Override 31 | public boolean hasNext() { 32 | return operationLogIterator.hasNext(); 33 | } 34 | 35 | @Override 36 | public Operation next() { 37 | OperationLogEntry operationLogEntry = operationLogIterator.next(); 38 | try { 39 | return loadOperation(operationLogEntry.getOpId(), operationLogEntry 40 | .getType(), operationLogEntry.getArgs(), operationLogEntry 41 | .getName()); 42 | } catch (Exception e) { 43 | throw new RuntimeException("Error in loadOperation", e.getCause()); 44 | } 45 | } 46 | 47 | @Override 48 | public int getCurrentOpId() { 49 | return -1; 50 | } 51 | 52 | } -------------------------------------------------------------------------------- /graphdb-bench/src/main/python/graph-creator.py: -------------------------------------------------------------------------------- 1 | # Generate Artificial Graphs 2 | # Alex Averbuch (alex.averbuch@gmail.com) 3 | 4 | from igraph import * 5 | from pyjavaproperties import Properties 6 | from random import * 7 | 8 | p = Properties() 9 | p.load(open('../resources/com/tinkerpop/bench/bench.properties')) 10 | 11 | degree = int(p['bench.graph.barabasi.degree']) 12 | vertices = int(p['bench.graph.barabasi.vertices']) 13 | 14 | g = Graph.Barabasi(n=vertices, m=degree, power=1, directed=False, zero_appeal=8) 15 | 16 | for v in g.vs: 17 | g.vs[v.index][p['bench.graph.property.id']] = "v" + str(v.index) 18 | for e in g.es: 19 | g.es[e.index][p['bench.graph.property.id']] = "e" + str(e.index) 20 | for e in g.es: 21 | if random() < 0.5: 22 | g.es[e.index][p['bench.graph.label']] = p['bench.graph.label.friend'] 23 | else: 24 | g.es[e.index][p['bench.graph.label']] = p['bench.graph.label.family'] 25 | g.write_graphml('../../../' + p['bench.datasets.directory'] + 26 | '/' + p['bench.graph.barabasi.file']) 27 | -------------------------------------------------------------------------------- /graphdb-bench/src/main/r/graph-creator.r: -------------------------------------------------------------------------------- 1 | # Generate Artificial Graphs 2 | # Marko A. Rodriguez (http://markorodriguez.com) 3 | 4 | library(igraph) 5 | g <- barabasi.game(n=1000000, m=2, power=1, zero.appeal=8, directed=FALSE) 6 | g <- simplify(g) 7 | g <- as.directed(g, mode='mutual') 8 | #diameter(g) 9 | #average.path.length(g) 10 | 11 | #write.graph(g, '../../../data/barabasi-graph.edge', format='edgelist') 12 | write.graph(g, '../../../data/barabasi-graph.xml', format='graphml') 13 | 14 | plot(subgraph(g,V(g)[1:1000]), layout=layout.fruchterman.reingold, vertex.size=2, edge.arrow.size=0, edge.width=0.5, vertex.label=NA) 15 | plot(degree.distribution(g),log='xy',xlab='number of friends',ylab='frequency',cex.lab=1.5); 16 | 17 | 18 | g <- barabasi.game(n=250, directed=TRUE) 19 | plot(g, layout=layout.fruchterman.reingold, vertex.size=4, edge.arrow.size=0.3, edge.width=1, vertex.label=NA, vertex.color="blue") -------------------------------------------------------------------------------- /graphdb-bench/src/main/resources/com/tinkerpop/bench/bench.properties: -------------------------------------------------------------------------------- 1 | # datasets - GraphML & DBs 2 | bench.datasets.directory=data/datasets/ 3 | # logs - operation logs 4 | bench.logs.delimiter=; 5 | # results - logs, summaries, and plots 6 | bench.results.directory=data/results/ 7 | # graph general 8 | bench.graph.property.id=_id 9 | bench.graph.label=_label 10 | bench.graph.label.family=_family 11 | bench.graph.label.friend=_friend 12 | # graph barabasi 13 | bench.graph.barabasi.file=barabasi.graphml 14 | bench.graph.barabasi.vertices=1000000 15 | bench.graph.barabasi.degree=5 -------------------------------------------------------------------------------- /graphdb-bench/src/main/resources/com/tinkerpop/bench/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootLogger=INFO, stdout 2 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 3 | #log4j.appender.stdout=org.apache.log4j.FileAppender 4 | #log4j.appender.stdout.file=recless.log 5 | #log4j.appender.stdout.append=true 6 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 7 | log4j.appender.stdout.layout.ConversionPattern=[%p] %C{1} - %m%n -------------------------------------------------------------------------------- /lopsided/LICENSE.txt: -------------------------------------------------------------------------------- 1 | LoPSided: An Implementation of the Linked Process Protocol 2 | Copyright (C) 2009 Los Alamos National Laboratory. 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining 5 | a copy of this software and associated documentation files (the 6 | "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, 8 | distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to 10 | the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 19 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 20 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 21 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /lopsided/README.textile: -------------------------------------------------------------------------------- 1 | !https://github.com/tinkerpop/lopsided/raw/master/doc/images/lopsided-logo.png! 2 | 3 | LoPSideD is a Java 1.6+ implementation of the "Linked Process":http://linkedprocess.org protocol. This implementation can be used to create a distributed compute cloud that can be supported and leveraged by any device with an Internet connection. 4 | 5 | The documentation for LoPSideD can be found at this "location":http://lopsided.tinkerpop.com. Finally, please visit "TinkerPop":http://tinkerpop.com for other software products. -------------------------------------------------------------------------------- /lopsided/doc/images/farm-gui-login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/farm-gui-login.png -------------------------------------------------------------------------------- /lopsided/doc/images/farm-gui-main-vms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/farm-gui-main-vms.png -------------------------------------------------------------------------------- /lopsided/doc/images/farm-gui-main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/farm-gui-main.png -------------------------------------------------------------------------------- /lopsided/doc/images/icons/countryside.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/icons/countryside.png -------------------------------------------------------------------------------- /lopsided/doc/images/icons/farm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/icons/farm.png -------------------------------------------------------------------------------- /lopsided/doc/images/icons/job.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/icons/job.png -------------------------------------------------------------------------------- /lopsided/doc/images/icons/registry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/icons/registry.png -------------------------------------------------------------------------------- /lopsided/doc/images/icons/security.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/icons/security.png -------------------------------------------------------------------------------- /lopsided/doc/images/icons/villein.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/icons/villein.png -------------------------------------------------------------------------------- /lopsided/doc/images/icons/vm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/icons/vm.png -------------------------------------------------------------------------------- /lopsided/doc/images/lop-cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/lop-cloud.png -------------------------------------------------------------------------------- /lopsided/doc/images/lop-hierarchy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/lop-hierarchy.png -------------------------------------------------------------------------------- /lopsided/doc/images/lop-logo-mini.graffle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/lop-logo-mini.graffle -------------------------------------------------------------------------------- /lopsided/doc/images/lop-logo-mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/lop-logo-mini.png -------------------------------------------------------------------------------- /lopsided/doc/images/lop-logo.graffle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/lop-logo.graffle -------------------------------------------------------------------------------- /lopsided/doc/images/lop-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/lop-logo.png -------------------------------------------------------------------------------- /lopsided/doc/images/lop-overview.graffle/Icon : -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/lop-overview.graffle/Icon -------------------------------------------------------------------------------- /lopsided/doc/images/lop-overview.graffle/data.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/lop-overview.graffle/data.plist -------------------------------------------------------------------------------- /lopsided/doc/images/lop-overview.graffle/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/lop-overview.graffle/image2.png -------------------------------------------------------------------------------- /lopsided/doc/images/lop-overview.graffle/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/lop-overview.graffle/image3.png -------------------------------------------------------------------------------- /lopsided/doc/images/lop-overview.graffle/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/lop-overview.graffle/image4.png -------------------------------------------------------------------------------- /lopsided/doc/images/lop-overview.graffle/image5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/lop-overview.graffle/image5.png -------------------------------------------------------------------------------- /lopsided/doc/images/lop-overview.graffle/image6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/lop-overview.graffle/image6.png -------------------------------------------------------------------------------- /lopsided/doc/images/lop-overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/lop-overview.png -------------------------------------------------------------------------------- /lopsided/doc/images/lop-sequence.graffle/Icon : -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/lop-sequence.graffle/Icon -------------------------------------------------------------------------------- /lopsided/doc/images/lop-sequence.graffle/data.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/lop-sequence.graffle/data.plist -------------------------------------------------------------------------------- /lopsided/doc/images/lop-sequence.graffle/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/lop-sequence.graffle/image3.png -------------------------------------------------------------------------------- /lopsided/doc/images/lop-sequence.graffle/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/lop-sequence.graffle/image4.png -------------------------------------------------------------------------------- /lopsided/doc/images/lop-sequence.graffle/image5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/lop-sequence.graffle/image5.png -------------------------------------------------------------------------------- /lopsided/doc/images/lop-sequence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/lop-sequence.png -------------------------------------------------------------------------------- /lopsided/doc/images/lop-xmpp-communication.graffle/Icon : -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/lop-xmpp-communication.graffle/Icon -------------------------------------------------------------------------------- /lopsided/doc/images/lop-xmpp-communication.graffle/data.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/lop-xmpp-communication.graffle/data.plist -------------------------------------------------------------------------------- /lopsided/doc/images/lop-xmpp-communication.graffle/image1.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/lop-xmpp-communication.graffle/image1.tiff -------------------------------------------------------------------------------- /lopsided/doc/images/lop-xmpp-communication.graffle/image6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/lop-xmpp-communication.graffle/image6.png -------------------------------------------------------------------------------- /lopsided/doc/images/lop-xmpp-communication.graffle/image7.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/lop-xmpp-communication.graffle/image7.pdf -------------------------------------------------------------------------------- /lopsided/doc/images/lop-xmpp-communication.graffle/image8.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/lop-xmpp-communication.graffle/image8.pdf -------------------------------------------------------------------------------- /lopsided/doc/images/lop-xmpp-communication.graffle/image9.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/lop-xmpp-communication.graffle/image9.pdf -------------------------------------------------------------------------------- /lopsided/doc/images/lop-xmpp-communication.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/lop-xmpp-communication.png -------------------------------------------------------------------------------- /lopsided/doc/images/lopsided-logo.graffle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/lopsided-logo.graffle -------------------------------------------------------------------------------- /lopsided/doc/images/lopsided-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/lopsided-logo.png -------------------------------------------------------------------------------- /lopsided/doc/images/villein-gui-login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/villein-gui-login.png -------------------------------------------------------------------------------- /lopsided/doc/images/villein-gui-main-spawn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/villein-gui-main-spawn.png -------------------------------------------------------------------------------- /lopsided/doc/images/villein-gui-main-vms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/villein-gui-main-vms.png -------------------------------------------------------------------------------- /lopsided/doc/images/villein-gui-main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/villein-gui-main.png -------------------------------------------------------------------------------- /lopsided/doc/images/villein-gui-vm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/doc/images/villein-gui-vm.png -------------------------------------------------------------------------------- /lopsided/doc/lopsided.wiki/Linked-Process-and-XMPP.textile: -------------------------------------------------------------------------------- 1 | Linked Process rides atop of "XMPP":http://xmpp.org for these reasons: 2 | 3 | # *XMPP provides presence and roster mechanisms necessary for dynamic compute clouds.* 4 | ** As farms come online and offline, there presence is made available to other machines automatically. 5 | ** As farms become overloaded, their status is updated to denote that they are currently unavailable. 6 | ** XMPP allows for the publication of "features" through @disco#info@ which is great for advertising available computing resources. 7 | # *XMPP is a real-time, asynchronous, bi-directional, push-based communication protocol.* 8 | ** More popular protocols like HTTP are pull-based an thus, polling for results is required. 9 | ** Linked Process jobs can execute for an indefinite amount of time, thus a push-based mechanism is desirable. 10 | # *XMPP has an existing infrastructure of servers/technology in place due to the popularity of XMPP chat.* 11 | ** Linked Process works over popular services like GTalk and Jabber. 12 | ** There are many implemented XMPP servers so its easy for anyone to throw up an XMPP server and run a local (organizationally-bound) Linked Process cluster. 13 | ** There are many XMPP APIs, thus developers can create different implementations of the Linked Process protocol with relative ease and without being bound to a particular codebase. 14 | 15 | In order to better understand Linked Process, its important to understand how XMPP works. 16 | 17 | !https://github.com/tinkerpop/lopsided/raw/master/doc/images/lop-xmpp-communication.png! 18 | 19 | !https://github.com/tinkerpop/lopsided/raw/master/doc/images/lop-sequence.png! -------------------------------------------------------------------------------- /lopsided/laboratory/josh/lopsided-linkeddata/create-demo-triplestore.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Path to JAR 4 | JAR=`dirname $0`/target/lopsided-linkeddata-*-full.jar 5 | 6 | # Find Java 7 | if [ "$JAVA_HOME" = "" ] ; then 8 | JAVA="java" 9 | else 10 | JAVA="$JAVA_HOME/bin/java" 11 | fi 12 | 13 | # Set Java options 14 | if [ "$JAVA_OPTIONS" = "" ] ; then 15 | JAVA_OPTIONS="-Xms32M -Xmx512M" 16 | fi 17 | 18 | if [ $# -ge 1 ] ; then 19 | JAVA_OPTIONS=$JAVA_OPTIONS" -Dorg.linkedprocess.configurationProperties="$1 20 | fi 21 | 22 | # Launch the application 23 | $JAVA $JAVA_OPTIONS -cp $JAR org.linkedprocess.linkeddata.tools.CreateDemoTripleStore 24 | 25 | # Return the program's exit code 26 | exit $? 27 | -------------------------------------------------------------------------------- /lopsided/laboratory/josh/lopsided-linkeddata/run-ld-server.sh: -------------------------------------------------------------------------------- 1 | JAR 2 | JAR=`dirname $0`/target/lopsided-linkeddata-*-full.jar 3 | 4 | # Find Java 5 | if [ "$JAVA_HOME" = "" ] ; then 6 | JAVA="java" 7 | else 8 | JAVA="$JAVA_HOME/bin/java" 9 | fi 10 | 11 | # Set Java options 12 | if [ "$JAVA_OPTIONS" = "" ] ; then 13 | JAVA_OPTIONS="-Xms32M -Xmx512M" 14 | fi 15 | 16 | if [ $# -ge 1 ] ; then 17 | JAVA_OPTIONS=$JAVA_OPTIONS" -Dorg.linkedprocess.configurationProperties="$1 18 | fi 19 | 20 | # Launch the application 21 | $JAVA $JAVA_OPTIONS -cp $JAR org.linkedprocess.linkeddata.server.DemoServer 22 | 23 | # Return the program's exit code 24 | exit $? 25 | -------------------------------------------------------------------------------- /lopsided/laboratory/josh/lopsided-linkeddata/src/assembly/full.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | full 4 | 5 | 6 | jar 7 | 8 | 9 | false 10 | 11 | 12 | 13 | target/classes 14 | / 15 | 16 | 17 | 18 | 19 | 20 | / 21 | true 22 | runtime 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /lopsided/laboratory/josh/lopsided-linkeddata/src/main/java/org/linkedprocess/linkeddata/ScriptEngineGateway.java: -------------------------------------------------------------------------------- 1 | package org.linkedprocess.linkeddata; 2 | 3 | import org.linkedprocess.LinkedProcess; 4 | import org.linkedprocess.farm.LinkedProcessFarm; 5 | 6 | import javax.script.ScriptEngine; 7 | import javax.script.ScriptException; 8 | import java.io.ByteArrayOutputStream; 9 | import java.io.IOException; 10 | import java.io.InputStream; 11 | 12 | /** 13 | * Created by IntelliJ IDEA. 14 | * User: josh 15 | * Date: Aug 3, 2009 16 | * Time: 4:32:36 PM 17 | * To change this template use File | Settings | File Templates. 18 | */ 19 | public class ScriptEngineGateway { 20 | public static void main(final String[] args) throws Exception { 21 | new ScriptEngineGateway().doit(); 22 | } 23 | 24 | private void doit() throws IOException, ScriptException { 25 | ScriptEngine engine = LinkedProcessFarm.getScriptEngineManager() 26 | .getEngineByName(LinkedProcess.GROOVY); 27 | 28 | String program = toString(ScriptEngineGateway.class.getResourceAsStream("lddemo.groovy")); 29 | Object result = engine.eval(program); 30 | 31 | System.out.println("result = " + result); 32 | } 33 | 34 | private String toString(final InputStream is) throws IOException { 35 | ByteArrayOutputStream bos = new ByteArrayOutputStream(); 36 | while (0 < is.available()) { 37 | bos.write(is.read()); 38 | } 39 | is.close(); 40 | 41 | return bos.toString(); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /lopsided/laboratory/josh/lopsided-linkeddata/src/main/java/org/linkedprocess/linkeddata/nquads/NQuadsFormat.java: -------------------------------------------------------------------------------- 1 | package org.linkedprocess.linkeddata.nquads; 2 | 3 | import org.openrdf.rio.RDFFormat; 4 | 5 | import java.nio.charset.Charset; 6 | 7 | /** 8 | * Created by IntelliJ IDEA. 9 | * User: josh 10 | * Date: Aug 3, 2009 11 | * Time: 3:25:39 PM 12 | * To change this template use File | Settings | File Templates. 13 | */ 14 | public class NQuadsFormat extends RDFFormat { 15 | public static NQuadsFormat NQUADS = new NQuadsFormat(); 16 | 17 | private NQuadsFormat() { 18 | // RDFFormat(String name, String mimeType, Charset charset, String fileExtension, boolean supportsNamespaces, boolean supportsContexts) 19 | super("nquads", "text/x-nquads", Charset.forName("US-ASCII"), "nq", true, true); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lopsided/laboratory/josh/lopsided-linkeddata/src/main/java/org/linkedprocess/linkeddata/server/rewriter/RewriterSail.java: -------------------------------------------------------------------------------- 1 | package org.linkedprocess.linkeddata.server.rewriter; 2 | 3 | import org.openrdf.sail.Sail; 4 | import org.openrdf.sail.SailConnection; 5 | import org.openrdf.sail.SailException; 6 | import org.openrdf.sail.helpers.SailWrapper; 7 | 8 | /** 9 | * Author: josh 10 | * Date: Aug 11, 2009 11 | * Time: 3:30:26 PM 12 | */ 13 | public class RewriterSail extends SailWrapper { 14 | private final RewritingSchema schema; 15 | 16 | public RewriterSail(final Sail baseSail, 17 | final RewritingSchema schema) { 18 | this.setBaseSail(baseSail); 19 | this.schema = schema; 20 | } 21 | 22 | @Override 23 | public SailConnection getConnection() throws SailException { 24 | return new RewriterSailConnection(this.getBaseSail().getConnection(), schema, this.getValueFactory()); 25 | } 26 | 27 | @Override 28 | public boolean isWritable() throws SailException { 29 | // TODO: handle rewriting for write operations 30 | return false; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lopsided/laboratory/josh/lopsided-linkeddata/src/main/java/org/linkedprocess/linkeddata/server/rewriter/RewritingSchema.java: -------------------------------------------------------------------------------- 1 | package org.linkedprocess.linkeddata.server.rewriter; 2 | 3 | import org.openrdf.model.URI; 4 | 5 | import java.util.HashMap; 6 | import java.util.Map; 7 | 8 | /** 9 | * Author: josh 10 | * Date: Aug 11, 2009 11 | * Time: 3:48:36 PM 12 | */ 13 | public class RewritingSchema { 14 | public enum PartOfSpeech { SUBJECT, PREDICATE, OBJECT, CONTEXT } 15 | public enum Action { 16 | TO_STORE, FROM_STORE 17 | } 18 | 19 | private final URIRewriter defaultRewriter = new URIRewriter() { 20 | public URI rewrite(final URI original) { 21 | return original; 22 | } 23 | }; 24 | 25 | private final Map rewriters 26 | = new HashMap(); 27 | 28 | public URIRewriter getRewriter(final PartOfSpeech partOfSpeech, 29 | final Action action) { 30 | URIRewriter r = rewriters.get("" + partOfSpeech + action); 31 | return null == r 32 | ? defaultRewriter 33 | : r; 34 | } 35 | 36 | public void setRewriter(final PartOfSpeech partOfSpeech, 37 | final Action action, 38 | final URIRewriter rewriter) { 39 | rewriters.put("" + partOfSpeech + action, rewriter); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /lopsided/laboratory/josh/lopsided-linkeddata/src/main/java/org/linkedprocess/linkeddata/server/rewriter/URIRewriter.java: -------------------------------------------------------------------------------- 1 | package org.linkedprocess.linkeddata.server.rewriter; 2 | 3 | import org.openrdf.model.URI; 4 | 5 | /** 6 | * Author: josh 7 | * Date: Aug 11, 2009 8 | * Time: 3:35:10 PM 9 | */ 10 | public interface URIRewriter { 11 | URI rewrite(URI original); 12 | } 13 | -------------------------------------------------------------------------------- /lopsided/laboratory/peter/villein-15-app/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /lopsided/laboratory/peter/villein-15-app/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | villein-15-app 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | org.maven.ide.eclipse.maven2Builder 30 | 31 | 32 | 33 | 34 | 35 | org.maven.ide.eclipse.maven2Nature 36 | com.android.ide.eclipse.adt.AndroidNature 37 | org.eclipse.jdt.core.javanature 38 | 39 | 40 | -------------------------------------------------------------------------------- /lopsided/laboratory/peter/villein-15-app/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /lopsided/laboratory/peter/villein-15-app/README.txt: -------------------------------------------------------------------------------- 1 | please refer to http://code.google.com/p/maven-android-plugin/wiki/GettingStarted to set up the Android SDK environment and deploy the android.jar into your local Maven repo, then type 2 | 3 | mvn install 4 | 5 | -------------------------------------------------------------------------------- /lopsided/laboratory/peter/villein-15-app/assets/defaults.properties: -------------------------------------------------------------------------------- 1 | server=xmpp.linkedprocess.org 2 | port=5222 3 | username=linked.process.1 4 | password=linked12 -------------------------------------------------------------------------------- /lopsided/laboratory/peter/villein-15-app/assets/demo.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2009. The LoPSideD implementation of the Linked Process 3 | # protocol is an open-source project founded at the Center for Nonlinear Studies 4 | # at the Los Alamos National Laboratory in Los Alamos, New Mexico. Please visit 5 | # http://linkedprocess.org and LICENSE.txt for more information. 6 | # 7 | 8 | #Sat Aug 15 15:33:12 MDT 2009 9 | port=5222 10 | password=test 11 | server=lanl.linkedprocess.org 12 | username=test_countryside 13 | ########## PrimeFinder specific properties 14 | primeFinder.startInteger=1 15 | primeFinder.endInteger=1000 16 | primeFinder.farmCount=2 17 | primeFinder.vmsPerFarm=2 18 | ########## ProgressPolling specific properties 19 | progressPolling.meterMax=1.0 20 | progressPolling.pollingInterval=500 21 | -------------------------------------------------------------------------------- /lopsided/laboratory/peter/villein-15-app/assets/findPrimes.groovy: -------------------------------------------------------------------------------- 1 | def findPrimes(startInt, endInt) { 2 | x = []; 3 | for(n in startInt..endInt) { 4 | prime = true; 5 | for (i in 3..n-1) { 6 | if (n % i == 0) { 7 | prime = false; 8 | break; 9 | } 10 | } 11 | if (( n%2 !=0 && prime && n > 2) || n == 2) { 12 | x.add(n); 13 | } 14 | meter=(n-startInt)/(endInt-startInt); 15 | System.out.println(startInt+'-'+endInt + ':n=' + n + 'progress: ' + meter) 16 | 17 | } 18 | return x; 19 | }; -------------------------------------------------------------------------------- /lopsided/laboratory/peter/villein-15-app/assets/smack-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | org.jivesoftware.smackx.ServiceDiscoveryManager 8 | org.jivesoftware.smack.PrivacyListManager 9 | org.jivesoftware.smackx.XHTMLManager 10 | org.jivesoftware.smackx.muc.MultiUserChat 11 | org.jivesoftware.smackx.filetransfer.FileTransferManager 12 | org.jivesoftware.smackx.LastActivityManager 13 | org.jivesoftware.smack.ReconnectionManager 14 | org.jivesoftware.smackx.commands.AdHocCommandManager 15 | 16 | 17 | 18 | 10000 19 | 20 | 21 | 30000 22 | 23 | -------------------------------------------------------------------------------- /lopsided/laboratory/peter/villein-15-app/default.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system use, 7 | # "build.properties", and override values to adapt the script to your 8 | # project structure. 9 | 10 | # apk configurations. This property allows creation of APK files with limited 11 | # resources. For example, if your application contains many locales and 12 | # you wish to release multiple smaller apks instead of a large one, you can 13 | # define configuration to create apks with limited language sets. 14 | # Format is a comma separated list of configuration names. For each 15 | # configuration, a property will declare the resource configurations to 16 | # include. Example: 17 | # apk-configurations=european,northamerica 18 | # apk-config-european=en,fr,it,de,es 19 | # apk-config-northamerica=en,es 20 | apk-configurations= 21 | # Project target. 22 | target=Google Inc.:Google APIs:3 23 | -------------------------------------------------------------------------------- /lopsided/laboratory/peter/villein-15-app/res/drawable/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/laboratory/peter/villein-15-app/res/drawable/icon.png -------------------------------------------------------------------------------- /lopsided/laboratory/peter/villein-15-app/res/drawable/lop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/laboratory/peter/villein-15-app/res/drawable/lop.png -------------------------------------------------------------------------------- /lopsided/laboratory/peter/villein-15-app/res/layout/config_primes.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | 15 | 19 | 20 | 23 | 24 | 25 | 29 | 33 | 34 | 37 | 38 | 39 | 43 | 44 | 45 | 46 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /lopsided/laboratory/peter/villein-15-app/res/layout/createjob.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 9 | 10 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /lopsided/laboratory/peter/villein-15-app/res/layout/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 20 | 21 | -------------------------------------------------------------------------------- /lopsided/laboratory/peter/villein-15-app/res/layout/overview.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /lopsided/laboratory/peter/villein-15-app/res/layout/row.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 11 | 14 | 15 | -------------------------------------------------------------------------------- /lopsided/laboratory/peter/villein-15-app/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | LoPDroid 5 | 6 | -------------------------------------------------------------------------------- /lopsided/laboratory/peter/villein-15-app/res/xml/preferences.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lopsided/laboratory/peter/villein-15-app/src/main/java/logging.properties: -------------------------------------------------------------------------------- 1 | # Specify the handlers to create in the root logger 2 | # (all loggers are children of the root logger) 3 | # The following creates two handlers 4 | #handlers = java.util.logging.ConsoleHandler, java.util.logging.FileHandler 5 | 6 | # Set the default logging level for the root logger 7 | .level = FINE 8 | 9 | # Set the default logging level for new ConsoleHandler instances 10 | #java.util.logging.ConsoleHandler.level = ALL 11 | 12 | # Set the default logging level for new FileHandler instances 13 | #java.util.logging.FileHandler.level = ALL 14 | 15 | # Set the default formatter for new ConsoleHandler instances 16 | #java.util.logging.ConsoleHandler.formatter = org.linkedprocess.xmpp.tools.SimpleLogFormatter 17 | 18 | # Set the default logging level for the logger named com.mycompany 19 | #com.mycompany.level = ALL 20 | -------------------------------------------------------------------------------- /lopsided/laboratory/peter/villein-15-app/src/main/java/org/linkedprocess/villein/android/ConnectionListener.java: -------------------------------------------------------------------------------- 1 | package org.linkedprocess.villein.android; 2 | 3 | public interface ConnectionListener { 4 | 5 | void connected(); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /lopsided/laboratory/peter/villein-15-app/src/main/java/org/linkedprocess/villein/android/CreateJob.java: -------------------------------------------------------------------------------- 1 | package org.linkedprocess.villein.android; 2 | 3 | import android.app.Activity; 4 | import android.os.Bundle; 5 | 6 | public class CreateJob extends Activity { 7 | private Bundle bundle; 8 | 9 | @Override 10 | public void onCreate(Bundle savedInstanceState) { 11 | this.bundle = savedInstanceState; 12 | super.onCreate(savedInstanceState); 13 | setContentView(R.layout.createjob); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lopsided/laboratory/peter/villein-15-app/src/main/java/org/linkedprocess/villein/android/EditPreferences.java: -------------------------------------------------------------------------------- 1 | package org.linkedprocess.villein.android; 2 | 3 | import android.content.SharedPreferences; 4 | import android.os.Bundle; 5 | import android.preference.EditTextPreference; 6 | import android.preference.PreferenceActivity; 7 | import android.preference.PreferenceManager; 8 | import android.widget.Toast; 9 | 10 | public class EditPreferences extends PreferenceActivity { 11 | 12 | public static final String PREFS = "prefs"; 13 | 14 | /** Called when the activity is first created. */ 15 | @Override 16 | public void onCreate(Bundle savedInstanceState) { 17 | super.onCreate(savedInstanceState); 18 | addPreferencesFromResource(R.xml.preferences); 19 | } 20 | 21 | @Override 22 | protected void onStop() { 23 | super.onStop(); 24 | SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this); 25 | SharedPreferences.Editor editor = sharedPreferences.edit(); 26 | editor.putString(Villein.USERNAME, 27 | ((EditTextPreference) findPreference(Villein.USERNAME)) 28 | .getText()); 29 | editor.putString(Villein.PASSWORD, 30 | ((EditTextPreference) findPreference(Villein.PASSWORD)) 31 | .getText()); 32 | editor 33 | .putString(Villein.SERVER, 34 | ((EditTextPreference) findPreference(Villein.SERVER)) 35 | .getText()); 36 | editor.putString(Villein.PORT, ((EditTextPreference) findPreference(Villein.PORT)) 37 | .getText()); 38 | 39 | editor.commit(); 40 | Toast.makeText(this, "preferences saved", Toast.LENGTH_SHORT).show(); 41 | Villein.prefs.refresh(); 42 | 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /lopsided/laboratory/peter/villein-15-app/src/main/java/org/linkedprocess/villein/android/Prefs.java: -------------------------------------------------------------------------------- 1 | package org.linkedprocess.villein.android; 2 | 3 | import android.content.Context; 4 | import android.content.SharedPreferences; 5 | import android.preference.PreferenceManager; 6 | 7 | public class Prefs { 8 | 9 | private Context activity; 10 | public String username; 11 | public String password; 12 | public String server; 13 | public int port; 14 | 15 | public Prefs(Context activity) { 16 | this.activity = activity; 17 | refresh(); 18 | } 19 | 20 | void refresh() { 21 | SharedPreferences prefs = PreferenceManager 22 | .getDefaultSharedPreferences(activity); 23 | username = prefs.getString(Villein.USERNAME, "linked.process.1"); 24 | password = prefs.getString(Villein.PASSWORD, "linked12"); 25 | server = prefs.getString(Villein.SERVER, "talk.l.google.com"); 26 | port = Integer.parseInt(prefs.getString(Villein.PORT, "5222")); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /lopsided/lopsided-core/src/main/java/org/linkedprocess/Connection.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009. The LoPSideD implementation of the Linked Process 3 | * protocol is an open-source project founded at the Center for Nonlinear Studies 4 | * at the Los Alamos National Laboratory in Los Alamos, New Mexico. Please visit 5 | * http://linkedprocess.org and LICENSE.txt for more information. 6 | */ 7 | 8 | package org.linkedprocess; 9 | 10 | import org.jivesoftware.smack.*; 11 | import org.jivesoftware.smack.filter.PacketFilter; 12 | import org.jivesoftware.smack.packet.Packet; 13 | import org.jivesoftware.smack.packet.Presence; 14 | 15 | public interface Connection { 16 | 17 | XMPPConnection getDelegate(); 18 | 19 | boolean isConnected(); 20 | 21 | void connect() throws XMPPException; 22 | 23 | void addPacketListener(PacketListener listener, PacketFilter filter); 24 | 25 | void addPacketWriterInterceptor(PacketInterceptor interceptor, PacketFilter filter); 26 | 27 | PacketCollector createPacketCollector(PacketFilter filter); 28 | 29 | void sendPacket(Packet packet); 30 | 31 | Roster getRoster(); 32 | 33 | boolean isAnonymous(); 34 | 35 | boolean isAuthenticated(); 36 | 37 | boolean isSecureConnection(); 38 | 39 | boolean isUsingCompression(); 40 | 41 | boolean isUsingTLS(); 42 | 43 | String getHost(); 44 | 45 | void disconnect(Presence presence); 46 | 47 | void disconnect(); 48 | 49 | String getUser(); 50 | 51 | void login(String username, String password, String string) throws XMPPException; 52 | 53 | } 54 | -------------------------------------------------------------------------------- /lopsided/lopsided-core/src/main/java/org/linkedprocess/LopXmppException.java: -------------------------------------------------------------------------------- 1 | package org.linkedprocess; 2 | 3 | /** 4 | * @author Marko A. Rodriguez (http://markorodriguez.com) 5 | * @version LoPSideD 0.1 6 | */ 7 | public class LopXmppException extends Exception { 8 | public LopXmppException(final String message) { 9 | super(message); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lopsided/lopsided-core/src/main/java/org/linkedprocess/ProbePresence.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009. The LoPSideD implementation of the Linked Process 3 | * protocol is an open-source project founded at the Center for Nonlinear Studies 4 | * at the Los Alamos National Laboratory in Los Alamos, New Mexico. Please visit 5 | * http://linkedprocess.org and LICENSE.txt for more information. 6 | */ 7 | 8 | package org.linkedprocess; 9 | 10 | import org.jivesoftware.smack.packet.Presence; 11 | 12 | /** 13 | * The Smack API does not support a . This class is provided to fill in this hole in their API. 14 | * 15 | * @author Marko A. Rodriguez (http://markorodriguez.com) 16 | * @version LoPSideD 0.1 17 | */ 18 | public class ProbePresence extends Presence { 19 | 20 | private static final String OLD_PRESENCE_PREFIX = " 13 | * Author: josh 14 | * Date: Jun 26, 2009 15 | * Time: 10:43:40 AM 16 | */ 17 | public class SchedulerException extends Exception { 18 | public SchedulerException() { 19 | super(); 20 | } 21 | 22 | public SchedulerException(final String msg) { 23 | super(msg); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lopsided/lopsided-core/src/main/java/org/linkedprocess/farm/security/VmSandboxedThread.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009. The LoPSideD implementation of the Linked Process 3 | * protocol is an open-source project founded at the Center for Nonlinear Studies 4 | * at the Los Alamos National Laboratory in Los Alamos, New Mexico. Please visit 5 | * http://linkedprocess.org and LICENSE.txt for more information. 6 | */ 7 | 8 | package org.linkedprocess.farm.security; 9 | 10 | /** 11 | * This is merely a marker class which allows VMSecurityManager to distinguish VM worker threads from all others. 12 | */ 13 | public class VmSandboxedThread extends Thread { 14 | // Definitely a hack... 15 | public static final String SPECIAL_TOSTRING_VALUE = "!"; 16 | 17 | public VmSandboxedThread(final Runnable r, 18 | final String name) { 19 | super(r, name); 20 | } 21 | 22 | public String toString() { 23 | return SPECIAL_TOSTRING_VALUE; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lopsided/lopsided-core/src/main/java/org/linkedprocess/farm/security/VmSecurityManagerListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009. The LoPSideD implementation of the Linked Process 3 | * protocol is an open-source project founded at the Center for Nonlinear Studies 4 | * at the Los Alamos National Laboratory in Los Alamos, New Mexico. Please visit 5 | * http://linkedprocess.org and LICENSE.txt for more information. 6 | */ 7 | 8 | package org.linkedprocess.farm.security; 9 | 10 | /** 11 | * User: josh 12 | * Date: Aug 3, 2009 13 | * Time: 5:19:42 PM 14 | */ 15 | public interface VmSecurityManagerListener { 16 | void notPermitted(SecurityException exception); 17 | 18 | void notPermittedByType(SecurityException exception, PermissionType type); 19 | 20 | void notPermittedByTypeAndPath(SecurityException exception, PermissionType type, String path); 21 | } 22 | -------------------------------------------------------------------------------- /lopsided/lopsided-core/src/main/resources/META-INF/services/javax.script.ScriptEngineFactory: -------------------------------------------------------------------------------- 1 | com.sun.script.jruby.JRubyScriptEngineFactory 2 | com.sun.script.groovy.GroovyScriptEngineFactory 3 | com.sun.script.jython.JythonScriptEngineFactory 4 | org.linkedprocess.JavaScriptEngineFactory 5 | -------------------------------------------------------------------------------- /lopsided/lopsided-core/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2009. The LoPSideD implementation of the Linked Process 3 | # protocol is an open-source project founded at the Center for Nonlinear Studies 4 | # at the Los Alamos National Laboratory in Los Alamos, New Mexico. Please visit 5 | # http://linkedprocess.org and LICENSE.txt for more information. 6 | # 7 | 8 | log4j.debug=false 9 | 10 | #log4j.rootLogger=INFO, console 11 | log4j.category.org.linkedprocess=DEBUG, lop, console 12 | 13 | log4j.appender.lop=org.apache.log4j.FileAppender 14 | log4j.appender.lop.file=lop.log 15 | log4j.appender.lop.append=true 16 | log4j.appender.lop.layout=org.apache.log4j.PatternLayout 17 | log4j.appender.lop.layout.ConversionPattern=%d [%t] %p %C{1} - %m%n 18 | 19 | 20 | log4j.appender.console=org.apache.log4j.ConsoleAppender 21 | log4j.appender.console.layout=org.apache.log4j.PatternLayout 22 | log4j.appender.console.layout.ConversionPattern=%d [%t] %p %C{1} - %m%n 23 | -------------------------------------------------------------------------------- /lopsided/lopsided-core/src/main/resources/logging.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2009. The LoPSideD implementation of the Linked Process 3 | # protocol is an open-source project founded at the Center for Nonlinear Studies 4 | # at the Los Alamos National Laboratory in Los Alamos, New Mexico. Please visit 5 | # http://linkedprocess.org and LICENSE.txt for more information. 6 | # 7 | 8 | # Specify the handlers to create in the root logger 9 | # (all loggers are children of the root logger) 10 | # The following creates two handlers 11 | handlers = java.util.logging.ConsoleHandler, java.util.logging.FileHandler 12 | 13 | # Set the default logging level for the root logger 14 | .level = INFO 15 | 16 | # Set the default logging level for new ConsoleHandler instances 17 | java.util.logging.ConsoleHandler.level = ALL 18 | 19 | # Set the default logging level for new FileHandler instances 20 | java.util.logging.FileHandler.level = ALL 21 | 22 | # Set the default formatter for new ConsoleHandler instances 23 | java.util.logging.ConsoleHandler.formatter = org.linkedprocess.xmpp.tools.SimpleLogFormatter 24 | 25 | # Set the default logging level for the logger named com.mycompany 26 | com.mycompany.level = ALL 27 | -------------------------------------------------------------------------------- /lopsided/lopsided-core/src/main/ruby/org/linkedprocess/xmpp-rb/farm_struct.rb: -------------------------------------------------------------------------------- 1 | require '../xmpp-rb/struct' 2 | 3 | module Lop 4 | 5 | class FarmStruct < Struct 6 | attr_accessor :virtual_machines 7 | 8 | def initialize() 9 | @virtual_machines = {} 10 | end 11 | end 12 | 13 | end -------------------------------------------------------------------------------- /lopsided/lopsided-core/src/main/ruby/org/linkedprocess/xmpp-rb/host_struct.rb: -------------------------------------------------------------------------------- 1 | require '../xmpp-rb/struct' 2 | require '../xmpp-rb/farm_struct' 3 | 4 | module Lop 5 | class HostStruct < Struct 6 | 7 | end 8 | end -------------------------------------------------------------------------------- /lopsided/lopsided-core/src/main/ruby/org/linkedprocess/xmpp-rb/job.rb: -------------------------------------------------------------------------------- 1 | module Lop 2 | 3 | class Job 4 | 5 | attr_accessor :job_id, :error_type, :error_message, :expression, :result 6 | 7 | end 8 | 9 | end -------------------------------------------------------------------------------- /lopsided/lopsided-core/src/main/ruby/org/linkedprocess/xmpp-rb/linked_process.rb: -------------------------------------------------------------------------------- 1 | module Lop 2 | 3 | class LinkedProcess 4 | LOP_FARM_NAMESPACE = "http://linkedprocess.org/protocol#LoPFarm" 5 | LOP_VM_NAMESPACE = "http://linkedprocess.org/protocol#LoPVM" 6 | DISCO_INFO_NAMESPACE = "http://jabber.org/protocol/disco#info" 7 | IQ_ROSTER_NAMESPACE = "jabber:iq:roster" 8 | 9 | SPAWN_VM_TAGNAME = "spawn_vm" 10 | TERMINATE_VM_TAGNAME = "terminate_vm" 11 | SUBMIT_JOB_TAGNAME = "submit_job" 12 | MANAGE_BINDINGS_TAGNAME = "manage_bindings" 13 | BINDING_TAGNAME = "binding" 14 | #### 15 | FEATURE_TAGNAME = "feature" 16 | QUERY_TAGNAME = "query" 17 | ITEM_TAGNAME = "item" 18 | 19 | VM_SPECIES_ATTRIBUTE = "vm_species" 20 | VM_PASSWORD_ATTRIBUTE = "vm_password" 21 | VM_JID_ATTRIBUTE = "vm_jid" 22 | ERROR_TYPE_ATTRIBUTE = "error_type" 23 | #### 24 | JID_ATTRIBUTE = "jid" 25 | VAR_ATTRIBUTE = "var" 26 | end 27 | 28 | end -------------------------------------------------------------------------------- /lopsided/lopsided-core/src/main/ruby/org/linkedprocess/xmpp-rb/struct.rb: -------------------------------------------------------------------------------- 1 | module Lop 2 | 3 | class Struct 4 | attr_accessor :full_jid 5 | end 6 | 7 | end -------------------------------------------------------------------------------- /lopsided/lopsided-core/src/main/ruby/org/linkedprocess/xmpp-rb/vm_struct.rb: -------------------------------------------------------------------------------- 1 | require '../xmpp-rb/struct' 2 | 3 | module Lop 4 | 5 | class VmStruct < Struct 6 | attr_accessor :vm_password, :vm_species, :jobs, :bindings, :farm 7 | 8 | def initialize 9 | @jobs = {} 10 | @bindings = {} 11 | end 12 | end 13 | 14 | end -------------------------------------------------------------------------------- /lopsided/lopsided-core/src/test/java/org/linkedprocess/JidTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009. The LoPSideD implementation of the Linked Process 3 | * protocol is an open-source project founded at the Center for Nonlinear Studies 4 | * at the Los Alamos National Laboratory in Los Alamos, New Mexico. Please visit 5 | * http://linkedprocess.org and LICENSE.txt for more information. 6 | */ 7 | 8 | package org.linkedprocess; 9 | 10 | import junit.framework.TestCase; 11 | 12 | import java.util.HashSet; 13 | 14 | /** 15 | * @author Marko A. Rodriguez (http://markorodriguez.com) 16 | * @version LoPSideD 0.1 17 | */ 18 | public class JidTest extends TestCase { 19 | 20 | public void testBareJid() { 21 | Jid jid1 = new Jid("linked.process.1@xmpp.linkedprocess.org/LoPFarm/123456"); 22 | Jid jid2 = new Jid("linked.process.1@xmpp.linkedprocess.org"); 23 | assertFalse(jid1.isBareJid()); 24 | assertTrue(jid2.isBareJid()); 25 | assertEquals(jid1.getBareJid(), jid2); 26 | assertEquals(jid2, jid2.getBareJid()); 27 | assertFalse(jid1.equals(jid1.getBareJid())); 28 | 29 | } 30 | 31 | public void testJidInSet() { 32 | HashSet set = new HashSet(); 33 | set.add(new Jid("linked.process.1@xmpp.linkedprocess.org")); 34 | set.add(new Jid("linked.process.1@xmpp.linkedprocess.org")); 35 | set.add(new Jid("linked.process.1@xmpp.linkedprocess.org")); 36 | assertEquals(set.size(), 1); 37 | } 38 | 39 | public void testGenerateResource() { 40 | Jid jid1 = new Jid("lop1@xmpp.linkedprocess.org/test/"); 41 | assertEquals(jid1.getResource(), "test/"); 42 | jid1 = new Jid("lop1@xmpp.linkedprocess.org"); 43 | assertNull(jid1.getResource()); 44 | jid1 = new Jid("lop1@xmpp.linkedprocess.org/1234/ABCD"); 45 | assertEquals("1234/ABCD", jid1.getResource()); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /lopsided/lopsided-core/src/test/java/org/linkedprocess/XmppClientTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009. The LoPSideD implementation of the Linked Process 3 | * protocol is an open-source project founded at the Center for Nonlinear Studies 4 | * at the Los Alamos National Laboratory in Los Alamos, New Mexico. Please visit 5 | * http://linkedprocess.org and LICENSE.txt for more information. 6 | */ 7 | 8 | package org.linkedprocess; 9 | 10 | import junit.framework.TestCase; 11 | 12 | import java.util.HashSet; 13 | import java.util.Set; 14 | 15 | /** 16 | * @author Marko A. Rodriguez (http://markorodriguez.com) 17 | * @version LoPSideD 0.1 18 | */ 19 | public class XmppClientTest extends TestCase { 20 | 21 | public void testRandomIDGenerator() { 22 | // 1,000,000 random IDs are generated without conflict. 23 | Set uniques = new HashSet(); 24 | for (int i = 0; i < 100000; i++) { 25 | //System.out.println(XmppClient.generateRandomResourceId()); 26 | uniques.add(Jid.generateRandomResourceId()); 27 | } 28 | assertEquals(uniques.size(), 100000); 29 | } 30 | 31 | public void testBoolean() { 32 | assertTrue(Boolean.valueOf("true")); 33 | assertFalse(Boolean.valueOf("false")); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lopsided/lopsided-core/src/test/java/org/linkedprocess/farm/security/ServiceDiscoveryConfigurationTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009. The LoPSideD implementation of the Linked Process 3 | * protocol is an open-source project founded at the Center for Nonlinear Studies 4 | * at the Los Alamos National Laboratory in Los Alamos, New Mexico. Please visit 5 | * http://linkedprocess.org and LICENSE.txt for more information. 6 | */ 7 | 8 | package org.linkedprocess.farm.security; 9 | 10 | import junit.framework.TestCase; 11 | import org.jdom.output.XMLOutputter; 12 | import org.linkedprocess.LinkedProcess; 13 | 14 | import java.util.Properties; 15 | 16 | /** 17 | * Author: josh 18 | * Date: Jul 16, 2009 19 | * Time: 4:55:42 PM 20 | */ 21 | public class ServiceDiscoveryConfigurationTest extends TestCase { 22 | 23 | public void testAll() throws Exception { 24 | Properties p = LinkedProcess.getConfiguration(); 25 | p.setProperty("org.linkedprocess.security.readFile", "true"); 26 | 27 | VmSecurityManager m = new VmSecurityManager(p); 28 | PathPermissions pp = new PathPermissions(); 29 | pp.addPermitRule("/tmp/foo/bar"); 30 | pp.addPermitRule("/opt/stuff"); 31 | pp.addPermitRule("/opt/"); 32 | m.setReadPermissions(pp); 33 | 34 | ServiceDiscoveryConfiguration c = new ServiceDiscoveryConfiguration(m); 35 | 36 | XMLOutputter op = new XMLOutputter(); 37 | op.output(c.toElement(), System.out); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /lopsided/lopsided-farm/LICENSE.txt: -------------------------------------------------------------------------------- 1 | LoPSided: An Implementation of the Linked Process Protocol 2 | Copyright (C) 2009 Los Alamos National Laboratory. 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining 5 | a copy of this software and associated documentation files (the 6 | "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, 8 | distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to 10 | the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 19 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 20 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 21 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /lopsided/lopsided-farm/README.txt: -------------------------------------------------------------------------------- 1 | lopsided-farm 2 | ================================================================================ 3 | Part of LoPSideD: an implementation of the Linked Process Protocol 4 | 5 | To start a LoPSideD farm in Unix, use the Bash launcher script: 6 | 7 | $ bash farm-nogui.sh config.properties 8 | 9 | where config.properties is a Java properties file containing the configuration 10 | of your LoPSiDeD environment. 11 | Similarly, in Windows you may start a farm using the provided batch script: 12 | 13 | $ farm-nogui config.properties 14 | 15 | To launch a farm using the LoPSideD graphical user interface, see the 16 | lopsided-gui module of this project. 17 | 18 | For more information on Linked Process and the LoPSideD implementation, see: 19 | http://linkedprocess.org 20 | Questions and comments are always welcome on the Linked Process mailing list: 21 | linkedprocess@googlegroups.com 22 | -------------------------------------------------------------------------------- /lopsided/lopsided-farm/farm-nogui.bat: -------------------------------------------------------------------------------- 1 | :: Windows launcher script for the Lopsided farm (no GUI) 2 | 3 | if not "%JAVA_OPTIONS%" == "" goto gotOpts 4 | set JAVA_OPTIONS=-Xms32M -Xmx512M 5 | :gotOpts 6 | 7 | if "%1" == "" goto noConfig 8 | set JAVA_OPTIONS=%JAVA_OPTIONS% -Dorg.linkedprocess.configurationProperties=%1 9 | :noConfig 10 | 11 | java %JAVA_OPTIONS% %JAVA_ARGS% -cp target\lopsided-farm-*-standalone.jar org.linkedprocess.farm.Farm 12 | 13 | :: TODO: return exit code 14 | -------------------------------------------------------------------------------- /lopsided/lopsided-farm/farm-nogui.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Path to JAR 4 | JAR=`dirname $0`/target/lopsided-farm-*-standalone.jar 5 | 6 | # Find Java 7 | if [ "$JAVA_HOME" = "" ] ; then 8 | JAVA="java" 9 | else 10 | JAVA="$JAVA_HOME/bin/java" 11 | fi 12 | 13 | # Set Java options 14 | if [ "$JAVA_OPTIONS" = "" ] ; then 15 | JAVA_OPTIONS="-Xms32M -Xmx512M" 16 | fi 17 | 18 | if [ $# -ge 1 ] ; then 19 | JAVA_OPTIONS=$JAVA_OPTIONS" -Dorg.linkedprocess.configurationProperties="$1 20 | fi 21 | 22 | # Launch the application 23 | $JAVA $JAVA_OPTIONS -cp $JAR org.linkedprocess.farm.Farm 24 | 25 | # Return the program's exit code 26 | exit $? 27 | -------------------------------------------------------------------------------- /lopsided/lopsided-farm/src/assembly/distribution.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | zip 4 | 5 | 6 | 7 | 8 | LICENSE.txt 9 | README.txt 10 | pom.xml 11 | demo_fortytwo_countryside.properties 12 | demo_lanl_countryside.properties 13 | fortytwo_countryside.properties 14 | lanl_countryside.properties 15 | sweden_countryside.properties 16 | 17 | 18 | 19 | 0775 20 | 21 | farm-nogui.sh 22 | farm-nogui.bat 23 | 24 | 25 | 26 | src 27 | 28 | 29 | target 30 | 31 | lopsided-farm-*.jar 32 | lopsided-farm-*-standalone.jar 33 | site 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /lopsided/lopsided-farm/src/assembly/standalone.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | standalone 4 | 5 | 6 | jar 7 | 8 | 9 | false 10 | 11 | 12 | 13 | target/classes 14 | / 15 | 16 | 17 | 18 | 19 | 20 | / 21 | true 22 | runtime 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /lopsided/lopsided-farm/src/main/java/org/linkedprocess/JavaScriptEngineFactory.java: -------------------------------------------------------------------------------- 1 | package org.linkedprocess; 2 | 3 | import com.sun.phobos.script.javascript.RhinoScriptEngineFactory; 4 | 5 | /** 6 | * Author: josh 7 | * Date: Jul 27, 2009 8 | * Time: 5:54:13 PM 9 | */ 10 | public class JavaScriptEngineFactory extends RhinoScriptEngineFactory { 11 | @Override 12 | public String getLanguageName() { 13 | return "javascript"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lopsided/lopsided-farm/src/main/java/org/linkedprocess/farm/FarmPacketListener.java: -------------------------------------------------------------------------------- 1 | package org.linkedprocess.farm; 2 | 3 | import org.linkedprocess.LopPacketListener; 4 | 5 | /** 6 | * @author Marko A. Rodriguez (http://markorodriguez.com) 7 | * @version LoPSideD 0.1 8 | */ 9 | public abstract class FarmPacketListener extends LopPacketListener { 10 | 11 | public FarmPacketListener(Farm farm) { 12 | super(farm); 13 | } 14 | 15 | public Farm getFarm() { 16 | return (Farm) this.xmppClient; 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /lopsided/lopsided-farm/src/main/java/org/linkedprocess/farm/PresenceSubscriptionFilter.java: -------------------------------------------------------------------------------- 1 | package org.linkedprocess.farm; 2 | 3 | import org.jivesoftware.smack.filter.PacketFilter; 4 | import org.jivesoftware.smack.packet.Packet; 5 | import org.jivesoftware.smack.packet.Presence; 6 | 7 | /** 8 | * @author Marko A. Rodriguez (http://markorodriguez.com) 9 | * @version LoPSideD 0.1 10 | */ 11 | public class PresenceSubscriptionFilter implements PacketFilter { 12 | 13 | public boolean accept(Packet packet) { 14 | try { 15 | if (!packet.toXML().trim().startsWith(""); 38 | assertNotNull(result); 39 | result = parse(""); 40 | assertNotNull(result); 41 | //missing "'" 42 | try { 43 | result = parse(""); 44 | fail(); 45 | } catch (XmlPullParserException xppe) { 46 | // expected 47 | } 48 | 49 | // assertNotNull(result.getFarmPassword()); 50 | 51 | } 52 | 53 | private SpawnVm parse(String spawn) throws Exception { 54 | parser.setInput(new StringReader(spawn)); 55 | int next = parser.next(); 56 | 57 | SpawnVm res = (SpawnVm) sp.parseIQ(parser); 58 | return res; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /lopsided/lopsided-gui/LICENSE.txt: -------------------------------------------------------------------------------- 1 | LoPSided: An Implementation of the Linked Process Protocol 2 | Copyright (C) 2009 Los Alamos National Laboratory. 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining 5 | a copy of this software and associated documentation files (the 6 | "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, 8 | distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to 10 | the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 19 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 20 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 21 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /lopsided/lopsided-gui/README.txt: -------------------------------------------------------------------------------- 1 | lopsided-gui 2 | ================================================================================ 3 | Part of LoPSideD: an implementation of the Linked Process Protocol 4 | 5 | To start the LoPSideD farm GUI in Unix, use the Bash launcher script: 6 | 7 | $ bash farm-gui.sh config.properties 8 | 9 | where config.properties is a Java properties file containing the configuration 10 | of your LoPSiDeD environment. 11 | Similarly, in Windows you may start a farm using the provided batch script: 12 | 13 | $ farm-gui config.properties 14 | 15 | To launch the villein GUI, use 16 | 17 | $ bash villein-gui.sh config.properties 18 | 19 | in Unix and 20 | 21 | $ villein-gui config.properties 22 | 23 | in Windows. 24 | 25 | To launch a farm without the LoPSideD graphical user interface, see the 26 | lopsided-farm module of this project. 27 | 28 | For more information on Linked Process and the LoPSideD implementation, see: 29 | http://linkedprocess.org 30 | Questions and comments are always welcome on the Linked Process mailing list: 31 | linkedprocess@googlegroups.com 32 | -------------------------------------------------------------------------------- /lopsided/lopsided-gui/farm-gui.bat: -------------------------------------------------------------------------------- 1 | :: Windows launcher script for the Lopsided farm (no GUI) 2 | 3 | if not "%JAVA_OPTIONS%" == "" goto gotOpts 4 | set JAVA_OPTIONS=-Xms32M -Xmx512M 5 | :gotOpts 6 | 7 | if "%1" == "" goto noConfig 8 | set JAVA_OPTIONS=%JAVA_OPTIONS% -Dorg.linkedprocess.configurationProperties=%1 9 | :noConfig 10 | 11 | java %JAVA_OPTIONS% %JAVA_ARGS% -cp target\lopsided-gui-*-standalone.jar org.linkedprocess.gui.farm.FarmGui 12 | 13 | :: TODO: return exit code 14 | -------------------------------------------------------------------------------- /lopsided/lopsided-gui/farm-gui.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Path to JAR 4 | JAR=`dirname $0`/target/lopsided-gui-*-standalone.jar 5 | 6 | # Find Java 7 | if [ "$JAVA_HOME" = "" ] ; then 8 | JAVA="java" 9 | else 10 | JAVA="$JAVA_HOME/bin/java" 11 | fi 12 | 13 | # Set Java options 14 | if [ "$JAVA_OPTIONS" = "" ] ; then 15 | JAVA_OPTIONS="-Xms32M -Xmx512M" 16 | fi 17 | 18 | if [ $# -ge 1 ] ; then 19 | JAVA_OPTIONS=$JAVA_OPTIONS" -Dorg.linkedprocess.configurationProperties="$1 20 | fi 21 | 22 | # Launch the application 23 | $JAVA $JAVA_OPTIONS -cp $JAR org.linkedprocess.gui.farm.FarmGui 24 | 25 | # Return the program's exit code 26 | exit $? 27 | -------------------------------------------------------------------------------- /lopsided/lopsided-gui/src/assembly/distribution.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | zip 4 | 5 | 6 | 7 | 8 | LICENSE.txt 9 | README.txt 10 | pom.xml 11 | 12 | 13 | 14 | 0775 15 | 16 | farm-gui.sh 17 | villein-gui.sh 18 | farm-gui.bat 19 | villein-gui.bat 20 | 21 | 22 | 23 | src 24 | 25 | 26 | target 27 | 28 | lopsided-gui-*.jar 29 | lopsided-gui-*-standalone.jar 30 | site 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /lopsided/lopsided-gui/src/assembly/standalone.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | standalone 4 | 5 | 6 | jar 7 | 8 | 9 | false 10 | 11 | 12 | 13 | target/classes 14 | / 15 | 16 | 17 | 18 | 19 | 20 | / 21 | true 22 | runtime 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /lopsided/lopsided-gui/src/main/java/org/linkedprocess/gui/GenericErrorHandler.java: -------------------------------------------------------------------------------- 1 | package org.linkedprocess.gui; 2 | 3 | import org.linkedprocess.LopError; 4 | import org.linkedprocess.villein.Handler; 5 | 6 | import javax.swing.*; 7 | 8 | /** 9 | * @author Marko A. Rodriguez (http://markorodriguez.com) 10 | * @version LoPSideD 0.1 11 | */ 12 | public class GenericErrorHandler implements Handler { 13 | 14 | public void handle(LopError error) { 15 | if (error.getMessage() != null) 16 | JOptionPane.showMessageDialog(null, error.getErrorType().toString() + "\n" + error.getMessage(), "error", JOptionPane.ERROR_MESSAGE); 17 | else 18 | JOptionPane.showMessageDialog(null, error.getErrorType().toString(), "error", JOptionPane.ERROR_MESSAGE); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lopsided/lopsided-gui/src/main/java/org/linkedprocess/gui/farm/FarmGuiStatusEventHandler.java: -------------------------------------------------------------------------------- 1 | package org.linkedprocess.gui.farm; 2 | 3 | import org.linkedprocess.LinkedProcess; 4 | import org.linkedprocess.farm.StatusEventHandler; 5 | 6 | /** 7 | * @author Marko A. Rodriguez (http://markorodriguez.com) 8 | * @version LoPSideD 0.1 9 | */ 10 | public class FarmGuiStatusEventHandler extends StatusEventHandler { 11 | 12 | protected FarmGui farmGui; 13 | 14 | 15 | public FarmGuiStatusEventHandler(FarmGui farmGui) { 16 | super(farmGui.getFarm()); 17 | this.farmGui = farmGui; 18 | } 19 | 20 | public void schedulerStatusChanged(LinkedProcess.Status status) { 21 | super.schedulerStatusChanged(status); 22 | } 23 | 24 | public void virtualMachineStatusChanged(String vmId, LinkedProcess.Status status) { 25 | super.virtualMachineStatusChanged(vmId, status); 26 | farmGui.updateVirtualMachineTree(vmId, status); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /lopsided/lopsided-gui/src/main/java/org/linkedprocess/gui/farm/vmviewer/VmViewerFrame.java: -------------------------------------------------------------------------------- 1 | package org.linkedprocess.gui.farm.vmviewer; 2 | 3 | import org.linkedprocess.farm.Farm; 4 | import org.linkedprocess.farm.os.Vm; 5 | import org.linkedprocess.gui.PacketSnifferPanel; 6 | 7 | import javax.swing.*; 8 | 9 | /** 10 | * @author Marko A. Rodriguez (http://markorodriguez.com) 11 | * @version LoPSideD 0.1 12 | */ 13 | public class VmViewerFrame extends JFrame { 14 | 15 | protected Vm vm; 16 | 17 | 18 | public VmViewerFrame(Vm vm, Farm farm) { 19 | super(vm.getVmId()); 20 | this.vm = vm; 21 | JTabbedPane tabbedPane = new JTabbedPane(); 22 | 23 | PacketSnifferPanel packetSnifferPanel = new PacketSnifferPanel(); 24 | 25 | farm.getConnection().addPacketWriterInterceptor(packetSnifferPanel, new PacketSnifferPanel.VmFilter(vm.getVmId())); 26 | farm.getConnection().addPacketListener(packetSnifferPanel, new PacketSnifferPanel.VmFilter(vm.getVmId())); 27 | 28 | tabbedPane.addTab("virtual machine", new MetadataPanel(this.vm)); 29 | tabbedPane.addTab("bindings", new ViewBindingsPanel(this.vm)); 30 | tabbedPane.addTab("packets", packetSnifferPanel); 31 | this.getContentPane().add(tabbedPane); 32 | this.setResizable(true); 33 | this.pack(); 34 | this.setVisible(true); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/active.png -------------------------------------------------------------------------------- /lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/add.png -------------------------------------------------------------------------------- /lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/countryside.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/countryside.png -------------------------------------------------------------------------------- /lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/cow-background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/cow-background.png -------------------------------------------------------------------------------- /lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/farm-background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/farm-background.png -------------------------------------------------------------------------------- /lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/farm-password.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/farm-password.png -------------------------------------------------------------------------------- /lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/farm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/farm.png -------------------------------------------------------------------------------- /lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/inactive.png -------------------------------------------------------------------------------- /lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/letter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/letter.png -------------------------------------------------------------------------------- /lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/lop-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/lop-logo.png -------------------------------------------------------------------------------- /lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/mailbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/mailbox.png -------------------------------------------------------------------------------- /lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/password.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/password.png -------------------------------------------------------------------------------- /lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/registry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/registry.png -------------------------------------------------------------------------------- /lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/remove.png -------------------------------------------------------------------------------- /lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/species.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/species.png -------------------------------------------------------------------------------- /lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/status.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/status.png -------------------------------------------------------------------------------- /lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/time.png -------------------------------------------------------------------------------- /lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/villein.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/villein.png -------------------------------------------------------------------------------- /lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/vm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/lopsided/lopsided-gui/src/main/resources/org/linkedprocess/gui/vm.png -------------------------------------------------------------------------------- /lopsided/lopsided-gui/villein-gui.bat: -------------------------------------------------------------------------------- 1 | :: Windows launcher script for the Lopsided farm (no GUI) 2 | 3 | if not "%JAVA_OPTIONS%" == "" goto gotOpts 4 | set JAVA_OPTIONS=-Xms32M -Xmx512M 5 | :gotOpts 6 | 7 | if "%1" == "" goto noConfig 8 | set JAVA_OPTIONS=%JAVA_OPTIONS% -Dorg.linkedprocess.configurationProperties=%1 9 | :noConfig 10 | 11 | java %JAVA_OPTIONS% %JAVA_ARGS% -cp target\lopsided-gui-*-standalone.jar org.linkedprocess.gui.farm.VilleinGui 12 | 13 | :: TODO: return exit code 14 | -------------------------------------------------------------------------------- /lopsided/lopsided-gui/villein-gui.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Path to JAR 4 | JAR=`dirname $0`/target/lopsided-gui-*-standalone.jar 5 | 6 | # Find Java 7 | if [ "$JAVA_HOME" = "" ] ; then 8 | JAVA="java" 9 | else 10 | JAVA="$JAVA_HOME/bin/java" 11 | fi 12 | 13 | # Set Java options 14 | if [ "$JAVA_OPTIONS" = "" ] ; then 15 | JAVA_OPTIONS="-Xms32M -Xmx512M" 16 | fi 17 | 18 | if [ $# -ge 1 ] ; then 19 | JAVA_OPTIONS=$JAVA_OPTIONS" -Dorg.linkedprocess.configurationProperties="$1 20 | fi 21 | 22 | # Launch the application 23 | $JAVA $JAVA_OPTIONS -jar $JAR 24 | 25 | # Return the program's exit code 26 | exit $? 27 | -------------------------------------------------------------------------------- /lopsided/lopsided-registry/LICENSE.txt: -------------------------------------------------------------------------------- 1 | LoPSided: An Implementation of the Linked Process Protocol 2 | Copyright (C) 2009 Los Alamos National Laboratory. 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining 5 | a copy of this software and associated documentation files (the 6 | "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, 8 | distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to 10 | the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 19 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 20 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 21 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /lopsided/lopsided-registry/README.txt: -------------------------------------------------------------------------------- 1 | lopsided-registry 2 | ================================================================================ 3 | Part of LoPSideD: an implementation of the Linked Process Protocol 4 | 5 | To start the LoPSideD registry in Unix, use the Bash launcher script: 6 | 7 | $ bash registry-nogui.sh config.properties 8 | 9 | where config.properties is a Java properties file containing the configuration 10 | of your LoPSiDeD environment. 11 | Similarly, in Windows you may start a registry using the provided batch script: 12 | 13 | $ registry-nogui config.properties 14 | 15 | For more information on Linked Process and the LoPSideD implementation, see: 16 | http://linkedprocess.org 17 | Questions and comments are always welcome on the Linked Process mailing list: 18 | linkedprocess@googlegroups.com 19 | -------------------------------------------------------------------------------- /lopsided/lopsided-registry/lanl_registry.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2009. The LoPSideD implementation of the Linked Process 3 | # protocol is an open-source project founded at the Center for Nonlinear Studies 4 | # at the Los Alamos National Laboratory in Los Alamos, New Mexico. Please visit 5 | # http://linkedprocess.org and LICENSE.txt for more information. 6 | # 7 | 8 | ################################################################################ 9 | # Server/XMPP 10 | ################################################################################ 11 | 12 | org.linkedprocess.registryServer = lanl.linkedprocess.org 13 | org.linkedprocess.registryPort = 5222 14 | org.linkedprocess.registryUsername = lanl_countryside 15 | org.linkedprocess.registryPassword = lanl 16 | 17 | -------------------------------------------------------------------------------- /lopsided/lopsided-registry/registry-nogui.bat: -------------------------------------------------------------------------------- 1 | :: Windows launcher script for the Lopsided farm (no GUI) 2 | 3 | if not "%JAVA_OPTIONS%" == "" goto gotOpts 4 | set JAVA_OPTIONS=-Xms32M -Xmx512M 5 | :gotOpts 6 | 7 | if "%1" == "" goto noConfig 8 | set JAVA_OPTIONS=%JAVA_OPTIONS% -Dorg.linkedprocess.configurationProperties=%1 9 | :noConfig 10 | 11 | java %JAVA_OPTIONS% %JAVA_ARGS% -jar target\lopsided-registry-*-standalone.jar 12 | 13 | :: TODO: return exit code 14 | -------------------------------------------------------------------------------- /lopsided/lopsided-registry/registry-nogui.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Path to JAR 4 | JAR=`dirname $0`/target/lopsided-registry-*-standalone.jar 5 | 6 | # Find Java 7 | if [ "$JAVA_HOME" = "" ] ; then 8 | JAVA="java" 9 | else 10 | JAVA="$JAVA_HOME/bin/java" 11 | fi 12 | 13 | # Set Java options 14 | if [ "$JAVA_OPTIONS" = "" ] ; then 15 | JAVA_OPTIONS="-Xms32M -Xmx512M" 16 | fi 17 | 18 | if [ $# -ge 1 ] ; then 19 | JAVA_OPTIONS=$JAVA_OPTIONS" -Dorg.linkedprocess.configurationProperties="$1 20 | fi 21 | 22 | # Launch the application 23 | $JAVA $JAVA_OPTIONS -cp $JAR org.linkedprocess.registry.Registry 24 | 25 | # Return the program's exit code 26 | exit $? 27 | -------------------------------------------------------------------------------- /lopsided/lopsided-registry/src/assembly/distribution.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | zip 4 | 5 | 6 | 7 | 8 | LICENSE.txt 9 | README.txt 10 | pom.xml 11 | lanl_registry.properties 12 | 13 | 14 | 15 | 0775 16 | 17 | registry-nogui.sh 18 | registry-nogui.bat 19 | 20 | 21 | 22 | src 23 | 24 | 25 | target 26 | 27 | lopsided-registry-*.jar 28 | lopsided-registry-*-standalone.jar 29 | site 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /lopsided/lopsided-registry/src/assembly/standalone.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | standalone 11 | 12 | 13 | jar 14 | 15 | 16 | false 17 | 18 | 19 | 20 | target/classes 21 | / 22 | 23 | 24 | 25 | 26 | 27 | / 28 | true 29 | runtime 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /lopsided/lopsided-registry/src/main/java/org/linkedprocess/registry/PresencePacketListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009. The LoPSideD implementation of the Linked Process 3 | * protocol is an open-source project founded at the Center for Nonlinear Studies 4 | * at the Los Alamos National Laboratory in Los Alamos, New Mexico. Please visit 5 | * http://linkedprocess.org and LICENSE.txt for more information. 6 | */ 7 | 8 | package org.linkedprocess.registry; 9 | 10 | 11 | import org.jivesoftware.smack.packet.Packet; 12 | import org.jivesoftware.smack.packet.Presence; 13 | import org.jivesoftware.smackx.packet.DiscoverInfo; 14 | import org.linkedprocess.Jid; 15 | import org.linkedprocess.LopPacketListener; 16 | import org.jdom.Document; 17 | 18 | /** 19 | * @author Marko A. Rodriguez (http://markorodriguez.com) 20 | * @version LoPSideD 0.1 21 | */ 22 | public class PresencePacketListener extends RegistryPacketListener { 23 | 24 | 25 | public PresencePacketListener(Registry registry) { 26 | super(registry); 27 | } 28 | 29 | public void processPacket(Packet packet) { 30 | Presence presence = (Presence) packet; 31 | Jid presenceJid = new Jid(packet.getFrom()); 32 | Registry.LOGGER.info("Arrived " + PresencePacketListener.class.getName()); 33 | Registry.LOGGER.info(presence.toXML()); 34 | 35 | if (presence.isAvailable()) { 36 | Document discoInfoDocument = this.getDiscoInfoDocument(presenceJid); 37 | if (LopPacketListener.isFarm(discoInfoDocument)) { 38 | Registry.LOGGER.info("Registering farm: " + packet.getFrom()); 39 | this.getRegistry().addActiveFarm(new Jid(packet.getFrom())); 40 | } 41 | } else { 42 | Registry.LOGGER.info("Unregistering resource: " + packet.getFrom()); 43 | this.getRegistry().removeActiveFarm(new Jid(packet.getFrom())); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /lopsided/lopsided-registry/src/main/java/org/linkedprocess/registry/PresenceSubscriptionFilter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009. The LoPSideD implementation of the Linked Process 3 | * protocol is an open-source project founded at the Center for Nonlinear Studies 4 | * at the Los Alamos National Laboratory in Los Alamos, New Mexico. Please visit 5 | * http://linkedprocess.org and LICENSE.txt for more information. 6 | */ 7 | 8 | package org.linkedprocess.registry; 9 | 10 | import org.jivesoftware.smack.filter.PacketFilter; 11 | import org.jivesoftware.smack.packet.Packet; 12 | import org.jivesoftware.smack.packet.Presence; 13 | 14 | /** 15 | * @author Marko A. Rodriguez (http://markorodriguez.com) 16 | * @version LoPSideD 0.1 17 | */ 18 | public class PresenceSubscriptionFilter implements PacketFilter { 19 | 20 | public boolean accept(Packet packet) { 21 | try { 22 | if (!packet.toXML().trim().startsWith(" implements IArgumentMatcher { 9 | 10 | Collection captureDestination; 11 | 12 | public MultiCaptureMatcher(Collection captureDestination) { 13 | this.captureDestination = captureDestination; 14 | } 15 | 16 | public void appendTo(StringBuffer buffer) { 17 | buffer.append("multiCapture(").append(captureDestination.toString()).append(")"); 18 | } 19 | 20 | @SuppressWarnings("unchecked") 21 | public boolean matches(Object actual) { 22 | captureDestination.add((T) actual); 23 | return true; 24 | } 25 | 26 | public static S multiCapture(Collection destination) { 27 | reportMatcher(new MultiCaptureMatcher(destination)); 28 | return null; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lopsided/lopsided-villein/LICENSE.txt: -------------------------------------------------------------------------------- 1 | LoPSided: An Implementation of the Linked Process Protocol 2 | Copyright (C) 2009 Los Alamos National Laboratory. 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining 5 | a copy of this software and associated documentation files (the 6 | "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, 8 | distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to 10 | the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 19 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 20 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 21 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /lopsided/lopsided-villein/src/assembly/distribution.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | zip 4 | 5 | 6 | 7 | 8 | LICENSE.txt 9 | README.txt 10 | pom.xml 11 | 12 | 13 | 14 | 0775 15 | 16 | farm-gui.sh 17 | villein-gui.sh 18 | farm-gui.bat 19 | villein-gui.bat 20 | 21 | 22 | 23 | src 24 | 25 | 26 | target 27 | 28 | linkedprocess-villein-*.jar 29 | linkedprocess-villein-*-standalone.jar 30 | site 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /lopsided/lopsided-villein/src/main/java/org/linkedprocess/villein/Handler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009. The LoPSideD implementation of the Linked Process 3 | * protocol is an open-source project founded at the Center for Nonlinear Studies 4 | * at the Los Alamos National Laboratory in Los Alamos, New Mexico. Please visit 5 | * http://linkedprocess.org and LICENSE.txt for more information. 6 | */ 7 | 8 | package org.linkedprocess.villein; 9 | 10 | /** 11 | * A general purpose handler. Used extensively by the proxies, commands, and patterns. 12 | *

13 | * User: josh 14 | * Date: Aug 6, 2009 15 | * Time: 4:09:18 PM 16 | */ 17 | public interface Handler { 18 | void handle(T t); 19 | } 20 | 21 | -------------------------------------------------------------------------------- /lopsided/lopsided-villein/src/main/java/org/linkedprocess/villein/NoHandlerForPacketException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009. The LoPSideD implementation of the Linked Process 3 | * protocol is an open-source project founded at the Center for Nonlinear Studies 4 | * at the Los Alamos National Laboratory in Los Alamos, New Mexico. Please visit 5 | * http://linkedprocess.org and LICENSE.txt for more information. 6 | */ 7 | 8 | package org.linkedprocess.villein; 9 | 10 | /** 11 | * If no handler was registered for a packet, then this exception is thrown. 12 | * For many situations, a null handler is passed into a command and thus, this is a common exception. 13 | *

14 | * User: josh 15 | * Date: Aug 6, 2009 16 | * Time: 5:58:39 PM 17 | */ 18 | public class NoHandlerForPacketException extends Exception { 19 | } 20 | -------------------------------------------------------------------------------- /lopsided/lopsided-villein/src/main/java/org/linkedprocess/villein/PresenceHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009. The LoPSideD implementation of the Linked Process 3 | * protocol is an open-source project founded at the Center for Nonlinear Studies 4 | * at the Los Alamos National Laboratory in Los Alamos, New Mexico. Please visit 5 | * http://linkedprocess.org and LICENSE.txt for more information. 6 | */ 7 | 8 | package org.linkedprocess.villein; 9 | 10 | import org.linkedprocess.Jid; 11 | import org.linkedprocess.LinkedProcess; 12 | 13 | /** 14 | * @author Marko A. Rodriguez (http://markorodriguez.com) 15 | * @version LoPSideD 0.1 16 | */ 17 | public interface PresenceHandler { 18 | 19 | public void handlePresenceUpdate(Jid jid, LinkedProcess.Status status); 20 | } 21 | -------------------------------------------------------------------------------- /lopsided/lopsided-villein/src/main/java/org/linkedprocess/villein/commands/Command.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009. The LoPSideD implementation of the Linked Process 3 | * protocol is an open-source project founded at the Center for Nonlinear Studies 4 | * at the Los Alamos National Laboratory in Los Alamos, New Mexico. Please visit 5 | * http://linkedprocess.org and LICENSE.txt for more information. 6 | */ 7 | 8 | package org.linkedprocess.villein.commands; 9 | 10 | import org.linkedprocess.villein.Villein; 11 | 12 | /** 13 | * The base class of all LoP command proxies. 14 | * Note that the command proxies are best utilized through the supported LoP proxies and patterns. 15 | * 16 | * @author Marko A. Rodriguez (http://markorodriguez.com) 17 | * @version LoPSideD 0.1 18 | */ 19 | public abstract class Command { 20 | 21 | protected final Villein villein; 22 | 23 | public Command(final Villein villein) { 24 | this.villein = villein; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /lopsided/lopsided-villein/src/main/java/org/linkedprocess/villein/patterns/BindingsChecker.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009. The LoPSideD implementation of the Linked Process 3 | * protocol is an open-source project founded at the Center for Nonlinear Studies 4 | * at the Los Alamos National Laboratory in Los Alamos, New Mexico. Please visit 5 | * http://linkedprocess.org and LICENSE.txt for more information. 6 | */ 7 | 8 | package org.linkedprocess.villein.patterns; 9 | 10 | import org.linkedprocess.farm.os.VmBindings; 11 | 12 | /** 13 | * A BindingsChecker allows a user to define a bindings equivalence relationship that is utilized by the PollBindingsPattern. 14 | * 15 | * @author Marko A. Rodriguez (http://markorodriguez.com) 16 | * @version LoPSideD 0.1 17 | */ 18 | public interface BindingsChecker { 19 | 20 | public boolean areEquivalent(VmBindings actualBindings, VmBindings desiredBindings); 21 | } 22 | -------------------------------------------------------------------------------- /lopsided/lopsided-villein/src/main/java/org/linkedprocess/villein/patterns/TimeoutException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009. The LoPSideD implementation of the Linked Process 3 | * protocol is an open-source project founded at the Center for Nonlinear Studies 4 | * at the Los Alamos National Laboratory in Los Alamos, New Mexico. Please visit 5 | * http://linkedprocess.org and LICENSE.txt for more information. 6 | */ 7 | 8 | package org.linkedprocess.villein.patterns; 9 | 10 | /** 11 | * The TimeoutException is used by most synchronous methods. With synchronous methods a timeout value is provided. 12 | * If the method takes longer than this timeout value to execute, then a TimeoutException is thrown. 13 | * 14 | * @author Marko A. Rodriguez (http://markorodriguez.com) 15 | * @version LoPSideD 0.1 16 | */ 17 | public class TimeoutException extends Exception { 18 | public TimeoutException(final String message) { 19 | super(message); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lopsided/lopsided-villein/src/main/java/org/linkedprocess/villein/proxies/ParentProxyNotFoundException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009. The LoPSideD implementation of the Linked Process 3 | * protocol is an open-source project founded at the Center for Nonlinear Studies 4 | * at the Los Alamos National Laboratory in Los Alamos, New Mexico. Please visit 5 | * http://linkedprocess.org and LICENSE.txt for more information. 6 | */ 7 | 8 | package org.linkedprocess.villein.proxies; 9 | 10 | /** 11 | * An exception thrown when the proxies data structure is in an inconsistent state. 12 | * 13 | * @author Marko A. Rodriguez (http://markorodriguez.com) 14 | * @version LoPSideD 0.1 15 | */ 16 | public class ParentProxyNotFoundException extends RuntimeException { 17 | public ParentProxyNotFoundException(final String message) { 18 | super(message); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lopsided/lopsided-villein/src/main/java/org/linkedprocess/villein/proxies/ResultHolder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009. The LoPSideD implementation of the Linked Process 3 | * protocol is an open-source project founded at the Center for Nonlinear Studies 4 | * at the Los Alamos National Laboratory in Los Alamos, New Mexico. Please visit 5 | * http://linkedprocess.org and LICENSE.txt for more information. 6 | */ 7 | 8 | package org.linkedprocess.villein.proxies; 9 | 10 | import org.linkedprocess.LopError; 11 | 12 | /** 13 | * ResultHolder is a "helper class" that is used to hold both succesful- and error-based results in a single data structure. 14 | * 15 | * @author Marko A. Rodriguez (http://markorodriguez.com) 16 | * @version LoPSideD 0.1 17 | */ 18 | public class ResultHolder { 19 | private T success; 20 | private LopError error; 21 | 22 | public ResultHolder() { 23 | } 24 | 25 | public ResultHolder(T success) { 26 | this.success = success; 27 | } 28 | 29 | public ResultHolder(LopError error) { 30 | this.error = error; 31 | } 32 | 33 | public T getSuccess() { 34 | return this.success; 35 | } 36 | 37 | public LopError getLopError() { 38 | return this.error; 39 | } 40 | 41 | public void setSuccess(T success) { 42 | this.success = success; 43 | } 44 | 45 | public void setLopError(LopError error) { 46 | this.error = error; 47 | } 48 | 49 | public boolean wasSuccessful() { 50 | return this.error == null; 51 | } 52 | 53 | public boolean isEmpty() { 54 | return (this.error == null && this.success == null); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /lopsided/lopsided-villein/src/main/resources/org/linkedprocess/demos/demo.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2009. The LoPSideD implementation of the Linked Process 3 | # protocol is an open-source project founded at the Center for Nonlinear Studies 4 | # at the Los Alamos National Laboratory in Los Alamos, New Mexico. Please visit 5 | # http://linkedprocess.org and LICENSE.txt for more information. 6 | # 7 | 8 | #Sat Aug 15 15:33:12 MDT 2009 9 | port=5222 10 | password=linked12 11 | server=lanl.linkedprocess.org 12 | username=linked.process.1 13 | ########## PrimeFinder specific properties 14 | primeFinder.startInteger=1 15 | primeFinder.endInteger=1000 16 | primeFinder.farmCount=1 17 | primeFinder.vmsPerFarm=1 18 | ########## ProgressPolling specific properties 19 | progressPolling.meterMax=1.0 20 | progressPolling.pollingInterval=500 21 | -------------------------------------------------------------------------------- /lopsided/lopsided-villein/src/main/resources/org/linkedprocess/demos/primes/FindPrimes.groovy: -------------------------------------------------------------------------------- 1 | def findPrimes(startInt, endInt) { 2 | x = []; 3 | for(n in startInt..endInt) { 4 | prime = true; 5 | for (i in 3..n-1) { 6 | if (n % i == 0) { 7 | prime = false; 8 | break; 9 | } 10 | } 11 | if (( n%2 !=0 && prime && n > 2) || n == 2) { 12 | x.add(n); 13 | } 14 | } 15 | return x; 16 | } -------------------------------------------------------------------------------- /lopsided/lopsided-villein/src/test/java/org/linkedprocess/proxies/JobProxyTest.java: -------------------------------------------------------------------------------- 1 | package org.linkedprocess.proxies; 2 | 3 | import junit.framework.TestCase; 4 | import org.linkedprocess.villein.proxies.JobProxy; 5 | 6 | import java.util.HashSet; 7 | import java.util.Set; 8 | 9 | /** 10 | * @author Marko A. Rodriguez (http://markorodriguez.com) 11 | * @version LoPSideD 0.1 12 | */ 13 | public class JobProxyTest extends TestCase { 14 | 15 | public void testEquals() { 16 | JobProxy job1 = new JobProxy(); 17 | job1.setJobId("ABCD"); 18 | JobProxy job2 = new JobProxy(); 19 | job2.setJobId("ABCD"); 20 | assertEquals(job1, job2); 21 | JobProxy job3 = new JobProxy(); 22 | job3.setJobId("EFGH"); 23 | assertFalse(job1 == job3); 24 | } 25 | 26 | public void testHashCode() { 27 | Set jobProxies = new HashSet(); 28 | for (int i = 0; i < 1000; i++) { 29 | JobProxy jobProxy = new JobProxy(); 30 | jobProxy.setJobId("ABCD"); 31 | jobProxies.add(jobProxy); 32 | } 33 | assertEquals(jobProxies.size(), 1); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /multigraph/src/main/java/com/tinkerpop/blueprints/pgm/impls/multi/MultiEdge.java: -------------------------------------------------------------------------------- 1 | package com.tinkerpop.blueprints.pgm.impls.multi; 2 | 3 | import com.tinkerpop.blueprints.pgm.Edge; 4 | import com.tinkerpop.blueprints.pgm.Element; 5 | import com.tinkerpop.blueprints.pgm.Vertex; 6 | 7 | import java.util.Collection; 8 | 9 | /** 10 | * @author Joshua Shinavier (http://fortytwo.net) 11 | */ 12 | class MultiEdge extends MultiElement implements Edge { 13 | private final Collection bases; 14 | 15 | public MultiEdge(final MultiGraph graph, 16 | final Object id, 17 | final Collection bases) { 18 | super(graph, id); 19 | this.bases = bases; 20 | } 21 | 22 | protected Collection getBases() { 23 | return (Collection) (Collection) bases; 24 | } 25 | 26 | public Vertex getOutVertex() { 27 | return graph.getVertex(bases.iterator().next().getOutVertex().getId()); 28 | } 29 | 30 | public Vertex getInVertex() { 31 | return graph.getVertex(bases.iterator().next().getInVertex().getId()); 32 | } 33 | 34 | public String getLabel() { 35 | return bases.iterator().next().getLabel(); 36 | } 37 | } -------------------------------------------------------------------------------- /multigraph/src/main/java/com/tinkerpop/blueprints/pgm/impls/multi/MultiElement.java: -------------------------------------------------------------------------------- 1 | package com.tinkerpop.blueprints.pgm.impls.multi; 2 | 3 | import com.tinkerpop.blueprints.pgm.Element; 4 | 5 | import java.util.Collection; 6 | import java.util.HashSet; 7 | import java.util.Set; 8 | 9 | /** 10 | * @author Joshua Shinavier (http://fortytwo.net) 11 | */ 12 | abstract class MultiElement implements Element { 13 | protected final Object id; 14 | protected final MultiGraph graph; 15 | 16 | public MultiElement(final MultiGraph graph, 17 | final Object id) { 18 | this.id = id; 19 | this.graph = graph; 20 | } 21 | 22 | protected abstract Collection getBases(); 23 | 24 | public Object getId() { 25 | return id; 26 | } 27 | 28 | public void setProperty(String key, Object value) { 29 | throw new UnsupportedOperationException(MultiGraph.READONLY_MSG); 30 | } 31 | 32 | public Object removeProperty(String key) { 33 | throw new UnsupportedOperationException(MultiGraph.READONLY_MSG); 34 | } 35 | 36 | public Object getProperty(String key) { 37 | for (Element e : getBases()) { 38 | Object o = e.getProperty(key); 39 | if (null != o) { 40 | return o; 41 | } 42 | } 43 | 44 | return null; 45 | } 46 | 47 | public Set getPropertyKeys() { 48 | Set keys = new HashSet(); 49 | 50 | for (Element e : getBases()) { 51 | keys.addAll(e.getPropertyKeys()); 52 | } 53 | 54 | return keys; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /multigraph/src/main/java/com/tinkerpop/blueprints/pgm/impls/multi/MultiIterable.java: -------------------------------------------------------------------------------- 1 | package com.tinkerpop.blueprints.pgm.impls.multi; 2 | 3 | import java.util.Collection; 4 | import java.util.Iterator; 5 | 6 | /** 7 | * @author Joshua Shinavier (http://fortytwo.net) 8 | */ 9 | class MultiIterable implements Iterable { 10 | private final Collection> bases; 11 | 12 | public MultiIterable(Collection> bases) { 13 | this.bases = bases; 14 | } 15 | 16 | public Iterator iterator() { 17 | return new Iterator() { 18 | private Iterator> iter = bases.iterator(); 19 | private Iterator cur; 20 | 21 | public boolean hasNext() { 22 | if (null != cur && cur.hasNext()) { 23 | return true; 24 | } 25 | 26 | while (true) { 27 | if (iter.hasNext()) { 28 | cur = iter.next().iterator(); 29 | 30 | if (cur.hasNext()) { 31 | return true; 32 | } 33 | } else { 34 | return false; 35 | } 36 | } 37 | } 38 | 39 | public T next() { 40 | // Note: requires hasNext() to have been called 41 | return cur.next(); 42 | } 43 | 44 | public void remove() { 45 | throw new UnsupportedOperationException(); 46 | } 47 | }; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /multigraph/src/main/java/com/tinkerpop/blueprints/pgm/impls/multi/MultiVertex.java: -------------------------------------------------------------------------------- 1 | package com.tinkerpop.blueprints.pgm.impls.multi; 2 | 3 | import com.tinkerpop.blueprints.pgm.Edge; 4 | import com.tinkerpop.blueprints.pgm.Element; 5 | import com.tinkerpop.blueprints.pgm.Vertex; 6 | 7 | import java.util.Collection; 8 | import java.util.HashMap; 9 | import java.util.Map; 10 | 11 | /** 12 | * @author Joshua Shinavier (http://fortytwo.net) 13 | */ 14 | class MultiVertex extends MultiElement implements Vertex { 15 | private final Collection bases; 16 | 17 | public MultiVertex(final MultiGraph graph, 18 | final Object id, 19 | final Collection bases) { 20 | super(graph, id); 21 | this.bases = bases; 22 | } 23 | 24 | public Iterable getOutEdges(String... labels) { 25 | // TODO: the hashmap is time-efficient but not scalable 26 | Map results = new HashMap(); 27 | 28 | for (Vertex v : bases) { 29 | for (Edge e : v.getOutEdges(labels)) { 30 | Object id = e.getId(); 31 | 32 | if (null == results.get(id)) { 33 | results.put(id, graph.getEdge(id)); 34 | } 35 | } 36 | } 37 | 38 | return results.values(); 39 | } 40 | 41 | public Iterable getInEdges(String... labels) { 42 | // TODO: the hashmap is time-efficient but not scalable 43 | Map results = new HashMap(); 44 | 45 | for (Vertex v : bases) { 46 | for (Edge e : v.getInEdges(labels)) { 47 | Object id = e.getId(); 48 | 49 | if (null == results.get(id)) { 50 | results.put(id, graph.getEdge(id)); 51 | } 52 | } 53 | } 54 | 55 | return results.values(); 56 | } 57 | 58 | protected Collection getBases() { 59 | return (Collection) (Collection) bases; 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /mutant/.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | .mutant_history 3 | target/ -------------------------------------------------------------------------------- /mutant/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009, TinkerPop [http://tinkerpop.com] 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | * Neither the name of the TinkerPop nor the 12 | names of its contributors may be used to endorse or promote products 13 | derived from this software without specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL TINKERPOP BE LIABLE FOR ANY 19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /mutant/README.textile: -------------------------------------------------------------------------------- 1 | !https://github.com/tinkerpop/mutant/raw/master/doc/images/mutant-logo.png! 2 | 3 | Mutant supports the use of multiple "JSR 223":http://jcp.org/en/jsr/detail?id=223 ScriptEngines over the same variable pool. In this way, its possible to make use of each language's unique expressive qualities when manipulating variables. 4 | 5 | The documentation for Mutant can be found at this "location":http://mutant.tinkerpop.com. Finally, please visit "TinkerPop":http://tinkerpop.com for other software products. -------------------------------------------------------------------------------- /mutant/doc/images/mutant-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/mutant/doc/images/mutant-logo.png -------------------------------------------------------------------------------- /mutant/doc/images/mutant-system-arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/mutant/doc/images/mutant-system-arch.png -------------------------------------------------------------------------------- /mutant/doc/mutant.wiki/Home.textile: -------------------------------------------------------------------------------- 1 | !https://github.com/tinkerpop/mutant/raw/master/doc/images/mutant-logo.png! 2 | 3 | Mutant supports the use of multiple "JSR 223":http://jcp.org/en/jsr/detail?id=223 "ScriptEngines":https://scripting.dev.java.net/ over the same variable pool. In this way, its possible to make use of each language's unique expressive qualities when manipulating a collection of variables. Mutant can be seen as a ScriptEngine of ScriptEngines--a programming language of programming languages.[1] 4 | 5 | ```text 6 | mutant[Groovy]> x = 12 7 | 12 8 | mutant[Groovy]> ?ruby 9 | Switched to ruby 10 | mutant[ruby]> x.to_s + " is a number." 11 | 12 is a number. 12 | ``` 13 | 14 | ==


== 15 | 16 | # [[Introduction]] 17 | ** [[Supported Engines]] 18 | ** [[Basic Examples]] 19 | # [[Mutant Language]] 20 | # Conclusion 21 | ** Release Notes 22 | 23 | ==
== 24 | 25 | fn1. Mutant documentation is up to date with the current Mutant "codebase":http://github.com/tinkerpop/mutant/tree/master, not with the latest Mutant "release":http://github.com/tinkerpop/mutant/downloads. -------------------------------------------------------------------------------- /mutant/doc/mutant.wiki/Introduction.textile: -------------------------------------------------------------------------------- 1 | Each programming language is designed to make particular types of computations easy to express. However, the term "computation" is vague and lives at numerous abstractions. For example, to fill memory locations with binary data, to sum all the data in a column table, or to walk a graph in a directed manner are considered different types of computations. While there are "general purpose programming languages":http://en.wikipedia.org/wiki/General-purpose_programming_language (i.e. languages that can represent any type of computation), the ease by which certain particular computations are represented varies. As such, for niche computations, "domain specific languages":http://en.wikipedia.org/wiki/Domain-specific_language are usually created (i.e. languages for dealing with stock trading, data table manipulation, etc.). However, usually, the syntax of such domain specific languages greatly limits the general applicability of the language. Simply put, there is no perfect language for all programming situations. Until now? 2 | 3 | !https://github.com/tinkerpop/mutant/raw/master/doc/images/mutant-system-arch.png! 4 | 5 | Mutant is a programming language of programming languages. It allows developers to move between different programming languages, while, at the same time, ensuring that the underlying variable pool is accessible to all languages (to all virtual machines). This model of programming is made easy by the @ScriptEngine@ API of "JSR 223":http://jcp.org/en/jsr/detail?id=223. There are numerous @ScriptEngine@ implementations and a large collection of them can be found at the "Script Project Home Page":https://scripting.dev.java.net/. Any of @ScriptEngine@ language can be added to Mutant and thus, a developer can make use of the constructs in each of those particular languages when manipulating their variables. 6 | 7 | !http://www.javaworld.com/javaworld/jw-04-2006/images/jw-0424-scripting3.gif! -------------------------------------------------------------------------------- /mutant/doc/mutant.wiki/Mutant-Language.textile: -------------------------------------------------------------------------------- 1 | The Mutant language is simple. Or, thought of another way, the Mutant language is the most complex language ever developed. Given that it can contain any other language, it is all languages in one. However, this latter vantage point is not productive with respects to grasping how to use Mutant. 2 | 3 | In short, there are two language statements in Mutant: 4 | 5 | * @?@: switch to another ScriptEngine by language name (e.g. for Groovy, do @?Groovy@). 6 | * @?s @: load a mutant script. 7 | 8 | Everything else is in the programming language of a particular ScriptEngine virtual machine (even comments). The typical Mutant script looks as below. When switching to a new ScriptEngine, the code that follows is the code specific to that language. That's all there is to it. 9 | 10 | ```text 11 | ?language-x 12 | // a comment in the language x 13 | do something 14 | in language x 15 | done. 16 | ?language-y 17 | set g in y 18 | ?language-x 19 | read g 20 | print g 21 | ``` 22 | -------------------------------------------------------------------------------- /mutant/doc/mutant.wiki/Supported-Engines.textile: -------------------------------------------------------------------------------- 1 | Mutant currently distributes with the following @ScriptEngine@ implementations. These engines are included through Mutant's "pom.xml":https://github.com/tinkerpop/mutant/blob/master/pom.xml @@. Finally, note that currently, not all implementations of @ScriptEngine@ implement "JSR 223":http://jcp.org/en/jsr/detail?id=223 correctly. This is a problem with the particular engines and not with Mutant. We have submitted bugs to respective engines with @ScriptEngine@ issues. 2 | 3 | * "AppleScript":http://developer.apple.com/applescript/ Engine 1.0 4 | ** Only available for Mac OSX 5 | * "Clojure":http://clojure.org/ Engine 1.0 6 | ** Variables bound in the engine are not preserved in the @GLOBAL_SCOPE@. 7 | * "Gremlin":http://gremlin.tinkerpop.com Engine 0.6-SNAPSHOT 8 | * "Groovy":http://groovy.codehaus.org/ Engine 2.0 9 | * "JavaScript":http://www.mozilla.org/rhino/ Engine Rhino 1.6 release 2 10 | * "JRuby":http://jruby.org/ Engine 1.5.5 11 | ** Variables bound in the engine are not preserved in the @GLOBAL_SCOPE@. 12 | * "Jython":http://www.jython.org/ Engine 2.5.1 13 | ** Variables in @GLOBA_SCOPE@ are not available inside or outside the engine. 14 | 15 | 16 | -------------------------------------------------------------------------------- /mutant/mutant.bat: -------------------------------------------------------------------------------- 1 | :: Windows launcher script for Mutant 2 | @echo off 3 | 4 | cd %CD%\target\ 5 | 6 | set TARGET= 7 | 8 | for /f "tokens=*" %%a in ('dir /b /ad') do ( 9 | if exist "%%a\bin\mutant.bat" set TARGET=%%a 10 | ) 11 | 12 | cd %TARGET%\bin\ 13 | call mutant.bat %* 14 | -------------------------------------------------------------------------------- /mutant/mutant.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | target/mutant-*-standalone/bin/mutant.sh $@ 4 | -------------------------------------------------------------------------------- /mutant/src/assembly/distribution.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | zip 4 | 5 | 6 | 7 | 8 | pom.xml 9 | 10 | 11 | 12 | 0775 13 | 14 | mutant.sh 15 | 16 | 17 | 18 | 19 | src 20 | 21 | 22 | data 23 | 24 | 25 | target/apidocs 26 | 27 | 28 | target/site 29 | 30 | 31 | target/mutant-${project.version}-standalone 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /mutant/src/assembly/standalone.xml: -------------------------------------------------------------------------------- 1 | 2 | standalone 3 | 4 | dir 5 | 6 | false 7 | 8 | 9 | 10 | src/main/bin 11 | /bin 12 | 0755 13 | 14 | 15 | target/*.jar 16 | /lib 17 | 18 | 19 | 20 | 21 | 22 | /lib 23 | false 24 | compile 25 | 26 | 27 | /lib 28 | false 29 | provided 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /mutant/src/main/bin/mutant.bat: -------------------------------------------------------------------------------- 1 | :: Windows launcher script for Mutant 2 | @echo off 3 | 4 | cd ..\lib 5 | set LIBDIR=%CD% 6 | 7 | set CP= 8 | 9 | for %%i in (*.jar) do call :concatsep %%i 10 | cd ..\..\..\ 11 | 12 | set JAVA_OPTIONS=-Xms32M -Xmx512M 13 | 14 | :: Launch the application 15 | java %JAVA_OPTIONS% %JAVA_ARGS% -cp %CP% com.tinkerpop.mutant.Console 16 | goto :eof 17 | 18 | :concatsep 19 | if "%CP%" == "" ( 20 | set CP=%LIBDIR%\%1 21 | )else ( 22 | set CP=%CP%;%LIBDIR%\%1 23 | ) 24 | 25 | :skip 26 | -------------------------------------------------------------------------------- /mutant/src/main/bin/mutant.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | CP=$( echo `dirname $0`/../lib/*.jar . | sed 's/ /:/g') 4 | #echo $CP 5 | 6 | # Find Java 7 | if [ "$JAVA_HOME" = "" ] ; then 8 | JAVA="java -server" 9 | else 10 | JAVA="$JAVA_HOME/bin/java -server" 11 | fi 12 | 13 | # Set Java options 14 | if [ "$JAVA_OPTIONS" = "" ] ; then 15 | JAVA_OPTIONS="-Xms32M -Xmx512M" 16 | fi 17 | 18 | # Launch the application 19 | $JAVA $JAVA_OPTIONS -cp $CP com.tinkerpop.mutant.Console 20 | 21 | # Return the program's exit code 22 | exit $? -------------------------------------------------------------------------------- /mutant/src/main/java/com/tinkerpop/mutant/EngineHolder.java: -------------------------------------------------------------------------------- 1 | package com.tinkerpop.mutant; 2 | 3 | import javax.script.ScriptEngine; 4 | import javax.script.ScriptEngineFactory; 5 | 6 | /** 7 | * @author Marko A. Rodriguez (http://markorodriguez.com) 8 | */ 9 | public class EngineHolder { 10 | 11 | private final String languageName; 12 | private final String languageVersion; 13 | private final String engineName; 14 | private final String engineVersion; 15 | private final ScriptEngine engine; 16 | 17 | public EngineHolder(final ScriptEngineFactory factory) { 18 | this.languageName = factory.getLanguageName(); 19 | this.languageVersion = factory.getLanguageVersion(); 20 | this.engineName = factory.getEngineName(); 21 | this.engineVersion = factory.getEngineVersion(); 22 | this.engine = factory.getScriptEngine(); 23 | } 24 | 25 | public String getEngineName() { 26 | return engineName; 27 | } 28 | 29 | public String getEngineVersion() { 30 | return engineVersion; 31 | } 32 | 33 | public String getLanguageName() { 34 | return languageName; 35 | } 36 | 37 | public ScriptEngine getEngine() { 38 | return this.engine; 39 | } 40 | 41 | 42 | } 43 | -------------------------------------------------------------------------------- /mutant/src/main/java/com/tinkerpop/mutant/MutantBindings.java: -------------------------------------------------------------------------------- 1 | package com.tinkerpop.mutant; 2 | 3 | import javax.script.Bindings; 4 | import java.util.HashMap; 5 | 6 | /** 7 | * Provides support for getting variables regardless of variable prefixes. 8 | * 9 | * @author Marko A. Rodriguez (http://markorodriguez.com) 10 | */ 11 | public class MutantBindings extends HashMap implements Bindings { 12 | 13 | private static final String AT_SYMBOL = "@"; 14 | private static final String DOLLAR_SYMBOL = "$"; 15 | 16 | public Object get(final Object variable) { 17 | String var = (String) variable; 18 | Object value = super.get(var); 19 | if (null == value) { 20 | if (var.startsWith(AT_SYMBOL) || var.startsWith(DOLLAR_SYMBOL)) { 21 | return super.get(var.substring(1)); 22 | } else { 23 | value = super.get(DOLLAR_SYMBOL + var); 24 | if (value == null) 25 | return super.get(AT_SYMBOL + var); 26 | else 27 | return value; 28 | } 29 | } else { 30 | return value; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /mutant/src/main/java/com/tinkerpop/mutant/Tokens.java: -------------------------------------------------------------------------------- 1 | package com.tinkerpop.mutant; 2 | 3 | /** 4 | * @author Marko A. Rodriguez (http://markorodriguez.com) 5 | */ 6 | public class Tokens { 7 | 8 | protected static final String HELP = "?h"; 9 | protected static final String BINDINGS = "?b"; 10 | protected static final String ENGINES = "?e"; 11 | protected static final String QUIT = "?q"; 12 | protected static final String PREVIOUS = "?z"; 13 | protected static final String NEXT = "?x"; 14 | protected static final String SCRIPT_SPACE = "?s "; 15 | protected static final String QUESTION = "?"; 16 | protected static final String BINDINGS_DEBUG = "?bb"; 17 | protected static final String VERSION = "0.1-SNAPSHOT"; 18 | protected static final String MUTANT = "mutant"; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /mutant/src/main/resources/META-INF/services/javax.script.ScriptEngineFactory: -------------------------------------------------------------------------------- 1 | org.codehaus.groovy.jsr223.GroovyScriptEngineFactory -------------------------------------------------------------------------------- /mutant/src/test/java/com/tinkerpop/mutant/MutantScriptEngineTest.java: -------------------------------------------------------------------------------- 1 | package com.tinkerpop.mutant; 2 | 3 | import junit.framework.TestCase; 4 | 5 | import javax.script.ScriptContext; 6 | import javax.script.ScriptEngine; 7 | import java.util.List; 8 | 9 | /** 10 | * @author Marko A. Rodriguez (http://markorodriguez.com) 11 | */ 12 | public class MutantScriptEngineTest extends TestCase { 13 | 14 | public void testBindingsToSubEngines() throws Exception { 15 | ScriptEngine engine = new MutantScriptEngine(); 16 | // a mutant script engine has both context bindings set to the same binding set 17 | engine.getContext().getBindings(ScriptContext.ENGINE_SCOPE).put("$x", 45); 18 | engine.getContext().getBindings(ScriptContext.GLOBAL_SCOPE).put("$y", 55); 19 | 20 | assertEquals(engine.eval("?Groovy\n$x"), 45); 21 | assertEquals(engine.eval("?ECMAScript\n$x"), 45); 22 | 23 | assertEquals(engine.eval("?Groovy\n$y"), 55); 24 | assertEquals(engine.eval("?ECMAScript\n$y"), 55); 25 | } 26 | 27 | public void testBindingsFromSubEngines() throws Exception { 28 | ScriptEngine engine = new MutantScriptEngine(); 29 | 30 | assertEquals(engine.eval("?Groovy\n$x = 45"), 45); 31 | assertEquals(engine.eval("?ECMAScript\n$x"), 45); 32 | 33 | assertEquals(engine.eval("?ECMAScript\n$x = 55"), 55.0); 34 | assertEquals(engine.eval("?Groovy\n$x"), 55.0); 35 | } 36 | 37 | public void testMidScriptConversion() throws Exception { 38 | ScriptEngine engine = new MutantScriptEngine(); 39 | assertTrue((Boolean) ((List) engine.eval("?Groovy\n$x = 0\nfor(int i=0; i<10; i++) {\n$x = $x + i\n}\n?gremlin\n$x = 45")).get(0)); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /wrender/.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | target/ 3 | .idea/ 4 | wrender.iml -------------------------------------------------------------------------------- /wrender/README.textile: -------------------------------------------------------------------------------- 1 | !https://github.com/tinkerpop/wrender/raw/master/doc/images/wrender-logo.png! 2 | 3 | Wrender is a lightweight graph visualization tool for "Blueprints":http://blueprints.tinkerpop.com. Along with various graph-based "TinkerPop":http://tinkerpop.com products, the "JUNG":http://jung.sourceforge.net and "Swing":http://en.wikipedia.org/wiki/Swing_%28Java%29 visualization toolkits are used to support the lazy rendering of Blueprints-based graphs. 4 | 5 | The documentation for Wrender can be found at this "location":http://wrender.tinkerpop.com. Finally, please visit "TinkerPop":http://tinkerpop.com for other software products. -------------------------------------------------------------------------------- /wrender/doc/images/demo-screen-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/wrender/doc/images/demo-screen-1.png -------------------------------------------------------------------------------- /wrender/doc/images/demo-screen-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/wrender/doc/images/demo-screen-2.png -------------------------------------------------------------------------------- /wrender/doc/images/demo-screen-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/wrender/doc/images/demo-screen-3.png -------------------------------------------------------------------------------- /wrender/doc/images/demo-screen-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/wrender/doc/images/demo-screen-4.png -------------------------------------------------------------------------------- /wrender/doc/images/wrender-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinkerpop/tinkubator/a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6/wrender/doc/images/wrender-logo.png -------------------------------------------------------------------------------- /wrender/doc/wrender.wiki/Home.textile: -------------------------------------------------------------------------------- 1 | !https://github.com/tinkerpop/wrender/raw/master/doc/images/wrender-logo.png! 2 | 3 | Wrender is a lightweight visualization tool for "Blueprints":http://blueprints.tinkerpop.com based property graphs. "JUNG":http://jung.sourceforge.net/ and "Swing":http://en.wikipedia.org/wiki/Swing_%28Java%29 visualization toolkits are used to support the lazy rendering of any Blueprints-enable graph database/framework. 4 | 5 | 6 | ==
== 7 | 8 | * [[Introduction]] 9 | * Working with JungGraph 10 | * Release Notes 11 | 12 | ==
== 13 | 14 | fn1. Wrender documentation is up to date with the current Wrender "codebase":http://github.com/tinkerpop/wrender/tree/master, not with the latest Wrender "release":http://github.com/tinkerpop/wrender/downloads. -------------------------------------------------------------------------------- /wrender/doc/wrender.wiki/Introduction.textile: -------------------------------------------------------------------------------- 1 | A basic demo of a draft of Wrender (*proof of concept*). Note, this is very alpha and provided here to get community feedback on direction. 2 | 3 | Wrender maintains two graphs--the graph of interest and an in-memory TinkerGraph that is actually visualized. The TinkerGraph is intended to be a subset of the larger graph. 4 | 5 | !https://github.com/tinkerpop/wrender/raw/master/doc/images/demo-screen-1.png! 6 | 7 | Use Gremlin to grab portions of the backend graph and place into the in-memory TinkerGraph. 8 | 9 | !https://github.com/tinkerpop/wrender/raw/master/doc/images/demo-screen-2.png! 10 | 11 | The "render" checkbox states that any vertices/edges that are returned by a Gremlin query are visualized (i.e. placed in the in-memory TinkerGraph) 12 | 13 | !https://github.com/tinkerpop/wrender/raw/master/doc/images/demo-screen-3.png! 14 | 15 | Of course, simply do @$_g/V/outE@ to render the entire graph. 16 | 17 | !https://github.com/tinkerpop/wrender/raw/master/doc/images/demo-screen-4.png! 18 | -------------------------------------------------------------------------------- /wrender/src/assembly/distribution.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | zip 4 | 5 | 6 | 7 | 8 | pom.xml 9 | 10 | 11 | 12 | 0775 13 | 14 | wrender.sh 15 | 16 | 17 | 18 | 19 | src 20 | 21 | 22 | data 23 | 24 | 25 | target/apidocs 26 | 27 | 28 | target/site 29 | 30 | 31 | target/wrender-${project.version}-standalone 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /wrender/src/assembly/standalone.xml: -------------------------------------------------------------------------------- 1 | 2 | standalone 3 | 4 | dir 5 | 6 | false 7 | 8 | 9 | 10 | src/main/bin 11 | /bin 12 | 0755 13 | 14 | 15 | target/*.jar 16 | /lib 17 | 18 | 19 | 20 | 21 | 22 | /lib 23 | false 24 | compile 25 | 26 | 27 | /lib 28 | false 29 | provided 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /wrender/src/main/bin/wrender.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | CP=$( echo `dirname $0`/../lib/*.jar . | sed 's/ /:/g') 4 | #echo $CP 5 | 6 | # Find Java 7 | if [ "$JAVA_HOME" = "" ] ; then 8 | JAVA="java -server" 9 | else 10 | JAVA="$JAVA_HOME/bin/java -server" 11 | fi 12 | 13 | # Set Java options 14 | if [ "$JAVA_OPTIONS" = "" ] ; then 15 | JAVA_OPTIONS="-Xms32M -Xmx512M" 16 | fi 17 | 18 | $JAVA $JAVA_OPTIONS -cp $CP com.tinkerpop.wrender.Wrender $k 19 | 20 | # Return the program's exit code 21 | exit $? -------------------------------------------------------------------------------- /wrender/src/test/java/com/tinkerpop/wrender/WrenderTest.java: -------------------------------------------------------------------------------- 1 | package com.tinkerpop.wrender; 2 | 3 | import junit.framework.TestCase; 4 | 5 | /** 6 | * @author Marko A. Rodriguez (http://markorodriguez.com) 7 | */ 8 | public class WrenderTest extends TestCase { 9 | 10 | public void testTrue() { 11 | assertTrue(true); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /wrender/wrender.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | target/wrender-*-standalone/bin/wrender.sh $@ 4 | --------------------------------------------------------------------------------