Bitcoin Forum
May 24, 2024, 12:20:01 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: What is the reason of separation into 2 programs daemon and GUI?  (Read 1153 times)
Stn (OP)
Full Member
***
Offline Offline

Activity: 227
Merit: 100


View Profile
March 13, 2013, 07:23:31 AM
 #1

Is there any point behind that fact Bitcoin client supplied with two executables "bitcoin" and "bitcoind"? Why it could not be single module with both functionality? Technically it seems possible. User then could see output either on server's desktop or via RPC.

Sometime user can see is just dull daemon window on the server and rejection from RPC. It is not clear either network unreachable or daemon is syncing at the moment. Could be much more friendlier if user see that client is functioning and in what particular state.
markm
Legendary
*
Offline Offline

Activity: 2940
Merit: 1090



View Profile WWW
March 13, 2013, 07:32:49 AM
 #2

For one thing, a GUI client needs a GUI, which is a massive amount of overhead for machines that have no screen, no mouse, and no keyboard...

-MarkM-

Browser-launched Crossfire client now online (select CrossCiv server for Galactic  Milieu)
Free website hosting with PHP, MySQL etc: http://hosting.knotwork.com/
Revalin
Hero Member
*****
Offline Offline

Activity: 728
Merit: 500


165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g


View Profile
March 13, 2013, 07:49:22 AM
 #3

Have your cake and eat it too:  'bitcoin-qt -server'

      War is God's way of teaching Americans geography.  --Ambrose Bierce
Bitcoin is the Devil's way of teaching geeks economics.  --Revalin 165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g
Stn (OP)
Full Member
***
Offline Offline

Activity: 227
Merit: 100


View Profile
March 13, 2013, 09:17:04 AM
 #4

Have your cake and eat it too:  'bitcoin-qt -server'
Thanks, so sweet!
smtp
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
March 13, 2013, 10:15:46 AM
 #5

For one thing, a GUI client needs a GUI, which is a massive amount of overhead for machines that have no screen, no mouse, and no keyboard...
And for the other thing? *fg*
Hmm .. you mean this GUI-overhead results in about, I guess, ~ 20% of useless allocated RAM, of the total bitcoin-qt client? *LOL*
What a huge waste of resources. :->>

I believe it was a historical design decision for "prettyness", because the old GUI (wtx) was simple relative independently coded from the remaining code - or the new GUI (qt) was independently coded such that it was easy to get a GUI-less client, too (in the case that in the future the GUI will be changed again to a different library/API) -- well, my speculations.

smtp
markm
Legendary
*
Offline Offline

Activity: 2940
Merit: 1090



View Profile WWW
March 13, 2013, 10:27:37 AM
Last edit: March 13, 2013, 11:53:36 AM by markm
 #6

Its not just RAM, its screen image, which can be scraped by keylog-and-screensrape malware; its keyboard and mouse input, which can be pirated by keylogger and mouse-emulator malware.

Its a massive attack surface best done without.

-MarkM-

Browser-launched Crossfire client now online (select CrossCiv server for Galactic  Milieu)
Free website hosting with PHP, MySQL etc: http://hosting.knotwork.com/
Killdozer
Full Member
***
Offline Offline

Activity: 203
Merit: 100



View Profile
March 13, 2013, 11:41:06 AM
 #7

What are the disadvantages? I don't actually know how much overhead the GUI has, but however much/little there is, what is the actual problem with having 2 versions?
Maybe you think that a lot of code has to be doubled, maintained in two places or so? This is of course not the case, the actual bitcoin core code is of course shared and only exists in one place (source file). Making 2 executables is just a matter of an extra project file, it is done completely automatically on full build...

justusranvier
Legendary
*
Offline Offline

Activity: 1400
Merit: 1009



View Profile
March 13, 2013, 12:14:17 PM
 #8

Is there any point behind that fact Bitcoin client supplied with two executables "bitcoin" and "bitcoind"? Why it could not be single module with both functionality? Technically it seems possible. User then could see output either on server's desktop or via RPC.
It would be better to have more separation, not less.

Only one instance of bitcoind is needed per LAN and it should run all the time as a daemon. For shared machines it shouldn't matter which user is logged on, or if anyone is logged in. Clients, on the other hand, only need to run when you want to use them and should not be shared.

If Bitcoin-Qt was stripped of the networking and blockchain functions and just became a SPV client that connects to bitcoind, and bitcoind was stripped of all wallet management functionality it would be easier to define a protocol spec and develop alternate implementations.
behindtext
Full Member
***
Offline Offline

Activity: 121
Merit: 103


View Profile WWW
March 13, 2013, 12:27:53 PM
 #9

it is common to see the separation between the underlying daemon and a gui since really do different things. per other comments, not everyone who runs a node wants to run the gui on that same machine.

bitcoin-qt might use some resources on your machine but they're not substantial. markm's point about attack surface is definitely valid since a machine where a user might want to run a gui is necessarily going to be more vulnerable to attack due to the preponderance of "large" pieces of software that frequently run on a workstation, e.g. webkit-based web browser, gecko-based email client.

per the usual with *nix operating systems, tools are designed to do a few things well and the partition between bitcoind, which does not depend on qt (a large dep), and bitcoin-qt makes fine sense.

