Bookmarks for Steemit – Step 1: Hivemind Update

in Steem Dev18 days ago

I first introduced the idea of bookmarks for Steemit about four months ago. Four months is usually a long time for a feature like this. But if you consider that I'm doing this alongside my work, the family and the interaction here on the Steem, I think that's pretty good.

I'm proud to say - and this is not really my style - that this is the first feature update in a few years.
So I'm all the more pleased to be able to tell you today that I've now submitted the pull request for the first step, which will add bookmark storage to the Hivemind code.
The 2nd step is the update of the Condenser, which is the Steemit interface, with which the bookmarks can be set by the Steemians. Unfortunately, without the Hivemind update, the Condenser update is useless. Therefore, I have to wait with the 2nd step until the Hivemind code has been updated.

Modifications

  1. a new table hive_bookmarks was created, in which the necessary data are stored (user, post_id and timestamp).
  2. the database is now running in version 21.
  3. as I already explained in my first post, the interaction and storage on the blockchain is realised via custom_json operations. The syntax of the operation is already described there and has not changed.
    The processing of custom_json operations has been extended to include the handling of bookmarks.
    The operation already contains a category field for later extensions, but this is currently not used.
  4. addition of a new request bridge.get_bookmarked_posts with which the bookmarks can be queried from the Steemit frontend. At least the account for which the bookmarks are to be queried must be specified here. Further optional parameters for sorting and pagination are also provided.
  5. last but not least, the data returned for posts has been extended. There is now an additional field bookmarked_by, which contains the accounts that have bookmarked the post or comment. This is required for the frontend.

Tests

I tested the code after completion both in terms of migration and functionality.
To do this, I have a testing hivemind node running on which I was able to test the modifications. I used a live database backup for the migration test and started it with the new code. The migration was successful and I was able to set and remove bookmarks with the (almost) finished condenser code.

72_hivemind_migration.png

Notes

To be able to use the function with the Condenser at some point, the code update must be added to the Steemit nodes. For this I ask @ety001 and the Steemit team @steemcurator01 for appropriate attention.

I will only submit the updated Codenser code after the database has been migrated to version 21... and I have integrated my edits into @the-gorilla's new code :-) Therefore, a hint would be very helpful. I can be reached via the known channels (Github, Steemit, Discord-ID: moecki).

Many users have requested the function and I am convinced that it can improve the user experience on Steemit. I can say that because I am not only active as a developer, but also as a blogger on Steemit.

My wishes

To Steemians:

Share/Resteem this post, write about the new feature, etc... so that as many more users as possible find out about it and we can collectively convince the Steemit team of the new feature. Here you can see a live demo:

To other developers:

Take a look at the custom_json operations and integrate their content on your frontends or data services. In the best case scenario, we can provide users with a cross-frontend user experience. Bookmarks that are set on steempro.com, for example, could also be displayed on steemit.com and vice versa.
I would like to mention devs @steemchiller @faisalamin @h4lab @happyberrysboy / @upvu @etainclub and @boylikegirl.wit as examples.

And then...

There is potential for improvement in many places in Hivemind. I already have one or two places in mind. Even if there might be better technical possibilities for such a database at the moment, the majority of users use this service indirectly by using steemit.com. We should therefore also try to make this more attractive.

So: Support me with your witness vote for further developments... :-D

Steem Search on https://moecki.online/

My Full Node on https://api.moecki.online

My Python Pricefeed for Witnesses

Thanks for your Witness Vote

02.05.2024
Sort:  

Phantastisch! Am Ende sieht's so einfach aus... 😂

Tja. Abwarten und Tee... Tolle Vorarbeit!!!!!!!!!

For further developments:
Ich bin schon dafür, dass man unter dem Post selbst sehen kann, wer diesen gebookmarkt (schönes neues Wort, oder?) hat und dass der Autor eine Benachrichtigung erhält (wie beim Resteem). Wer weiß, was alles kommt? Irgendwann ist die Menge der Lesezeichen ein neues Merkmal für Qualität und schon wimmelt es - wie üblich - an all jenen, die ganz genau wissen, wie sie sich ihre Vorteile ergaunernwirtschaften.
Ich bin jedoch dagegen, dass jeder eine fremde Bookmark-Datei einsehen kann. Ist schon klar, dass dies mit den entsprechenden Codes und Fähigkeiten eh einsehbar ist, man muss diese Funktion m.M.n. aber für den "Otto-Normal-User" nicht extra in einen Condenser einbauen.

