Fermat-ORG / fermat-framework

This is the Fermat Framework described on the first Fermat whitepaper. The Java Framework, Android Framework, Linux Framework, and all platforms are here. This project is currently paused until we put the network infraestructure in place. Later this work will be resumed to put this client-side infraestructure to work with the new set of networks.
https://drive.google.com/file/d/0B02V15ufCwR3UDNER3l2WGVmcE0/view
Other
2 stars 2 forks source link

Clean project structure #5546

Open sytolk opened 8 years ago

sytolk commented 8 years ago

What do you think to turn module /fermat/P2P/plugin/communication/fermat-p2p-plugin-communication-cloud-server-bitdubai into "fermat-node" separate project.. and gradle is google`s choose in this module is no google (Android) dependency correct me if I wrong but there is no reason to use Gradle as a build system for the fermat-node project. I think that better is to have Maven build too. Maven features like this miss me: https://github.com/janssk1/maven-graph-plugin/wiki/Manual

(project can have two build systems Gradle and Maven)

This project have 3 not published module dependency: compile project(':fermat-api') compile project(':fermat-p2p-api') compile project(':fermat-pip-api')

It can be loaded in new project from local Maven repo or publish it as far I remember to publish in sonatype its need some proof of domain com.bitdubai (in meta tag) http://www.sonatype.org/nexus/2015/06/02/how-to-publish-software-artifacts-to-maven-central/

To determine if this "Boolean" issue is true or false we can write Pros and Cons:

Turn "fermat-p2p-plugin-communication-cloud-server-bitdubai" module into "fermat-node" project Pros:

  1. Can use different build system from Gradle.
  2. Less build speed. Low system requirement.. => increase of development speed
  3. Clean and well structured project (README-NETWORK-SERVICE.md is for this project only)

Cons: ...

If this Issue is accepted please create empty "fermat-node" project under https://github.com/Fermat-ORG and I can provide PR.

leonacostaok commented 8 years ago

Hi @sytolk, the idea of the project is that each device with an instance of Fermat running, be a Fermat node. Each device will react depending its resources (power consumption, bandwidth availability/height, processing power, stable connectivity, storage space, etc.). Have you read the white-paper? Please take a look deeply.

sytolk commented 8 years ago

@Inacosta This is the dependency tree of the Android module http://pastebin.com/VNv2E4mZ can you show me where is the dependency to fermat-p2p-plugin-communication-cloud-server-bitdubai there is only dependency to fermat-p2p-plugin-communication-cloud-client-bitdubai this means that Android app is client only. Maybe you mean some other meaning of the word "node" but my question was: Can we separate server module from Android?

by the way white-paper is ideas only it is not technical documentation (this means that you cant start working based on this white-paper)

sytolk commented 8 years ago

From white-paper:

Why does Fermat require specialized nodes for interconnecting devices? Why not let them connect between each other freely? There are two main reasons: Fermat is mobile first, and many mobile operators forbid incoming connections. This leaves these mobile devices with only one option: to initiate the connection. Fermat nodes can be seen as relay servers described in NAT traversal techniques. Even mobile devices that do allow incoming connections are not good candidates to be relay servers since not all mobile data plans offer unlimited data transfer. This creates the need for: specialized nodes within Fermat that can take the role of relay servers an incentive mechanism to get node operators to run them.

but if its have ideas how to make "Each device" to be client and server and deals with the NAT ? let me know and I suppose that the white-paper will be easy changed ;)

leonacostaok commented 8 years ago

I'm sorry you're right. It's not very specific. There is a "fermat-linux-core" and we've a plug-in called "fermat-p2p-plugin-network-node", it will work inside the framework. Please take a look.

Luis-Fernando-Molina commented 8 years ago

Hi everyone let me join the discussion.

Please bear in mind that Fermat is an evolutionary creature and it final state of design has not been reached, so we are happy to hear suggestions.

Some considerations first:

  1. We are targeting Android first and although we expect to port the code to other OS we will do it as late as possible in order not to lose focus.
  2. Our first communication infrastructure, the one called Cloud Client & Cloud Server where both implemented as plug ins with the hope that wherever they run they would reuse the rest of the infrastructure, like for example the access to crypto networks.
  3. For a first version of the Cloud Server, we give the dev doing that the freedom to "put it to work" however it takes, since we needed some sort of communication working in order not to delay higher level functionality.
  4. Now we have some sort of alpha "communication infrastructure" that is far of being a p2p network, in fact it is not. It is just a server that acts as a bridge. Our current idea is to keep this like this and slowly perfected to accommodate an array of "cloud servers".
  5. We are just starting a parallel project with the intention to create the p2p network version 1. For that new client project and node projects should be created and developed almost from scratch, just reusing some techniques and other stuff from the stable version of the client-cloud.
  6. There is a wish that mobile devices could turn themselves into nodes under certain conditions (plugged to charger, wifi, no end user using it, etc, and if it can automatically reprogram the home rounter for allowing incoming connections). According to some preliminary tests this is possible in certain circumstances. @furszy can clarify if needed. Anyway this is still on the wish list and with not too much priority right now. We would just like to confirm if it is possible or not in some cases.
  7. The short term intention is that a node is run by someone who knows and understand what he is doing and can follow a technical procedure to configure whatever needed. It should be done on regular pcs on linux first. Right now, the priority is to put this v1 p2p network to work, preferably within the Fermat framework ported to Linux, but a standalone version at the beginning is also welcome.

later, i will come back to address your specific concerns.

Luis-Fernando-Molina commented 8 years ago

What do you think to turn module /fermat/P2P/plugin/communication/fermat-p2p-plugin-communication-cloud-server-bitdubai into "fermat-node" separate project.

As I said before, it will be a separate project written from scratch taking some techniques and other things that did worked well from the cloud server project.

and gradle is google`s choose in this module is no google (Android) dependency correct me if I wrong but there is no reason to use Gradle as a build system for the fermat-node project. I think that better is to have Maven build too.

