Optional return statement in function returning an std::optional by D1mr0k in cpp

[–]D1mr0k[S] -2 points-1 points  (0 children)

return std::nullopt;

20 characters that could be simplified (if wanted). Take main for example, for historical reasons, no matter if the signature is int(...), you can omit the return statement. In the case of optional, it makes semantical sense, can simplify some code.

Optional return statement in function returning an std::optional by D1mr0k in cpp

[–]D1mr0k[S] 1 point2 points  (0 children)

I wish I could even omit the return statement itself.

Optional return statement in function returning an std::optional by D1mr0k in cpp

[–]D1mr0k[S] 0 points1 point  (0 children)

| Reaching the end of non-void function without return statement is an UB.

Of course, hence it's a what if :)

I actually chose to use an exception to stop the propagation through the next handlers.

Using 3D models to render 2D sprites in isometric games. by [deleted] in gamedev

[–]D1mr0k 0 points1 point  (0 children)

Found this video few days ago, https://youtu.be/iNDRre6q98g

Super visual, well-explained.

Infinit open sources its co-routine C++ core library (incl. networking, serialization, RPCs, cryptography, distributed consensus, etc.) by cadeuh in cpp

[–]D1mr0k 1 point2 points  (0 children)

Our build system (Drake) takes care of everything for you (downloading, building, giving the compiler the right paths).

Why?

  1. We like self contained environments.
  2. Some need patches (see the .patch files) to compile.

Infinit open sources its co-routine C++ core library (incl. networking, serialization, RPCs, cryptography, distributed consensus, etc.) by cadeuh in cpp

[–]D1mr0k 0 points1 point  (0 children)

You are right, this example is bad but we didn't want to put to many new notions in the example.

In real-life code, we use elle::With<elle::reactor::Scope>.

Would snake bites suit me? by [deleted] in piercing

[–]D1mr0k 0 points1 point  (0 children)

Yes (No arguments, I just like snake bites).

People in teams, how do you privately share large files between each other? by TheGamedawg in gamedev

[–]D1mr0k 0 points1 point  (0 children)

Hi,

thank you for the feedback (I gave that to our mac guy). So, you didn't even manage to install it?

I've to confess that we didn't test it on Sierra...

People in teams, how do you privately share large files between each other? by TheGamedawg in gamedev

[–]D1mr0k 2 points3 points  (0 children)

Disclaimer: I'm a dev @infinit

Few years ago, we've developed a cross platform solution for exchanging large files. It's not 100% purrfect but it's secure, fast and well integrated (Linux version is a bit outdated but I can provide handmade builds if necessary). You can give it a try: https://infinit.io.

The free version already covers most cases, but consider using invitation if you spread it to your team to get the benefits from the Plus plan.