Edit:
Hm, eigentlich ist es schon sinnvoll, dass die Bookmarks aller allen "zugänglich" sind (so wie ja eigentlich alles - man braucht nur das richtige "Stalking-Tool". Das muss halt transparent gemacht werden.
Und über "Ausnutzungsmöglichkeiten" kann man ja sprechen, sobald es so weit ist. Manchmal früher, manchmal später...

 17 days ago (edited)

Vielen Dank. :-))

Am Ende sieht's so einfach aus

Auch wenn das nicht ernst gemeint war, wundere ich mich selbst tatsächlich manchmal, wie einfach manches im Ergebnis aussieht. Auch wenn ich jetzt die Code-Zeilen sehe, die für diese Funktion verantwortlich sind, kann ich es kaum glauben. Ich muss mir dann wieder selbst in Erinnerung rufen, dass das Coden selbst bekanntlich nur ein kleiner Teil der ganzen Arbeit ist.

gebookmarkt (schönes neues Wort, oder?)

Sieht komisch aus, würde ich aber bevorzugen. Ich war kurz auch bei gebookmarked, aber das wäre wohl reinstes Denglisch... Die deutsche Umschreibung ist mir tatsächlich viiiel zu lang: ein Lesezeichen gesetzt/gespeichert, mit Lesezeichen versehen...

Ich bin jedoch dagegen, dass jeder eine fremde Bookmark-Datei einsehen kann.

Wie meinst du das? Es wird ja keine Datei angelegt. Du kannst später die Bookmarks fremder User sehen, wenn du deren Profil besuchst. So wie du jetzt schon deren Posts und Kommentare sehen kannst.

und dass der Autor eine Benachrichtigung erhält (wie beim Resteem)

Das ist als TODO vorgesehen. Die Arbeit wollte ich mir allerdings erst machen, wenn die Bookmarks selbst funktionieren. Ich weiß ja noch gar nicht, ob es übernommen wird...
Außerdem fest eingeplant sind Kategorien für die Bookmarks. Das ist dann aber tatsächlich etwas aufwändiger, da die freie Vergabe einer Kategorie sicherheitskritischer ist, als eine schlichte Verknüpfung von User und Post-ID.

Ach ja: schön, dass du dir die Zeit für den Kommentar genommen hast (!finanzbot 20%):-D

Jo, dass einem englischen Verb/Wort - wenn man es denn unbedingt benutzen muss - die deutsche Grammatik übergestülpt wird, ist korrekt. Passt nicht immer, hört sich oft komisch an, sieht aber schriftlich bei Weitem nicht so furchtbar aus wie das englische Grammatik im echten deutschen Denglish... ;-)
Wir Muttersprachler sind doch an sich prädestiniert, deutsche Wörter zu erfinden bzw. weiterzuentwickeln. So muss auch eine Verkürzung von Phrasen möglich sein: Nix "ein Lesezeichen setzen". Das heißt von nun an "lesezeichnen".
Und so fällt es mir doch glatt ganz leicht, "Wie meinst du das?" zu beantworten. "Datei" war meine Umschreibung für all meine Lesezeichen und somit meinen ersten Gedanken, dass ich es doof fände, wenn jeder sehen kann, was ich gelesezeichnet habe. Diesen (lauten) Gedanken habe ich aber revidiert. Muss ich eben aufpassen, dass ich nicht so viele Pornoseiten lesezeichne... ;-)

Die Arbeit wollte ich mir allerdings erst machen, wenn die Bookmarks selbst funktionieren.

Sehr weise! Hoffe, du benötigst nicht allzuviel (Aus)Sitzfleisch.

fest eingeplant sind Kategorien für die Bookmarks

Wow, da freue ich mich ja jetzt schon drauf! Yeah, mit Struktur lesezeichnen!

schön, dass du dir die Zeit für den Kommentar genommen hast

Hallo?!
Na gut, weil du es bist... War auf jeden Fall im Browser lesegezeichnet... ;-P

 15 days ago 

Oh ja, "lesezeichnen" finde ich auch nicht verkehrt. Hat auch was künstlerisches an sich :-)

Hey @moecki,
thank you for using our automatic payout bot 'DUBby' to share your post rewards with your commentators.
To make sure everything works as planned, please remember to give me payout orders.
Just write a comment to the users who should receive a share. It should contain the instruction in the form !finanzbot x %.

If you need help with this, feel free to ask or check this manual (german).

Greetings from the 'DU-Finanzbot' (by Witness @moecki).

Heißa, dass DUBby die Artikelsprache erkennt, fällt mir gerade zum ersten Mal auf.
Glückwunsch, Chief of Maschinenraum!

 12 days ago 

