Giter Site home page Giter Site logo

rwth-acis / las2peer-template-project Goto Github PK

View Code? Open in Web Editor NEW
14.0 15.0 12.0 5.05 MB

A template service that shows the basic configuration of a las2peer project and features a wiki with all relevant las2peer information.

Home Page: https://las2peer.org

License: Creative Commons Zero v1.0 Universal

Shell 33.45% Java 55.48% Batchfile 4.21% Dockerfile 6.86%
las2peer encryption

las2peer-template-project's Introduction

las2peer-Template-Project

Java CI with Gradle codecov Dependencies

This project can be used as a starting point for your las2peer service development. It contains everything needed to start las2peer service development, you do not need to add any dependencies manually.

For documentation on the las2peer service API, please refer to the wiki.

Please follow the instructions of this ReadMe to setup your basic service development environment.

Preparations

Java

las2peer template uses Java 14. las2peer uses Java 17.

Quick Setup of your Service Development Environment

If you never used las2peer before, it is recommended that you first visit the Step by Step - First Service tutorial for a more detailed guidance on how to use this template.

Follow these four steps to setup your project:

  1. If you use Eclipse (for our guides we are using version 2020-12), import this project (as Gradle -> Existing Gradle Project). Please make sure, that Java 17 is available in Eclipse. During the import process, the .classpath files will be generated automatically.
  2. The service source code can be found at i5.las2peer.services.templateService.TemplateService.
    (Optional: Change gradle.properties according to the service you want to build. Rename your build directory structure according to the names you gave.)
  3. Compile your service with ./gradlew clean jar. This will also build the service jar.
  4. Generate documentation, run your JUnit tests and generate service and user agent with ./gradlew clean build (If this did not run check that the policy files are working correctly).

The jar file with your service will be in "template_project/export/" and "service/" and the generated agent XML files in "etc/startup/". You can find the JUnit reports in the folder "template_project/build/reports/tests/".

If you decide to change the dependencies of your project, please make sure to refresh the Gradle project in Eclipse by right-clicking on your project and then choosing Gradle -> Refresh Gradle Project. Also run "gradle cleanAll" to remove all previously added libraries.

Next Steps

Please visit the Wiki of this project. There you will find guides and tutorials, information on las2peer concepts and further interesting las2peer knowledge.

las2peer-template-project's People

Contributors

alexanderneumann avatar aran30 avatar cagatayogut avatar chenkunzhang avatar cyremur avatar derjasper avatar fbasels avatar gordin avatar istvank avatar junpls avatar lakhoune avatar mohamedalsherif avatar navidda avatar nmaster avatar pedela avatar phil-cd avatar tcuje avatar tjanson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

las2peer-template-project's Issues

[ENH] Delete startup files when building project

  1. Motivation - When building las2peer projects locally using the "build" command, one always has to manually delete the service agent xml file since the gradle update, which is tedious. If one does not delete the file after having rebuilt the project, the service won't start correctly as the hash value changed and won't be compatible with the old service agent file.
  2. Specification - Add a "deleteStartupFodler" build task which deletes the content of etc/startup as to not block new users when restarting a freshly built service.
  3. Finalised state - No lockup because of a deprecated service agent file.

[ENH] Missing Dockerfile for template-project

  1. Motivation - Most (if not all) las2peer services are programmed and then used in a virtualized cluster environment. This leads to the necessity of having "images" of created services. It would be helpful, if the template-project service would contain a template Dockerfile as well, making the development of new services easier.
  2. Specification - Create Dockerfile and docker-entrypoint.sh file.
  3. Finalised state - Las2peer developers have an easier time creating an image of their service.

Migration from 1.1.1 to 1.2.0 failed

I tried migrating the mensa service to the version 1.2.0 of las2peer. I followed the steps described in the Migration guide, but the build failed with the exception

Entry META-INF/LICENSE.txt is a duplicate but no duplicate handling strategy has been set. Please refer to https://docs.gradle.org/7.2/dsl/org.gradle.api.tasks.Copy.html#org.gradle.api.tasks.Copy:duplicatesStrategy for details.

(see here)

Is it possible to get stored objects to call back to their originating client?

Hi all,

I have created a simple service call JBotNetService which at the moment stores and fetches JBot storage objects. JBot is an abstract representation of a JavaBot which is an IRC information service bot.

I want to be able to set a message on one JBot and for that JBot to propagate that message to all the others. I could simply set the message field on each of the JBots and then have all the originating JavaBots poll so see if the message has changed and to act on it. This is an approach I've seen and used in traditional Java RMI based client -server apps.

However, I want all the JavaBot's to act instantly when the message has been sent, so this polling idea is not good unless your polling interval is very short (in the order of milliseconds). This could be an issue if there are hundreds of JBots and put a lot of load on the system generally. Instead, can I have the JBot trigger an event on the originating JavaBot?

I have some ideas on this:

Could the JBot maintain an IO stream passed to it by the JavaBot in order to call back?

If not, could the JBot create its own IO stream back to the JavaBot, given an ip and port set in the JBot on creation?

Is there an easier and better way that is facilitated by las2peer?

Could the JBot be a Service that can talk to its originating JavaBot? - the JavaBot creates and registers the JBot service and that service talks back to the JavaBot. When JavaBot sends a message to the JBot service, that message gets propagated to all the other registered JBot services in the network?

Thanks in advance for thoughts and feedback on this.

Warren

Update to las2peer v1.1.0 (Java 14)

Once the new las2peer version 1.1.0 is released, the template project should also be updated in order to help the service maintainers to update their services easily.
Things that definitely need to be changed:

Please note, that this list might be incomplete.

Adjust README

readme lost the information about how to run using docker

[BUG] Can't open las2peer node frontend

I was not able to access the las2peer node frontend after launching the service.

Logs
The logs on the node only show File not found: '/webapp/images/manifest/icon-192x192.png' while all other resources load just fine when inspecting the network tab in the browser

Steps to reproduce

  1. clone repository
  2. build the service using gradle
  3. launch localhost:8080 in your browser

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.