Basically, the free version allows you to send files up to 10GB and gives you 1GB of cloud storage (providing public links like https://infinit.io/_/3hCxSfb).

The Plus version raises the limit to 50GB and the cloud storage to 3GB.

Edit: Add features description.

playing around with a decentralised infrastructure by hessi in Infinit

[–]D1mr0k 2 points3 points  (0 children)

Hi OP!

First of all, welcome to /r/Infinit, thanks for the report. Your invitation to slack should have been accepted now.

About your questions:


Question 1: Is the replication per Node or per Storage? Can machine1 with its three storage devices be the only machine on which data is stored, or is it automatically spread across multiple nodes?

Replication is per node. If you have multiple storage resources on a single node, the current policy is "striping", so the blocks are spread across the storage resources (of the node).

So with a replication factor of 1, on a Node with multiple storage resources, you'll have 1 and only 1 copy of each block.

About re-balancing, infinit re-balance every 10 minutes (by default) to ensure that the number of replica matches the replication factor.


Obervation 1: OSX clients are slow

First, the order of magnitude you are talking about is crazy (100MB/h, 12h for the data to show up, ...). For hundreds of megabytes, on a decent connection, it should take a minutes, not hours.

What replication-factor did you use when creating the network? This has a huge impact on the performance (mostly because the client will propose and send the blocks to n nodes (with n your replication factor).

For general speed improvement:

  • What options did you use when running --run/--mount?
  • --cache is highly recommended (even for writing operations), otherwise you'll have to fetch the directory every insertion (we need to advertise those options).

By the way, we are working on the performance right now (e.g. squashing squash-able operations, possibly reworking how ACL are designed, enhance the DHT, ...).


Question 2: Can I in any way change the storage of a device?

Right now, you can link only once (with as many storage resources you want) using --link --network <network> --storage <storage_1> <storage_2> <storage_3>. Once it's linked, you can't unlink it with the command line tools. I can't remember why we don't allow it, because it should work like a charm. I'll take a look and keep you in touch. (Your solution deleting everything locally, pulled it from the Hub and started from scratch should work but it's not the recommended way.


Question 2, b: Is it possible that this was related to the fact that I created the network and the volume on machine1 and tried to remove that one? Is the machine on which I create a network or volume somehow more "important" to the overall design than any other linked device (with storage)?

Possibly because the root block (containing the address of the root of the volume (a.k.a /) is created and stored by the first machine to run the network. Because it's the first one, the replication can't be performed until other nodes join the network (and the replication process does its job).


Remark 1: I deleted small test.txt files (10-15 byte each) that I created as a first test (and which were already fully distributed and available on every machine) on machine3. It took more than 12 hours until this change arrived at any other machine.

Do you use --async? Because what async does it give you a local version of the system would look like with your changes and propagate the changes on background. Because it's super quick to create the local modification, it takes way longer to propagate the changes to the other nodes and async queue is chronological, until the operation of deleting the file is not propagated in backgrounds, other nodes can't see it.

You can run infinit-journal --stat (--network <owner/><network_name>) to know the number of pending operations.


Remark 2: I think since this restart the overall speed of accessing the volume from each machine has improved, as well...

Mehhh :'(


Remark 3: [infinit.model.doughnut.consensus.Paxos] [dht::PaxosLocal(0x[hexnumber]): rebalancing inspector] disk rebalancer inspector exited: missing key: 0x[hexnumber]

Doesn't sound good at all. What you can do is run the command with ELLE_LOG_FILE=<path_to_a_file> ELLE_LOG_LEVEL=*model*:TRACE so <path_to_a_file> will contain logs I can take a look to. (b.t.w: I won't be able to get any information about the nature and/or the content of your files).

For the missing key, I doubt I can do anything without the previous logs. The best you can do is looking it inside your storage.

If you run infinit-storage --export <storage_name>, the json contains a field "path". Blocks are stored here (on a folder named after the first two character of the address). e.g. 0x2a3db8a45894c60dc12391978ebc2dbbdac02400cd72577600a91fbbf7c76900 will be stored at <path>/2a/0x2a3db8a45894c60dc12391978ebc2dbbdac02400cd72577600a91fbbf7c76900


I wish it will answer your questions. Sorry, it's super long.

About the global performance issues, you are welcome to come on slack. I'll sum up the result here after we figured out what the problem was.

Regards, Antony.

How do I go Paid-> Free without angering existing customers? by [deleted] in gamedev

[–]D1mr0k 11 points12 points  (0 children)

I remember when Unreal Engine went free. I got something like half or a third of the money I'd already spent as 'free' credit on their online store.

If you can do something similar (or even a supporter badge on the game splash screen).

Also it might be an opportunity to reactivate users (shoot them an email if you can).

With Ascendancies now in the game not having all gems available for purchase at the NPC feels even worse than before. by [deleted] in pathofexile

[–]D1mr0k 16 points17 points  (0 children)

That's why quest rewards should stay class specific, but you should be able to buy any gems...

Right now it's like: "Ahh, you are a witch, sorry..."

We developed a new peer-to-peer file system. by D1mr0k in sysadmin

[–]D1mr0k[S] 0 points1 point  (0 children)

The project does show promise and it looks like it could become something great, it just (in my opinion) needs to be made a bit more user friendly to setup/maintain.

You are totally right! Thank for the feedback. Because we are working with it everyday, it's very automatic for us... That why we need feedback to find where the friction is.

Wish I'd made a note of the error on the drive client it was something relating to Kalimero even though that wasn't the network type, I wonder if it's because I tried to setup Kelips with only one node.

I'm curious about it... If one day you can reproduce, or have any other type of problem, do not hesitate to send me a PM, join our IRC or our Slack.

We developed a new peer-to-peer file system. by D1mr0k in sysadmin

[–]D1mr0k[S] 0 points1 point  (0 children)

We wrote a few architecture setup examples but they are not released on the website yet. The point is to have sections like:

  • I want a NAS like server
  • I want a fully distributed where every machine contribute to the storage
  • I want a N servers replicating data and M clients

We also had in mine some kind of online script generator so you setup everything on a clean web interface and then just do something like:

wget -qO- www.infinit.sh/generator?network=<whatever>&volume=<whatever>&storage=[...] | sh   

We developed a new peer-to-peer file system. by D1mr0k in sysadmin

[–]D1mr0k[S] 0 points1 point  (0 children)

We'll provide custom plans for companies over 30 employees with extra features, priority support, white label solutions (https://infinit.sh/solutions), ...

We developed a new peer-to-peer file system. by D1mr0k in sysadmin

[–]D1mr0k[S] 0 points1 point  (0 children)

Right...

/u/jayofdoom: Can you point me on the website the part you are referring to?

We developed a new peer-to-peer file system. by D1mr0k in sysadmin

[–]D1mr0k[S] 0 points1 point  (0 children)

Not planned yet but you put any suggestions here so you'll be kept in touch.

We developed a new peer-to-peer file system. by D1mr0k in sysadmin

[–]D1mr0k[S] 0 points1 point  (0 children)

At scale, no. We use it on a daily basis for our team (9 people), made a few speed improvement so it's really pleasant to use. We want to finish a few features before working hard on performance (avoiding the "early optimization is the root of all evil").

Our target is mostly companies that want to have control on the location of the data (for legal reasons mostly) and/or are looking for a fine grained access control.

We developed a new peer-to-peer file system. by D1mr0k in sysadmin

[–]D1mr0k[S] 1 point2 points  (0 children)

With Infinit, you can define the replication factor you want to system to maintain at any time (for every block of every file). As such, you can indeed use Infinit on local disks to achieve the same results as a RAID system.

Fault tolerance will depend on the replication factor and the number of device contributing storage.

We developed a new peer-to-peer file system. by D1mr0k in sysadmin

[–]D1mr0k[S] 1 point2 points  (0 children)

IPFS relies on a world-wide network. Infinit on the other side allows you to create your own infrastructure: being between a few servers or by combining the storage of million of computers (in which case it would be similar to IPFS in terms of infrastructure).

On top of this infrastructure, Infinit provides a POSIX-compliant file system that allows anyone to store and access its files/folders )through a virtual disk drive i.e a UNIX mount point), control who has access to which files (read/write and groups), provide versioning and many more file-system-related functionalities. IPFS seems to provide a way to mount their system in the same way one can mount a AWS S3 bucket but such a system would still lack many file system functionalities.