Danke. Er wird halt doch öfter mit deutschen Texten befasst ;-)

Bei den Auszahlungstexten wäre es noch besser, wenn die jeweilige Kommentarsprache berücksichtigt werden würde. Das funktioniert aber nicht bei zu kurzen Kommentaren. Also bleibt es bei der Post-Sprache. :-)

Ich muss dringend Andreas' neuen Post lesezeichnen - also hau rein... ;-)

 12 days ago 

Stimmt, da war noch was. Dazu wollte ich auch noch in die Tasten hauen...

(schönes neues Wort, oder?)

Na so neu isses nich. Heutzutage fast schon wieder veraltet. Heute favt man.
Dat is für Leut, die in Zeiten von WhatsApp, Tik-Tok, Insta und Co noch Emails schreiben.
Würde die Millenium-Jungfuchs-Abteilung jetzt sagen. #lol
https://www.korrekturen.de/flexion/adjektive/gebookmarkt/

wie üblich - an all jenen, die ganz genau wissen, wie sie sich ihre Vorteile ergaunernwirtschaften.

Wie kommste denn auf sowas? Das läge nur an der Qualität in einer solchen Merkmal-Liste, wenn auf einmal 100 only-fun-data Accounts die Liste anführen, weil die ihren Müll gegenseitig bookmarken. Wer käme denn auf solche blöde Ideen? :D

Na so neu isses nich.

Du solltest mein Zwinkern, wann immer es um die Verdenglischung unserer Sprache geht, kennen.

Heute favt man.

Habe ich auch schon gehört. Als erstes bei meinem ü50-Bruderherz... :o

Wer käme denn auf solche blöde Ideen?

Eben... ;-D

bei meinem ü50-Bruderherz

Was macht er denn auf Instagram? :)

Vor dem Steem-Ernie braucht man da ja keine Angst haben. Der war ja schon zu blöde zwei manuelle Accounts zu betreuen.

Prima! Ich hoffe wirklich sehr, daß Dein Werk umgesetzt und integriert wird!

Habe ich Punkt 5 richtig verstanden...: der Autor eines Posts kann also auch sehen, von wem er ein Lesezeichen gesetzt bekommt? Das hatte ich noch gar nicht auf dem Plan, ist aber super cool!

 17 days ago (edited)

Ja, jetzt liegt es nicht mehr in meiner Hand. Bevor ich weitere Zeit investiere, sind jetzt andere dran...

Aktuell wird nur die Anzahl der Lesezeichen für den Post oder Kommentar anzuzeigen. Das war für mich jetzt der Kompromiss zwischen "Öffentlich" und "Privat". Theoretisch ist die Anzeige der User machbar (z. B. ähnlich wie bei den Votes).
Ziemlich am Anfang gab es eine Diskussion darüber, ob man die Lesezeichen verschlüsselt setzt, so dass niemand sehen kann, welche Lesezeichen ein User gespeichert hat. Eine andere Frage war, ob man auch die Lesezeichen anderer User sehen kann. Das zeigt, dass das Thema der Sichtbarkeit doch für den einen oder anderen eines sein kann... Die Diskussion kann gern unter den Usern geführt werden :-)

!finanzbot 5 %

Ich find das nicht nur klasse, sondern super klasse! Bin schon seeeehr gespannt...

 17 days ago (edited)

Danke dir. Bin auch erst mal froh, dass ich das jetzt soweit aufbereitet habe. Der Code an sich ist ja schon länger fertig, das anschließende Testen und Zusammenstellen für den PR dauert gefühlt ewig... das ist bei fremden Repos noch mal was anderes als bei eigenen... aber wem erzähle ich das ;-)

Für die fortwährende Unterstützung: !finanzbot 10 % :-)

 18 days ago 

Awesome - I'm excited 🙂

NoPowerPowerOutageGIF.gif

 17 days ago 

Me too! :-D
Now I have a bit more time for other topics... I'm not going to adopt your changes just yet. I first have to see what will really be merged.

 13 days ago 

I'm optimistic that both of our changes will be accepted. I'm hesitant to make another big change until I get some good news though!

I was looking at how difficult it would be to update the "Trending" algorithm today. It looks like I've got to set up a few Nodes which looks expensive. Presumably, this is what you had to do to get your Witness Node running?

 12 days ago 

The "trending" is calculated at least at Hivemind level. I can't tell you whether this also happens on the chain itself. Because of the API query condenser_api.get_discussions_by_trending it could be assumed. However, I doubt that this is the same algorithm.