Maven features like this miss me: https://github.com/janssk1/maven-graph-plugin/wiki/Manual

(project can have two build systems Gradle and Maven)

that graphic is quite nice and it might be very usefull for a project like this.

I do believe it could be a good idea to include Maven as a secondary build system.

we can invite @Fermat-ORG/fermat-team-leaders to discuss this here.

Turn "fermat-p2p-plugin-communication-cloud-server-bitdubai" module into "fermat-node" project Pros:

  1. Can use different build system from Gradle.
  2. Less build speed. Low system requirement.. => increase of development speed
  3. Clean and well structured project (README-NETWORK-SERVICE.md is for this project only)

Cons: ...

f this Issue is accepted please create empty "fermat-node" project under https://github.com/Fermat-ORG and I can provide PR.

There is a project that is going to be the fermat-node. As stated before, in the end it should be inside the framework, at the begining i don't care.

I believe it is a good idea to build it outside the framework first in order to compile faster and accelerate development time. Once we reach an alpha there it could be put again into the framework.

If that is your idea then I very much agree with it.

Please @sytolk and @lnacosta confirm this it a good idea and I create a new repo for you to follow this path.

sytolk commented 8 years ago

I believe it is a good idea to build it outside the framework first in order to compile faster and accelerate development time. Once we reach an alpha there it could be put again into the framework.

Sorry but I cant think for the temporary solutions. If its have a plan to move the whole server code back I think its better not to turn into separated project :) I believe that the true way is to have different project "fermat-node" and if its need to include it in Android Linux Windows (swing client app) just to write in fermat project small library that wraps the fermat-node project include it like jar file with all dependency. Wrapper around the fermat-node can be in the same directory fermat-p2p-plugin-communication-cloud-server-wrapper-bitdubai