verymuchso
Sr. Member
Offline
Activity: 421
Merit: 250
HEAT Ledger
|
|
February 20, 2014, 10:03:41 AM |
|
JeanLuc:
I posted this a couple of days ago. I still look forward to your reply.
Currently there is no way for java clients to get notified of progress during startup (nxt.Nxt.init())
Ideally there would be a listener you could register or some sort of progress monitor. In eclipse you have the IProgressMonitor interface, such an interface would be perfect, i included a simplified example.
public interface IProgressMonitor { public void beginTask(String name, int totalWork); public void done(); public void worked(int work); }
The monitor would be provided by the user and is passed to the various startup methods. When reading the blockchain (for instance) you would call monitor.beginTask("Read blockchain", totalNumberOfBlocks) and then on each (or each 5th, 10th etc.) block read you call monitor.worked(numberOfBlocksRead). At the end you would call monitor.done().
A listener for log messages would be very nice to. I now remove the nxt.util.Logger class and replace with my own in order to display messages in the dialog that displays startup progress. Not a clean solution at all.
Thanks!
|
|
|
|
rickyjames
|
|
February 20, 2014, 10:04:14 AM |
|
Incorrect text marked with red:
Thank you. I really wanted dev review of this before blasting it out to the world.
|
|
|
|
Come-from-Beyond
Legendary
Offline
Activity: 2142
Merit: 1010
Newbie
|
|
February 20, 2014, 10:05:01 AM |
|
Dev Response RequestedAs I've mentioned prior, CoinPayments is working on adding Nxt to their offering. Please help me address this question: "I've been working on NXT some more today and looking at this page http://wiki.nxtcrypto.org/wiki/Handling_deposits it sounds like transactions aren't really "safe" and can disappear until they get 720 confirms (~12 hours). Is that right?" Yes, this is right. The same in Bitcoin. means difficult to come true instant transaction ? No.
|
|
|
|
Come-from-Beyond
Legendary
Offline
Activity: 2142
Merit: 1010
Newbie
|
|
February 20, 2014, 10:09:29 AM |
|
how far are we from decentralized P2P exchanges? I'm fixing bugs. This is not very fast coz I'm doing other things in parallel.
|
|
|
|
rickyjames
|
|
February 20, 2014, 10:12:35 AM |
|
Woah, woah, woah. I want to call a time out here for a few pages.
no problem, I understand, but at least there is some kind of reaction. Pin, thanks for understanding. The next-to-last thing I want to do here is piss you off. You are showing great organizational skills and initiative here and those are wonderful assets. I just want to slow down a little and channel all the energy you are showing. When you harness a fast moving whitewater river, you get a calm, placid, slow moving lake. But that lake has the controlled energy in it to power a city. I'm still coming back later with project funding spreadsheet links. I just need a little time to set it all up.
|
|
|
|
wesleyh
|
|
February 20, 2014, 10:12:38 AM |
|
how far are we from decentralized P2P exchanges? I'm fixing bugs. This is not very fast coz I'm doing other things in parallel. Oooh parallel chains! ;-)
|
|
|
|
salsacz
|
|
February 20, 2014, 10:13:51 AM |
|
Hey... I would like to know your take on the following... would it be a good idea for those getting prepared to establish a Nxt Asset to get funded through crowd funding platforms like https://www.startjoin.com/projects/discover/all? Think of it this way... if one issues a Nxt Asset and offers shares directly to the Nxt community... he/she would only be able to get funding from people that are already active in the Nxt community and/or from people that already own NXT. What if Nxt Asset Exchange projects were to be introduced on platforms like StartJoin? It could be clear in the terms that the gathered funds would be exchanged for corresponding shares of the respective Nxt Asset (which would be valued in NXT of course). In other words... there will be conversation about Nxt Asset projects... ability for people to participate with Bitcoin but also with fiat (StartJoin accepts PayPal)... Edit: Even if it is not a good idea for Nxt Asset Exchange projects to get funded through such platforms... maybe it would be wise for a marketing push for NXT to be added as a form of pledge. yes, NxtStarter will have: Asset funding, charity funding, Nxt projects funding, any kind of other project funding (a game, a game built on top of the Nxt network)..
|
|
|
|
abctc
Legendary
Offline
Activity: 1792
Merit: 1038
|
|
February 20, 2014, 10:19:44 AM |
|
Maybe allocate some funds to Peer Explorer. The person running it just got NXT stolen out of caches meant for node administrators. The whole cache program he's running encourages the creation of VPS nodes. Just a suggestion.
+1000
|
██████████████████████████████████████████████████ ████████████████████████████████████████████████████ ██████████████████████████████████████████████████████ ████████████████████████████████████████████████████████ ████████████████████████████████████████████████████████ ████████████████████████████████████████████████████████████████████ ████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████ ████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████ ████████████████████████████████████████████████████████████████████ | , the Next platform. Magis quam Moneta (More than a Coin) |
|
|
|
chanc3r
|
|
February 20, 2014, 10:21:10 AM |
|
´What's unethical about paying for services? If an exchange wants to list it and the payment amount is reasonable, why not?
Paying is OK, the bidder contest is wrong. Anyway, we need 3000 votes asap. https://www.mintpal.com/votingWe will be back in first place shortly I hope.
|
|
|
|
Hegemon
|
|
February 20, 2014, 10:23:04 AM |
|
´What's unethical about paying for services? If an exchange wants to list it and the payment amount is reasonable, why not?
Paying is OK, the bidder contest is wrong. Anyway, we need 3000 votes asap. https://www.mintpal.com/votingWe will be back in first place shortly I hope. 2900
|
|
|
|
Jean-Luc
|
|
February 20, 2014, 10:26:19 AM |
|
Ideally there would be a listener you could register or some sort of progress monitor. In eclipse you have the IProgressMonitor interface, such an interface would be perfect, i included a simplified example.
public interface IProgressMonitor { public void beginTask(String name, int totalWork); public void done(); public void worked(int work); }
The monitor would be provided by the user and is passed to the various startup methods. When reading the blockchain (for instance) you would call monitor.beginTask("Read blockchain", totalNumberOfBlocks) and then on each (or each 5th, 10th etc.) block read you call monitor.worked(numberOfBlocksRead). At the end you would call monitor.done().[/i]
A listener for log messages would be very nice to. I now remove the nxt.util.Logger class and replace with my own in order to display messages in the dialog that displays startup progress. Not a clean solution at all.
I will keep that in mind. I am making a lot of changes in 0.8.0. Will think about how to do it when I get to it.
|
|
|
|
xyzzyx
Sr. Member
Offline
Activity: 490
Merit: 250
I don't really come from outer space.
|
|
February 20, 2014, 10:27:42 AM |
|
The hacker conference HOPE X will be taking place at the Hotel Pennsylvania in NYC on July 18-20 of this year. There is currently a call for speakers: Call for Speakers Attention all hackers, makers, whistleblowers, artists, phone phreaks, rebels, technologists, and free thinkers everywhere! Come and share your ideas, thoughts, and passions with thousands of really bright, creative, and open-minded people in New York City this summer at HOPE X.
We have room for around 100 talks and panels covering a wide range of topics, limited only by our collective imagination. Past talks and panels have included: anonymity, surveillance and countersurveillance, social engineering, hardware hacking, cryptography, privacy, security, censorship, programming, democracy and law, digital protests, society hacking, copyright, phone phreaking and telecommunications, new technologies, all manner of experimentation, and so much more. We are constantly searching for innovative subjects and presentation formats.
http://www.2600.com/?q=content/announcing-hope-x-and-100-more-hours-hope-video-are-now-online
|
"An awful lot of code is being written ... in languages that aren't very good by people who don't know what they're doing." -- Barbara Liskov
|
|
|
Come-from-Beyond
Legendary
Offline
Activity: 2142
Merit: 1010
Newbie
|
|
February 20, 2014, 10:40:25 AM |
|
Oooh parallel chains! ;-)
No
|
|
|
|
verymuchso
Sr. Member
Offline
Activity: 421
Merit: 250
HEAT Ledger
|
|
February 20, 2014, 10:54:42 AM |
|
Ideally there would be a listener you could register or some sort of progress monitor. In eclipse you have the IProgressMonitor interface, such an interface would be perfect, i included a simplified example.
public interface IProgressMonitor { public void beginTask(String name, int totalWork); public void done(); public void worked(int work); }
The monitor would be provided by the user and is passed to the various startup methods. When reading the blockchain (for instance) you would call monitor.beginTask("Read blockchain", totalNumberOfBlocks) and then on each (or each 5th, 10th etc.) block read you call monitor.worked(numberOfBlocksRead). At the end you would call monitor.done().[/i]
A listener for log messages would be very nice to. I now remove the nxt.util.Logger class and replace with my own in order to display messages in the dialog that displays startup progress. Not a clean solution at all.
I will keep that in mind. I am making a lot of changes in 0.8.0. Will think about how to do it when I get to it. Will the interfaces for the major components (Account, Transaction, Peer etc..) stay roughly the same? Also the listener interfaces, will they remain?
|
|
|
|
bitcoinpaul
|
|
February 20, 2014, 11:08:33 AM |
|
Oooh parallel chains! ;-)
No Local Signing? Blockchain Pruning? Shrinking? Morphing? Timetravel? Come-ooooooooooon tell us-from-beyond the horizon!
|
|
|
|
Jean-Luc
|
|
February 20, 2014, 11:13:22 AM |
|
Will the interfaces for the major components (Account, Transaction, Peer etc..) stay roughly the same? Also the listener interfaces, will they remain?
Some of them. There are two big changes. First, Nxt is no longer a servlet and does not need to follow the servlet init/destroy lifecycle anymore. It is initialized reading its properties from nxt.properties instead of web.xml. If needed, it will start a PeerServlet that accepts peer-to-peer requests, an APIServlet that serves http/json API requests, and a UserServlet that supports the current NRS javascript client. You can disable all of those in the properties file, so if you are only using the Java API, and don't have a public IP on which to accept incoming peer requests, you will not be running any servlets at all. Second, I am making Block, Transaction, and Blockchain, interfaces. The current Blockchain class is a bunch of static methods, I am splitting those into BlockchainProcessor, TransactionProcessor, and Blockchain/BlockchainImpl classes. All those will be singletons instead of collections of static methods, which I believe is more flexible in the long term. Peer has also been split into Peer (an interface), PeerImpl (package-local implementation), and Peers (static methods that handle the whole set of peers). Account, Asset, Order, Alias, etc, will not change for now. In the future I will have to move them to the database, so I don't want to waste time refactoring them now only to change them again later. I will try to keep the Listener interfaces, and see how I can use them to accommodate your request for monitoring the initialization steps too.
|
|
|
|
verymuchso
Sr. Member
Offline
Activity: 421
Merit: 250
HEAT Ledger
|
|
February 20, 2014, 11:19:17 AM |
|
Will the interfaces for the major components (Account, Transaction, Peer etc..) stay roughly the same? Also the listener interfaces, will they remain?
Some of them. There are two big changes. First, Nxt is no longer a servlet and does not need to follow the servlet init/destroy lifecycle anymore. It is initialized reading its properties from nxt.properties instead of web.xml. If needed, it will start a PeerServlet that accepts peer-to-peer requests, an APIServlet that serves http/json API requests, and a UserServlet that supports the current NRS javascript client. You can disable all of those in the properties file, so if you are only using the Java API, and don't have a public IP on which to accept incoming peer requests, you will not be running any servlets at all. Second, I am making Block, Transaction, and Blockchain, interfaces. The current Blockchain class is a bunch of static methods, I am splitting those into BlockchainProcessor, TransactionProcessor, and Blockchain/BlockchainImpl classes. All those will be singletons instead of collections of static methods, which I believe is more flexible in the long term. Peer has also been split into Peer (an interface), PeerImpl (package-local implementation), and Peers (static methods that handle the whole set of peers). Account, Asset, Order, Alias, etc, will not change for now. In the future I will have to move them to the database, so I don't want to waste time refactoring them now only to change them again later. I will try to keep the Listener interfaces, and see how I can use them to accommodate your request for monitoring the initialization steps too. Sounds cool! When do you expect to release 0.8.0? Also the setup where you split out the actual peer handling and the pure blockchain interface is perfect, it would allow for even better tools to analyze the blockchain.
|
|
|
|
Come-from-Beyond
Legendary
Offline
Activity: 2142
Merit: 1010
Newbie
|
|
February 20, 2014, 11:20:39 AM |
|
Oooh parallel chains! ;-)
No Local Signing? Blockchain Pruning? Shrinking? Morphing? Timetravel? Come-ooooooooooon tell us-from-beyond the horizon! Modelling forging with leased forging power. Trying to find flaws.
|
|
|
|
FrictionlessCoin
Legendary
Offline
Activity: 868
Merit: 1000
Cryptotalk.org - Get paid for every post!
|
|
February 20, 2014, 11:24:58 AM |
|
Will the interfaces for the major components (Account, Transaction, Peer etc..) stay roughly the same? Also the listener interfaces, will they remain?
Some of them. There are two big changes. First, Nxt is no longer a servlet and does not need to follow the servlet init/destroy lifecycle anymore. It is initialized reading its properties from nxt.properties instead of web.xml. If needed, it will start a PeerServlet that accepts peer-to-peer requests, an APIServlet that serves http/json API requests, and a UserServlet that supports the current NRS javascript client. You can disable all of those in the properties file, so if you are only using the Java API, and don't have a public IP on which to accept incoming peer requests, you will not be running any servlets at all. Second, I am making Block, Transaction, and Blockchain, interfaces. The current Blockchain class is a bunch of static methods, I am splitting those into BlockchainProcessor, TransactionProcessor, and Blockchain/BlockchainImpl classes. All those will be singletons instead of collections of static methods, which I believe is more flexible in the long term. Peer has also been split into Peer (an interface), PeerImpl (package-local implementation), and Peers (static methods that handle the whole set of peers). Account, Asset, Order, Alias, etc, will not change for now. In the future I will have to move them to the database, so I don't want to waste time refactoring them now only to change them again later. I will try to keep the Listener interfaces, and see how I can use them to accommodate your request for monitoring the initialization steps too. Finally some sanity on the codebase. The original code base you couldn't make head or tails as to which request handled the client and which one handled the protocol. Finally removing all those static methods. Hopefully you remove all those static variables too! Anyway, I've seen the 0.7 code and I have to say that you've made good progress from the original horrible code. BTW, when will you folks release the source code?
|
|
|
|
verymuchso
Sr. Member
Offline
Activity: 421
Merit: 250
HEAT Ledger
|
|
February 20, 2014, 11:29:27 AM |
|
JeanLuc
You said you now use embedded jetty. My current setup is that i use embedded jetty and feed the Nxt servlet on startup to jetty. What's the setup you use for jetty? Will i still need to embed my own or will 0.8.0 take care of that?
|
|
|
|
|