markm
Legendary
*
Offline Offline

Activity: 2940
Merit: 1090



View Profile WWW
March 13, 2013, 12:44:41 PM
 #10

Does *coin-qt even let you turn off the stupid notification stuff, tell it not to clutter your desk with icons/widgets, stuff like that? I recall when I did run it it was a constant source of pointless distraction whether from work I was trying to do on another desktop of the GUI on the machine or even just trying to catch some television while puttering on the computer at the same time.

Or I could be partway through writing a forum post and some stupid bid for attention would happen, as if I wanted to know every time any account of any of the umpteen coin types mined a block or had some other transaction happen.

GUIs are unfortunately hard to avoid nowadays for things like browsing but can be very annoying.

I have some stupid icon at top of screen right now that seems to be a link to a web page and right-clicking it has no delete option, lefclicking it tries to visit the page, and middleclick does nothing. There were two at one point and I got rid of one somehow by dragging it somewhere and dropping it but no idea why that worked - I didn't drop it in a trashcan picture - and dragging this remaining one didn't make it go away last time I tried. Last thing I want is to fill that bar with icons for bitcoin, namecoin, devcoin, groupcoin, ixcoin, i0coin and coiledcoin just because DiabloMiner is merged-mining on p2pool somewhere in the background (neither, thankfully, blipping icons at me).

I already shut down ppcoin, bbqcoin, geistgeld and terracoin to save some RAM, and that was with all of them being daemons not qt-GUIs.

-MarkM-


Browser-launched Crossfire client now online (select CrossCiv server for Galactic  Milieu)
Free website hosting with PHP, MySQL etc: http://hosting.knotwork.com/
2112
Legendary
*
Offline Offline

Activity: 2128
Merit: 1068



View Profile
March 13, 2013, 05:09:16 PM
 #11

What are the disadvantages?
bitcoind is a functional subset of bitcoin-qt: check the function ThreadSafeAskFee(). The version with the UI actually asks and allows yes/no answer. The noUI version always answers yes.

This design mistake is called "inversion of control" and it cannot be easily fixed without significant rearchitecting of the software. It has been discussed several times on this forum, search for "inversion of control". Many people proposed totally unworkable solutions because they didn't understand the difficulty of dealing with the described problem.

Please comment, critique, criticize or ridicule BIP 2112: https://bitcointalk.org/index.php?topic=54382.0
Long-term mining prognosis: https://bitcointalk.org/index.php?topic=91101.0
justusranvier
Legendary
*
Offline Offline

Activity: 1400
Merit: 1009



View Profile
March 13, 2013, 05:23:35 PM
 #12

The easiest way to solve a difficult problem is to discover that you don't actually need to do it in the first place.

Bitcoind doesn't need the ability to generate transactions or manage wallets.
2112
Legendary
*
Offline Offline

Activity: 2128
Merit: 1068



View Profile
March 13, 2013, 05:55:42 PM
 #13

Bitcoind doesn't need the ability to generate transactions or manage wallets.
On one hand this is true. On the other hand the core development team will do everything to make sure that this doesn't happen. Please see the posts of gmaxwell regarding Stratum & Electrum (not to be confused with Stratum mining).

Dream On!


Please comment, critique, criticize or ridicule BIP 2112: https://bitcointalk.org/index.php?topic=54382.0
Long-term mining prognosis: https://bitcointalk.org/index.php?topic=91101.0
markm
Legendary
*
Offline Offline

Activity: 2940
Merit: 1090



View Profile WWW
March 13, 2013, 09:10:58 PM
 #14

If bitcoind cannot do sendcoins on behalf of shell scripts, apps, other machines on the local net, other machines anywhere that are authorised, and so on, then a walletd would be needed...

-MarkM-

Browser-launched Crossfire client now online (select CrossCiv server for Galactic  Milieu)
Free website hosting with PHP, MySQL etc: http://hosting.knotwork.com/
justusranvier
Legendary
*
Offline Offline

Activity: 1400
Merit: 1009



View Profile
March 13, 2013, 09:13:10 PM
 #15

If bitcoiond cannot do sendcoins on behalf of shell scripts, apps, other machines on the local net, other machines anywhere that are authorised, and so on, then a walletd would be needed...
I'd call it bitcoin-curses, the command line complement to bitcoin-Qt. http://en.wikipedia.org/wiki/Curses_%28programming_library%29
 
Someone could even make a libbitcoin to store common functionality between the two clients that other apps could link to directly. Actually, it looks like someone has already done something like that already.
markm
Legendary
*
Offline Offline

Activity: 2940
Merit: 1090



View Profile WWW
March 13, 2013, 09:18:05 PM
 #16

Curses! Haha.

Yeah its all very well to rail against voodoo black boxes but on another channel I am really starting to see why FellowTraveler's goal for Open Transactions is to have it be "the" finance layer that anything on the machine that touches finance goes through.

(This will all just be "opentxs sendcoinstoaddress --blockchain bitcoin --address 1234dghdtjhj --amount 5.4321") Smiley

-MarkM-


Browser-launched Crossfire client now online (select CrossCiv server for Galactic  Milieu)
Free website hosting with PHP, MySQL etc: http://hosting.knotwork.com/
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!