deep-foundation / deep-foundation/deep-packages

Finish the development of `post-to-cloud` deep package

Open
#1 2 comments 0 reactions 0 assignees View on GitHub
good first issue help wanted reward
Dominant language
No language data
Stars
0
Forks
3
PR merge metrics
No merged PRs in 30d

Description

https://www.npmjs.com/package/@deep-foundation/rss-to-deep (see readme to package).

![IMG_1577](https://github.com/deep-foundation/deep-packages/assets/1431904/2f1dddc8-e357-4391-b09c-af451da7cb61)

https://www.npmjs.com/package/@deep-foundation/post-to-cloud

![IMG_1581](https://github.com/deep-foundation/deep-packages/assets/1431904/758d6cb1-fa5f-4246-80c2-c0f098a0b260)

To get detailed view of packages install them inside a Deep instance.

## Context

The `Cloud` instances are links with `Object` (JSON) value. These JSON values are used to display cloud of words in selected posts links (news articles) imported from RSS feeds.

![IMG_1449](https://github.com/deep-foundation/deep-packages/assets/1431904/9d235bf4-d685-4894-84c0-78523eb8b86d)

## Cloud value format:

```js
{
"wordId1": {
// Word string value
word: "",
// Frequency of occurrence of the word for the whole Cloud (in all addresses selected by all CloudAddress links)
total: 0,
// Frequency of occurrence of the word in each address
addresses: {
"addressId1": 0,
"addressId2": 0
// ...
}
},
"wordId2": {

},
// ...
}
```

## Requirements

- Create a fork of `post-to-cloud` package, you can publish package with same name but in your user namespace in NPM.
- Update the `converterCode` handler to react using `HandleUpdate` link to updates of `Post` links (type is defined at `rss-to-deep`). Effect of this handler will be insert or update of `Word`, `Count` links and update of `Cloud` values in target JSON format. The `Cloud`'s value should be restricted by values of `Limit`, `Min`, `Max` links from addresses selected by `CloudAddress` links. This handler should `deep.await` all previous unfinished `Promises` to organize a queue of execution.
- Use as few requests as possible, group select queries, combine write operations into single transaction using `deep.serial`.
- Make sure your version of package contains TSX link with draft of `Cloud` visualization (client handler) from https://www.npmjs.com/package/@deep-foundation/words-experiment package.
- Visualization of `Cloud` should support changes in `Limit`, `Min`, `Max` and `CloudAddress` links for each `Cloud`.
- Additional handlers for changes in these links should recalculate `Cloud`'s JSON value.

## Algorithm draft

![IMG_1588](https://github.com/deep-foundation/deep-packages/assets/1431904/4ae6abc1-4486-4207-8774-dd8f3ff4bd71)
![IMG_1590](https://github.com/deep-foundation/deep-packages/assets/1431904/6200b12a-213c-4dec-9639-e4a9adc83acf)

## Completion reward

~~50000 ₽ can be claimed as a reward.~~ Reward will be paid to the first programmer that will make an NPM package that will pass review of @konard and @ivansglazunov

2023-10-19 update:

Due the fact that @Menzorg finished most parts of the task except main algorithm above the reward is now reduced to 25000 ₽.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.