-
Notifications
You must be signed in to change notification settings - Fork 44
Adds new architecture diagram and update copy #152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 8 commits
2183fb0
c2c8b1a
70db1ca
96f8110
ff93b52
8940c49
65bd98f
1e6bccb
9c2eabc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
## LDK Architecture | ||
 | ||
## Architecture | ||
 | ||
|
||
LDK's core components are shown in the center box labeled `lightning`. The boxes | ||
with dotted borders are LDK's modules — these must be configured with either | ||
off-the-shelf or custom implementations that you provide. | ||
Firstly, LDK is not a daemon, but rather its own implementation of the Lightning protocol written as an SDK and designed to be compiled and executed in your application. | ||
|
||
`EventHandler` in the diagram is not so much a necessary LDK module, but instead | ||
refers to the fact that LDK generates events that the user should handle (e.g. | ||
the `PaymentReceived` event). | ||
This makes it environment agnostic, allowing you to choose your own data storage, wallet, networking stack and blockchain monitoring. In the diagram above the boxes with dotted borders are LDK's modules — these must be configured with either default or custom implementations that you provide. | ||
|
||
LDK also uses an event-driven architecture which allows for asynchronous result notification. For example you perform actions like making payments without waiting for the result and are later made aware via an event if the payment was successful or not. | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ignore if i am preempting your next step. 2-liner should probably be an answer to:
Need not be too detailed in overview section. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah the plan is to provide examples for both of these in the following PR's. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That was going to be my feedback after seeing the preview...I liked the organization of Peer management, Channel management, and Payments & Routing from the btc++ prezo. |
||
::: tip Langauge Bindings | ||
|
||
Although the core SDK is written in Rust, LDK supports many other programming languages. These include Java/Kotlin, Swift, JavaScript/TypeScript (Beta), C++ (Alpha). Check out [examples](../examples.md) to see some of the implementations out in the wild! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
earlier this picture was .png in previous revision, its back to .svg i guess.
svg are generally not considered standard and are security concern because they are executing code.
"The danger of an SVG file comes from the fact that it’s an XML that can have embedded CSS and JavaScript. The web browser will automatically run any JavaScript embedded in an SVG file. Therefore, if the script contains malicious code, it will place the user’s computer at risk."
from: https://blog.online-convert.com/svg-file-and-its-danger/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although we created this image and its not a security concern, but would prefer if its just png or jpeg for simplicity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a slight issue with the dashed strokes in that image, so I fixed and optimized it. See above 73kb SVG.
While there is certainly the possibility that malicious code can be hidden inside an SVG file, the same can be said for any other pieces of code on the site.
Also, the existing architecture page contains 20 SVG tags in its current form. Including the current architecture image.
Therefore, I don't buy that argument at all @G8XSU.
Now having said that, if we want to have a discussion about switching to PNG or JPG for images like these, that conversation should be focused on usability and load time, IMO.
I ran this through a PNG optimizer and got it down to around 35kb. And we can get similarly good results with a 2x export of the same image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly agree with @sbddesign here. Even if we want to have the performance discussion a 73kb optimized SVG is pretty good for this example and usage. I'll update to use the latest SVG provided for now and log an issue to discuss the overall strategy for image formats etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well i was just pointing out that in previous rev it was png and now it changed to svg.
As long as it is intentional and not a miss, go ahead since we are uploading these to server 👍