API vs Client vs Ports

I’m confused by these three maidsafe projects. Which of these must I use to connect to and manipulate a local safe network? I was able to build the ports project but unable to determine what was being exposed that would help you connect. I also looked at the client project. I was unable to build this. The instructions seem to suggest it was already apart of the main maidsafe project and had its own build targets but it doesn’t seem to have these targets. If I don’t want to develop against a local network which of these projects do I need?

This is probably a @Viv question. He has a bunch on right now, but will hopefully come back and clear these questions up for you shortly.

Hey Vijayee,

If you want to run a local network, you do not need any of them. Setting up a local network should indicate the steps you can follow for this. It only involves you building and running the target local_network_controller. Do note the API project’s exposure to network operations from a client perspective is still being worked on. So you wouldn’t be able to do(reliably) stuff like Store/Get until the NFS libraries get to a stable testing state.

Before I jump into your next question I’ll highlight the purpose of the API’s you mentioned which should hopefully clarify your next doubt as well.

  • MaidSafe-API - It’s the top level C++ API project that exposes client side functionalities abstracted from underlying sub-module API’s. So say an operation such as “get my messages for a given MPID” takes 3 API calls to be done from the submodules(low level API’s), the MaidSafe-API project would act as a wrapper(high level API) to expose it in a single function such as “GetMyMessages()”
  • MaidSafe-Ports - Each target language in this project is intended to port the MaidSafe-API project to the corresponding programming language. Do note again that they are currently not having a dependency on MaidSafe-API since it’s very much a wip project. Currently only sub-modules upto RUDP in hierarchy(common->passport->rudp) have cereal library integrated. Once protobuf gets replaced in further submodules, the port project will also target MaidSafe-API

Currently not much, we’re still at the stage of setting up the boilerplate required to support the destination languages. One key port language missing right now is ObjC-iOS. As I mentioned previously, when the Ports project targets the maidsafe_api library and thereby has access to the NFS API you’d be able to use it from nodejs(I’m guessing that’s what you’re after from our mailing list convo) as to how you’d expect.

Not sure which repository you’re referring to here, but you shouldn’t need anything but the nodejs_port target for what you’re after when everything is setup. nodejs_port internally depends on cpp_wrapper and as my previous link showed, cpp_wrapper will then be linking against maidsafe_api

If you mean these instructions, then they are correct, the dependency right now is limited to maidsafe_rudp from the main project. Targets the ports project will expose if configured correctly will be(for nodejs) nodejs_port and nodejs_sample from the Ports project

Using a local network / testnet / live network(when it’s live :smile: does not depend on the targets built / how they’re built but which nodes you bootstrap your client via. If you contact a node running on your local machine which is part of it’s own network, then you’ll join that network and so on. It just boils down to the node(thereby network) you’re trying to bootstrap against and not how you compiled the client.

Hope that clarifies your doubts, soz about there not being “much” you can do with the ports target such as nodejs_port, this should soon improve with the work going into routing v2 and the NFS libs.

1 Like

I’m sorry. I was not clear. I am already running a local network which of these projects would be able to connect to this network and manipulate it? And thanks for the explanation on the difference between projects. I see things clearer now.

I meant the Client project under the MaidSafe and I was referring to these instructions and I was referring to the AllClient target that would build the client from the MaidSafe super project.

Thanks for your help if I can compile these answer in any way into a document so that others won’t have to take away form development time with questions let me know as I would love to help get tools for app builders more clearly defined. I’d love to contribute other useful code too but I’ve discovered My CMake-Fu is weak and I have been getting owned… so I’ll be in the dojo figuring that out.

1 Like

Oh that one. soz that shouldn’t even be in the repos list. It’s not a dependency of the Super project anymore and last commit activity in that repo was about a year ago(been deprecated for a while). I’ve moved it now. Hopefully it doesnt appear in the repos list from now.

Firstly thank you for offering to help(especially at these early stages when API’s are still getting defined and there isn’t a lot for people to play about with). If you’d like to contribute any documentation, it’s a bit tricky with github not allowing Pull Requests for wiki’s. You can always commit your changes to an actual repo of yours and create an issue in the original repo and indicate the files you want taken over from your repo and we can merge them in that way. This does need some thought to be made better and allow community member submissions in an easier way. CMake is indeed quite tricky to start off with and gets a little better eventually(never too easy). If you’re getting stuck with something related to the CMake setup / general enquiries, just shoot a mail to the mailing list and I’m sure someone would be able to help you out.

1 Like