The witness nodes run independently of the Hivemind development. Hivemind and the RPC node run on their own server. I had to use another server for the Hivemind test node so that the "productive" nodes are not affected.
At the moment, I'm actually spending more than I'm earning from block production. As long as I have fun with developing, that's fine...

 12 days ago 

I found the trending code within the steemd repository. It's written in C++ so it's safe to keep away from it 🙂 It appeared to take 2 parameters - a score and a timeframe so the same function is used to return trending and hot. Once I saw where it was and the C++, I decided I'd park that until I fancied re-acquainting myself with that particular language!

I'm still surprised that you're not one of the top witnesses. I hope that you make your way higher. I find it quite a deterrent that somebody who contributes as much as you do is outside the top 50 - otherwise I'd be more inclined to satisfy my curiosity and set up a node too!

 12 days ago 

until I fancied re-acquainting myself with that particular language!

I feel the same way. I have already refreshed a few basics. Unfortunately, I still have no idea how debugging could be done there. It's also not a top priority at the moment.

I'm still surprised

I'm not really. It's the same old problem. Are the posts read so that a lot of people take note of the activities? I would probably have to annoy the whales with the big stake more directly... Others can do that better...

!finanzbot 10 %

Others can do that better...

Well, I'm not really good at it either.
But I'm good at thinking out loud:
The witness vote of @dev365 is very influential. And this account is - as far as I know (and I think @rme knows this too...) - controlled by the Steemit Team. So @steemcurator01 should be able to manage something. And this account reads your posts and seems to be just as enthusiastic about them and your actions as we all are!

Moecki for TOP 20 Witness!!!

 11 days ago 

I remember upvu trying to get dev365's votes removed so that the Witness Voting system was fairer but I don't think that ever happened. So it does put more weight on user's like upvu and rme to select the witnesses which contribute the most (in terms of community as well as development). moecki does both so I keep thinking it's only a matter of time before he gets the votes he deserves!

Maybe when @moecki launches bookmarks, he could hard code an automatic bookmark to his "moecki's a witness" post 😉

I'm still surprised that you're not one of the top witnesses.

#metoo

Let's develop a proposal... ;-)

It all look good!

I hope I can contribute in the publicity of this innovation.

 17 days ago (edited)

I like to be surprised :-)

For your continued support !finanzbot 5 %

It's going to be very useful feature and it's on chain which is amazing. Definitely steempro will get benefit from it. Thank You for sharing the details, I hope hivemind will merge it as soon as possible.

 17 days ago (edited)

Thanks.
As far as I know, you get the data for steempro from Steemchiller's SDS. So it would be really great if he could also offer a request for this. We will see...

!finanzbot 2%

you are the best

 12 days ago 

Thank you
!finanzbot 1 %

That's a good thing.
To avoid reinventing the wheel, it would be a good idea to document the custom_json we create.

 17 days ago 

What do you mean with "we"? Do you mean a documentation about all custom_json operations?
We've discussed this before. Usually, the developer creates a special operation for their app to store data on the chain. Such special operations cannot usually be reused for other apps.
Documentation would be useful for cross-app operations (like the bookmark ops). I don't know of any overview of this either. You can find a few hints here:

Thank you so much for the good information. I will take note. I agree that custom_json is generally difficult to reuse. However, my ideal idea is, ‘If we make the usage of custom_json into a protocol, wouldn’t it be possible to share it with other developers?’ I will personally proceed with the project with custom_json and then share the results.

And 'we' are the people who use custom_json, and documenting and sharing it is just an idea for now.

 12 days ago 

If we make the usage of custom_json into a protocol, wouldn’t it be possible to share it with other developers?

That's right, I see it the same way. That's why I shared and documented my operation. I also want others to be able to use this and integrate it into their apps.

I will personally proceed with the project with custom_json and then share the results.

I think that's good. Have you made anything public about this yet? That would interest me.

Thank you very much for your comments !finanzbot 5 %.
Maybe you can also support me as a witness with your vote.

Goooooooood ! ^💙^

 17 days ago (edited)

Thank you.
You are welcome to do a little promotion in the Korean community :-)
!finanzbot 4 %

Me parece excelente esta modalidad de agregar favoritos, ya que por lo general lo hacemos con el resteem que al final queda perdiéndose en nuestro blog con el tiempo y la idea es tener a la mano esa publicación o comentario que nos interesa.

 17 days ago (edited)

Right!
Let's keep our fingers crossed that we can use this on Steemit soon. :-)

!finanzbot 2%

Coin Marketplace

STEEM 0.27
TRX 0.12
JST 0.032
BTC 67030.16
ETH 3094.97
USDT 1.00
SBD 3.66